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
f739803c
Commit
f739803c
authored
Jul 05, 2022
by
VVsssssk
Committed by
ChaimZhu
Jul 20, 2022
Browse files
[Fix]update pp cfg and fix MultiScaleFlipAug3D
parent
41db4eae
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
127 additions
and
84 deletions
+127
-84
configs/_base_/datasets/kitti-3d-3class.py
configs/_base_/datasets/kitti-3d-3class.py
+20
-6
configs/_base_/datasets/kitti-3d-car.py
configs/_base_/datasets/kitti-3d-car.py
+17
-3
configs/_base_/schedules/cyclic_20e.py
configs/_base_/schedules/cyclic_20e.py
+20
-17
configs/_base_/schedules/cyclic_40e.py
configs/_base_/schedules/cyclic_40e.py
+20
-17
configs/pointpillars/hv_pointpillars_secfpn_6x8_160e_kitti-3d-3class.py
...illars/hv_pointpillars_secfpn_6x8_160e_kitti-3d-3class.py
+24
-22
configs/pointpillars/hv_pointpillars_secfpn_6x8_160e_kitti-3d-car.py
...ntpillars/hv_pointpillars_secfpn_6x8_160e_kitti-3d-car.py
+13
-14
mmdet3d/datasets/pipelines/formating.py
mmdet3d/datasets/pipelines/formating.py
+5
-1
mmdet3d/datasets/pipelines/test_time_aug.py
mmdet3d/datasets/pipelines/test_time_aug.py
+2
-0
mmdet3d/metrics/kitti_metric.py
mmdet3d/metrics/kitti_metric.py
+1
-1
mmdet3d/models/detectors/base.py
mmdet3d/models/detectors/base.py
+3
-2
mmdet3d/models/detectors/single_stage.py
mmdet3d/models/detectors/single_stage.py
+2
-1
No files found.
configs/_base_/datasets/kitti-3d-3class.py
View file @
f739803c
...
@@ -71,9 +71,9 @@ test_pipeline = [
...
@@ -71,9 +71,9 @@ test_pipeline = [
translation_std
=
[
0
,
0
,
0
]),
translation_std
=
[
0
,
0
,
0
]),
dict
(
type
=
'RandomFlip3D'
),
dict
(
type
=
'RandomFlip3D'
),
dict
(
dict
(
type
=
'PointsRangeFilter'
,
point_cloud_range
=
point_cloud_range
)
,
type
=
'PointsRangeFilter'
,
point_cloud_range
=
point_cloud_range
)
dict
(
type
=
'Pack3DDetInputs'
,
keys
=
[
'points'
]),
]),
])
dict
(
type
=
'Pack3DDetInputs'
,
keys
=
[
'points'
])
]
]
# construct a pipeline for data and gt loading in show function
# construct a pipeline for data and gt loading in show function
# please keep its loading function consistent with test_pipeline (e.g. client)
# please keep its loading function consistent with test_pipeline (e.g. client)
...
@@ -117,13 +117,27 @@ val_dataloader = dict(
...
@@ -117,13 +117,27 @@ val_dataloader = dict(
data_root
=
data_root
,
data_root
=
data_root
,
data_prefix
=
dict
(
pts
=
'training/velodyne_reduced'
),
data_prefix
=
dict
(
pts
=
'training/velodyne_reduced'
),
ann_file
=
'kitti_infos_val.pkl'
,
ann_file
=
'kitti_infos_val.pkl'
,
pipeline
=
eval_pipeline
,
pipeline
=
test_pipeline
,
modality
=
input_modality
,
test_mode
=
True
,
metainfo
=
metainfo
,
box_type_3d
=
'LiDAR'
))
test_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
1
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
data_prefix
=
dict
(
pts
=
'training/velodyne_reduced'
),
ann_file
=
'kitti_infos_val.pkl'
,
pipeline
=
test_pipeline
,
modality
=
input_modality
,
modality
=
input_modality
,
test_mode
=
True
,
test_mode
=
True
,
metainfo
=
metainfo
,
metainfo
=
metainfo
,
box_type_3d
=
'LiDAR'
))
box_type_3d
=
'LiDAR'
))
test_dataloader
=
val_dataloader
test_dataloader
[
'dataset'
][
'pipeline'
]
=
test_pipeline
val_evaluator
=
dict
(
val_evaluator
=
dict
(
type
=
'KittiMetric'
,
type
=
'KittiMetric'
,
ann_file
=
data_root
+
'kitti_infos_val.pkl'
,
ann_file
=
data_root
+
'kitti_infos_val.pkl'
,
...
...
configs/_base_/datasets/kitti-3d-car.py
View file @
f739803c
...
@@ -115,13 +115,27 @@ val_dataloader = dict(
...
@@ -115,13 +115,27 @@ val_dataloader = dict(
data_root
=
data_root
,
data_root
=
data_root
,
data_prefix
=
dict
(
pts
=
'training/velodyne_reduced'
),
data_prefix
=
dict
(
pts
=
'training/velodyne_reduced'
),
ann_file
=
'kitti_infos_val.pkl'
,
ann_file
=
'kitti_infos_val.pkl'
,
pipeline
=
eval_pipeline
,
pipeline
=
test_pipeline
,
modality
=
input_modality
,
test_mode
=
True
,
metainfo
=
metainfo
,
box_type_3d
=
'LiDAR'
))
test_dataloader
=
dict
(
batch_size
=
1
,
num_workers
=
1
,
persistent_workers
=
True
,
drop_last
=
False
,
sampler
=
dict
(
type
=
'DefaultSampler'
,
shuffle
=
False
),
dataset
=
dict
(
type
=
dataset_type
,
data_root
=
data_root
,
data_prefix
=
dict
(
pts
=
'training/velodyne_reduced'
),
ann_file
=
'kitti_infos_val.pkl'
,
pipeline
=
test_pipeline
,
modality
=
input_modality
,
modality
=
input_modality
,
test_mode
=
True
,
test_mode
=
True
,
metainfo
=
metainfo
,
metainfo
=
metainfo
,
box_type_3d
=
'LiDAR'
))
box_type_3d
=
'LiDAR'
))
test_dataloader
=
val_dataloader
test_dataloader
[
'dataset'
][
'pipeline'
]
=
test_pipeline
val_evaluator
=
dict
(
val_evaluator
=
dict
(
type
=
'KittiMetric'
,
type
=
'KittiMetric'
,
ann_file
=
data_root
+
'kitti_infos_val.pkl'
,
ann_file
=
data_root
+
'kitti_infos_val.pkl'
,
...
...
configs/_base_/schedules/cyclic_20e.py
View file @
f739803c
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
# use a default schedule.
# use a default schedule.
# optimizer
# optimizer
lr
=
1e-4
lr
=
1e-4
iter_num_in_epoch
=
3712
# This schedule is mainly used by models on nuScenes dataset
# This schedule is mainly used by models on nuScenes dataset
# max_norm=10 is better for SECOND
# max_norm=10 is better for SECOND
optim_wrapper
=
dict
(
optim_wrapper
=
dict
(
...
@@ -15,35 +14,39 @@ optim_wrapper = dict(
...
@@ -15,35 +14,39 @@ optim_wrapper = dict(
param_scheduler
=
[
param_scheduler
=
[
dict
(
dict
(
type
=
'CosineAnnealingLR'
,
type
=
'CosineAnnealingLR'
,
T_max
=
8
*
iter_num_in_epoch
,
T_max
=
8
,
eta_min
=
lr
*
10
,
eta_min
=
lr
*
10
,
by_epoch
=
False
,
begin
=
0
,
begin
=
0
,
end
=
8
*
iter_num_in_epoch
),
end
=
8
,
by_epoch
=
True
,
convert_to_iter_based
=
True
),
dict
(
dict
(
type
=
'CosineAnnealingLR'
,
type
=
'CosineAnnealingLR'
,
T_max
=
12
*
iter_num_in_epoch
,
T_max
=
12
,
eta_min
=
lr
*
1e-4
,
eta_min
=
lr
*
1e-4
,
by_epoch
=
False
,
begin
=
8
,
begin
=
8
*
iter_num_in_epoch
,
end
=
20
,
end
=
20
*
iter_num_in_epoch
),
by_epoch
=
True
,
convert_to_iter_based
=
True
),
dict
(
dict
(
type
=
'CosineAnnealingBetas'
,
type
=
'CosineAnnealingBetas'
,
T_max
=
8
*
iter_num_in_epoch
,
T_max
=
8
,
eta_min
=
0.85
/
0.95
,
eta_min
=
0.85
/
0.95
,
by_epoch
=
False
,
begin
=
0
,
begin
=
0
,
end
=
8
*
iter_num_in_epoch
),
end
=
8
,
by_epoch
=
True
,
convert_to_iter_based
=
True
),
dict
(
dict
(
type
=
'CosineAnnealingBetas'
,
type
=
'CosineAnnealingBetas'
,
T_max
=
12
*
iter_num_in_epoch
,
T_max
=
12
,
eta_min
=
1
,
eta_min
=
1
,
by_epoch
=
False
,
begin
=
8
,
begin
=
8
*
iter_num_in_epoch
,
end
=
20
,
end
=
20
*
iter_num_in_epoch
)
by_epoch
=
True
,
convert_to_iter_based
=
True
)
]
]
# runtime settings
# runtime settings
train_cfg
=
dict
(
by_epoch
=
True
,
max_epochs
=
20
)
train_cfg
=
dict
(
by_epoch
=
True
,
max_epochs
=
20
,
val_interval
=
1
)
val_cfg
=
dict
(
interval
=
1
)
val_cfg
=
dict
()
test_cfg
=
dict
()
test_cfg
=
dict
()
configs/_base_/schedules/cyclic_40e.py
View file @
f739803c
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
# rather than the max learning rate. Since the target_ratio is (10, 1e-4),
# rather than the max learning rate. Since the target_ratio is (10, 1e-4),
# the learning rate will change from 0.0018 to 0.018, than go to 0.0018*1e-4
# the learning rate will change from 0.0018 to 0.018, than go to 0.0018*1e-4
lr
=
0.0018
lr
=
0.0018
iter_num_in_epoch
=
3712
# The optimizer follows the setting in SECOND.Pytorch, but here we use
# The optimizer follows the setting in SECOND.Pytorch, but here we use
# the official AdamW optimizer implemented by PyTorch.
# the official AdamW optimizer implemented by PyTorch.
optim_wrapper
=
dict
(
optim_wrapper
=
dict
(
...
@@ -14,38 +13,42 @@ optim_wrapper = dict(
...
@@ -14,38 +13,42 @@ optim_wrapper = dict(
param_scheduler
=
[
param_scheduler
=
[
dict
(
dict
(
type
=
'CosineAnnealingLR'
,
type
=
'CosineAnnealingLR'
,
T_max
=
16
*
iter_num_in_epoch
,
T_max
=
16
,
eta_min
=
lr
*
10
,
eta_min
=
lr
*
10
,
by_epoch
=
False
,
begin
=
0
,
begin
=
0
,
end
=
16
*
iter_num_in_epoch
),
end
=
16
,
by_epoch
=
True
,
convert_to_iter_based
=
True
),
dict
(
dict
(
type
=
'CosineAnnealingLR'
,
type
=
'CosineAnnealingLR'
,
T_max
=
24
*
iter_num_in_epoch
,
T_max
=
24
,
eta_min
=
lr
*
1e-4
,
eta_min
=
lr
*
1e-4
,
by_epoch
=
False
,
begin
=
16
,
begin
=
16
*
iter_num_in_epoch
,
end
=
40
,
end
=
40
*
iter_num_in_epoch
),
by_epoch
=
True
,
convert_to_iter_based
=
True
),
dict
(
dict
(
type
=
'CosineAnnealingBetas'
,
type
=
'CosineAnnealingBetas'
,
T_max
=
16
*
iter_num_in_epoch
,
T_max
=
16
,
eta_min
=
0.85
/
0.95
,
eta_min
=
0.85
/
0.95
,
by_epoch
=
False
,
begin
=
0
,
begin
=
0
,
end
=
16
*
iter_num_in_epoch
),
end
=
16
,
by_epoch
=
True
,
convert_to_iter_based
=
True
),
dict
(
dict
(
type
=
'CosineAnnealingBetas'
,
type
=
'CosineAnnealingBetas'
,
T_max
=
24
*
iter_num_in_epoch
,
T_max
=
24
,
eta_min
=
1
,
eta_min
=
1
,
by_epoch
=
False
,
begin
=
16
,
begin
=
16
*
iter_num_in_epoch
,
end
=
40
,
end
=
40
*
iter_num_in_epoch
)
by_epoch
=
True
,
convert_to_iter_based
=
True
)
]
]
# Runtime settings,training schedule for 40e
# Runtime settings,training schedule for 40e
# Although the max_epochs is 40, this schedule is usually used we
# Although the max_epochs is 40, this schedule is usually used we
# RepeatDataset with repeat ratio N, thus the actual max epoch
# RepeatDataset with repeat ratio N, thus the actual max epoch
# number could be Nx40
# number could be Nx40
train_cfg
=
dict
(
by_epoch
=
True
,
max_epochs
=
40
)
train_cfg
=
dict
(
by_epoch
=
True
,
max_epochs
=
40
,
val_interval
=
1
)
val_cfg
=
dict
(
interval
=
1
)
val_cfg
=
dict
()
test_cfg
=
dict
()
test_cfg
=
dict
()
configs/pointpillars/hv_pointpillars_secfpn_6x8_160e_kitti-3d-3class.py
View file @
f739803c
...
@@ -52,51 +52,53 @@ test_pipeline = [
...
@@ -52,51 +52,53 @@ test_pipeline = [
translation_std
=
[
0
,
0
,
0
]),
translation_std
=
[
0
,
0
,
0
]),
dict
(
type
=
'RandomFlip3D'
),
dict
(
type
=
'RandomFlip3D'
),
dict
(
dict
(
type
=
'PointsRangeFilter'
,
point_cloud_range
=
point_cloud_range
),
type
=
'PointsRangeFilter'
,
point_cloud_range
=
point_cloud_range
)
]),
dict
(
type
=
'Pack3DDetInputs'
,
keys
=
[
'points'
])
dict
(
type
=
'Pack3DDetInputs'
,
keys
=
[
'points'
])
])
]
]
train_dataloader
=
dict
(
train_dataloader
=
dict
(
dataset
=
dict
(
dataset
=
dict
(
pipeline
=
train_pipeline
,
metainfo
=
metainfo
)))
dataset
=
dict
(
dataset
=
dict
(
pipeline
=
train_pipeline
,
metainfo
=
metainfo
)))
test_dataloader
=
dict
(
dataset
=
dict
(
metainfo
=
metainfo
))
test_dataloader
=
dict
(
dataset
=
dict
(
pipeline
=
test_pipeline
,
metainfo
=
metainfo
))
val_dataloader
=
dict
(
dataset
=
dict
(
metainfo
=
metainfo
))
val_dataloader
=
dict
(
dataset
=
dict
(
pipeline
=
test_pipeline
,
metainfo
=
metainfo
))
# In practice PointPillars also uses a different schedule
# In practice PointPillars also uses a different schedule
# optimizer
# optimizer
lr
=
0.001
lr
=
0.001
epoch_num
=
80
epoch_num
=
80
iter_num_in_epoch
=
3712
optim_wrapper
=
dict
(
optim_wrapper
=
dict
(
optimizer
=
dict
(
lr
=
lr
),
clip_grad
=
dict
(
max_norm
=
35
,
norm_type
=
2
))
optimizer
=
dict
(
lr
=
lr
),
clip_grad
=
dict
(
max_norm
=
35
,
norm_type
=
2
))
param_scheduler
=
[
param_scheduler
=
[
dict
(
dict
(
type
=
'CosineAnnealingLR'
,
type
=
'CosineAnnealingLR'
,
T_max
=
epoch_num
*
0.4
*
iter_num_in_epoch
,
T_max
=
epoch_num
*
0.4
,
eta_min
=
lr
*
10
,
eta_min
=
lr
*
10
,
by_epoch
=
False
,
begin
=
0
,
begin
=
0
,
end
=
epoch_num
*
0.4
*
iter_num_in_epoch
),
end
=
epoch_num
*
0.4
,
by_epoch
=
True
,
convert_to_iter_based
=
True
),
dict
(
dict
(
type
=
'CosineAnnealingLR'
,
type
=
'CosineAnnealingLR'
,
T_max
=
epoch_num
*
0.6
*
iter_num_in_epoch
,
T_max
=
epoch_num
*
0.6
,
eta_min
=
lr
*
1e-4
,
eta_min
=
lr
*
1e-4
,
by_epoch
=
False
,
begin
=
epoch_num
*
0.4
,
begin
=
epoch_num
*
0.4
*
iter_num_in_epoch
,
end
=
epoch_num
*
1
,
end
=
epoch_num
*
1
*
iter_num_in_epoch
),
by_epoch
=
True
,
convert_to_iter_based
=
True
),
dict
(
dict
(
type
=
'CosineAnnealingBetas'
,
type
=
'CosineAnnealingBetas'
,
T_max
=
epoch_num
*
0.4
*
iter_num_in_epoch
,
T_max
=
epoch_num
*
0.4
,
eta_min
=
0.85
/
0.95
,
eta_min
=
0.85
/
0.95
,
by_epoch
=
False
,
begin
=
0
,
begin
=
0
,
end
=
epoch_num
*
0.4
*
iter_num_in_epoch
),
end
=
epoch_num
*
0.4
,
by_epoch
=
True
,
convert_to_iter_based
=
True
),
dict
(
dict
(
type
=
'CosineAnnealingBetas'
,
type
=
'CosineAnnealingBetas'
,
T_max
=
epoch_num
*
0.6
*
iter_num_in_epoch
,
T_max
=
epoch_num
*
0.6
,
eta_min
=
1
,
eta_min
=
1
,
b
y_epoch
=
False
,
b
egin
=
epoch_num
*
0.4
,
begin
=
epoch_num
*
0.4
*
iter_num_in_epoch
,
end
=
epoch_num
*
1
,
end
=
epoch_num
*
1
*
iter_num_in_epoch
)
convert_to_iter_based
=
True
)
]
]
# max_norm=35 is slightly better than 10 for PointPillars in the earlier
# max_norm=35 is slightly better than 10 for PointPillars in the earlier
# development of the codebase thus we keep the setting. But we does not
# development of the codebase thus we keep the setting. But we does not
...
@@ -104,6 +106,6 @@ param_scheduler = [
...
@@ -104,6 +106,6 @@ param_scheduler = [
# PointPillars usually need longer schedule than second, we simply double
# PointPillars usually need longer schedule than second, we simply double
# the training schedule. Do remind that since we use RepeatDataset and
# the training schedule. Do remind that since we use RepeatDataset and
# repeat factor is 2, so we actually train 160 epochs.
# repeat factor is 2, so we actually train 160 epochs.
train_cfg
=
dict
(
by_epoch
=
True
,
max_epochs
=
epoch_num
)
train_cfg
=
dict
(
by_epoch
=
True
,
max_epochs
=
epoch_num
,
val_interval
=
2
)
val_cfg
=
dict
(
interval
=
2
)
val_cfg
=
dict
()
test_cfg
=
dict
()
test_cfg
=
dict
()
configs/pointpillars/hv_pointpillars_secfpn_6x8_160e_kitti-3d-car.py
View file @
f739803c
# model settings
# model settings
_base_
=
'./hv_pointpillars_secfpn_6x8_160e_kitti-3d-3class.py'
_base_
=
'./hv_pointpillars_secfpn_6x8_160e_kitti-3d-3class.py'
# dataset settings
dataset_type
=
'KittiDataset'
data_root
=
'data/kitti/'
class_names
=
[
'Car'
]
metainfo
=
dict
(
CLASSES
=
class_names
)
point_cloud_range
=
[
0
,
-
39.68
,
-
3
,
69.12
,
39.68
,
1
]
point_cloud_range
=
[
0
,
-
39.68
,
-
3
,
69.12
,
39.68
,
1
]
model
=
dict
(
model
=
dict
(
bbox_head
=
dict
(
bbox_head
=
dict
(
type
=
'Anchor3DHead'
,
type
=
'Anchor3DHead'
,
...
@@ -26,11 +32,7 @@ model = dict(
...
@@ -26,11 +32,7 @@ model = dict(
allowed_border
=
0
,
allowed_border
=
0
,
pos_weight
=-
1
,
pos_weight
=-
1
,
debug
=
False
))
debug
=
False
))
# dataset settings
dataset_type
=
'KittiDataset'
data_root
=
'data/kitti/'
class_names
=
[
'Car'
]
metainfo
=
dict
(
CLASSES
=
class_names
)
db_sampler
=
dict
(
db_sampler
=
dict
(
data_root
=
data_root
,
data_root
=
data_root
,
info_path
=
data_root
+
'kitti_dbinfos_train.pkl'
,
info_path
=
data_root
+
'kitti_dbinfos_train.pkl'
,
...
@@ -70,15 +72,12 @@ test_pipeline = [
...
@@ -70,15 +72,12 @@ test_pipeline = [
translation_std
=
[
0
,
0
,
0
]),
translation_std
=
[
0
,
0
,
0
]),
dict
(
type
=
'RandomFlip3D'
),
dict
(
type
=
'RandomFlip3D'
),
dict
(
dict
(
type
=
'PointsRangeFilter'
,
point_cloud_range
=
point_cloud_range
),
type
=
'PointsRangeFilter'
,
point_cloud_range
=
point_cloud_range
)
]),
dict
(
type
=
'Pack3DDetInputs'
,
keys
=
[
'points'
])
dict
(
type
=
'Pack3DDetInputs'
,
keys
=
[
'points'
])
])
]
]
train_dataloader
=
dict
(
train_dataloader
=
dict
(
dataset
=
dict
(
dataset
=
dict
(
dataset
=
dict
(
pipeline
=
train_pipeline
,
metainfo
=
metainfo
)))
type
=
'RepeatDataset'
,
test_dataloader
=
dict
(
dataset
=
dict
(
pipeline
=
test_pipeline
,
metainfo
=
metainfo
))
times
=
2
,
val_dataloader
=
dict
(
dataset
=
dict
(
pipeline
=
test_pipeline
,
metainfo
=
metainfo
))
dataset
=
dict
(
pipeline
=
train_pipeline
,
metainfo
=
metainfo
)))
test_dataloader
=
dict
(
dataset
=
dict
(
metainfo
=
metainfo
))
val_dataloader
=
dict
(
dataset
=
dict
(
metainfo
=
metainfo
))
mmdet3d/datasets/pipelines/formating.py
View file @
f739803c
...
@@ -69,6 +69,9 @@ class Pack3DDetInputs(BaseTransform):
...
@@ -69,6 +69,9 @@ class Pack3DDetInputs(BaseTransform):
"""
"""
# augtest
# augtest
if
isinstance
(
results
,
list
):
if
isinstance
(
results
,
list
):
if
len
(
results
)
==
1
:
# simple test
return
self
.
pack_single_results
(
results
[
0
])
pack_results
=
[]
pack_results
=
[]
for
single_result
in
results
:
for
single_result
in
results
:
pack_results
.
append
(
self
.
pack_single_results
(
single_result
))
pack_results
.
append
(
self
.
pack_single_results
(
single_result
))
...
@@ -113,7 +116,8 @@ class Pack3DDetInputs(BaseTransform):
...
@@ -113,7 +116,8 @@ class Pack3DDetInputs(BaseTransform):
img
=
results
[
'img'
]
img
=
results
[
'img'
]
if
len
(
img
.
shape
)
<
3
:
if
len
(
img
.
shape
)
<
3
:
img
=
np
.
expand_dims
(
img
,
-
1
)
img
=
np
.
expand_dims
(
img
,
-
1
)
results
[
'img'
]
=
np
.
ascontiguousarray
(
img
.
transpose
(
2
,
0
,
1
))
results
[
'img'
]
=
to_tensor
(
np
.
ascontiguousarray
(
img
.
transpose
(
2
,
0
,
1
)))
for
key
in
[
for
key
in
[
'proposals'
,
'gt_bboxes'
,
'gt_bboxes_ignore'
,
'gt_labels'
,
'proposals'
,
'gt_bboxes'
,
'gt_bboxes_ignore'
,
'gt_labels'
,
...
...
mmdet3d/datasets/pipelines/test_time_aug.py
View file @
f739803c
...
@@ -88,6 +88,8 @@ class MultiScaleFlipAug3D(BaseTransform):
...
@@ -88,6 +88,8 @@ class MultiScaleFlipAug3D(BaseTransform):
pcd_vertical_flip_aug
=
[
False
,
True
]
\
pcd_vertical_flip_aug
=
[
False
,
True
]
\
if
self
.
flip
and
self
.
pcd_vertical_flip
else
[
False
]
if
self
.
flip
and
self
.
pcd_vertical_flip
else
[
False
]
for
scale
in
self
.
img_scale
:
for
scale
in
self
.
img_scale
:
# TODO refactor according to augtest docs
self
.
transforms
.
transforms
[
0
].
scale
=
scale
for
pts_scale_ratio
in
self
.
pts_scale_ratio
:
for
pts_scale_ratio
in
self
.
pts_scale_ratio
:
for
flip
in
flip_aug
:
for
flip
in
flip_aug
:
for
pcd_horizontal_flip
in
pcd_horizontal_flip_aug
:
for
pcd_horizontal_flip
in
pcd_horizontal_flip_aug
:
...
...
mmdet3d/metrics/kitti_metric.py
View file @
f739803c
...
@@ -159,7 +159,7 @@ class KittiMetric(BaseMetric):
...
@@ -159,7 +159,7 @@ class KittiMetric(BaseMetric):
for
pred_result
in
pred
:
for
pred_result
in
pred
:
for
attr_name
in
pred
[
pred_result
]:
for
attr_name
in
pred
[
pred_result
]:
pred
[
pred_result
][
attr_name
]
=
pred
[
pred_result
][
pred
[
pred_result
][
attr_name
]
=
pred
[
pred_result
][
attr_name
].
to
(
'cpu'
)
attr_name
].
to
(
self
.
collect_device
)
result
[
pred_result
]
=
pred
[
pred_result
]
result
[
pred_result
]
=
pred
[
pred_result
]
sample_idx
=
data
[
'data_sample'
][
'sample_idx'
]
sample_idx
=
data
[
'data_sample'
][
'sample_idx'
]
result
[
'sample_idx'
]
=
sample_idx
result
[
'sample_idx'
]
=
sample_idx
...
...
mmdet3d/models/detectors/base.py
View file @
f739803c
...
@@ -21,9 +21,10 @@ class Base3DDetector(BaseDetector):
...
@@ -21,9 +21,10 @@ class Base3DDetector(BaseDetector):
"""
"""
def
__init__
(
self
,
def
__init__
(
self
,
data_processor
:
OptConfigType
=
None
,
data_
pre
processor
:
OptConfigType
=
None
,
init_cfg
:
OptMultiConfig
=
None
)
->
None
:
init_cfg
:
OptMultiConfig
=
None
)
->
None
:
super
().
__init__
(
data_preprocessor
=
data_processor
,
init_cfg
=
init_cfg
)
super
().
__init__
(
data_preprocessor
=
data_preprocessor
,
init_cfg
=
init_cfg
)
def
forward
(
self
,
def
forward
(
self
,
inputs
:
Union
[
dict
,
List
[
dict
]],
inputs
:
Union
[
dict
,
List
[
dict
]],
...
...
mmdet3d/models/detectors/single_stage.py
View file @
f739803c
...
@@ -42,7 +42,8 @@ class SingleStage3DDetector(Base3DDetector):
...
@@ -42,7 +42,8 @@ class SingleStage3DDetector(Base3DDetector):
test_cfg
:
OptConfigType
=
None
,
test_cfg
:
OptConfigType
=
None
,
data_preprocessor
:
OptConfigType
=
None
,
data_preprocessor
:
OptConfigType
=
None
,
init_cfg
:
OptMultiConfig
=
None
)
->
None
:
init_cfg
:
OptMultiConfig
=
None
)
->
None
:
super
().
__init__
(
data_processor
=
data_preprocessor
,
init_cfg
=
init_cfg
)
super
().
__init__
(
data_preprocessor
=
data_preprocessor
,
init_cfg
=
init_cfg
)
self
.
backbone
=
MODELS
.
build
(
backbone
)
self
.
backbone
=
MODELS
.
build
(
backbone
)
if
neck
is
not
None
:
if
neck
is
not
None
:
self
.
neck
=
MODELS
.
build
(
neck
)
self
.
neck
=
MODELS
.
build
(
neck
)
...
...
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