Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
208wuqi opened this issue May 23, 2023 · 6 comments

Comments

@208wuqi
Copy link

208wuqi commented May 23, 2023

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!

@hujiecpp
Copy link
Owner

Can you provide the runtime information more detailly?

@208wuqi
Copy link
Author

208wuqi commented May 23, 2023

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

@hujiecpp
Copy link
Owner

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

@208wuqi
Copy link
Author

208wuqi commented May 23, 2023

What I input is a .mp4 video file.

@hujiecpp
Copy link
Owner

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

@208wuqi
Copy link
Author

208wuqi commented May 23, 2023

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants