nehulagrawal commited on
Commit
18639ac
1 Parent(s): 220e07e

Update detection.py

Browse files
Files changed (1) hide show
  1. detection.py +1 -5
detection.py CHANGED
@@ -46,10 +46,6 @@ class ObjectDetection:
46
 
47
  def plot_bboxes(self, results, frame, threshold=0.5, box_color='orange', text_color='black'):
48
  labels, conf, coord = results
49
-
50
- # Resize the frame to 400x400
51
- frame = cv2.resize(frame, (200, 200))
52
-
53
  box_color = self.get_color(box_color)
54
  text_color = self.get_color(text_color)
55
 
@@ -60,5 +56,5 @@ class ObjectDetection:
60
 
61
  cv2.rectangle(frame, (x1, y1), (x2, y2), box_color, 2)
62
  cv2.putText(frame, f"{class_name} - {conf[i]*100:.2f}%", (x1, y1), cv2.FONT_HERSHEY_COMPLEX, 0.5, text_color)
63
-
64
  return frame
 
46
 
47
  def plot_bboxes(self, results, frame, threshold=0.5, box_color='orange', text_color='black'):
48
  labels, conf, coord = results
 
 
 
 
49
  box_color = self.get_color(box_color)
50
  text_color = self.get_color(text_color)
51
 
 
56
 
57
  cv2.rectangle(frame, (x1, y1), (x2, y2), box_color, 2)
58
  cv2.putText(frame, f"{class_name} - {conf[i]*100:.2f}%", (x1, y1), cv2.FONT_HERSHEY_COMPLEX, 0.5, text_color)
59
+ frame = cv2.resize(frame, (200, 200))
60
  return frame