Comments (10)
Sorry, I tried to remove cv2
libs and forgot to test the code, thanks for you help, I already fix the bugs you pointed out, please try again :)
If you don't want to re-download the new released package, you may need to
- re-install BFM2017 with a new version of texture_uv.mat
- re-download facialDetails.py and proxyPredictor.py.
from facial_details_synthesis.
@apchenstu I get this error
Load preTrain model done.
Load preTrain model done.
Traceback (most recent call last):
File "facialDetails.py", line 294, in
main(args)
File "facialDetails.py", line 237, in main
fit_landmarks(args.landmark_exe_path, args.img_path)
File "facialDetails.py", line 57, in fit_landmarks
os.chdir(landmark_exe_path)
FileNotFoundError: [Errno 2] No such file or directory: ./landmarks
from facial_details_synthesis.
You may used an old version, this error is due to I renamed some folders. You can try the newest one release package, Thanks.
from facial_details_synthesis.
@apchenstu I used the released package attached, I think the problem is with the exe files as i am trying to setup the project in google colab and currently it is setup to work only in windows
Load preTrain model done.
Load preTrain model done.
sh: 1: FaceLandmarkImg.exe: not found
===> Landmarks detection done.
===> estimating proxy of /content/Facial_Details_Synthesis/src/test.jpg
Traceback (most recent call last):
File "/usr/lib/python3.6/shutil.py", line 550, in move
os.rename(src, real_dst)
FileNotFoundError: [Errno 2] No such file or directory: '/content/Facial_Details_Synthesis/src/landmarkDetector/processed/SH3mfFA_.box' -> '/content/Facial_Details_Synthesis/src/result/SH3mfFA_/SH3mfFA_.box'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "facialDetails.py", line 294, in
main(args)
File "facialDetails.py", line 248, in main
move_landmark(args.landmark_exe_path,save_path,base_name[0])
File "facialDetails.py", line 51, in move_landmark
shutil.move(os.path.join(landmark_exe_path,'processed',name+'.box'),os.path.join(save_path,name+'.box'))
File "/usr/lib/python3.6/shutil.py", line 564, in move
copy_function(src, real_dst)
File "/usr/lib/python3.6/shutil.py", line 263, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib/python3.6/shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/content/Facial_Details_Synthesis/src/landmarkDetector/processed/SH3mfFA_.box'
from facial_details_synthesis.
Yeah, I didn't test the code on other platforms. Your error looks like the landmarkDetector
not works well. I will write the compiling guideline in those two days, maybe you can try to re-compile the code in google colab by then. Thanks
from facial_details_synthesis.
Sorry, I tried to remove
cv2
libs and forgot to test the code, thanks for you help, I already fix the bugs you pointed out, please try again :)If you don't want to re-download the new released package, you may need to
- re-install BFM2017 with a new version of texture_uv.mat
- re-download facialDetails.py and proxyPredictor.py.
Thank you for your quick response, but there are still many bugs.
1. The output part of the displacement map is wrong.
As I pointed out before, line 280 - 282 in facialDetails.py
are wrong.
This part outputs the error like belows.
===> predicting details of ...\FacialDetailsSynthesis\samples\details\019615.jpg
Traceback (most recent call last):
File "...\PIL\PngImagePlugin.py", line 771, in _save
rawmode, mode = _OUTMODES[mode]
KeyError: 'I;16'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "facialDetails.py", line 297, in <module>
main(args)
File "facialDetails.py", line 282, in main
Image.fromarray(displacementMap.astype('uint16')).save(save_path)
File "...\PIL\Image.py", line 1994, in save
save_handler(self, fp, filename)
File "...\PIL\PngImagePlugin.py", line 773, in _save
raise IOError("cannot write mode %s as PNG" % mode)
OSError: cannot write mode I;16 as PNG
2. Pretrained weights may be wrong.
The pretrained weights of DFDN may be wrong because the estimation of the normal and distplacement map doesn't work.
The outputs contain many block noises.
3. Linking the output material file with the normal and displacement map isn't correct.
result.mtl
is always the following format.
newmtl FaceTexture
map_Kd result.isomap.png
It doesn't contain the normal and displacement map.
4. the path of hmrenderer.exe is wrong
Line 291 in facialDetails.py
doesn't work well because the renderer cannot find the material file.
cmd = '%s/hmrenderer.exe %s %s %s'%(args.face_render_path,save_obj_path+'.obj',save_path,args.face_render_path+'/shaders')
So, the output of the rendering shows only the mesh and doesn't show the albedo.
I'm sorry many times.
Could you check them?
from facial_details_synthesis.
No worries, I noted the bugs you pointed out, actually, these four bugs are the same problem, it is because the code could not correctly load the input image.
Maybe we use different version PIL libs(PIL 6.0.0
in my PC), and the anaconda default version is 'PIL 6.1.0' now, I will fix this. Thanks.
from facial_details_synthesis.
I just setup the environment and test the code in a new PC, it can correctly output normalMap and displacementMap, for the noises output, can you show me the results, I also got noisy result before I fixed the bugs you point out, it's because value range (i.e., opencv range 0-255 and PIL range 0-1.0 after transform RGB to HSV), please check this line here.
Please ignore material warming as our phong shading model would not use material and texture.
from facial_details_synthesis.
@apchenstu thanks looking forward to compile guide to try to get it to work in google colab
from facial_details_synthesis.
@apchenstu Thank you very much. I could try your project.
from facial_details_synthesis.
Related Issues (20)
- CUDNN_STATUS_BAD_PARAM
- Some detal about code implement? HOT 1
- textureRender not output the result without error HOT 1
- textureRender.exe errors. HOT 1
- proxy Predictor Using Emotion Issues
- Can you provide a link to bfm2017-1_bfm_nomouth.bin? I can't install eos-py==0.16.1 HOT 2
- AttributeError: 'Image' object has no attribute 'ndim' HOT 3
- Why is always running out of my GPU memory? HOT 1
- How can i get the Albedo map and Specular map
- Question regarding code HOT 1
- A problem in running facialDetails.py HOT 5
- LOG (Cannot open file [D:\Folder_1\init_facial_fidelity_capture\results\019615\result.obj] ) HOT 1
- LOG (Cannot open file [D:\Folder_1\init_facial_fidelity_capture\results\019615\result.obj] ) HOT 3
- Cannot fit landmarks HOT 2
- where is the "./landmarkDetector/processed/teaser.box"?
- The release version is not able to find the landmarks
- If cmake version is the newest, the cmd of section "Compiling/proxyEstmator/Step3 cmake .." should change.
- Why the faceRender.exe is not support displacementMap? HOT 2
- can not create processed/019615.box' HOT 1
- can not find box files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facial_details_synthesis.