Open xuzhuang1996 opened 11 months ago
Can you share a stack trace? Any other details you have?
Can you share a stack trace? Any other details you have?
this is full stack trace:
Traceback (most recent call last):
File "C:\Users\Administrator\PycharmProjects\pythonProject\main.py", line 129, in <module>
target_images = renderer(mesh)
File "C:\ProgramData\anaconda3\envs\py39\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "C:\ProgramData\anaconda3\envs\py39\lib\site-packages\pytorch3d-0.7.0-py3.9-win-amd64.egg\pytorch3d\renderer\mesh\renderer.py", line 61, in forward
fragments = self.rasterizer(meshes_world, **kwargs)
File "C:\ProgramData\anaconda3\envs\py39\lib\site-packages\torch\nn\modules\module.py", line 1190, in _call_impl
return forward_call(*input, **kwargs)
File "C:\ProgramData\anaconda3\envs\py39\lib\site-packages\pytorch3d-0.7.0-py3.9-win-amd64.egg\pytorch3d\renderer\mesh\rasterizer.py", line 219, in forward
meshes_proj = self.transform(meshes_world, **kwargs)
File "C:\ProgramData\anaconda3\envs\py39\lib\site-packages\pytorch3d-0.7.0-py3.9-win-amd64.egg\pytorch3d\renderer\mesh\rasterizer.py", line 208, in transform
meshes_ndc = meshes_world.update_padded(new_verts_padded=verts_ndc)
File "C:\ProgramData\anaconda3\envs\py39\lib\site-packages\pytorch3d-0.7.0-py3.9-win-amd64.egg\pytorch3d\structures\meshes.py", line 1426, in update_padded
check_shapes(new_verts_padded, [self._N, self._V, 3])
File "C:\ProgramData\anaconda3\envs\py39\lib\site-packages\pytorch3d-0.7.0-py3.9-win-amd64.egg\pytorch3d\structures\meshes.py", line 1422, in check_shapes
raise ValueError("new values must have the same number of points.")
ValueError: new values must have the same number of points.
The other OBJ models are working properly, but this data.obj file only contains polylines, and I am not sure if this OBJ is reasonable. Normal opening in CC:
🐛 Bugs / Unexpected behaviors
I load obj file,and when I want to render it to image, I get error: new values must have the same number of points
Instructions To Reproduce the Issue:
this is my obj file: just contains a polyline:
data.zip
my core code is: