Open hilaryliang opened 3 months ago
Hello, unfortunately, we don't support video. The video support that we have is from the Detic codebase (DECOLA demo code is based on the one from Detic). It won't be hard to make it support so I will take a look in the future, but cannot promise anytime soon.
Hi, I found not only for video, but a single image has the same error. So I believe there is a potential bug somewhere, hope you can help to take a look.
when the custom_vocabulary includes the object that can be detected is ok:
python demo.py --config-file configs/DECOLA_PHASE2_LI_CLIP_SwinB_4x_ft4x.yaml --input trash_test/000732.jpg --output trash_test/outputs_custom/1.jpg --vocabulary custom --custom_vocabulary water_bottle,wallet,webcam,mug,headphone,drawer,keyboard,laptop,plastic_bag --confidence-threshold 0.2 --opts MODEL.WEIGHTS weights/DECOLA_PHASE2_LI_CLIP_SwinB_4x_ft4x.pth
but when the custom_vocabulary not include in the image, which means if image contains 0 object from the custom_vocabulary, the error will happen
python demo.py --config-file configs/DECOLA_PHASE2_LI_CLIP_SwinB_4x_ft4x.yaml --input trash_test/000732.jpg --output trash_test/outputs_custom/1.jpg --vocabulary custom --custom_vocabulary water_bottle,wallet,webcam,mug,headphone,drawer,keyboard,laptop --confidence-threshold 0.2 --opts MODEL.WEIGHTS weights/DECOLA_PHASE2_LI_CLIP_SwinB_4x_ft4x.pth
the only difference of this two command is custom_vocabulary plastic_bag
output:
ERROR: Traceback (most recent call last): File "demo.py", line 173, in
predictions, visualized_output = demo.run_on_image(img) File "/homes/hilary/marinedet/sota_ovd/DECOLA/decola/predictor.py", line 95, in run_on_image predictions = self.predictor(image) File "/homes/hilary/marinedet/sota_ovd/detectron2/detectron2/engine/defaults.py", line 319, in call predictions = self.model([inputs])[0] IndexError: list index out of range
Thank you for your great work!
I want to predict a video or a list of images using demo.py.
command:
python demo.py --config-file configs/DECOLA_PHASE1_L_CLIP_SwinB_4x.yaml --video-input ./test_videos/output2.mp4 --output ./test_videos/output/result.mkv --vocabulary custom --custom_vocabulary sea\ urchin --confidence-threshold 0.3 --language-condition --opts MODEL.WEIGHTS weights/DECOLA_PHASE1_L_CLIP_SwinB_4x.pth
output:
I use the same way to install the env for Detic and DECOLA. also use similar commands. Detic works, but DECOLA does not work. Is there anything else I haven't noticed?
looking forward to your help!