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

Compile tf_mesh_renderer with TF 1.15 #177

Closed CengizhanYurdakul closed 2 years ago

CengizhanYurdakul commented 3 years ago

Hello, I am trying to implement 3D face reconstruction in another code running on Tensorflow 1.15. I'm in trouble with compiling tf_mesh_renderer. Is it possible to compile? If possible how can I do it? I am attaching the error I got. Screenshot from 2021-08-11 19-22-05

YuDeng commented 3 years ago

Hi, the library can be used if you pass the first test out of three. Did you successfully generate rasterize_triangles_kernel.so?

CengizhanYurdakul commented 2 years ago

If you want to generate rasterize_triangles_kernel.so clearly you need to create symbolic link on your tensorflow_core.

Firstly use 'find' command for sure that your path

find /home -name tensorflow_core

Secondly go to path that you found

cd <PATH THAT FOUND FROM FIND COMMAND>
cd /usr/local/lib/python3.6/dist-packages/tensorflow_core/

Finally create symbolic link and compile again

ln -s libtensorflow_framework.so.1 /usr/local/lib/python3.6/dist-packages/tensorflow_core/libtensorflow_framework.so

The problem is '.1' that end of the '.so'. Process can not reach this file and fail.

xi4444x commented 1 year ago

Hello, I am trying to implement 3D face reconstruction in another code running on Tensorflow 1.15. I'm in trouble with compiling tf_mesh_renderer. Is it possible to compile? If possible how can I do it? I am attaching the error I got. Screenshot from 2021-08-11 19-22-05

I'm just like you ,but I don't successfully generate the .so file.

CengizhanYurdakul commented 1 year ago

The main problem here is the name of the file libtensorflow_framework.so. After I created this file, I also created a symbolic link for libtensorflow_framework.so.1 as in the command below. This solved my problem. Make sure you have your own path and try this.

ln -s /usr/local/lib/python3.6/dist-packages/tensorflow_core/libtensorflow_framework.so.1 /usr/local/lib/python3.6/dist-packages/tensorflow_core/libtensorflow_framework.so