SuriRaja commited on
Commit
6b08eb8
·
1 Parent(s): 45a917a

Update services/overlay_service.py

Browse files
Files changed (1) hide show
  1. services/overlay_service.py +2 -5
services/overlay_service.py CHANGED
@@ -2,9 +2,6 @@ import cv2
2
 
3
  def overlay_boxes(frame, boxes):
4
  for box in boxes:
5
- x_min, y_min, x_max, y_max, score, label = box
6
- color = (0, 255, 0) if score > 0.5 else (0, 0, 255)
7
- cv2.rectangle(frame, (x_min, y_min), (x_max, y_max), color, 2)
8
- text = f"{label}: {score:.2f}"
9
- cv2.putText(frame, text, (x_min, y_min - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.5, color, 1)
10
  return frame
 
2
 
3
  def overlay_boxes(frame, boxes):
4
  for box in boxes:
5
+ x_min, y_min, x_max, y_max = map(int, box)
6
+ cv2.rectangle(frame, (x_min, y_min), (x_max, y_max), (0, 0, 255), 2)
 
 
 
7
  return frame