pytorch3d
pytorch3d copied to clipboard
IndexError: index -1 is out of bounds for axis 0 with size 0
I was trying to load a .obj file using load_obj() function of pytorch3d.I am getting the below error.Can you please advice on how to solve this?
Traceback (most recent call last):
File "/home/synthetic_data_generator/main.py", line 119, in
Could it be that our function load_obj is being called with create_texture_atlas=True on an obj file with no texture data? What do you get if you call it with create_texture_atlas=False on the same file?
Do you need texture data out of this file? And do you know if there is texture data in the file? Feel free to share the data.
Hi, when I use create_texture_atlas=False, it throws this error File "/home/miniconda3/envs/poseapp/lib/python3.9/site-packages/pytorch3d/renderer/mesh/textures.py", line 379, in init raise ValueError(msg) ValueError: Expected atlas to be a list of tensors of shape (F, R, R, C) with the same value of R. I have attached the files.Please feel free to go through. https://drive.google.com/drive/folders/1y_12gEvObi2riuaDgE0i2nh3hHkX3Tus?usp=sharing
Regarding texture data , I obtained texture image file and material file as well along with the .obj.But that wasn't mentioned in the obj file.So I added mtllib elbow_connector_tex.mtl in the .obj file. Also, usemtl isnt explicitly mentioned in the .obj file .So its throwing that error. material_names is an empty list.