patrikhuber / eos

A lightweight 3D Morphable Face Model library in modern C++
Apache License 2.0
1.92k stars 598 forks source link

Error loading the Morphable Model: Error opening given file: ./bfm2017/bfm2017-1_bfm_nomouth.bin #341

Closed XIAO-RUI-RUI closed 1 year ago

XIAO-RUI-RUI commented 2 years ago

I follow the step in github. When I used the latest convert-bfm2017-to-eos.py(7ec85e6028dfcdf959c87ac7d926681121e55022), there is error follow: `Traceback (most recent call last): File "convert-bfm2017-to-eos.py", line 53, in texture_triangle_indices=[]) # uv-coordinates can be added here TypeError: init(): incompatible constructor arguments. The following argument types are supported:

  1. eos.morphablemodel.MorphableModel(shape_model: eos.morphablemodel.PcaModel, color_model: eos.morphablemodel.PcaModel, texture_coordinates: List[List[float[2]]] = [])
  2. eos.morphablemodel.MorphableModel(shape_model: eos.morphablemodel.PcaModel, expression_model: Union[eos.morphablemodel.PcaModel, List[eos.morphablemodel.Blendshape]], color_model: eos.morphablemodel.PcaModel, texture_coordinates: List[List[float[2]]] = [])

Invoked with: <eos.morphablemodel.PcaModel object at 0x000001551C1B1830>, <eos.morphablemodel.PcaModel object at 0x000001551C1328B0>, <eos.morphablemodel.PcaModel object at 0x000001551C171870>; kwargs: vertex_definitions=None, texture_coordinates=[], texture_triangle_indices=[]`


Because the the problem, I used the eos-py1.16.0, the problem is disappear. But when I used the bfm2017-1_bfm_nomouth.bin in one program, another problem come up with: Error loading the Morphable Model: Error opening given file: ./bfm2017/bfm2017-1_bfm_nomouth.bin That all.

XIAO-RUI-RUI commented 2 years ago

I seem find the reason, maybe I should use the old version of convert-bfm2017-to-eos.py and eos-py0.16.0 together.

patrikhuber commented 2 years ago

Hi @XIAO-RUI-RUI,

I just ran the latest version of convert-bfm2017-to-eos.py (eos 1.3.0 from the master branch), and it loaded, converted and saved the BFM2017 just fine, without any errors. I can then also successfully load the converted model using eos.morphablemodel.load_model(...).

I think you must have done something wrong locally, or modified the script in some way.

Make sure you're on the latest master branch or v1.3.0. Definitely do not use an eos version as old as 0.16 anymore.