MCPcopy Create free account
hub / github.com/OpenDriveLab/OccNet / LoadOccGTFromFile

Class LoadOccGTFromFile

projects/mmdet3d_plugin/datasets/pipelines/loading.py:7–37  ·  view source on GitHub ↗

Load multi channel images from a list of separate channel files. Expects results['img_filename'] to be a list of filenames. note that we read image in BGR style to align with opencv.imread Args: to_float32 (bool): Whether to convert the img to float32. Defaults

Source from the content-addressed store, hash-verified

5from mmdet3d.core.points import BasePoints
6from mmdet.datasets.builder import PIPELINES
7
8
9@PIPELINES.register_module()
10class LoadPointsFromMultiSweepsWithPadding(object):
11 """Load points from multiple sweeps. WILL PAD POINTS DIM TO LOAD DIM
12 This is usually used for nuScenes dataset to utilize previous sweeps.
13 Args:
14 sweeps_num (int): Number of sweeps. Defaults to 10.
15 load_dim (int): Dimension number of the loaded points. Defaults to 5.
16 use_dim (list[int]): Which dimension to use. Defaults to [0, 1, 2, 4].
17 file_client_args (dict): Config dict of file clients, refer to
18 https://github.com/open-mmlab/mmcv/blob/master/mmcv/fileio/file_client.py
19 for more details. Defaults to dict(backend='disk').
20 pad_empty_sweeps (bool): Whether to repeat keyframe when
21 sweeps is empty. Defaults to False.
22 remove_close (bool): Whether to remove close points.
23 Defaults to False.
24 test_mode (bool): If test_model=True used for testing, it will not
25 randomly sample sweeps but select the nearest N frames.
26 Defaults to False.
27 """
28
29 def __init__(self,
30 sweeps_num=10,
31 load_dim=5,
32 use_dim=[0, 1, 2, 4],
33 file_client_args=dict(backend='disk'),
34 pad_empty_sweeps=False,
35 remove_close=False,
36 test_mode=False):
37 self.load_dim = load_dim
38 self.sweeps_num = sweeps_num
39 self.use_dim = use_dim
40 self.file_client_args = file_client_args.copy()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected