yolo_slowfast icon indicating copy to clipboard operation
yolo_slowfast copied to clipboard

Detection on custom yolo weights

Open soumyadbanik opened this issue 2 years ago • 5 comments

I have a custom trained yolo weights and there the person class is not having 0 class index. How to handle that? As far as I understood you are taking the 0th index and passing it to slowfast_r50, since person class is in 0th index at coco dataset

soumyadbanik avatar Jan 04 '23 09:01 soumyadbanik

maybe you can try to change the 66th line in yolo_slowfast.py , form "if int(cls) != 0:" to "if int(cls) != N:", in which N means the index of person class.

wufan-tb avatar Jan 06 '23 02:01 wufan-tb

Thanks a lot. It wokred

soumyadbanik avatar Jan 06 '23 05:01 soumyadbanik

How to run it through the computer webcam?

shizishen avatar Feb 01 '23 12:02 shizishen

How to run it through the computer webcam?

You can try with replacing here by video=cv2.VideoCapture(0) #or put your specific camera id

soumyadbanik avatar Feb 01 '23 12:02 soumyadbanik

ideo=cv2.VideoCapture(0) #or put your specific camera id

python yolo_slowfast.py --input 0

Here " 0 (Zero) " means webcam

suki1504 avatar Jun 17 '23 13:06 suki1504