Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
mmdetection3d
Commits
6c46cbcc
Commit
6c46cbcc
authored
Jul 09, 2020
by
zhangwenwei
Browse files
Merge branch 'refine_dataset_docstring' into 'master'
Refine dataset docstring See merge request open-mmlab/mmdet.3d!148
parents
406ce50b
cbb3162d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
24 deletions
+32
-24
mmdet3d/datasets/pipelines/dbsampler.py
mmdet3d/datasets/pipelines/dbsampler.py
+2
-2
mmdet3d/datasets/pipelines/loading.py
mmdet3d/datasets/pipelines/loading.py
+14
-9
mmdet3d/datasets/pipelines/test_time_aug.py
mmdet3d/datasets/pipelines/test_time_aug.py
+4
-4
mmdet3d/datasets/pipelines/transforms_3d.py
mmdet3d/datasets/pipelines/transforms_3d.py
+12
-9
No files found.
mmdet3d/datasets/pipelines/dbsampler.py
View file @
6c46cbcc
...
...
@@ -184,7 +184,7 @@ class DataBaseSampler(object):
Args:
gt_bboxes (np.ndarray): Ground truth bounding boxes.
gt_labels (np.ndarray):
L
abels of boxes.
gt_labels (np.ndarray):
Ground truth l
abels 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
"""
...
...
mmdet3d/datasets/pipelines/loading.py
View file @
6c46cbcc
...
...
@@ -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.
Default
s 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
,
...
...
mmdet3d/datasets/pipelines/test_time_aug.py
View file @
6c46cbcc
...
...
@@ -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. Default
s 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".
Default
s 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. Default
s 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. Default
s to
True. Note that it works only when
'flip' is turned on.
"""
...
...
mmdet3d/datasets/pipelines/transforms_3d.py
View file @
6c46cbcc
...
...
@@ -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]).
Default
s
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].
Default
s
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):
w
hether to shift height
is set by ``translation_std``. Default
s
to [0, 0, 0]
shift_height (bool):
W
hether 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]):
l
ist of class names to be kept for training
classes (list[str]):
L
ist 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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment