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

How to use menpo3d/extractimage.py to generate the mesh occlusion mask for UV map? #80

Open
llei66 opened this issue May 19, 2021 · 0 comments

Comments

@llei66
Copy link

llei66 commented May 19, 2021

from menpo3d.extractimage import *

import menpo3d.io as m3io
import menpo.io as mio
import cv2
import menpo3d
import pdb

obj_path = '/data/DATA/3dFace/UVGAN_DATA/Visualise_demo/demo_input/001_01_01_051_10.obj'

img_path = "/data/DATA/3dFace/UVGAN_DATA/Visualise_demo/demo_input/img/"
mesh = m3io.import_mesh(obj_path)
image = mio.import_images(img_path, verbose=True)

#from menpowidgets import visualize_images
#visualize_images(image)
pdb.set_trace()

#mesh_temp.view()
points = mesh.points
mask = per_vertex_occlusion_accurate(mesh)
colours = extract_per_vertex_colour(mesh, image[0])

I use the menpo3d, and import mesh and image, but the mask results is false, so every points(53125) is occluded, I output the result as below. Could you help me to get the occlusion mask for uvmap? Thanks a lot!
image

@llei66 llei66 changed the title How to use menpo3d/extractimage.py to generate the occlusion mask? How to use menpo3d/extractimage.py to generate the mesh occlusion mask for UV map? May 19, 2021
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

1 participant