Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
1c66012a
Commit
1c66012a
authored
Aug 19, 2018
by
Lianmin Zheng
Committed by
Tianqi Chen
Aug 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix import (#1621)
parent
a5f2759e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
nnvm/python/nnvm/testing/yolo2_detection.py
+4
-3
No files found.
nnvm/python/nnvm/testing/yolo2_detection.py
View file @
1c66012a
...
...
@@ -10,9 +10,6 @@ from __future__ import division
import
math
from
collections
import
namedtuple
import
numpy
as
np
from
PIL
import
Image
from
PIL
import
ImageDraw
from
PIL
import
ImageFont
def
_entry_index
(
batch
,
w
,
h
,
outputs
,
classes
,
coords
,
location
,
entry
):
n
=
int
(
location
/
(
w
*
h
))
...
...
@@ -186,6 +183,10 @@ def _draw_label(im, r, c, label, rgb):
_set_pixel
(
im
,
i
+
c
,
j
+
r
,
k
,
val
)
#rgb[k] * val)
def
_get_label
(
labelstr
,
rgb
):
from
PIL
import
Image
from
PIL
import
ImageDraw
from
PIL
import
ImageFont
text
=
labelstr
colorText
=
"black"
testDraw
=
ImageDraw
.
Draw
(
Image
.
new
(
'RGB'
,
(
1
,
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