tree3po commited on
Commit
825c042
·
verified ·
1 Parent(s): e9ed76e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -25,13 +25,11 @@ def draw_box(image,det):
25
  #print(bbox)
26
  start_point = ((int(ea[0]),int(ea[1])))
27
  end_point = ((int(ea[2]),int(ea[3])))
28
- color = (255, 0, 0)
29
- thickness = 2
30
- label = f'{det.data}'
31
- font = cv2.FONT_HERSHEY_SIMPLEX # Choose a font
32
  font_scale = 1
33
  color = (0, 0, 255) # Blue color
34
- thickness = 2
35
  text_position = (int(ea[0]), int(ea[1]) + 10) # Adjust position as needed
36
  image = cv2.rectangle(image, start_point, end_point, color, thickness)
37
  cv2.putText(image, label, text_position, font, font_scale, color, thickness)
 
25
  #print(bbox)
26
  start_point = ((int(ea[0]),int(ea[1])))
27
  end_point = ((int(ea[2]),int(ea[3])))
28
+ label = f'{det.data["class_name"][i]}'
29
+ font = cv2.FONT_HERSHEY_COMPLEX # Choose a font
 
 
30
  font_scale = 1
31
  color = (0, 0, 255) # Blue color
32
+ thickness = 1
33
  text_position = (int(ea[0]), int(ea[1]) + 10) # Adjust position as needed
34
  image = cv2.rectangle(image, start_point, end_point, color, thickness)
35
  cv2.putText(image, label, text_position, font, font_scale, color, thickness)