Open mariohdez opened 6 years ago
What version of Python are you running? I believe that code was written for Python 2.
Yes, I was using python2.7
Best, Jianchao
On Tue, May 29, 2018 at 1:25 PM, Yotam Gingold notifications@github.com wrote:
What version of Python are you running? I believe that code was written for Python 2.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CraGL/Decompose-Single-Image-Into-Layers/issues/3#issuecomment-392931605, or mute the thread https://github.com/notifications/unsubscribe-auth/AFWo62WXx1GZb40o4k60nsFdSpVqLx5aks5t3a7TgaJpZM4USE0k .
-- Best, Jianchao Tan https://cs.gmu.edu/~jtan8/ Graduate Research Assistant Computer Science Department, George Mason University
Yeah, I am using Python 2.7.
That attribute should be automatically generated. Very strange. What version of scipy and numpy are you running?
I am using these versions of the dependencies:
numpy: 1.14.3
scipy: 1.1.0
cython: 0.28.3
glpk: 0.4.42
cvxopt: 1.2.0
pillow: 5.1.0
Maybe the glpk version is different since I installed it via apt-get, instead of homebrew. Although homebrew is not available for Linux.
I am using glpk 0.4.57 on my macOS.
My dependencies version are:
cvxopt==1.2.0
Cython==0.28.2
numpy==1.14.3
Pillow==5.0.0
scipy==1.1.0
Best,
Jianchao
On Tue, May 29, 2018 at 2:27 PM, Mario Hernandez notifications@github.com wrote:
Maybe the glpk version is different since I installed it via apt-get, instead of homebrew. Although homebrew is not available for Linux.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/CraGL/Decompose-Single-Image-Into-Layers/issues/3#issuecomment-392951086, or mute the thread https://github.com/notifications/unsubscribe-auth/AFWo60hnEAjUpdO1XhxcO-j1rtWQ7hKcks5t3b1agaJpZM4USE0k .
-- Best, Jianchao Tan https://cs.gmu.edu/~jtan8/ Graduate Research Assistant Computer Science Department, George Mason University
That is a very, very strange error message. I wonder, can you cd ConvexHull_Simplification
, run python, then:
import trimesh
mesh = trimesh.FromOBJ_FileName( "mesh.obj" )
print mesh.vertex_vertex_neighbors( 0 )
You will have to find an OBJ file (any one should do) and save it as mesh.obj
.
I also got the same problem on Ubuntu, and I ran the code below
import trimesh mesh = trimesh.FromOBJ_FileName( "mesh.obj" )
I
got this
Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'FromOBJ_FileName'
I don't know what I am doing wrong, any idea?
FromOBJ_FileName()
is a static method of the TriMesh
class inside the trimesh
module. You meant to write:
import trimesh
mesh = trimesh.TriMesh.FromOBJ_FileName( "mesh.obj" )
Thanks. It worked.
But I still get the same problem when I enter python ../ConvexHull_Simplification/SILD_convexhull_simplification.py apple
I get this error:
AttributeError: 'TriMesh' object has no attribute '_TriMesh__halfedges'
so I'm not sure what is wrong...
Unfortunately it's not easy for me to check this. I ran into trouble installing the dependencies on CentOS and Debian machines I have access to.
It looks like the problem is the GLPK solver. I posted a solution in https://github.com/CraGL/Decompose-Single-Image-Into-Layers/issues/5 . Does that work for you?
Hello,
I installed the dependencies required on my Linux machine, and I am unable to run the program.
I keep getting this error:
original vertices number: 85 Traceback (most recent call last): File "../ConvexHull_Simplification/SILD_convexhull_simplification.py", line 344, in <module> mesh=remove_one_edge_by_finding_smallest_adding_volume_with_test_conditions(mesh,option=2) File "../ConvexHull_Simplification/SILD_convexhull_simplification.py", line 151, in remove_one_edge_by_finding_smallest_adding_volume_with_test_conditions mesh.get_halfedges() File "/home/mahern/python_src/Decompose-Single-Image-Into-Layers/ConvexHull_Simplification/trimesh.py", line 442, in get_halfedges if self.__halfedges is None: self.update_halfedges() File "/home/mahern/python_src/Decompose-Single-Image-Into-Layers/ConvexHull_Simplification/trimesh.py", line 333, in update_halfedges he0index = len( self.__halfedges ) AttributeError: 'TriMesh' object has no attribute '_TriMesh__halfedges'
any ideas of how to go around this issue?
Thanks.