hb-setosys commited on
Commit
0972c78
·
verified ·
1 Parent(s): adcf8a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -86,7 +86,7 @@ def count_unique_people(video_path):
86
  class_id = int(box.cls.item()) # Get class ID
87
  confidence = float(box.conf.item()) # Get confidence score
88
 
89
- # Track only trucks
90
  if class_id == PEOPLE_CLASS_ID and confidence > CONFIDENCE_THRESHOLD:
91
  x1, y1, x2, y2 = map(int, box.xyxy[0]) # Get bounding box
92
  detections.append([x1, y1, x2, y2, confidence])
@@ -119,7 +119,7 @@ def count_unique_people(video_path):
119
 
120
  else:
121
  # If people is not in history, add it
122
- people_history[truck_id] = {
123
  "frame_count": frame_count,
124
  "position": people_center
125
  }
 
86
  class_id = int(box.cls.item()) # Get class ID
87
  confidence = float(box.conf.item()) # Get confidence score
88
 
89
+ # Track only people
90
  if class_id == PEOPLE_CLASS_ID and confidence > CONFIDENCE_THRESHOLD:
91
  x1, y1, x2, y2 = map(int, box.xyxy[0]) # Get bounding box
92
  detections.append([x1, y1, x2, y2, confidence])
 
119
 
120
  else:
121
  # If people is not in history, add it
122
+ people_history[people_id] = {
123
  "frame_count": frame_count,
124
  "position": people_center
125
  }