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
3e1befe1
Commit
3e1befe1
authored
Oct 03, 2018
by
Kai Chen
Browse files
bug fix
parent
97f9febd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mmcv/visualization/image.py
mmcv/visualization/image.py
+2
-2
No files found.
mmcv/visualization/image.py
View file @
3e1befe1
...
@@ -107,7 +107,7 @@ def imshow_det_bboxes(img,
...
@@ -107,7 +107,7 @@ def imshow_det_bboxes(img,
scores
=
bboxes
[:,
-
1
]
scores
=
bboxes
[:,
-
1
]
inds
=
scores
>
score_thr
inds
=
scores
>
score_thr
bboxes
=
bboxes
[
inds
,
:]
bboxes
=
bboxes
[
inds
,
:]
labels
=
labels
[
inds
,
:
]
labels
=
labels
[
inds
]
bbox_color
=
color_val
(
bbox_color
)
bbox_color
=
color_val
(
bbox_color
)
text_color
=
color_val
(
text_color
)
text_color
=
color_val
(
text_color
)
...
@@ -120,7 +120,7 @@ def imshow_det_bboxes(img,
...
@@ -120,7 +120,7 @@ def imshow_det_bboxes(img,
img
,
left_top
,
right_bottom
,
bbox_color
,
thickness
=
thickness
)
img
,
left_top
,
right_bottom
,
bbox_color
,
thickness
=
thickness
)
label_text
=
class_names
[
label_text
=
class_names
[
label
]
if
class_names
is
not
None
else
'cls {}'
.
format
(
label
)
label
]
if
class_names
is
not
None
else
'cls {}'
.
format
(
label
)
if
bbox
.
shape
[
1
]
>
4
:
if
len
(
bbox
)
>
4
:
label_text
+=
'|{:.02f}'
.
format
(
bbox
[
-
1
])
label_text
+=
'|{:.02f}'
.
format
(
bbox
[
-
1
])
cv2
.
putText
(
img
,
label_text
,
(
bbox_int
[
0
],
bbox_int
[
1
]
-
2
),
cv2
.
putText
(
img
,
label_text
,
(
bbox_int
[
0
],
bbox_int
[
1
]
-
2
),
cv2
.
FONT_HERSHEY_COMPLEX
,
font_scale
,
text_color
)
cv2
.
FONT_HERSHEY_COMPLEX
,
font_scale
,
text_color
)
...
...
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