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
70980ad6
Unverified
Commit
70980ad6
authored
Oct 11, 2020
by
Wenwei Zhang
Committed by
GitHub
Oct 11, 2020
Browse files
[Fix]: fix image pad shape bug in PointFusion (#162)
parent
2492836b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
mmdet3d/models/detectors/mvx_two_stage.py
mmdet3d/models/detectors/mvx_two_stage.py
+6
-1
mmdet3d/models/fusion_layers/point_fusion.py
mmdet3d/models/fusion_layers/point_fusion.py
+1
-4
No files found.
mmdet3d/models/detectors/mvx_two_stage.py
View file @
70980ad6
...
...
@@ -170,7 +170,12 @@ class MVXTwoStageDetector(Base3DDetector):
def
extract_img_feat
(
self
,
img
,
img_metas
):
"""Extract features of images."""
if
self
.
with_img_backbone
:
if
self
.
with_img_backbone
and
img
is
not
None
:
input_shape
=
img
.
shape
[
-
2
:]
# update real input shape of each single img
for
img_meta
in
img_metas
:
img_meta
.
update
(
input_shape
=
input_shape
)
if
img
.
dim
()
==
5
and
img
.
size
(
0
)
==
1
:
img
.
squeeze_
()
elif
img
.
dim
()
==
5
and
img
.
size
(
0
)
>
1
:
...
...
mmdet3d/models/fusion_layers/point_fusion.py
View file @
70980ad6
...
...
@@ -277,9 +277,6 @@ class PointFusion(nn.Module):
for
i
in
range
(
len
(
img_metas
)):
mlvl_img_feats
=
[]
for
level
in
range
(
len
(
self
.
img_levels
)):
if
torch
.
isnan
(
img_ins
[
level
][
i
:
i
+
1
]).
any
():
import
pdb
pdb
.
set_trace
()
mlvl_img_feats
.
append
(
self
.
sample_single
(
img_ins
[
level
][
i
:
i
+
1
],
pts
[
i
][:,
:
3
],
img_metas
[
i
]))
...
...
@@ -330,7 +327,7 @@ class PointFusion(nn.Module):
pcd_scale_factor
,
pcd_flip
=
pcd_flip
,
img_flip
=
img_flip
,
img_pad_shape
=
img_meta
[
'
pad
_shape'
][:
2
],
img_pad_shape
=
img_meta
[
'
input
_shape'
][:
2
],
img_shape
=
img_meta
[
'img_shape'
][:
2
],
aligned
=
self
.
aligned
,
padding_mode
=
self
.
padding_mode
,
...
...
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