当前位置:网站首页>yolov5调用ip摄像头时出现的问题
yolov5调用ip摄像头时出现的问题
2022-08-02 03:21:00 【woshicaiji12138】
今天尝试使用yolov5-5.0做实时目标检测,但是当输入指令:
python detect.py --source http://192.168.xx.xx:xx/video --weights yolov5s.pt
(xx表示我自己的ip)
总会出现以下问题:
[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’t find 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
在网上查阅了诸多资料也没能解决,直到在一篇博客中看到别人的指令是这样的
python detect.py --source http://admin:[email protected].x.x.x:x
突然想起来自己在pycharm的terminal直接点击ip摄像头的连接地址时会出现这样的弹窗:
这才发现自己的错误多么低级:没有ip摄像头的输入账号和密码。
于是在terminal重新输入:
python detect.py --source http://admin:[email protected]192.168.x.x:x --weights yolov5s.pt
成功!
边栏推荐
猜你喜欢
随机推荐
关于跨域问题
MySQL8.0与MySQL5.7差异分析
线性代数学习笔记2-1:向量和向量组、线性相关性(张成空间的概念)
Kubernetes 基本概念
About cross-domain issues
(Reposted) The relationship between hashcode and equals
Redis安装,基本命令,持久化方式,集群
Freeswitch操作基本配置
MySQL分组后排序
(转帖)HashCode总结(1)
线性代数学习笔记3-3:逆矩阵的理解
STM32——LCD—TFTLCD原理与配置介绍
连接数据库时遇到的bug1号
PowerManagerService灭屏超时流程
DSPE-PEG-Silane,DSPE-PEG-SIL,磷脂-聚乙二醇-硅烷修饰活性基团
day11--shell脚本
DSPE-PEG-PDP,DSPE-PEG-OPSS,磷脂-聚乙二醇-巯基吡啶供应,MW:5000
磷脂-聚乙二醇-巯基,DSPE-PEG-Thiol,DSPE-PEG-SH,MW:5000
CV-Model【4】:MobileNet v3
支付通道对接常见的问题有哪些?