I try to run the tutorial ârender_textured_meshesâ. When it comes to the 3rd step "Render the mesh", bug came from the command "images = renderer(mesh)".
And it shows "AttributeError: 'NoneType' object has no attribute 'reshape'".
I did not change any of the tutorial. And i could not find the explanation of "
Looking forward to reply. Thanks in advance, sincerely.
I had the same issue, I installed the library from source and it was resolved(cpu). It can also be fixed if you use the nightly build (gpu)
I had the same issue +1. I installed the library from conda install pytorch3d -c pytorch3d
I also had this issue. I installed from pypi (pytorch3d-0.2.0)
I had the same issue, I installed the library from source and it was resolved(cpu). It can also be fixed if you use the nightly build (gpu)
I tried conda install pytorch3d -c pytorch3d-nightly but there is another error when we import Textures from pytorch3d.structures:
from pytorch3d.structures import Meshes, Textures
ImportError: cannot import name 'Textures' from 'pytorch3d.structures' (/opt/conda/envs/pytorch-py37/lib/python3.7/site-packages/pytorch3d/structures/__init__.py)
textures is in renderer now, so you can from pytorch3d.renderer import Textures
I also have this issue. I'm working on mac os 10.14. At first i installed through pip, then directly from the source, in both cases i get the same error. Any solution?
I don't know if it will work for you but these were the steps I followed on popOS 20.04 in a new virtual environment
pip install pytorch3d
pip uninstall pytorch3d
git clone https://github.com/facebookresearch/pytorch3d.git
cd pytorch3d
pip install -e .
@ashwath98 thanks! it now works (with the removal of 'Textures' from the import)
@ashwath98 @AsaphLightricks yes the Textures have now been moved to the renderer. Also note there are now three separate textures classes and the original Textures class will be deprecated.
Refer to pytorch3d/renderer/mesh/textures.py for more details.
Most helpful comment
textures is in renderer now, so you can from pytorch3d.renderer import Textures