赞
踩
源码下载链接: https://github.com/ultralytics/yolov5/tree/v5.0
detect.py
将红色框的default设置为0
utils
datasets.py
将红色框中的代码注释 再将cap = cv2.VideoCapture(url)中的url改为0
cap = cv2.VideoCapture(url)
url
0
就可以实现实时目标检测了