如何用yolo通过本地摄像头识别物体

  1. 使用YOLOv5训练完物体后,用detect.py文件识别

  1. 打开detect.py文件,将defaul=0

  1. 有错

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

解决方案

将urL替换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. 成功

猜你喜欢

转载自blog.csdn.net/qq_56508207/article/details/129553364
今日推荐