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.