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
3cc7104d
Commit
3cc7104d
authored
May 09, 2020
by
zww
Browse files
Fix numba warning
parent
643b46d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
mmdet3d/datasets/pipelines/data_augment_utils.py
mmdet3d/datasets/pipelines/data_augment_utils.py
+5
-0
mmdet3d/datasets/pipelines/dbsampler.py
mmdet3d/datasets/pipelines/dbsampler.py
+3
-3
No files found.
mmdet3d/datasets/pipelines/data_augment_utils.py
View file @
3cc7104d
import
warnings
import
numba
import
numba
import
numpy
as
np
import
numpy
as
np
from
numba.errors
import
NumbaPerformanceWarning
from
mmdet3d.core.bbox
import
box_np_ops
from
mmdet3d.core.bbox
import
box_np_ops
warnings
.
filterwarnings
(
"ignore"
,
category
=
NumbaPerformanceWarning
)
@
numba
.
njit
@
numba
.
njit
def
_rotation_box2d_jit_
(
corners
,
angle
,
rot_mat_T
):
def
_rotation_box2d_jit_
(
corners
,
angle
,
rot_mat_T
):
...
...
mmdet3d/datasets/pipelines/dbsampler.py
View file @
3cc7104d
...
@@ -433,9 +433,9 @@ class MMDataBaseSampler(DataBaseSampler):
...
@@ -433,9 +433,9 @@ class MMDataBaseSampler(DataBaseSampler):
elif
blending_op
==
'box'
:
elif
blending_op
==
'box'
:
obj_mask
=
cv2
.
blur
(
obj_mask
.
astype
(
np
.
float32
),
(
3
,
3
))
obj_mask
=
cv2
.
blur
(
obj_mask
.
astype
(
np
.
float32
),
(
3
,
3
))
paste_mask
=
1
-
obj_mask
paste_mask
=
1
-
obj_mask
img
[
y1
:
y1
+
h
,
img
[
y1
:
y1
+
h
,
x1
:
x1
+
x1
:
x1
+
w
]
=
(
img
[
y1
:
y1
+
h
,
x1
:
x1
+
w
].
astype
(
np
.
float32
)
*
w
]
=
(
img
[
y1
:
y1
+
h
,
x1
:
x1
+
w
].
astype
(
np
.
float32
)
*
paste_mask
[...,
None
]).
astype
(
np
.
uint8
)
paste_mask
[...,
None
]).
astype
(
np
.
uint8
)
img
[
y1
:
y1
+
h
,
x1
:
x1
+
w
]
+=
(
obj_img
.
astype
(
np
.
float32
)
*
img
[
y1
:
y1
+
h
,
x1
:
x1
+
w
]
+=
(
obj_img
.
astype
(
np
.
float32
)
*
obj_mask
[...,
None
]).
astype
(
np
.
uint8
)
obj_mask
[...,
None
]).
astype
(
np
.
uint8
)
return
img
return
img
...
...
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