Code Monkey home page Code Monkey logo

bfm_to_flame's People

Contributors

timobolkart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bfm_to_flame's Issues

Replace BFM with FLAME?

@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?

Convert HiFi3D++ UV texture to FLAME UV texture

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

Generating the cache_data

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?

How to convert 3dmm texture to flame texture?

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!

How to prepare FLAME_uv_template.obj and BFM_aligned.obj

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?

FLAME_to_BFM

This work provides a way to convert BFM model to FLAME, but any plan to demonstrate:

  1. how to create a BFM texture model from the FLAME vertex color space, and
  2. how to convert a FLAME mesh to a BFM mesh.

Thanks in advance.

How to create "BFM_to_FLAME_corr.npz"

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?

Albedo model

Hey

It'll be appreciated if FLAME_albedo_from_BFM.npz file be available. I believe it saves some efforts.

Regards

Regarding the obj file

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..

BFM point color should be multiply by the color coefficient?

Thanks for a great work ! It's brilliant to transfer the uv basis of FLAME from BFM. I have a problem here, for calculate the point color, should it multiply by the color coefficient? I found that part is exactly same with the mean color calculation.
Snipaste_2020-12-17_00-06-53

error when running col_to_tex.py

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.