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

Building ITW texture model issue #2

Open
thrillerist opened this issue May 15, 2018 · 3 comments
Open

Building ITW texture model issue #2

thrillerist opened this issue May 15, 2018 · 3 comments

Comments

@thrillerist
Copy link

Hi,
there's error when building the ITW texture model.
itw_texture_model, X, m = generate_texture_model_from_image_3d_fits(features_and_fits_32bit[:n_imgs_for_rpca])

Traceback (most recent call last):
...
File "C:\Users\thril\Documents\GitHub\itwmm\itwmm\model_init_.py", line 63, in generate_texture_model_from_image_3d_fits
features, mask = extract_per_vertex_colour_with_occlusion(fit_2d, img)

File "C:\Users\thril\Documents\GitHub\itwmm\itwmm\model\extractimage.py", line 130, in extract_per_vertex_colour_with_occlusion
render_diag=render_diag)

File "C:\Users\thril\Documents\GitHub\itwmm\itwmm\model\extractimage.py", line 26, in per_vertex_occlusion
bc, ti = rasterize_barycentric_coordinate_images(mesh, shape)

File "C:\Anaconda3\lib\site-packages\menpo3d\rasterize\cpu.py", line 151, in rasterize_barycentric_coordinate_images
tri_indices_img = np.zeros((1, h, w), dtype=int)

TypeError: 'numpy.float64' object cannot be interpreted as an integer

@jiajunzhang16
Copy link

Also meet the same error, have you solved the problem?
Many thanks.

@KhanhDinhDuy
Copy link

I also meet this error :(((

@KhanhDinhDuy
Copy link

In this file: /anaconda3/envs/menpo/lib/python3.5/site-packages/menpo3d/rasterize/cpu.py
we need to add this line after the "h, w = image_shape":
h, w = int(h), int(w)
This will resolve my issue because h,w can be float numbers

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

No branches or pull requests

3 participants