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
ab8644ea
"examples/vscode:/vscode.git/clone" did not exist on "b57bedb7ba3f38e7e54ab3adf5ba3657cd7912a1"
Unverified
Commit
ab8644ea
authored
Apr 16, 2021
by
Yezhen Cong
Committed by
GitHub
Apr 16, 2021
Browse files
[Fix]: Fix error in four unittest functions (#453)
parent
4002f06c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
80 additions
and
82 deletions
+80
-82
configs/ssn/hv_ssn_secfpn_sbn-all_2x16_2x_lyft-3d.py
configs/ssn/hv_ssn_secfpn_sbn-all_2x16_2x_lyft-3d.py
+74
-75
tests/test_models/test_detectors.py
tests/test_models/test_detectors.py
+4
-5
tests/test_models/test_heads/test_heads.py
tests/test_models/test_heads/test_heads.py
+2
-2
No files found.
configs/ssn/hv_ssn_secfpn_sbn-all_2x16_2x_lyft-3d.py
View file @
ab8644ea
...
@@ -148,10 +148,9 @@ model = dict(
...
@@ -148,10 +148,9 @@ model = dict(
loss_weight
=
1.0
),
loss_weight
=
1.0
),
loss_bbox
=
dict
(
type
=
'SmoothL1Loss'
,
beta
=
1.0
/
9.0
,
loss_weight
=
1.0
),
loss_bbox
=
dict
(
type
=
'SmoothL1Loss'
,
beta
=
1.0
/
9.0
,
loss_weight
=
1.0
),
loss_dir
=
dict
(
loss_dir
=
dict
(
type
=
'CrossEntropyLoss'
,
use_sigmoid
=
False
,
loss_weight
=
0.2
)))
type
=
'CrossEntropyLoss'
,
use_sigmoid
=
False
,
loss_weight
=
0.2
)),
# model training and testing settings
# model training and testing settings
train_cfg
=
dict
(
train_cfg
=
dict
(
_delete_
=
True
,
_delete_
=
True
,
pts
=
dict
(
pts
=
dict
(
assigner
=
[
assigner
=
[
...
@@ -222,4 +221,4 @@ train_cfg = dict(
...
@@ -222,4 +221,4 @@ train_cfg = dict(
allowed_border
=
0
,
allowed_border
=
0
,
code_weight
=
[
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
],
code_weight
=
[
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
,
1.0
],
pos_weight
=-
1
,
pos_weight
=-
1
,
debug
=
False
))
debug
=
False
))
)
tests/test_models/test_detectors.py
View file @
ab8644ea
...
@@ -136,19 +136,18 @@ def test_3dssd():
...
@@ -136,19 +136,18 @@ def test_3dssd():
gt_bbox_0
=
DepthInstance3DBoxes
(
torch
.
rand
([
10
,
7
],
device
=
'cuda'
))
gt_bbox_0
=
DepthInstance3DBoxes
(
torch
.
rand
([
10
,
7
],
device
=
'cuda'
))
gt_bbox_1
=
DepthInstance3DBoxes
(
torch
.
rand
([
10
,
7
],
device
=
'cuda'
))
gt_bbox_1
=
DepthInstance3DBoxes
(
torch
.
rand
([
10
,
7
],
device
=
'cuda'
))
gt_bboxes
=
[
gt_bbox_0
,
gt_bbox_1
]
gt_bboxes
=
[
gt_bbox_0
,
gt_bbox_1
]
gt_labels_0
=
torch
.
randint
(
0
,
10
,
[
10
],
device
=
'cuda'
)
gt_labels_0
=
torch
.
zeros
(
[
10
],
device
=
'cuda'
)
.
long
()
gt_labels_1
=
torch
.
randint
(
0
,
10
,
[
10
],
device
=
'cuda'
)
gt_labels_1
=
torch
.
zeros
(
[
10
],
device
=
'cuda'
)
.
long
()
gt_labels
=
[
gt_labels_0
,
gt_labels_1
]
gt_labels
=
[
gt_labels_0
,
gt_labels_1
]
# test forward_train
# test forward_train
losses
=
self
.
forward_train
(
points
,
img_metas
,
gt_bboxes
,
gt_labels
)
losses
=
self
.
forward_train
(
points
,
img_metas
,
gt_bboxes
,
gt_labels
)
assert
losses
[
'vote_loss'
]
>=
0
assert
losses
[
'vote_loss'
]
>=
0
assert
losses
[
'objectness_loss'
]
>=
0
assert
losses
[
'centerness_loss'
]
>=
0
assert
losses
[
'semantic_loss'
]
>=
0
assert
losses
[
'center_loss'
]
>=
0
assert
losses
[
'center_loss'
]
>=
0
assert
losses
[
'dir_class_loss'
]
>=
0
assert
losses
[
'dir_class_loss'
]
>=
0
assert
losses
[
'dir_res_loss'
]
>=
0
assert
losses
[
'dir_res_loss'
]
>=
0
assert
losses
[
'
size_class
_loss'
]
>=
0
assert
losses
[
'
corner
_loss'
]
>=
0
assert
losses
[
'size_res_loss'
]
>=
0
assert
losses
[
'size_res_loss'
]
>=
0
# test simple_test
# test simple_test
...
...
tests/test_models/test_heads/test_heads.py
View file @
ab8644ea
...
@@ -593,7 +593,7 @@ def test_h3d_head():
...
@@ -593,7 +593,7 @@ def test_h3d_head():
pytest
.
skip
(
'test requires GPU and torch+cuda'
)
pytest
.
skip
(
'test requires GPU and torch+cuda'
)
_setup_seed
(
0
)
_setup_seed
(
0
)
h3d_head_cfg
=
_get_roi_head_cfg
(
'h3dnet/h3dnet_
8x3
_scannet-3d-18class.py'
)
h3d_head_cfg
=
_get_roi_head_cfg
(
'h3dnet/h3dnet_
3x8
_scannet-3d-18class.py'
)
num_point
=
128
num_point
=
128
num_proposal
=
64
num_proposal
=
64
...
@@ -907,7 +907,7 @@ def test_ssd3d_head():
...
@@ -907,7 +907,7 @@ def test_ssd3d_head():
assert
ret_dict
[
'dir_res'
].
shape
==
torch
.
Size
([
2
,
64
,
12
])
assert
ret_dict
[
'dir_res'
].
shape
==
torch
.
Size
([
2
,
64
,
12
])
# test loss
# test loss
points
=
[
torch
.
rand
([
4000
,
4
],
device
=
'cuda'
)
for
i
in
range
(
2
)]
points
=
[
torch
.
rand
([
4000
,
3
],
device
=
'cuda'
)
for
i
in
range
(
2
)]
gt_bbox1
=
LiDARInstance3DBoxes
(
torch
.
rand
([
5
,
7
],
device
=
'cuda'
))
gt_bbox1
=
LiDARInstance3DBoxes
(
torch
.
rand
([
5
,
7
],
device
=
'cuda'
))
gt_bbox2
=
LiDARInstance3DBoxes
(
torch
.
rand
([
5
,
7
],
device
=
'cuda'
))
gt_bbox2
=
LiDARInstance3DBoxes
(
torch
.
rand
([
5
,
7
],
device
=
'cuda'
))
gt_bboxes
=
[
gt_bbox1
,
gt_bbox2
]
gt_bboxes
=
[
gt_bbox1
,
gt_bbox2
]
...
...
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