CWrecker commited on
Commit
f29dc51
1 Parent(s): c8d1bd7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -1
app.py CHANGED
@@ -26,7 +26,21 @@ def inference(path:str, threshold:float=0.6):
26
  color=(0, 0, 255),
27
  thickness=2,
28
  )
29
- cv2.putText(image, cls, (int(box[0]), int(box[2])))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  counter+=1
31
  return cv2.cvtColor(image, cv2.COLOR_BGR2RGB), counter
32
 
 
26
  color=(0, 0, 255),
27
  thickness=2,
28
  )
29
+
30
+ font = cv2.FONT_HERSHEY_SIMPLEX
31
+ fontScale = 1
32
+ fontColor = (255,255,255)
33
+ thickness = 1
34
+ lineType = 2
35
+
36
+ cv2.putText(img,str(cls),
37
+ (int(box[0]), int(box[2])),
38
+ font,
39
+ fontScale,
40
+ fontColor,
41
+ thickness,
42
+ lineType)
43
+
44
  counter+=1
45
  return cv2.cvtColor(image, cv2.COLOR_BGR2RGB), counter
46