Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

motorcycle not detected #5

Open
wimdecorte opened this issue Aug 12, 2024 · 1 comment
Open

motorcycle not detected #5

wimdecorte opened this issue Aug 12, 2024 · 1 comment

Comments

@wimdecorte
Copy link

Motorcycles in a video are not picked up by the detection and I don't see an obvious place to specify which types should be.

I can upload the 20s video clip that I'm processing.

@sergio11
Copy link
Owner

Hi @wimdecorte

YOLOv8 is trained on the COCO dataset, which includes motorcycles as one of its predefined classes, so it should be able to detect them without any additional configuration. If motorcycles are not being detected in your video, several factors might be causing this issue:

  • Video Resolution and Quality: Low resolution or poor video quality might make it difficult for the model to detect smaller objects like motorcycles.
  • Lighting Conditions: Poor or uneven lighting can affect detection performance.
  • Confidence Threshold: The confidence threshold for detections might be set too high, causing the model to ignore less certain detections.

To address the last point, you can try lowering the confidence threshold in the YOLO model.

Here’s how you can adjust it in your code:

confidence_threshold = 0.3  # Adjust this value as needed
results = self.model.track(self._increase_brightness(frame), persist=True, tracker="bytetrack.yaml", conf=confidence_threshold)

This change allows the model to consider detections with lower confidence scores, which might help in identifying the motorcycles.

Please let me know if this answer help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants