如何在Google Colab上使用DentectRon2启动网络摄像头检测?
我正在使用DentectRon2来实现实时细分。训练了模型后,我尝试使用此脚本对网络摄像头视频进行推断:
!git clone https://github.com/facebookresearch/detectron2
%run detectron2/deco. demo.py -config-file/content/config.yml--webcam --confidence-threshold 0.6 -opts model.weights.weaters/content/content/output/model_final.pth.pth
输出是:
[06/15 12:33:39 detectron2]: Arguments: Namespace(confidence_threshold=0.6, config_file='/content/config.yml', input=None, opts=['MODEL.WEIGHTS', '/content/output/model_final.pth'], output=None, video_input=None, webcam=True)
[06/15 12:33:40 fvcore.common.checkpoint]: [Checkpointer] Loading from /content/output/model_final.pth ...
0it [00:00, ?it/s]
但是,网络摄像头确实可以不起作用。
谁能帮助我解决问题?
提前致谢。
I'm using Detectron2 to implement real time segmentation. After training my model, I tried to perform the inference on my webcam video, using this script:
!git clone https://github.com/facebookresearch/detectron2
%run detectron2/demo/demo.py --config-file /content/config.yml --webcam --confidence-threshold 0.6 --opts MODEL.WEIGHTS /content/output/model_final.pth
The output was:
[06/15 12:33:39 detectron2]: Arguments: Namespace(confidence_threshold=0.6, config_file='/content/config.yml', input=None, opts=['MODEL.WEIGHTS', '/content/output/model_final.pth'], output=None, video_input=None, webcam=True)
[06/15 12:33:40 fvcore.common.checkpoint]: [Checkpointer] Loading from /content/output/model_final.pth ...
0it [00:00, ?it/s]
However, the webcam does not work.
Can anyone help me to solve the problem?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Yuxin Wu(detectron2的创建者)注释在此github问题上供人们构建代码的占位符功能,“ - webcam”输入不能保存输出:
Yuxin Wu (The creator of detectron2) commented on this github issue that this is more of a placeholder feature for people to build code off of, and the "--webcam" input does not save outputs: