facebookresearch / SlowFast

PySlowFast: video understanding codebase from FAIR for reproducing state-of-the-art video models.
Apache License 2.0
6.38k stars 1.18k forks source link

OSError: Video /home/Project/input/in.mp4 cannot be opened #681

Open liveforeverneverdie opened 8 months ago

liveforeverneverdie commented 8 months ago

Traceback (most recent call last): File "/root/Project/slowfast/tools/run_net.py", line 52, in main() File "/root/Project/slowfast/tools/run_net.py", line 48, in main demo(cfg) File "/root/Project/slowfast/tools/demo_net.py", line 112, in demo frame_provider = VideoManager(cfg) File "/root/Project/slowfast/slowfast/visualization/demo_loader.py", line 49, in init raise IOError("Video {} cannot be opened".format(self.source)) OSError: Video /home/Project/input/in.mp4 cannot be opened

SLOWFAST_32x2_R101_50_50.yaml:

DEMO:
  ENABLE: True
  LABEL_FILE_PATH: "/home/Project/slowfast/demo/AVA/AVA.json" # Add local label file path here.
  INPUT_VIDEO: "/home/Project/input/in.mp4"
  OUTPUT_FILE: "/home/Project/output/out.mp4"
#  WEBCAM: -1
  DETECTRON2_CFG: "COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml"
  DETECTRON2_WEIGHTS: detectron2://COCO-Detection/faster_rcnn_R_50_FPN_3x/137849458/model_final_280758.pkl

I think path of mp4 should be correct, but it just can't be opened. And I have "chmod" mp4. Hopefully someone helps.

Ottomachine1 commented 8 months ago

I have the same question , are u work out? I need help too

alpargun commented 4 months ago

Can you try uncommenting WEBCAM: -1? You want to disable webcam and toggle INPUT_VIDEO, right?

Refer to:

self.source = (
            cfg.DEMO.WEBCAM if cfg.DEMO.WEBCAM > -1 else cfg.DEMO.INPUT_VIDEO
        )

in demo_loader.py