anhttran/extreme_3d_faces

get 3d reconstructed faces with facial fine details

lhyfst opened this issue · 4 comments

Dear author,
@anhttran

For unknown reasons, my 3d reconstructed faces don't have fine details.
this is an image shown in your paper:
image

this is what I get by run python testBatchModel.py testImages.txt /shared
8845981467_6945cef32a_b.ply
image
image

I don't know why my results don't have the facial fine details.

Could you please kindly tell me how to add the fine details to the 3d reconstructed faces?

Best,
Heyuan

When I run python testBatchModel.py testImages.txt /shared it warns sh: 1: ./TestBump: not found. Is it the reason why my outputs don't have details? How to fix it?

$ nvidia-docker run --rm -ti --ipc=host --privileged -v /shared:/shared --gpus all extreme-3dmm-docker bash
root@5a3450a4f747:/app/demoCode# python testBatchModel.py testImages.txt /shared
> Prepare image ../data/test/03f245cb652c103e1928b1b27028fadd--smith-glasses-too-faced.jpg:
>     Number of faces detected: 1
> Prepare image ../data/test/20140420_011855_News1-Apr-25.jpg:
>     Number of faces detected: 1
...
> CNN Model loaded to regress 3D Shape and Texture!
> Loaded the Basel Face Model to write the 3D output!
> Processing image: /shared/imgs/03f245cb652c103e1928b1b27028fadd--smith-glasses-too-faced.png
('> Writing 3D file in: ', '/shared/shape/03f245cb652c103e1928b1b27028fadd--smith-glasses-too-faced.ply')
> Processing image: /shared/imgs/20140420_011855_News1-Apr-25.png
('> Writing 3D file in: ', '/shared/shape/20140420_011855_News1-Apr-25.ply')
> Processing image: /shared/imgs/214451-human-being-woman-old-calm-face-senior-citizen-photocase-stock-photo-large.png
...
Regress bump maps
Recover the 3D models
./TestBump -batch /shared/imList.txt /shared/3D/ /shared/shape /shared/bump /shared/bump ../3DMM_model/BaselFaceModel_mod.h5 ../dlib_model/shape_predictor_68_face_landmarks.dat /shared/imgs /shared/imgs/ 1
sh: 1: ./TestBump: not found

Moreover, when I run docker build -t extreme-3dmm-docker ., although I can create the docker container successfully, there are some warnings in step 9/13:

$ docker build -t extreme-3dmm-docker .
...
Step 9/13 : RUN mkdir build; 	cd build; 	cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=../demoCode ..; 	make; 	make install; 	cd ..
 ---> Running in 5548b8c0ddcf
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:17 (find_package):
  By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "OpenCV", but
  CMake did not find one.

  Could not find a package configuration file provided by "OpenCV" with any
  of the following names:

    OpenCVConfig.cmake
    opencv-config.cmake

  Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
  "OpenCV_DIR" to a directory containing one of the above files.  If "OpenCV"
  provides a separate development package or SDK, be sure it has been
  installed.


OpenCV information:
  OpenCV_INCLUDE_DIRS: 
  OpenCV_LIBRARIES: 
-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   filesystem
--   system
Boost information:
  Boost_INCLUDE_DIRS: /usr/include
  Boost_LIBRARIES: /usr/lib/x86_64-linux-gnu/libboost_filesystem.so;/usr/lib/x86_64-linux-gnu/libboost_system.so
  Boost_LIBRARY_DIRS: /usr/lib/x86_64-linux-gnu
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
OPENMP FOUND
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.4")  
-- Configuring done
-- Generating done
-- Build files have been written to: /app/build
Scanning dependencies of target CvGl
[  7%] Building CXX object modules/CvGl/CMakeFiles/CvGl.dir/FBRender.cpp.o
In file included from /app/modules/CvGl/FBRender.cpp:2:
/app/modules/CvGl/FBRender.h:21:10: fatal error: cv.h: No such file or directory
 #include "cv.h"
          ^~~~~~
compilation terminated.
make[2]: *** [modules/CvGl/CMakeFiles/CvGl.dir/build.make:63: modules/CvGl/CMakeFiles/CvGl.dir/FBRender.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:91: modules/CvGl/CMakeFiles/CvGl.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
[  7%] Building CXX object modules/CvGl/CMakeFiles/CvGl.dir/FBRender.cpp.o
In file included from /app/modules/CvGl/FBRender.cpp:2:
/app/modules/CvGl/FBRender.h:21:10: fatal error: cv.h: No such file or directory
 #include "cv.h"
          ^~~~~~
compilation terminated.
make[2]: *** [modules/CvGl/CMakeFiles/CvGl.dir/build.make:63: modules/CvGl/CMakeFiles/CvGl.dir/FBRender.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:91: modules/CvGl/CMakeFiles/CvGl.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Removing intermediate container 5548b8c0ddcf
 ---> 993fdebcb9d4

Any suggestions are valuable!

Look like CMake could not find OpenCV library, making your docker failed to build the C++ code to generate the executable file TestBump.

I plan to develop a Python-only version, but I am quite busy with my current schedule. I may release it sometime in June.

Thanks for your reply. Which version of the OpenCV did you use?

I used OpenCV 2 when developing this code. I think it is not hard to adapt it to OpenCV 3. See an example pull request in a similar project: anhttran/3dmm_cnn#45