Skip to content
Snippets Groups Projects
Commit 6c46cbcc authored by zhangwenwei's avatar zhangwenwei
Browse files

Merge branch 'refine_dataset_docstring' into 'master'

Refine dataset docstring

See merge request open-mmlab/mmdet.3d!148
parents 406ce50b cbb3162d
Branches
Tags
No related merge requests found
......@@ -184,7 +184,7 @@ class DataBaseSampler(object):
Args:
gt_bboxes (np.ndarray): Ground truth bounding boxes.
gt_labels (np.ndarray): Labels of boxes.
gt_labels (np.ndarray): Ground truth labels of boxes.
Returns:
dict: Dict of sampled 'pseudo ground truths'.
......@@ -192,7 +192,7 @@ class DataBaseSampler(object):
- gt_labels_3d (np.ndarray): ground truths labels \
of sampled objects.
- gt_bboxes_3d (:obj:`BaseInstance3DBoxes`): \
sampled 3D bounding boxes
sampled ground truth 3D bounding boxes
- points (np.ndarray): sampled points
- group_ids (np.ndarray): ids of sampled ground truths
"""
......
......@@ -9,7 +9,12 @@ from mmdet.datasets.pipelines import LoadAnnotations
class LoadMultiViewImageFromFiles(object):
"""Load multi channel images from a list of separate channel files.
Expects results['img_filename'] to be a list of filenames
Expects results['img_filename'] to be a list of filenames.
Args:
to_float32 (bool): Whether to convert the img to float32.
Defaults to False.
color_type (str): Color type of the file. Defaults to 'unchanged'.
"""
def __init__(self, to_float32=False, color_type='unchanged'):
......@@ -66,11 +71,11 @@ class LoadPointsFromMultiSweeps(object):
This is usually used for nuScenes dataset to utilize previous sweeps.
Args:
sweeps_num (int): number of sweeps
load_dim (int): dimension number of the loaded points
sweeps_num (int): number of sweeps. Defaults to 10.
load_dim (int): dimension number of the loaded points. Defaults to 5.
file_client_args (dict): Config dict of file clients, refer to
https://github.com/open-mmlab/mmcv/blob/master/mmcv/fileio/file_client.py
for more details.
for more details. Defaults to dict(backend='disk').
"""
def __init__(self,
......@@ -236,15 +241,15 @@ class LoadPointsFromFile(object):
Load sunrgbd and scannet points from file.
Args:
shift_height (bool): Whether to use shifted height.
load_dim (int): The dimension of the loaded points.
Default: 6.
Defaults to 6.
use_dim (list[int]): Which dimensions of the points to be used.
Default: [0, 1, 2]. For KITTI dataset, set use_dim=4
or use_dim=[0, 1, 2, 3] to use the intensity dimension
Defaults to [0, 1, 2]. For KITTI dataset, set use_dim=4
or use_dim=[0, 1, 2, 3] to use the intensity dimension.
shift_height (bool): Whether to use shifted height. Defaults to False.
file_client_args (dict): Config dict of file clients, refer to
https://github.com/open-mmlab/mmcv/blob/master/mmcv/fileio/file_client.py
for more details.
for more details. Defaults to dict(backend='disk').
"""
def __init__(self,
......
......@@ -15,17 +15,17 @@ class MultiScaleFlipAug3D(object):
img_scale (tuple | list[tuple]: Images scales for resizing.
pts_scale_ratio (float | list[float]): Points scale ratios for
resizing.
flip (bool): Whether apply flip augmentation. Default: False.
flip (bool): Whether apply flip augmentation. Defaults to False.
flip_direction (str | list[str]): Flip augmentation directions
for images, options are "horizontal" and "vertical".
If flip_direction is list, multiple flip augmentations will
be applied. It has no effect when ``flip == False``.
Default: "horizontal".
Defaults to "horizontal".
pcd_horizontal_flip (bool): Whether apply horizontal flip augmentation
to point cloud. Default: True. Note that it works only when
to point cloud. Defaults to True. Note that it works only when
'flip' is turned on.
pcd_vertical_flip (bool): Whether apply vertical flip augmentation
to point cloud. Default: True. Note that it works only when
to point cloud. Defaults to True. Note that it works only when
'flip' is turned on.
"""
......
......@@ -20,11 +20,11 @@ class RandomFlip3D(RandomFlip):
sync_2d (bool, optional): Whether to apply flip according to the 2D
images. If True, it will apply the same flip as that to 2D images.
If False, it will decide whether to flip randomly and independently
to that of 2D images.
to that of 2D images. Defaults to True.
flip_ratio_bev_horizontal (float, optional): The flipping probability
in horizontal direction.
in horizontal direction. Defaults to 0.0.
flip_ratio_bev_vertical (float, optional): The flipping probability
in vertical direction.
in vertical direction. Defaults to 0.0.
"""
def __init__(self,
......@@ -119,6 +119,7 @@ class ObjectSample(object):
db_sampler (dict): Config dict of the database sampler.
sample_2d (bool): Whether to also paste 2D image patch to the images
This should be true when applying multi-modality cut-and-paste.
Defaults to False.
"""
def __init__(self, db_sampler, sample_2d=False):
......@@ -277,15 +278,16 @@ class GlobalRotScaleTrans(object):
Args:
rot_range (list[float]): Range of rotation angle.
Default to [-0.78539816, 0.78539816] (close to [-pi/4, pi/4]).
Defaults to [-0.78539816, 0.78539816] (close to [-pi/4, pi/4]).
scale_ratio_range (list[float]): Range of scale ratio.
Default to [0.95, 1.05].
Defaults to [0.95, 1.05].
translation_std (list[float]): The standard deviation of ranslation
noise. This apply random translation to a scene by a noise, which
is sampled from a gaussian distribution whose standard deviation
is set by ``translation_std``. Default to [0, 0, 0]
shift_height (bool): whether to shift height
is set by ``translation_std``. Defaults to [0, 0, 0]
shift_height (bool): Whether to shift height.
(the fourth dimension of indoor points) when scaling.
Defaults to False.
"""
def __init__(self,
......@@ -519,7 +521,7 @@ class ObjectNameFilter(object):
"""Filter GT objects by their names.
Args:
classes (list[str]): list of class names to be kept for training
classes (list[str]): List of class names to be kept for training.
"""
def __init__(self, classes):
......@@ -578,7 +580,8 @@ class IndoorPointSample(object):
points (np.ndarray): 3D Points.
num_samples (int): Number of samples to be sampled.
replace (bool): Whether the sample is with or without replacement.
return_choices (bool): Whether return choice.
Defaults to None.
return_choices (bool): Whether return choice. Defaults to False.
Returns:
tuple[np.ndarray] | np.ndarray:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment