Fix increment +=2 bug in object_counter.py (#9998)

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
Muhammad Usman 2024-04-13 10:24:02 -05:00 committed by GitHub
parent 0f4a4fdf5f
commit e2700e7dd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -224,7 +224,7 @@ class ObjectCounter:
if (box[0] - prev_position[0]) * (self.counting_region.centroid.x - prev_position[0]) > 0:
self.in_counts += 1
self.class_wise_count[self.names[cls]]["in"] += 2
self.class_wise_count[self.names[cls]]["in"] += 1
else:
self.out_counts += 1
self.class_wise_count[self.names[cls]]["out"] += 1