You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the YOLOv5 issues and discussions and found no similar questions.
Question
I want to use the val.py script to detect only 'person' and 'car' classes, but the output prediction results still include other classes, and modifying the include_class in the dataloaders file doesn't work, what should I do?"
pred has else class
Additional
No response
The text was updated successfully, but these errors were encountered:
👋 Hello @ghosmile, thank you for reaching out to us with your question regarding YOLOv5 🚀! This is an automated response, but rest assured that an Ultralytics engineer will assist you soon.
If you're looking to customize val.py to detect only specific classes such as 'person' and 'car', please ensure you're correctly filtering the output predictions. You may need to adjust your script to handle class filters appropriately.
For bug reports or issues, providing a minimum reproducible example would greatly assist us in debugging. This includes concise code snippets, environment details, and any relevant logs or error messages.
In case you are looking for guidance on usage or best practices, please explore our tutorials, which cover a range of topics from custom data training to hyperparameter optimization.
Requirements
Make sure your environment satisfies the following:
Python version 3.8.0 or higher
All necessary dependencies installed from requirements.txt
YOLOv5 runs smoothly in verified environments including free GPU Notebooks, Google Cloud, Amazon Deep Learning AMI, and Docker images.
Status
Check the current status of our Continuous Integration (CI) tests. If the CI badge is green, all tests are passing, ensuring stable operation across various platforms.
Stay tuned, and thank you for your patience as we work to support your needs! 😊🔍
@ghosmile to detect only 'person' and 'car' classes using val.py, you can modify the --classes argument in your command like this: python val.py --weights yolov5s.pt --data coco.yaml --classes 0 2, where 0 and 2 correspond to 'person' and 'car' class indices in the COCO dataset.
Search before asking
Question
I want to use the val.py script to detect only 'person' and 'car' classes, but the output prediction results still include other classes, and modifying the include_class in the dataloaders file doesn't work, what should I do?"
pred has else class
Additional
No response
The text was updated successfully, but these errors were encountered: