cleardusk / 3DDFA_V2

The official PyTorch implementation of Towards Fast, Accurate and Stable 3D Dense Face Alignment, ECCV 2020.
MIT License
2.9k stars 514 forks source link

OSError: [WinError 193] %1 #62

Closed natgnah closed 3 years ago

natgnah commented 3 years ago

Describe the bug When I try to command "python demo.py -f examples/inputs/emma.jpg --onnx" this error message will pop up

Error message Traceback (most recent call last): File "demo.py", line 13, in from utils.render_ctypes import render # faster File "C:\Users\Yuan\3DDFA_V2-master\utils\render_ctypes.py", line 64, in render_app = TrianglesMeshRender(clibs=make_abs_path('asset/render.so')) File "C:\Users\Yuan\3DDFA_V2-master\utils\render_ctypes.py", line 39, in init self._clibs = ctypes.CDLL(clibs) File "C:\Users\Yuan\anaconda3\envs\Test\lib\ctypes__init.py", line 348, in init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 193] %1 不是有效的 Win32 应用程序。

Platform: Window

cleardusk commented 3 years ago

Try not to use utils/render_ctypes.py by comment out the last three lines of build.sh, and comment this line. utils/render_ctypes.py may not be friendly to Windows.

cd FaceBoxes
sh ./build_cpu_nms.sh
cd ..

cd Sim3DR
sh ./build_sim3dr.sh
cd ..

#cd utils/asset
#gcc -shared -Wall -O3 render.c -o render.so -fPIC
#cd ../..
natgnah commented 3 years ago

Try not to use utils/render_ctypes.py by comment out the last three lines of build.sh, and comment this line. utils/render_ctypes.py may not be friendly to Windows.

cd FaceBoxes
sh ./build_cpu_nms.sh
cd ..

cd Sim3DR
sh ./build_sim3dr.sh
cd ..

#cd utils/asset
#gcc -shared -Wall -O3 render.c -o render.so -fPIC
#cd ../..

thank you, it work for me