mp-02 commited on
Commit
74fb3a1
1 Parent(s): 9b31f19

Update sroie_inference.py

Browse files
Files changed (1) hide show
  1. sroie_inference.py +5 -5
sroie_inference.py CHANGED
@@ -95,12 +95,12 @@ def prediction(image):
95
 
96
  image = (blur(image, blur_boxes))
97
 
98
- #draw = ImageDraw.Draw(image, "RGBA")
99
- #font = ImageFont.load_default()
100
 
101
- #for prediction, box in zip(true_predictions, true_boxes):
102
- # draw.rectangle(box)
103
- # draw.text((box[0]+10, box[1]-10), text=prediction, font=font, fill="black", font_size="8")
104
 
105
  return d, image
106
 
 
95
 
96
  image = (blur(image, blur_boxes))
97
 
98
+ draw = ImageDraw.Draw(image, "RGBA")
99
+ font = ImageFont.load_default()
100
 
101
+ for prediction, box in zip(true_predictions, true_boxes):
102
+ draw.rectangle(box)
103
+ draw.text((box[0]+10, box[1]-10), text=prediction, font=font, fill="black", font_size="8")
104
 
105
  return d, image
106