ultralytics
ultralytics copied to clipboard
Filter prediction by class using CLI
Search before asking
- [X] I have searched the YOLOv8 issues and discussions and found no similar questions.
Question
Hi there Ultralytics,
Is it somehow possible to filter the predictions by class using CLI? For example, I only want to predict the class car from a video.
Many thanks
Additional
No response
@rusvagzur no, not out of the box, you'd have to filter inference results after inference runs.
@rusvagzur no, not out of the box, you'd have to filter inference results after inference runs.
Sorry if I ask again about this, but in yolov5 it was possible to filter by class in the cli and in python? Will it be possible in python and v8 too? thanks
for example like this python detect.py --weights yolov5x.pt --view-img --class 0 1 2 3 4 5 6 7 8 9 --nosave --device 0 --source https://www.youtube.com/watch?v=cZENtQgRVxk
@GianniGi exactly, that's what I meant
@GianniGi Cheak out the recent modification for filtering the class filter