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
ModelZoo
SOLOv2-pytorch
Commits
dcfedf54
Commit
dcfedf54
authored
Dec 27, 2019
by
Cao Yuhang
Committed by
Kai Chen
Dec 27, 2019
Browse files
Add Crop seg to RandomCrop (#1880)
* add crop seg to RandomCrop trans * minor fix comment
parent
16a6f7da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
mmdet/datasets/pipelines/transforms.py
mmdet/datasets/pipelines/transforms.py
+4
-0
No files found.
mmdet/datasets/pipelines/transforms.py
View file @
dcfedf54
...
...
@@ -378,6 +378,10 @@ class RandomCrop(object):
bboxes
[:,
1
::
2
]
=
np
.
clip
(
bboxes
[:,
1
::
2
],
0
,
img_shape
[
0
]
-
1
)
results
[
key
]
=
bboxes
# crop semantic seg
for
key
in
results
.
get
(
'seg_fields'
,
[]):
results
[
key
]
=
results
[
key
][
crop_y1
:
crop_y2
,
crop_x1
:
crop_x2
]
# filter out the gt bboxes that are completely cropped
if
'gt_bboxes'
in
results
:
gt_bboxes
=
results
[
'gt_bboxes'
]
...
...
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