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

ImportError: DLL load failed: 找不到指定的程序。 #41

Open
QueenPuxxi opened this issue Aug 16, 2023 · 3 comments
Open

ImportError: DLL load failed: 找不到指定的程序。 #41

QueenPuxxi opened this issue Aug 16, 2023 · 3 comments

Comments

@QueenPuxxi
Copy link

When I use:
python -m demo.demo_frankmocap --input_path ./sampledata/single_totalbody.mp4 --out_dir ./mocap_output --save_pred_pkl

The following error occurs:
(frankmocap) e:\MOCAP\frankmocap>python -m demo.demo_frankmocap --input_path ./sampledata/single_totalbody.mp4 --out_dir ./mocap_output --save_pred_pkl
Traceback (most recent call last):
File "E:\Anaconda\envs\frankmocap\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "E:\Anaconda\envs\frankmocap\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "e:\MOCAP\frankmocap\demo\demo_frankmocap.py", line 24, in
from handmocap.hand_bbox_detector import HandBboxDetector
File "e:\MOCAP\frankmocap\handmocap\hand_bbox_detector.py", line 19, in
from detectron2.engine import DefaultPredictor
File "E:\Anaconda\envs\frankmocap\lib\site-packages\detectron2\engine_init
.py", line 11, in
from .hooks import *
File "E:\Anaconda\envs\frankmocap\lib\site-packages\detectron2\engine\hooks.py", line 17, in
from detectron2.evaluation.testing import flatten_results_dict
File "E:\Anaconda\envs\frankmocap\lib\site-packages\detectron2\evaluation_init
.py", line 2, in
from .cityscapes_evaluation import CityscapesInstanceEvaluator, CityscapesSemSegEvaluator
File "E:\Anaconda\envs\frankmocap\lib\site-packages\detectron2\evaluation\cityscapes_evaluation.py", line 11, in
from detectron2.data import MetadataCatalog
File "E:\Anaconda\envs\frankmocap\lib\site-packages\detectron2\data_init_.py", line 4, in
from .build import (
File "E:\Anaconda\envs\frankmocap\lib\site-packages\detectron2\data\build.py", line 12, in
from detectron2.structures import BoxMode
File "E:\Anaconda\envs\frankmocap\lib\site-packages\detectron2\structures_init_.py", line 7, in
from .masks import BitMasks, PolygonMasks, rasterize_polygons_within_box, polygons_to_bitmask
File "E:\Anaconda\envs\frankmocap\lib\site-packages\detectron2\structures\masks.py", line 9, in
from detectron2.layers.roi_align import ROIAlign
File "E:\Anaconda\envs\frankmocap\lib\site-packages\detectron2\layers_init_.py", line 3, in
from .deform_conv import DeformConv, ModulatedDeformConv
File "E:\Anaconda\envs\frankmocap\lib\site-packages\detectron2\layers\deform_conv.py", line 11, in
from detectron2 import _C
ImportError: DLL load failed: 找不到指定的程序。

企业微信截图_16921566365222

@carlosedubarreto
Copy link
Owner

it looks like a problem on the detectron build.

this instruction helpd me recently to be able to install it, hope it helps
https://stackoverflow.com/questions/60631933/install-detectron2-on-windows-10/72784255#72784255

one last thing, if you allow me to suggest, why not go to a code that looks much better?

I recently found this code called 4d humans
https://github.com/shubham-goel/4D-Humans

I'm amazed by it, the result in general is great and fast.
I liked it so much that I even made an addon for blender with it. And its not difficult to install, probably the most difficult part (if you are not using the addon) ia making the compilation of detectron 2, and that you can solve with the link I sent you from stack exchange.

@QueenPuxxi
Copy link
Author

@carlosedubarreto Hello, I just found that when I run with python -m demo.demo_bodymocap --input_path ./sampledata/single_totalbody.mp4 --out_dir ./mocap_output it doesn't pop up the previous error. Yes, I deleted --save_pred_pkl.

But unfortunately this led to a new error:
(frankmocap) E:\MOCAP\frankmocap>python -m demo.demo_bodymocap --input_path ./sampledata/single_totalbody.mp4 --out_dir ./mocap_output
Loading Body Pose Estimator
use_smplx False
WARNING: You are using a SMPL model, with only 10 shape coefficients.
Traceback (most recent call last):
File "E:\Anaconda\envs\frankmocap\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "E:\Anaconda\envs\frankmocap\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "E:\MOCAP\frankmocap\demo\demo_bodymocap.py", line 178, in
main()
File "E:\MOCAP\frankmocap\demo\demo_bodymocap.py", line 165, in main
body_mocap = BodyMocap(checkpoint_path, args.smpl_dir, device, use_smplx)
File "E:\MOCAP\frankmocap\bodymocap\body_mocap_api.py", line 38, in init
self.model_regressor = hmr(SMPL_MEAN_PARAMS).to(self.device)
File "E:\MOCAP\frankmocap\bodymocap\models\hmr.py", line 165, in hmr
resnet_imagenet = resnet.resnet50(pretrained=True)
File "E:\Anaconda\envs\frankmocap\lib\site-packages\torchvision\models\resnet.py", line 301, in resnet50
**kwargs)
File "E:\Anaconda\envs\frankmocap\lib\site-packages\torchvision\models\resnet.py", line 263, in _resnet
progress=progress)
File "E:\Anaconda\envs\frankmocap\lib\site-packages\torch\hub.py", line 575, in load_state_dict_from_url
return torch.load(cached_file, map_location=map_location)
File "E:\Anaconda\envs\frankmocap\lib\site-packages\torch\serialization.py", line 600, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "E:\Anaconda\envs\frankmocap\lib\site-packages\torch\serialization.py", line 242, in init
super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
1692257714747

What is the cause of this?

BTW, thank you for your recommendation! :)

@carlosedubarreto
Copy link
Owner

@QueenPuxxi , this error is usually a problem to download files from the internet.
some code download automatically files with models, and as far as I know that error is something that you just have to try again to make it work.

Or if you have a place with restriction on the internet, sometimes a VPN is necessary.

Or maybe putting in vscode to debug and see what file its trying to downoad and get it manually and put in the place it expects to find the file.

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