Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
30c7a97c
Commit
30c7a97c
authored
Sep 24, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix typo in
982f42b9
parent
982f42b9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tensorpack/utils/viz.py
tensorpack/utils/viz.py
+2
-2
No files found.
tensorpack/utils/viz.py
View file @
30c7a97c
...
@@ -408,8 +408,8 @@ def draw_boxes(im, boxes, labels=None, color=None):
...
@@ -408,8 +408,8 @@ def draw_boxes(im, boxes, labels=None, color=None):
bottom_left
[
1
]
=
box
[
3
]
-
0.3
*
lineh
bottom_left
[
1
]
=
box
[
3
]
-
0.3
*
lineh
x1
,
y1
=
int
(
top_left
[
0
]),
int
(
top_left
[
1
])
x1
,
y1
=
int
(
top_left
[
0
]),
int
(
top_left
[
1
])
x2
,
y2
=
int
(
top_left
[
0
]
+
linew
),
int
(
top_left
[
1
]
+
lineh
)
x2
,
y2
=
int
(
top_left
[
0
]
+
linew
),
int
(
top_left
[
1
]
+
lineh
)
x1
,
x2
=
[
np
.
clip
(
x
,
0
,
im
g
.
shape
[
1
]
-
1
)
for
x
in
[
x1
,
x2
]]
x1
,
x2
=
[
np
.
clip
(
x
,
0
,
im
.
shape
[
1
]
-
1
)
for
x
in
[
x1
,
x2
]]
y1
,
y2
=
[
np
.
clip
(
y
,
0
,
im
g
.
shape
[
0
]
-
1
)
for
y
in
[
y1
,
y2
]]
y1
,
y2
=
[
np
.
clip
(
y
,
0
,
im
.
shape
[
0
]
-
1
)
for
y
in
[
y1
,
y2
]]
if
color
is
None
:
if
color
is
None
:
# find the best color
# find the best color
mean_color
=
im
[
y1
:
y2
+
1
,
x1
:
x2
+
1
]
.
mean
(
axis
=
(
0
,
1
))
mean_color
=
im
[
y1
:
y2
+
1
,
x1
:
x2
+
1
]
.
mean
(
axis
=
(
0
,
1
))
...
...
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