0

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.

1 Answers1

0

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:

Working as expected as --webcam does not currently save outputs. You can take the script as an example to implement new functionalities.

Captain Hat
  • 2,444
  • 1
  • 14
  • 31