Skip to content

RuntimeError: GET was unable to find an engine to execute this computation #3

Description

@208wuqi

Hello, I encountered the following problems when testing the demo:
“RuntimeError: GET was unable to find an engine to execute this computation”
how to solve it?thank you!

Activity

  1. hujiecpp commented on May 23, 2023

    @hujiecpp
    Owner

    Can you provide the runtime information more detailly?

  2. 208wuqi commented on May 23, 2023

    @208wuqi
    Author

    python demo/demo.py --config-file projects/YOSO/configs/YOSO-R50.yaml --video-input 2.mkv --output output_video.mkv --opts MODEL.WEIGHTS ./model_zoo/yoso_res50_coco.pth
    [05/23 10:05:25 detectron2]: Arguments: Namespace(confidence_threshold=0.8, config_file='projects/YOSO/configs/YOSO-R50.yaml', input=None, opts=['MODEL.WEIGHTS', './model_zoo/yoso_res50_coco.pth'], output='output_video.mkv', overlap_threshold=0.98, video_input='2.mkv', webcam=False)
    [05/23 10:05:26 fvcore.common.checkpoint]: [Checkpointer] Loading from ./model_zoo/yoso_res50_coco.pth ...
    512 256
    [ERROR:0@2.038] global cap_ffmpeg_impl.hpp:2991 open Could not find encoder for codec_id=27, error: Encoder not found
    [ERROR:0@2.038] global cap_ffmpeg_impl.hpp:3066 open VIDEOIO/FFMPEG: Failed to initialize VideoWriter
    [ERROR:0@2.038] global cap.cpp:595 open VIDEOIO(CV_IMAGES): raised OpenCV exception:

    OpenCV(4.7.0) /io/opencv/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): /tmp/video_format_testjaz2izyw/test_file.mkv in function 'icvExtractPattern'

    0%| | 0/7501 [00:00<?, ?it/s]
    Traceback (most recent call last):
    File "demo/demo.py", line 189, in
    for vis_frame in tqdm.tqdm(demo.run_on_video(video), total=num_frames):
    File "/home/wuqi/.local/lib/python3.8/site-packages/tqdm/std.py", line 1178, in iter
    for obj in iterable:
    File "/home/wuqi/Code/YOSO/demo/predictor.py", line 130, in run_on_video
    yield process_predictions(frame, self.predictor(frame))
    File "/home/wuqi/Code/YOSO/detectron2/engine/defaults.py", line 223, in call
    predictions = self.model([inputs])[0]
    File "/home/wuqi/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
    File "/home/wuqi/Code/YOSO/projects/YOSO/yoso/segmentator.py", line 78, in forward
    backbone_feats = self.backbone(images.tensor)
    File "/home/wuqi/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
    File "/home/wuqi/Code/YOSO/detectron2/modeling/backbone/resnet.py", line 434, in forward
    x = self.stem(x)
    File "/home/wuqi/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
    File "/home/wuqi/Code/YOSO/detectron2/modeling/backbone/resnet.py", line 356, in forward
    x = self.conv1(x)
    File "/home/wuqi/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
    File "/home/wuqi/Code/YOSO/detectron2/layers/wrappers.py", line 76, in forward
    x = F.conv2d(
    RuntimeError: GET was unable to find an engine to execute this computation

  3. hujiecpp commented on May 23, 2023

    @hujiecpp
    Owner

    It seems that the VideoWriter does not support the .mkv format. Can you try other video format such as .mp4?

  4. 208wuqi commented on May 23, 2023

    @208wuqi
    Author

    What I input is a .mp4 video file.

  5. hujiecpp commented on May 23, 2023

    @hujiecpp
    Owner

    --video-input 2.mkv --output output_video.mkv

  6. 208wuqi commented on May 23, 2023

    @208wuqi
    Author

    python demo/demo.py --config-file projects/YOSO/configs/YOSO-R50.yaml --video-input 1.mp4 --output output_video.mp4 --opts MODEL.WEIGHTS ./model_zoo/yoso_res50_coco.pth
    [05/23 10:54:00 detectron2]: Arguments: Namespace(confidence_threshold=0.8, config_file='projects/YOSO/configs/YOSO-R50.yaml', input=None, opts=['MODEL.WEIGHTS', './model_zoo/yoso_res50_coco.pth'], output='output_video.mp4', overlap_threshold=0.98, video_input='1.mp4', webcam=False)
    [05/23 10:54:01 fvcore.common.checkpoint]: [Checkpointer] Loading from ./model_zoo/yoso_res50_coco.pth ...
    512 256
    [ERROR:0@2.862] global cap_ffmpeg_impl.hpp:2991 open Could not find encoder for codec_id=27, error: Encoder not found
    [ERROR:0@2.862] global cap_ffmpeg_impl.hpp:3066 open VIDEOIO/FFMPEG: Failed to initialize VideoWriter
    [ERROR:0@2.863] global cap.cpp:595 open VIDEOIO(CV_IMAGES): raised OpenCV exception:

    OpenCV(4.7.0) /io/opencv/modules/videoio/src/cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): /tmp/video_format_testkiva3ir6/test_file.mkv in function 'icvExtractPattern'

    0%| | 0/24800 [00:01<?, ?it/s]
    Traceback (most recent call last):
    File "demo/demo.py", line 189, in
    for vis_frame in tqdm.tqdm(demo.run_on_video(video), total=num_frames):
    File "/home/wuqi/.local/lib/python3.8/site-packages/tqdm/std.py", line 1178, in iter
    for obj in iterable:
    File "/home/wuqi/Code/YOSO/demo/predictor.py", line 130, in run_on_video
    yield process_predictions(frame, self.predictor(frame))
    File "/home/wuqi/Code/YOSO/detectron2/engine/defaults.py", line 223, in call
    predictions = self.model([inputs])[0]
    File "/home/wuqi/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
    File "/home/wuqi/Code/YOSO/projects/YOSO/yoso/segmentator.py", line 78, in forward
    backbone_feats = self.backbone(images.tensor)
    File "/home/wuqi/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
    File "/home/wuqi/Code/YOSO/detectron2/modeling/backbone/resnet.py", line 434, in forward
    x = self.stem(x)
    File "/home/wuqi/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
    File "/home/wuqi/Code/YOSO/detectron2/modeling/backbone/resnet.py", line 356, in forward
    x = self.conv1(x)
    File "/home/wuqi/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
    File "/home/wuqi/Code/YOSO/detectron2/layers/wrappers.py", line 76, in forward
    x = F.conv2d(
    RuntimeError: GET was unable to find an engine to execute this computation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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