Skip to content

ADE20k demo test.Index out of range #24

@Cuirundi

Description

@Cuirundi

python demo/demo.py --config-file projects/YOSO/configs/ade20k/panoptic-segmentation/YOSO-R50.yaml --video-input 123.mp4 --output output/ --opts MODEL.WEIGHTS weights/yoso_res50_ade20k.pth
[07/31 22:58:16 detectron2]: Arguments: Namespace(config_file='projects/YOSO/configs/ade20k/panoptic-segmentation/YOSO-R50.yaml', webcam=False, video_input='123.mp4', input=None, output='output/', overlap_threshold=0.98, confidence_threshold=0.8, opts=['MODEL.WEIGHTS', 'weights/yoso_res50_ade20k.pth'])
WARNING [07/31 22:58:16 fvcore.common.config]: Loading config projects/YOSO/configs/ade20k/panoptic-segmentation/Base-ADE20K-PanopticSegmentation.yaml with yaml.unsafe_load. Your machine may be at risk if the file contains malicious content.
[07/31 22:58:17 fvcore.common.checkpoint]: [Checkpointer] Loading from weights/yoso_res50_ade20k.pth ...
512 256
[ERROR:0@4.554] global cap_ffmpeg_impl.hpp:3133 open Could not find encoder for codec_id=27, error: Encoder not found
[ERROR:0@4.554] global cap_ffmpeg_impl.hpp:3211 open VIDEOIO/FFMPEG: Failed to initialize VideoWriter
[ WARN:0@4.555] global cap.cpp:643 open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.10.0) /io/opencv/modules/videoio/src/cap_images.cpp:430: error: (-215:Assertion failed) !filename_pattern.empty() in function 'open'

0%| | 0/1723 [00:00<?, ?it/s]/home/iiau/anaconda3/envs/te/lib/python3.10/site-packages/torch/functional.py:507: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/conda/conda-bld/pytorch_1704987394225/work/aten/src/ATen/native/TensorShape.cpp:3549.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
6%|██▌ | 108/1723 [00:20<05:13, 5.15it/s]
Traceback (most recent call last):
File "/media/iiau/a9633b88-037d-4a85-bc0e-d0ad9dbc9e28/yoso1/yoso1/demo/demo.py", line 189, in
for vis_frame in tqdm.tqdm(demo.run_on_video(video), total=num_frames):
File "/home/iiau/anaconda3/envs/te/lib/python3.10/site-packages/tqdm/std.py", line 1181, in iter
for obj in iterable:
File "/media/iiau/a9633b88-037d-4a85-bc0e-d0ad9dbc9e28/yoso1/yoso1/demo/predictor.py", line 130, in run_on_video
yield process_predictions(frame, self.predictor(frame))
File "/media/iiau/a9633b88-037d-4a85-bc0e-d0ad9dbc9e28/yoso1/yoso1/demo/predictor.py", line 94, in process_predictions
vis_frame = video_visualizer.draw_panoptic_seg_predictions(
File "/media/iiau/a9633b88-037d-4a85-bc0e-d0ad9dbc9e28/yoso1/yoso1/detectron2/utils/video_visualizer.py", line 168, in draw_panoptic_seg_predictions
labels = [self.metadata.thing_classes[k] for k in category_ids]
File "/media/iiau/a9633b88-037d-4a85-bc0e-d0ad9dbc9e28/yoso1/yoso1/detectron2/utils/video_visualizer.py", line 168, in
labels = [self.metadata.thing_classes[k] for k in category_ids]
IndexError: list index out of range

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions