How to identify objects through local camera with yolo

  1. After using YOLOv5 to train the object, use the detect.py file to identify it.

  1. Open the detect.py file and set defaul=0

  1. Wrong

if 'youtube.com/' in url or 'youtu.be/' in url: # if source is YouTube video TypeError: argument of type 'int' is not iterable

solution

Replace url with str(url)

if 'youtube.com/' in str(url) or 'youtu.be/' in str(url): # if source is YouTube video

https://blog.csdn.net/tou_tu_le/article/details/124179473?ops_request_misc=&request_id=&biz_id=102&utm_term=%20%20%20%20if%20%27youtube.com/%27%20in%20url%20o&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-2-124179473.142^v73^control,201^v4^add_ask,239^v2^insert_chatgpt&spm=1018.2226.3001.4187

  1. success

Guess you like

Origin blog.csdn.net/qq_56508207/article/details/129553364