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
MMCV
Commits
27ce4190
Commit
27ce4190
authored
Aug 10, 2019
by
Jerry Jiarui XU
Committed by
Kai Chen
Aug 11, 2019
Browse files
fixed crop of single channel image like semantic map (#107)
parent
3b46ddf0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
mmcv/image/transforms/geometry.py
mmcv/image/transforms/geometry.py
+1
-1
No files found.
mmcv/image/transforms/geometry.py
View file @
27ce4190
...
...
@@ -142,7 +142,7 @@ def imcrop(img, bboxes, scale=1.0, pad_fill=None):
patch
=
img
[
y1
:
y2
+
1
,
x1
:
x2
+
1
,
...]
else
:
_x1
,
_y1
,
_x2
,
_y2
=
tuple
(
scaled_bboxes
[
i
,
:])
if
chn
==
2
:
if
chn
==
1
:
patch_shape
=
(
_y2
-
_y1
+
1
,
_x2
-
_x1
+
1
)
else
:
patch_shape
=
(
_y2
-
_y1
+
1
,
_x2
-
_x1
+
1
,
chn
)
...
...
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