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
2155ff69
"vscode:/vscode.git/clone" did not exist on "ac155f7415c74730a32e3cad7850894c614b1564"
Commit
2155ff69
authored
Jun 08, 2022
by
VVsssssk
Committed by
ChaimZhu
Jul 20, 2022
Browse files
[Fix]fix dbsampler and object sampler
parent
14a18646
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
mmdet3d/datasets/pipelines/dbsampler.py
mmdet3d/datasets/pipelines/dbsampler.py
+2
-2
mmdet3d/datasets/pipelines/transforms_3d.py
mmdet3d/datasets/pipelines/transforms_3d.py
+1
-2
No files found.
mmdet3d/datasets/pipelines/dbsampler.py
View file @
2155ff69
...
@@ -114,7 +114,7 @@ class DataBaseSampler(object):
...
@@ -114,7 +114,7 @@ class DataBaseSampler(object):
self
.
classes
=
classes
self
.
classes
=
classes
self
.
cat2label
=
{
name
:
i
for
i
,
name
in
enumerate
(
classes
)}
self
.
cat2label
=
{
name
:
i
for
i
,
name
in
enumerate
(
classes
)}
self
.
label2cat
=
{
i
:
name
for
i
,
name
in
enumerate
(
classes
)}
self
.
label2cat
=
{
i
:
name
for
i
,
name
in
enumerate
(
classes
)}
self
.
points_loader
=
mmcv
.
build_from_cfg
(
points_loader
,
PIPELINES
)
self
.
points_loader
=
TRANSFORMS
.
build
(
points_loader
)
self
.
file_client
=
mmcv
.
FileClient
(
**
file_client_args
)
self
.
file_client
=
mmcv
.
FileClient
(
**
file_client_args
)
# load data base infos
# load data base infos
...
@@ -267,7 +267,7 @@ class DataBaseSampler(object):
...
@@ -267,7 +267,7 @@ class DataBaseSampler(object):
file_path
=
os
.
path
.
join
(
file_path
=
os
.
path
.
join
(
self
.
data_root
,
self
.
data_root
,
info
[
'path'
])
if
self
.
data_root
else
info
[
'path'
]
info
[
'path'
])
if
self
.
data_root
else
info
[
'path'
]
results
=
dict
(
pts_filename
=
file_path
)
results
=
dict
(
lidar_points
=
dict
(
lidar_path
=
file_path
)
)
s_points
=
self
.
points_loader
(
results
)[
'points'
]
s_points
=
self
.
points_loader
(
results
)[
'points'
]
s_points
.
translate
(
info
[
'box3d_lidar'
][:
3
])
s_points
.
translate
(
info
[
'box3d_lidar'
][:
3
])
...
...
mmdet3d/datasets/pipelines/transforms_3d.py
View file @
2155ff69
...
@@ -7,7 +7,6 @@ import cv2
...
@@ -7,7 +7,6 @@ import cv2
import
numpy
as
np
import
numpy
as
np
from
mmcv
import
is_tuple_of
from
mmcv
import
is_tuple_of
from
mmcv.transforms
import
BaseTransform
from
mmcv.transforms
import
BaseTransform
from
mmengine.registry
import
build_from_cfg
from
mmdet3d.core
import
VoxelGenerator
from
mmdet3d.core
import
VoxelGenerator
from
mmdet3d.core.bbox
import
(
CameraInstance3DBoxes
,
DepthInstance3DBoxes
,
from
mmdet3d.core.bbox
import
(
CameraInstance3DBoxes
,
DepthInstance3DBoxes
,
...
@@ -334,7 +333,7 @@ class ObjectSample(BaseTransform):
...
@@ -334,7 +333,7 @@ class ObjectSample(BaseTransform):
self
.
sample_2d
=
sample_2d
self
.
sample_2d
=
sample_2d
if
'type'
not
in
db_sampler
.
keys
():
if
'type'
not
in
db_sampler
.
keys
():
db_sampler
[
'type'
]
=
'DataBaseSampler'
db_sampler
[
'type'
]
=
'DataBaseSampler'
self
.
db_sampler
=
build_from_cfg
(
db_sampler
,
TRANSFORMS
)
self
.
db_sampler
=
TRANSFORMS
.
build
(
db_sampler
)
self
.
use_ground_plane
=
use_ground_plane
self
.
use_ground_plane
=
use_ground_plane
@
staticmethod
@
staticmethod
...
...
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