-
Search before asking
QuestionI'm running this code on my raspberry pi 4 with picamera to detect and count people, using yolov8n, but sometimes it detects a class called none person, and then shows several boxes, when crossing the line it ends up counting these boxes with the class none person, and then, it ends up uncalibrating the count... I didn't find it in the documentation about this class called none person... how to disable it? `import cv2 class PiLineCounter:
if name == 'main':
` Additional |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, @Rasantis 👋🏻 ! Thanks a lot for your interest in Before we start, let's convert this issue into a discussion and move it to the Q&A section. |
Beta Was this translation helpful? Give feedback.
-
It looks like the You can:
# old line
labels = [f"{d[4]} {self.model.model.names[d[3]]} {d[2]:0.2f}" for d in detections_filtered]
# new line
labels = [f"{self.model.model.names[d[3]]} {d[2]:0.2f}" for d in detections_filtered]
detections_filtered = detections[detections.tracker_id != None] |
Beta Was this translation helpful? Give feedback.
@Rasantis
It looks like the
None
is thetracker_id
value associated with the given detection. Probably YOLOv8 can't assign the correcttracker_id
so it leaves it asNone
.You can:
tracker_id
when printing the labels. You can do that by updating:tracker_id
equal toNone
.