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
fc679dc8
Unverified
Commit
fc679dc8
authored
Oct 12, 2022
by
VVsssssk
Committed by
GitHub
Oct 12, 2022
Browse files
solve bc breaking (#1908)
parent
6d3518d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
mmdet3d/models/data_preprocessors/data_preprocessor.py
mmdet3d/models/data_preprocessors/data_preprocessor.py
+7
-5
mmdet3d/models/layers/spconv/__init__.py
mmdet3d/models/layers/spconv/__init__.py
+3
-1
No files found.
mmdet3d/models/data_preprocessors/data_preprocessor.py
View file @
fc679dc8
...
@@ -13,11 +13,9 @@ from torch.nn import functional as F
...
@@ -13,11 +13,9 @@ from torch.nn import functional as F
from
mmdet3d.registry
import
MODELS
from
mmdet3d.registry
import
MODELS
from
mmdet3d.utils
import
OptConfigType
from
mmdet3d.utils
import
OptConfigType
from
mmdet.models
import
DetDataPreprocessor
from
mmdet.models
import
DetDataPreprocessor
from
mmdet.models.utils.misc
import
samplelist_boxtype2tensor
from
.utils
import
multiview_img_stack_batch
from
.utils
import
multiview_img_stack_batch
@
MODELS
.
register_module
()
@
MODELS
.
register_module
()
class
Det3DDataPreprocessor
(
DetDataPreprocessor
):
class
Det3DDataPreprocessor
(
DetDataPreprocessor
):
"""Points / Image pre-processor for point clouds / vision-only / multi-
"""Points / Image pre-processor for point clouds / vision-only / multi-
...
@@ -90,7 +88,6 @@ class Det3DDataPreprocessor(DetDataPreprocessor):
...
@@ -90,7 +88,6 @@ class Det3DDataPreprocessor(DetDataPreprocessor):
seg_pad_value
=
seg_pad_value
,
seg_pad_value
=
seg_pad_value
,
bgr_to_rgb
=
bgr_to_rgb
,
bgr_to_rgb
=
bgr_to_rgb
,
rgb_to_bgr
=
rgb_to_bgr
,
rgb_to_bgr
=
rgb_to_bgr
,
boxtype2tensor
=
boxtype2tensor
,
batch_augments
=
batch_augments
)
batch_augments
=
batch_augments
)
self
.
voxel
=
voxel
self
.
voxel
=
voxel
self
.
voxel_type
=
voxel_type
self
.
voxel_type
=
voxel_type
...
@@ -170,9 +167,14 @@ class Det3DDataPreprocessor(DetDataPreprocessor):
...
@@ -170,9 +167,14 @@ class Det3DDataPreprocessor(DetDataPreprocessor):
'pad_shape'
:
pad_shape
'pad_shape'
:
pad_shape
})
})
if
self
.
boxtype2tensor
:
if
hasattr
(
self
,
'boxtype2tensor'
)
and
self
.
boxtype2tensor
:
from
mmdet.models.utils.misc
import
\
samplelist_boxtype2tensor
samplelist_boxtype2tensor
(
data_samples
)
samplelist_boxtype2tensor
(
data_samples
)
elif
hasattr
(
self
,
'boxlist2tensor'
)
and
self
.
boxlist2tensor
:
from
mmdet.models.utils.misc
import
\
samplelist_boxlist2tensor
samplelist_boxlist2tensor
(
data_samples
)
if
self
.
pad_mask
:
if
self
.
pad_mask
:
self
.
pad_gt_masks
(
data_samples
)
self
.
pad_gt_masks
(
data_samples
)
...
...
mmdet3d/models/layers/spconv/__init__.py
View file @
fc679dc8
...
@@ -6,7 +6,9 @@ try:
...
@@ -6,7 +6,9 @@ try:
except
ImportError
:
except
ImportError
:
IS_SPCONV2_AVAILABLE
=
False
IS_SPCONV2_AVAILABLE
=
False
else
:
else
:
if
hasattr
(
spconv
,
'__version__'
)
and
spconv
.
__version__
>=
'2.0.0'
:
if
hasattr
(
spconv
,
'__version__'
)
and
spconv
.
__version__
>=
'2.0.0'
and
hasattr
(
spconv
,
'pytorch'
):
IS_SPCONV2_AVAILABLE
=
register_spconv2
()
IS_SPCONV2_AVAILABLE
=
register_spconv2
()
else
:
else
:
IS_SPCONV2_AVAILABLE
=
False
IS_SPCONV2_AVAILABLE
=
False
...
...
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