microsoft / Deep3DFaceReconstruction

Accurate 3D Face Reconstruction with Weakly-Supervised Learning: From Single Image to Image Set (CVPRW 2019)
MIT License
2.16k stars 441 forks source link

KeyError: 'TEST_SRCDIR' #191

Open UestcJay opened 2 years ago

UestcJay commented 2 years ago

I follow the instruction, pip tf1.12 on ubuntu16.04, cuda9.0, using the precompiling binary file, but there is a error, can you give me some help? Traceback (most recent call last): File "demo.py", line 13, in from face_decoder import Face3D File "/root/shenzhen/lkq/Deep3DFaceReconstruction/face_decoder.py", line 10, in from renderer import mesh_renderer File "/root/shenzhen/lkq/Deep3DFaceReconstruction/renderer/mesh_renderer.py", line 23, in import rasterize_triangles File "/root/shenzhen/lkq/Deep3DFaceReconstruction/renderer/../renderer/rasterize_triangles.py", line 27, in os.path.join(os.environ['TEST_SRCDIR'], File "/root/anaconda3/envs/deep3d/lib/python3.6/os.py", line 669, in getitem raise KeyError(key) from None KeyError: 'TEST_SRCDIR'

Liuxiaoan1 commented 2 years ago

我最近也遇到了这个问题 我解决了 如果你是linux则把TEST_SRCDIR改成HOME,下一行改成你的.so文件路径即可,你可以试一下

kun2001github commented 4 months ago

I had the same problem, and here's my solution:export TEST_SRCDIR=/root/Deep3DFaceReconstruction/renderer If you want to make it permanent, you can write it to ~/.bashrc I hope this will help you

Refer to :https://github.com/tensorflow/tensorflow/issues/8921#issuecomment-291244714