menpo / lsfm

Large Scale Facial Model (LSFM) - an automatic pipeline for constructing 3D Morphable Models from large collections of facial meshes
http://ibug.doc.ic.ac.uk/resources/lsfm/
BSD 3-Clause "New" or "Revised" License
500 stars 117 forks source link

AttributeError: 'ColouredTriMesh' object has no attribute 'texture' #21

Open channingxiao opened 6 years ago

channingxiao commented 6 years ago

I was using lsfm 1.0.0. I encountered "AttributeError: 'ColouredTriMesh' object has no attribute 'texture'" error. So I checked the code, it was in

def import_mesh(path): if path.suffix == '.pkl' or path.suffix == '.gz': mesh = import_pickle(path) else: mesh = m3io.import_mesh(path) if mesh.texture.pixels.dtype != np.float64: mesh.texture.pixels = normalize_pixels_range(mesh.texture.pixels) return mesh

mesh = import_pickle(path) here I imported the template.pkl copied from "data". I read the menpo "ColouredTriMesh" code, there is no attribute 'texture'" . ( version 0.7.7).

I am using ubuntu 14.04 with python 3.5. lsfm is 1.0.0, and it was installed with "conda install lsfm -c menpo".

btp10 commented 5 years ago

TexturedTriMesh has attribute 'texture'. Try to input mesh data of the following format: