muhammadsalmanalfaridzi commited on
Commit
b25ef76
·
verified ·
1 Parent(s): 586e4bb

Update dino.txt

Browse files
Files changed (1) hide show
  1. dino.txt +5 -3
dino.txt CHANGED
@@ -69,16 +69,18 @@ def detect_objects_in_video(video_path):
69
  )
70
  dinox_client.run_task(task)
71
  dinox_pred = task.result.objects
72
-
73
  # Filter & Hitung Unclassified Products
74
  unclassified_counts = {}
75
  for obj in dinox_pred:
76
- class_name = obj.category.strip().lower()
 
 
77
  if class_name not in unclassified_counts:
78
  unclassified_counts[class_name] = 1
79
  else:
80
  unclassified_counts[class_name] += 1
81
-
82
  # Draw bounding box for unclassified objects
83
  x1, y1, x2, y2 = obj.bbox
84
  cv2.rectangle(frame, (int(x1), int(y1)), (int(x2), int(y2)), (0, 0, 255), 2)
 
69
  )
70
  dinox_client.run_task(task)
71
  dinox_pred = task.result.objects
72
+
73
  # Filter & Hitung Unclassified Products
74
  unclassified_counts = {}
75
  for obj in dinox_pred:
76
+ # Ganti nama kelas menjadi 'unclassified'
77
+ class_name = "unclassified" # Ganti label menjadi 'unclassified'
78
+
79
  if class_name not in unclassified_counts:
80
  unclassified_counts[class_name] = 1
81
  else:
82
  unclassified_counts[class_name] += 1
83
+
84
  # Draw bounding box for unclassified objects
85
  x1, y1, x2, y2 = obj.bbox
86
  cv2.rectangle(frame, (int(x1), int(y1)), (int(x2), int(y2)), (0, 0, 255), 2)