timobolkart / bfm_to_flame Goto Github PK
View Code? Open in Web Editor NEWConvert from Basel Face Model (BFM) to the FLAME head model
Home Page: http://flame.is.tue.mpg.de
Convert from Basel Face Model (BFM) to the FLAME head model
Home Page: http://flame.is.tue.mpg.de
Would you please check why the inpainting masks are not available for download? Thanks!
@TimoBolkart Do you know someone I could hire who could help me take any usage of the BFM out of 3DDFA_v2, and replace it with the FLAME model instead?
Hi @TimoBolkart !
I have a question I hope you could help me with.
I'm trying to convert a UV texture made for HiFi3D++ into a UV texture for FLAME.
In https://github.com/csbhr/FFHQ-UV/blob/main/FLAME_Apply_HIFI3D_UV/flame2hifi3d_assets/FLAME_w_HIFI3D_UV.obj , the UV coordinates of the HiFi3D++ UV-texture map corresponding to the Flame vertices/faces are provided (https://github.com/csbhr/FFHQ-UV/blob/main/README_flame2hifi3d.md), using these UV coordinates, the FLAME meshes can look for texture colors from the UV-maps in HiFi3D++ format.
I need to basically copy the pixels from one UV texture into the corresponding location in the new UV texture. Any tips on how to get this correspondence?
Thanks a lot !!
Best
Since I use the 3DDFA_V2 to predict BFM model without neck area, how can i change it to FLAME model. BFM model without neck part only has 35709 points.
Hello, I've read the other issues and I want to ask how to generate the cache_data for mesh conversion. the BFM model I'm using doesn't seem to fit any so I want to try generating a new cached_data to use. I am currently using the face-only BFM model and I want to try with other mesh models as well.
also is the cache_data in the col_to_tex only specifically for texture conversion? as it requires vt and ft and I tried using the example input and output and it doesn't work, changing vt to v and ft to f returns ValueError: Input must be Nx3. if yes then is there much difference in creating for mesh conversion?
and I've seen the cached_data and I see the matrix 'mtr' inside it, is the matrix calculated using barycentric_coords for vertices, or is it something else?
FLAME to BFM.
Thanks for your great work. The author provides the the BFM_to_FLAME_corr.npy for us. But how is this BFM_to_FLAME_corr.npzcalculated?
Hello, the code of this branch demonstrates how to convert 3dmm mesh into flame mesh, but there is no texture conversion. Do you know how to convert 3dmm texture into flame texture? Looking forward to your reply, thank you very much!
Nice work! Can you give a general introduction on how to prepare FLAME_uv_template.obj and BFM_aligned.obj?
Did you just prepare the generic template mesh of FLAME and save it as FLAME_uv_template.obj, and then align a template mesh of BFM to it via rigid transform or IPC?
Line 74 in 5d12b6b
This work provides a way to convert BFM model to FLAME, but any plan to demonstrate:
Thanks in advance.
Hi,
This project use standard BFM2009 convert to FLame, but deep3dface (https://github.com/sicxu/Deep3DFaceRecon_pytorch.git) generate mesh is not standart (71418,3), how to convert this mesh to flame?
Thanks a lot!
Thanks for the great work!
Although you directly provided the file "BFM_to_FLAME_corr.npz", I am curious how this file was generated, and it seems not mentioned in the code.
Suppose, I want to convert other BFM-like models to FLAME, or convert BFM to other FLAME-like models, then what should I do?
Hi, thanks for the repository !
Is it possible to ask for a correspondence between BIWI (https://data.vision.ee.ethz.ch/cvl/datasets/b3dac2.en.html) and FLAME ?
Hey
It'll be appreciated if FLAME_albedo_from_BFM.npz
file be available. I believe it saves some efforts.
Regards
Thank you for the great work! The link to download impainting masks is not working. Can you kindly solve that?
Thank you for your code. I am a green hand in 3d face reconstruction, I wonder when converting a BFM mesh to a FLAME mesh, should we change the corresponding landmarks?
Thank you for your nice and useful work!
It seems that this repo is currently supporting BFM 2017 and 2009.
Are you planning to also support BFM 2019? (https://faces.dmi.unibas.ch/bfm/bfm2019.html)
my basel model doesn't include the neck, can it still work?
The conversion from FLAME albedo from BFM generates only two components.
Can you please suggest if I have a textured BFM mesh, How to convert it in the textured FLAME mesh?
In general, most projects primarily focus on the reconstruction of facial features without including ears. However, the complete BFM model includes ears. In such a scenario, how should it be transformed into FLAME?
Nice work! But I only successfully converted the mesh of BFM model. I don't understand how to change texture.I need to use col_ to_ tex.py? I'm not likely to use the output of that code. I would be very grateful if you could reply to me!!
Hello, thanks for the share.
I can't fit my scan data to flame
umm.. in mesh_convert.py
my scan file is return ('Conversion failed - input mesh does not match any setup')
my scan file
BFM_mesh.v.shape[0] = 115676
BFM_mesh.f.shape[0] = 229432
Can't it be executed except when the if statement is satisfied?
Thanks for your advice..
Hi, thanks for your sharing.
We had this problem (Conversion failed - input mesh does not match any setup) while converting an obj file generated by deep3d (which is based on BFM2009, refer to https://github.com/sicxu/Deep3DFaceRecon_pytorch) to FLAME.
The Vertices are 35709, Faces are 70789 in the obj file, how to convert it to FLAME?
Hope to get your reply, thank you!
Thanks for your great work. I followed the instructions to generate the file, but the data in it seems to be wrong . all are zeros. I tried it twice. Can you help me?
I downloaded the models from the links as shown. The model file had a different name, so I updated in the code:
bfm_model = load_BFM_2017('./model/model2017-1_face12_nomouth.h5')
Then when I ran python col_to_tex.py
, I get this error:
Conversion started......
Traceback (most recent call last):
File "col_to_tex.py", line 200, in <module>
main()
File "col_to_tex.py", line 193, in main
transfer_BFM_textures_to_FLAME_uv()
File "col_to_tex.py", line 158, in transfer_BFM_textures_to_FLAME_uv
bfm_verts_color[valid_BFM_faces[:, 1], :] * valid_BFM_b_coords[:, 1][:, np.newaxis] + \
IndexError: index 42692 is out of bounds for axis 0 with size 28588
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.