-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Description
❓ Questions and Help
Thank you for this great work! I tried the Colab Notebook tutorial and it worked perfectly fine to infer the pre-trained network on images of my choice. Unfortunately I am facing a problem when trying to infer on a video. I copied the same exact Installation-steps from the tutorial into my own Colab Notebook, installed everything as in the tutorial and tried to execute following command:
!python detectron2_repo/demo/demo.py --config-file detectron2_repo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml
--video-input video.mp4
--opts MODEL.WEIGHTS detectron2://COCO-
InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl
Here is the output from my Colab Notebook:
I assume it might have to do with ffmpeg and OpenCV not being able to load the video, which is why I have tried this:
!apt install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavresample-dev
!apt install ffmpeg
It says everything is already installed though and doesn't change anything.
I also made sure that the video.mp4 exists using: os.path.exists('video.mp4')
Here is the full output: [10/12 04:17:56 detectron2]: Arguments: Namespace(confidence_threshold=0.5, config_file='detectron2_repo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml', input=None, opts=['MODEL.WEIGHTS', 'detectron2://COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x/137849600/model_final_f10217.pkl'], output=None, video_input='video.mp4', webcam=False)
WARNING [10/12 04:17:56 d2.config.compat]: Config 'detectron2_repo/configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml' has no VERSION. Assuming it to be compatible with latest v2.
Unable to stop the stream: Inappropriate ioctl for device
0it [00:00, ?it/s]