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
3b0ae48c
Commit
3b0ae48c
authored
Nov 11, 2022
by
Erli Ouyang
Committed by
ZwwWayne
Dec 03, 2022
Browse files
Update iou_neg_piecewise_sampler.py (#2017)
fix lint
parent
aa544d4a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
mmdet3d/models/task_modules/samplers/iou_neg_piecewise_sampler.py
...models/task_modules/samplers/iou_neg_piecewise_sampler.py
+7
-3
No files found.
mmdet3d/models/task_modules/samplers/iou_neg_piecewise_sampler.py
View file @
3b0ae48c
# Copyright (c) OpenMMLab. All rights reserved.
import
math
import
torch
from
mmdet3d.registry
import
TASK_UTILS
...
...
@@ -74,9 +76,11 @@ class IoUNegPiecewiseSampler(RandomSampler):
# if the numbers of negative samplers in previous
# pieces are less than the expected number, extend
# the same number in the current piece.
piece_expected_num
=
int
(
num_expected
*
self
.
neg_piece_fractions
[
piece_inds
])
+
extend_num
piece_expected_num
=
min
(
num_expected
,
math
.
ceil
(
num_expected
*
self
.
neg_piece_fractions
[
piece_inds
])
+
extend_num
)
min_iou_thr
=
self
.
neg_iou_thr
[
piece_inds
+
1
]
max_iou_thr
=
self
.
neg_iou_thr
[
piece_inds
]
piece_neg_inds
=
torch
.
nonzero
(
...
...
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