Skip to content
Snippets Groups Projects
Commit 1c66012a authored by Lianmin Zheng's avatar Lianmin Zheng Committed by Tianqi Chen
Browse files

fix import (#1621)

parent a5f2759e
No related branches found
No related tags found
No related merge requests found
...@@ -10,9 +10,6 @@ from __future__ import division ...@@ -10,9 +10,6 @@ from __future__ import division
import math import math
from collections import namedtuple from collections import namedtuple
import numpy as np 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): def _entry_index(batch, w, h, outputs, classes, coords, location, entry):
n = int(location/(w*h)) n = int(location/(w*h))
...@@ -186,6 +183,10 @@ def _draw_label(im, r, c, label, rgb): ...@@ -186,6 +183,10 @@ def _draw_label(im, r, c, label, rgb):
_set_pixel(im, i+c, j+r, k, val)#rgb[k] * val) _set_pixel(im, i+c, j+r, k, val)#rgb[k] * val)
def _get_label(labelstr, rgb): def _get_label(labelstr, rgb):
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
text = labelstr text = labelstr
colorText = "black" colorText = "black"
testDraw = ImageDraw.Draw(Image.new('RGB', (1, 1))) testDraw = ImageDraw.Draw(Image.new('RGB', (1, 1)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment