Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using the BFM model #17

Closed
Adra8373 opened this issue Apr 18, 2017 · 7 comments
Closed

Error when using the BFM model #17

Adra8373 opened this issue Apr 18, 2017 · 7 comments

Comments

@Adra8373
Copy link

After using the conversion scripts available (convert_bfm2009_to_raw_binary.m ; bfm-binary-to-cereal ),
I got this message
Loading shape PCA basis matrix with 160470 rows and 199 cols.
Loading colour PCA basis matrix with 160470 rows and 199 cols.
Warning: PCA shape model's data dimension is different from the number of textur
e coordinates given. The converted model is still saved, but does most likely no
t work correctly for texturing.

But I was wondering about the warning is there any problem in the conversion process. Because when I used the generated file in 4dface project I got this error:

OpenCV Error: Assertion failed (s >= 0) in cv::setSize, file C:\opencv\github-2.
4\opencv\modules\core\src\matrix.cpp, line 116
OpenCV Error: Insufficient memory (Failed to allocate 128508788 bytes) in cv::Ou
tOfMemoryError, file C:\opencv\github-2.4\opencv\modules\core\src\alloc.cpp, lin
e 52

@patrikhuber
Copy link
Owner

patrikhuber commented Apr 18, 2017

Hi,

The warning is just exactly what it says: The BFM doesn't come with texture coordinates, so unless you add some, anything requiring texture remapping will naturally not be available.

Not sure where the OpenCV errors come from. You'll have to check which line it occurs. Note that BFM support is somewhat alpha-status so unless you are willing to get your hands dirty and know how to run a debugger, I would not recommend going that route.
We hope to improve BFM support in the future.

@Adra8373
Copy link
Author

Hi

I think the problem in the rows of the matrix is negative. How can I solve it please? Is the problem in the conversion process?

4dface.exe!cv::Mat::create(int _rows, int _cols, int _type) Line 354 C++

this 0x00000000001c3ae8 {flags=1124008870 dims=2 rows=-331695445 ...} cv::Mat *

@patrikhuber
Copy link
Owner

patrikhuber commented Apr 18, 2017

I think you may just be running out of memory (RAM)? Though the BFM basis matrix is only about 70k x 200, so not too big. Shouldn't be an issue.
Can I please recommend that you use an up-to-date eos version (i.e. v0.12.1), not the one from the 4dface submodule. eos evolved a lot and now uses Eigen to represent model data.

Still, I think this is most likely some issue with your system.

@Adra8373
Copy link
Author

Hi

I uploaded the new version of 4dface, but when I tried to run the cmake I got this error

CMake Error at C:/Program Files/CMake/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find Eigen3 (missing: EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
(Required is at least version "2.91.0")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.6/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
cmake/FindEigen3.cmake:76 (find_package_handle_standard_args)
CMakeLists.txt:74 (find_package)

It is because of Eigen package, I need to use the Eigen that in eos how can I set that ?

@patrikhuber
Copy link
Owner

patrikhuber commented Apr 18, 2017

Please follow the instructions in the README of eos. (you may also need to clear the CMake cache)

(Note that the newer eos version may not work out of the box with this current 4dface version, be prepared to make some adjustments, if you want to combine these two. It's easy to do for someone with a bit of programming experience but it's not an out-of-the-box supported use-case at the moment.)

@Thanh-Binh
Copy link

Is BFM better than Surrey model?

@patrikhuber
Copy link
Owner

patrikhuber commented Apr 18, 2017

Is BFM better than Surrey model?

This question does not have a yes/no answer. Among many other differences, the BFM is a high-res, high-quality model, capturing face, ear and neck area. The SFM comes in many resolution levels (from 845 vertices to 30k), a public shape model, and expressions. There are many use-cases for both of them, and there's many publications out there describing both of the models in detail.

I'm going to close this issue as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants