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
OpenPCDet
Commits
3b9549c9
Unverified
Commit
3b9549c9
authored
Sep 14, 2021
by
jihan.yang
Committed by
GitHub
Sep 14, 2021
Browse files
fixbug: modify global gt database when applying data aug
parent
a4c3ccf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
pcdet/datasets/augmentor/database_sampler.py
pcdet/datasets/augmentor/database_sampler.py
+3
-1
No files found.
pcdet/datasets/augmentor/database_sampler.py
View file @
3b9549c9
import
pickle
import
os
import
copy
import
numpy
as
np
import
SharedArray
import
torch.distributed
as
dist
...
...
@@ -155,13 +156,14 @@ class DataBaseSampler(object):
obj_points_list
=
[]
if
self
.
use_shared_memory
:
gt_database_data
=
SharedArray
.
attach
(
f
"shm://
{
self
.
gt_database_data_key
}
"
)
gt_database_data
.
setflags
(
write
=
0
)
else
:
gt_database_data
=
None
for
idx
,
info
in
enumerate
(
total_valid_sampled_dict
):
if
self
.
use_shared_memory
:
start_offset
,
end_offset
=
info
[
'global_data_offset'
]
obj_points
=
gt_database_data
[
start_offset
:
end_offset
]
obj_points
=
copy
.
deepcopy
(
gt_database_data
[
start_offset
:
end_offset
]
)
else
:
file_path
=
self
.
root_path
/
info
[
'path'
]
obj_points
=
np
.
fromfile
(
str
(
file_path
),
dtype
=
np
.
float32
).
reshape
(
...
...
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