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
c2fe651f
Commit
c2fe651f
authored
Jul 20, 2022
by
zhangshilong
Committed by
ChaimZhu
Jul 20, 2022
Browse files
refactor directory
parent
bc5806ba
Changes
275
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
83 additions
and
75 deletions
+83
-75
mmdet3d/models/task_modules/coders/pgd_bbox_coder.py
mmdet3d/models/task_modules/coders/pgd_bbox_coder.py
+0
-0
mmdet3d/models/task_modules/coders/point_xyzwhlr_bbox_coder.py
...3d/models/task_modules/coders/point_xyzwhlr_bbox_coder.py
+1
-1
mmdet3d/models/task_modules/coders/smoke_bbox_coder.py
mmdet3d/models/task_modules/coders/smoke_bbox_coder.py
+1
-1
mmdet3d/models/task_modules/samplers/__init__.py
mmdet3d/models/task_modules/samplers/__init__.py
+14
-0
mmdet3d/models/task_modules/samplers/iou_neg_piecewise_sampler.py
...models/task_modules/samplers/iou_neg_piecewise_sampler.py
+0
-0
mmdet3d/models/task_modules/samplers/pseudosample.py
mmdet3d/models/task_modules/samplers/pseudosample.py
+1
-1
mmdet3d/models/task_modules/voxel/__init__.py
mmdet3d/models/task_modules/voxel/__init__.py
+0
-0
mmdet3d/models/task_modules/voxel/builder.py
mmdet3d/models/task_modules/voxel/builder.py
+0
-0
mmdet3d/models/task_modules/voxel/voxel_generator.py
mmdet3d/models/task_modules/voxel/voxel_generator.py
+0
-0
mmdet3d/models/test_time_augs/__init__.py
mmdet3d/models/test_time_augs/__init__.py
+4
-0
mmdet3d/models/test_time_augs/merge_augs.py
mmdet3d/models/test_time_augs/merge_augs.py
+5
-5
mmdet3d/models/utils/__init__.py
mmdet3d/models/utils/__init__.py
+7
-3
mmdet3d/models/utils/add_prefix.py
mmdet3d/models/utils/add_prefix.py
+0
-2
mmdet3d/models/utils/gaussian.py
mmdet3d/models/utils/gaussian.py
+0
-0
mmdet3d/models/utils/gen_keypoints.py
mmdet3d/models/utils/gen_keypoints.py
+1
-1
mmdet3d/ops/__init__.py
mmdet3d/ops/__init__.py
+0
-48
mmdet3d/registry.py
mmdet3d/registry.py
+0
-0
mmdet3d/registry/__init__.py
mmdet3d/registry/__init__.py
+0
-13
mmdet3d/structures/__init__.py
mmdet3d/structures/__init__.py
+49
-0
mmdet3d/structures/bbox_3d/__init__.py
mmdet3d/structures/bbox_3d/__init__.py
+0
-0
No files found.
mmdet3d/
core/bbox
/coders/pgd_bbox_coder.py
→
mmdet3d/
models/task_modules
/coders/pgd_bbox_coder.py
View file @
c2fe651f
File moved
mmdet3d/
core/bbox
/coders/point_xyzwhlr_bbox_coder.py
→
mmdet3d/
models/task_modules
/coders/point_xyzwhlr_bbox_coder.py
View file @
c2fe651f
...
@@ -3,7 +3,7 @@ import numpy as np
...
@@ -3,7 +3,7 @@ import numpy as np
import
torch
import
torch
from
mmdet3d.registry
import
TASK_UTILS
from
mmdet3d.registry
import
TASK_UTILS
from
mmdet.
core.bbox
import
BaseBBoxCoder
from
mmdet.
models.task_modules
import
BaseBBoxCoder
@
TASK_UTILS
.
register_module
()
@
TASK_UTILS
.
register_module
()
...
...
mmdet3d/
core/bbox
/coders/smoke_bbox_coder.py
→
mmdet3d/
models/task_modules
/coders/smoke_bbox_coder.py
View file @
c2fe651f
...
@@ -3,7 +3,7 @@ import numpy as np
...
@@ -3,7 +3,7 @@ import numpy as np
import
torch
import
torch
from
mmdet3d.registry
import
TASK_UTILS
from
mmdet3d.registry
import
TASK_UTILS
from
mmdet.
core.bbox
import
BaseBBoxCoder
from
mmdet.
models.task_modules
import
BaseBBoxCoder
@
TASK_UTILS
.
register_module
()
@
TASK_UTILS
.
register_module
()
...
...
mmdet3d/
core/bbox
/samplers/__init__.py
→
mmdet3d/
models/task_modules
/samplers/__init__.py
View file @
c2fe651f
# Copyright (c) OpenMMLab. All rights reserved.
# Copyright (c) OpenMMLab. All rights reserved.
from
mmdet.core.bbox.samplers
import
(
BaseSampler
,
CombinedSampler
,
from
mmdet.models.task_modules.samplers
import
(
BaseSampler
,
CombinedSampler
,
InstanceBalancedPosSampler
,
InstanceBalancedPosSampler
,
IoUBalancedNegSampler
,
OHEMSampler
,
IoUBalancedNegSampler
,
RandomSampler
,
SamplingResult
)
OHEMSampler
,
RandomSampler
,
SamplingResult
)
from
.iou_neg_piecewise_sampler
import
IoUNegPiecewiseSampler
from
.iou_neg_piecewise_sampler
import
IoUNegPiecewiseSampler
from
.pseudosample
import
PseudoSampler
from
.pseudosample
import
PseudoSampler
...
...
mmdet3d/
core/bbox
/samplers/iou_neg_piecewise_sampler.py
→
mmdet3d/
models/task_modules
/samplers/iou_neg_piecewise_sampler.py
View file @
c2fe651f
File moved
mmdet3d/
core/bbox
/samplers/pseudosample.py
→
mmdet3d/
models/task_modules
/samplers/pseudosample.py
View file @
c2fe651f
...
@@ -3,7 +3,7 @@ import torch
...
@@ -3,7 +3,7 @@ import torch
from
mmengine.data
import
InstanceData
from
mmengine.data
import
InstanceData
from
mmdet3d.registry
import
TASK_UTILS
from
mmdet3d.registry
import
TASK_UTILS
from
mmdet.
core.bbox.assigner
s
import
AssignResult
from
mmdet.
models.task_module
s
import
AssignResult
from
..samplers
import
BaseSampler
,
SamplingResult
from
..samplers
import
BaseSampler
,
SamplingResult
...
...
mmdet3d/
core
/voxel/__init__.py
→
mmdet3d/
models/task_modules
/voxel/__init__.py
View file @
c2fe651f
File moved
mmdet3d/
core
/voxel/builder.py
→
mmdet3d/
models/task_modules
/voxel/builder.py
View file @
c2fe651f
File moved
mmdet3d/
core
/voxel/voxel_generator.py
→
mmdet3d/
models/task_modules
/voxel/voxel_generator.py
View file @
c2fe651f
File moved
mmdet3d/
core/evaluation/kitti_util
s/__init__.py
→
mmdet3d/
models/test_time_aug
s/__init__.py
View file @
c2fe651f
# Copyright (c) OpenMMLab. All rights reserved.
# Copyright (c) OpenMMLab. All rights reserved.
from
.
eval
import
kitti_eval
,
kitti_eval_coco_style
from
.
merge_augs
import
merge_aug_bboxes_3d
__all__
=
[
'
kitti_eval'
,
'kitti_eval_coco_style
'
]
__all__
=
[
'
merge_aug_bboxes_3d
'
]
mmdet3d/
core/post_processing
/merge_augs.py
→
mmdet3d/
models/test_time_augs
/merge_augs.py
View file @
c2fe651f
# Copyright (c) OpenMMLab. All rights reserved.
# Copyright (c) OpenMMLab. All rights reserved.
import
torch
import
torch
from
mmdet3d.
core.post_processing
import
nms_bev
,
nms_normal_bev
from
mmdet3d.
structures
import
bbox3d2result
,
bbox3d_mapping_back
,
xywhr2xyxyr
from
..
bbox
import
bbox3d2result
,
bbox3d_mapping_back
,
xywhr2xyxyr
from
..
layers
import
nms_bev
,
nms_normal_bev
def
merge_aug_bboxes_3d
(
aug_results
,
aug_batch_input_metas
,
test_cfg
):
def
merge_aug_bboxes_3d
(
aug_results
,
aug_batch_input_metas
,
test_cfg
):
...
@@ -12,7 +12,7 @@ def merge_aug_bboxes_3d(aug_results, aug_batch_input_metas, test_cfg):
...
@@ -12,7 +12,7 @@ def merge_aug_bboxes_3d(aug_results, aug_batch_input_metas, test_cfg):
aug_results (list[dict]): The dict of detection results.
aug_results (list[dict]): The dict of detection results.
The dict contains the following keys
The dict contains the following keys
- bbox
es
_3d (:obj:`BaseInstance3DBoxes`): Detection bbox.
- bbox_3d (:obj:`BaseInstance3DBoxes`): Detection bbox.
- scores_3d (torch.Tensor): Detection scores.
- scores_3d (torch.Tensor): Detection scores.
- labels_3d (torch.Tensor): Predicted box labels.
- labels_3d (torch.Tensor): Predicted box labels.
img_metas (list[dict]): Meta information of each sample.
img_metas (list[dict]): Meta information of each sample.
...
@@ -21,7 +21,7 @@ def merge_aug_bboxes_3d(aug_results, aug_batch_input_metas, test_cfg):
...
@@ -21,7 +21,7 @@ def merge_aug_bboxes_3d(aug_results, aug_batch_input_metas, test_cfg):
Returns:
Returns:
dict: Bounding boxes results in cpu mode, containing merged results.
dict: Bounding boxes results in cpu mode, containing merged results.
- bbox
es
_3d (:obj:`BaseInstance3DBoxes`): Merged detection bbox.
- bbox_3d (:obj:`BaseInstance3DBoxes`): Merged detection bbox.
- scores_3d (torch.Tensor): Merged detection scores.
- scores_3d (torch.Tensor): Merged detection scores.
- labels_3d (torch.Tensor): Merged predicted box labels.
- labels_3d (torch.Tensor): Merged predicted box labels.
"""
"""
...
@@ -41,7 +41,7 @@ def merge_aug_bboxes_3d(aug_results, aug_batch_input_metas, test_cfg):
...
@@ -41,7 +41,7 @@ def merge_aug_bboxes_3d(aug_results, aug_batch_input_metas, test_cfg):
pcd_vertical_flip
=
input_info
[
'pcd_vertical_flip'
]
pcd_vertical_flip
=
input_info
[
'pcd_vertical_flip'
]
recovered_scores
.
append
(
bboxes
[
'scores_3d'
])
recovered_scores
.
append
(
bboxes
[
'scores_3d'
])
recovered_labels
.
append
(
bboxes
[
'labels_3d'
])
recovered_labels
.
append
(
bboxes
[
'labels_3d'
])
bboxes
=
bbox3d_mapping_back
(
bboxes
[
'bbox
es
_3d'
],
scale_factor
,
bboxes
=
bbox3d_mapping_back
(
bboxes
[
'bbox_3d'
],
scale_factor
,
pcd_horizontal_flip
,
pcd_vertical_flip
)
pcd_horizontal_flip
,
pcd_vertical_flip
)
recovered_bboxes
.
append
(
bboxes
)
recovered_bboxes
.
append
(
bboxes
)
...
...
mmdet3d/models/utils/__init__.py
View file @
c2fe651f
# Copyright (c) OpenMMLab. All rights reserved.
# Copyright (c) OpenMMLab. All rights reserved.
from
.add_prefix
import
add_prefix
from
.clip_sigmoid
import
clip_sigmoid
from
.clip_sigmoid
import
clip_sigmoid
from
.edge_indices
import
get_edge_indices
from
.edge_indices
import
get_edge_indices
from
.gaussian
import
(
draw_heatmap_gaussian
,
ellip_gaussian2D
,
gaussian_2d
,
gaussian_radius
,
get_ellip_gaussian_2D
)
from
.gen_keypoints
import
get_keypoints
from
.gen_keypoints
import
get_keypoints
from
.handle_objs
import
filter_outside_objs
,
handle_proj_objs
from
.handle_objs
import
filter_outside_objs
,
handle_proj_objs
from
.mlp
import
MLP
__all__
=
[
__all__
=
[
'clip_sigmoid'
,
'MLP'
,
'get_edge_indices'
,
'filter_outside_objs'
,
'clip_sigmoid'
,
'get_edge_indices'
,
'filter_outside_objs'
,
'handle_proj_objs'
,
'get_keypoints'
'handle_proj_objs'
,
'get_keypoints'
,
'gaussian_2d'
,
'draw_heatmap_gaussian'
,
'gaussian_radius'
,
'get_ellip_gaussian_2D'
,
'ellip_gaussian2D'
,
'add_prefix'
]
]
mmdet3d/
core
/utils/
misc
.py
→
mmdet3d/
models
/utils/
add_prefix
.py
View file @
c2fe651f
# Copyright (c) OpenMMLab. All rights reserved.
# Copyright (c) OpenMMLab. All rights reserved.
def
add_prefix
(
inputs
,
prefix
):
def
add_prefix
(
inputs
,
prefix
):
"""Add prefix for dict.
"""Add prefix for dict.
...
...
mmdet3d/
core
/utils/gaussian.py
→
mmdet3d/
models
/utils/gaussian.py
View file @
c2fe651f
File moved
mmdet3d/models/utils/gen_keypoints.py
View file @
c2fe651f
# Copyright (c) OpenMMLab. All rights reserved.
# Copyright (c) OpenMMLab. All rights reserved.
import
torch
import
torch
from
mmdet3d.
core.bbox
import
points_cam2img
from
mmdet3d.
structures
import
points_cam2img
def
get_keypoints
(
gt_bboxes_3d_list
,
def
get_keypoints
(
gt_bboxes_3d_list
,
...
...
mmdet3d/ops/__init__.py
deleted
100644 → 0
View file @
bc5806ba
# Copyright (c) OpenMMLab. All rights reserved.
from
mmcv.ops
import
(
RoIAlign
,
SigmoidFocalLoss
,
get_compiler_version
,
get_compiling_cuda_version
,
nms
,
roi_align
,
sigmoid_focal_loss
)
from
mmcv.ops.assign_score_withk
import
assign_score_withk
from
mmcv.ops.ball_query
import
ball_query
from
mmcv.ops.furthest_point_sample
import
(
furthest_point_sample
,
furthest_point_sample_with_dist
)
from
mmcv.ops.gather_points
import
gather_points
from
mmcv.ops.group_points
import
GroupAll
,
QueryAndGroup
,
grouping_operation
from
mmcv.ops.knn
import
knn
from
mmcv.ops.points_in_boxes
import
(
points_in_boxes_all
,
points_in_boxes_cpu
,
points_in_boxes_part
)
from
mmcv.ops.points_sampler
import
PointsSampler
as
Points_Sampler
from
mmcv.ops.roiaware_pool3d
import
RoIAwarePool3d
from
mmcv.ops.roipoint_pool3d
import
RoIPointPool3d
from
mmcv.ops.scatter_points
import
DynamicScatter
,
dynamic_scatter
from
mmcv.ops.three_interpolate
import
three_interpolate
from
mmcv.ops.three_nn
import
three_nn
from
mmcv.ops.voxelize
import
Voxelization
,
voxelization
from
.dgcnn_modules
import
DGCNNFAModule
,
DGCNNFPModule
,
DGCNNGFModule
from
.norm
import
NaiveSyncBatchNorm1d
,
NaiveSyncBatchNorm2d
from
.paconv
import
PAConv
,
PAConvCUDA
from
.pointnet_modules
import
(
PAConvCUDASAModule
,
PAConvCUDASAModuleMSG
,
PAConvSAModule
,
PAConvSAModuleMSG
,
PointFPModule
,
PointSAModule
,
PointSAModuleMSG
,
build_sa_module
)
from
.sparse_block
import
(
SparseBasicBlock
,
SparseBottleneck
,
make_sparse_convmodule
)
__all__
=
[
'nms'
,
'soft_nms'
,
'RoIAlign'
,
'roi_align'
,
'get_compiler_version'
,
'get_compiling_cuda_version'
,
'NaiveSyncBatchNorm1d'
,
'NaiveSyncBatchNorm2d'
,
'batched_nms'
,
'Voxelization'
,
'voxelization'
,
'dynamic_scatter'
,
'DynamicScatter'
,
'sigmoid_focal_loss'
,
'SigmoidFocalLoss'
,
'SparseBasicBlock'
,
'SparseBottleneck'
,
'RoIAwarePool3d'
,
'points_in_boxes_part'
,
'points_in_boxes_cpu'
,
'make_sparse_convmodule'
,
'ball_query'
,
'knn'
,
'furthest_point_sample'
,
'furthest_point_sample_with_dist'
,
'three_interpolate'
,
'three_nn'
,
'gather_points'
,
'grouping_operation'
,
'GroupAll'
,
'QueryAndGroup'
,
'PointSAModule'
,
'PointSAModuleMSG'
,
'PointFPModule'
,
'DGCNNFPModule'
,
'DGCNNGFModule'
,
'DGCNNFAModule'
,
'points_in_boxes_all'
,
'get_compiler_version'
,
'assign_score_withk'
,
'get_compiling_cuda_version'
,
'Points_Sampler'
,
'build_sa_module'
,
'PAConv'
,
'PAConvCUDA'
,
'PAConvSAModuleMSG'
,
'PAConvSAModule'
,
'PAConvCUDASAModule'
,
'PAConvCUDASAModuleMSG'
,
'RoIPointPool3d'
]
mmdet3d/registry
/registry
.py
→
mmdet3d/registry.py
View file @
c2fe651f
File moved
mmdet3d/registry/__init__.py
deleted
100644 → 0
View file @
bc5806ba
# Copyright (c) OpenMMLab. All rights reserved.
from
.registry
import
(
DATA_SAMPLERS
,
DATASETS
,
HOOKS
,
LOOPS
,
METRICS
,
MODEL_WRAPPERS
,
MODELS
,
OPTIM_WRAPPER_CONSTRUCTORS
,
OPTIMIZERS
,
PARAM_SCHEDULERS
,
RUNNER_CONSTRUCTORS
,
RUNNERS
,
TASK_UTILS
,
TRANSFORMS
,
VISBACKENDS
,
VISUALIZERS
,
WEIGHT_INITIALIZERS
)
__all__
=
[
'RUNNERS'
,
'RUNNER_CONSTRUCTORS'
,
'HOOKS'
,
'DATASETS'
,
'DATA_SAMPLERS'
,
'TRANSFORMS'
,
'MODELS'
,
'WEIGHT_INITIALIZERS'
,
'OPTIMIZERS'
,
'OPTIM_WRAPPER_CONSTRUCTORS'
,
'TASK_UTILS'
,
'PARAM_SCHEDULERS'
,
'METRICS'
,
'MODEL_WRAPPERS'
,
'LOOPS'
,
'VISBACKENDS'
,
'VISUALIZERS'
]
mmdet3d/structures/__init__.py
0 → 100644
View file @
c2fe651f
# Copyright (c) OpenMMLab. All rights reserved.
from
.bbox_3d
import
(
BaseInstance3DBoxes
,
Box3DMode
,
CameraInstance3DBoxes
,
Coord3DMode
,
DepthInstance3DBoxes
,
LiDARInstance3DBoxes
,
get_box_type
,
get_proj_mat_by_coord_type
,
limit_period
,
mono_cam_box2vis
,
points_cam2img
,
points_img2cam
,
rotation_3d_in_axis
,
xywhr2xyxyr
)
from
.det3d_data_sample
import
Det3DDataSample
# yapf: disable
from
.ops
import
(
AxisAlignedBboxOverlaps3D
,
BboxOverlaps3D
,
BboxOverlapsNearest3D
,
axis_aligned_bbox_overlaps_3d
,
bbox3d2result
,
bbox3d2roi
,
bbox3d_mapping_back
,
bbox_overlaps_3d
,
bbox_overlaps_nearest_3d
,
box2d_to_corner_jit
,
box3d_to_bbox
,
box_camera_to_lidar
,
boxes3d_to_corners3d_lidar
,
camera_to_lidar
,
center_to_corner_box2d
,
center_to_corner_box3d
,
center_to_minmax_2d
,
corner_to_standup_nd_jit
,
corner_to_surfaces_3d
,
corner_to_surfaces_3d_jit
,
corners_nd
,
create_anchors_3d_range
,
depth_to_lidar_points
,
depth_to_points
,
get_frustum
,
iou_jit
,
minmax_to_corner_2d
,
points_in_convex_polygon_3d_jit
,
points_in_convex_polygon_jit
,
points_in_rbbox
,
projection_matrix_to_CRT_kitti
,
rbbox2d_to_near_bbox
,
remove_outside_points
,
rotation_points_single_angle
,
surface_equ_3d
)
# yapf: enable
from
.point_data
import
PointData
from
.points
import
BasePoints
,
CameraPoints
,
DepthPoints
,
LiDARPoints
__all__
=
[
'BasePoints'
,
'CameraPoints'
,
'DepthPoints'
,
'LiDARPoints'
,
'Det3DDataSample'
,
'PointData'
,
'Box3DMode'
,
'BaseInstance3DBoxes'
,
'LiDARInstance3DBoxes'
,
'CameraInstance3DBoxes'
,
'DepthInstance3DBoxes'
,
'xywhr2xyxyr'
,
'get_box_type'
,
'rotation_3d_in_axis'
,
'limit_period'
,
'points_cam2img'
,
'points_img2cam'
,
'Coord3DMode'
,
'mono_cam_box2vis'
,
'get_proj_mat_by_coord_type'
,
'box2d_to_corner_jit'
,
'box3d_to_bbox'
,
'box_camera_to_lidar'
,
'boxes3d_to_corners3d_lidar'
,
'camera_to_lidar'
,
'center_to_corner_box2d'
,
'center_to_corner_box3d'
,
'center_to_minmax_2d'
,
'corner_to_standup_nd_jit'
,
'corner_to_surfaces_3d'
,
'corner_to_surfaces_3d_jit'
,
'corners_nd'
,
'create_anchors_3d_range'
,
'depth_to_lidar_points'
,
'depth_to_points'
,
'get_frustum'
,
'iou_jit'
,
'minmax_to_corner_2d'
,
'points_in_convex_polygon_3d_jit'
,
'points_in_convex_polygon_jit'
,
'points_in_rbbox'
,
'projection_matrix_to_CRT_kitti'
,
'rbbox2d_to_near_bbox'
,
'remove_outside_points'
,
'rotation_points_single_angle'
,
'surface_equ_3d'
,
'BboxOverlapsNearest3D'
,
'BboxOverlaps3D'
,
'bbox_overlaps_nearest_3d'
,
'bbox_overlaps_3d'
,
'AxisAlignedBboxOverlaps3D'
,
'axis_aligned_bbox_overlaps_3d'
,
'bbox3d_mapping_back'
,
'bbox3d2roi'
,
'bbox3d2result'
]
mmdet3d/
core/bbox/
structures/__init__.py
→
mmdet3d/structures/
bbox_3d/
__init__.py
View file @
c2fe651f
File moved
Prev
1
…
5
6
7
8
9
10
11
12
13
14
Next
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