当前位置:网站首页>Problems when yolov5 calls ip camera
Problems when yolov5 calls ip camera
2022-08-02 03:32:00 【woshicaiji12138】
I tried to use yolov5-5.0 for real-time target detection today, but when I entered the command:
python detect.py --source http://192.168.xx.xx:xx/video --weights yolov5s.pt(xx means my own ip)
The following problem always occurs:
[ERROR:[email protected]] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap.cpp (166) cv::VideoCapture::open VIDEOIO(CV_IMAGES): raised OpenCV
exception:
OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can'tfind starting numb
er (in the name of file): http://192.168.3.100:8001/video in function 'cv::icvExtractPattern'
Traceback (most recent call last):
File “detect.py”, line 178, in
detect()
File “detect.py”, line 51, in detect
dataset= LoadStreams(source, img_size=imgsz, stride=stride)
File “D:\yolov5\yolov5-5.0\yolov5-5.0\utils\datasets.py”, line 284, in init
assert cap.isOpened(), f'Failed to open {s}'
AssertionError: Failed to open http://192.168.3.100:8081/video
I checked a lot of information on the Internet and couldn't solve it until I saw in a blog that someone else's instruction wassuch
python detect.py --source http://admin:[email protected].x.x.span>x:xSuddenly I remember that when I click the connection address of the ip camera directly in the terminal of pycharm, this pop-up window will appear:

Only then did I realize how rudimentary my mistake was: I didn't have an ip camera to enter the account number and password.
So re-enter in the terminal:
python detect.py --source http://admin:[email protected]192.168.x.x:x --weights yolov5s.pt
Success!
边栏推荐
猜你喜欢
随机推荐
About cross-domain issues
Deveco studio 鸿蒙app访问网络详细过程(js)
A senior test engineer asked me these questions as soon as the interview came
JVM学习----垃圾回收--G1
Scaffolding installation
RHCSA第三天
云服务器安装部署Nacos2.0.4版本
MySQL分组后取最大一条数据【最优解】
MySQL删除表数据 MySQL清空表命令 3种方法
手把手带你 Unity 入门之从零创建一个时钟(GameObjects 与 Scripts)
第七周复习
【C语言万字长文】 宏定义 结构体 共用体 内存对齐知识点总结
MySQL两阶段提交串讲
CV-Model【4】:MobileNet v3
5.nodejs--cross domain, CORS, JSONP, Proxy
np.isnan()
SSM整合
磷脂-聚乙二醇-醛基 DSPE-PEG-Aldehyde DSPE-PEG-CHO MW:5000
支付通道对接常见的问题有哪些?
代码随想录笔记_哈希_383赎金信









