0

I'm learning Pytorch3d and am trying to load .obj file with texture. The code is:

DATA_DIR = "./data"
obj_filename = os.path.join(DATA_DIR, "cow_mesh/cow.obj")
device = torch.device('cuda')
mesh = load_objs_as_meshes([obj_filename], device=device)

And indeed I have the texture file at ./data/cow_mesh/cow_texture.png However, I get the error below.

UnidentifiedImageError: cannot identify image file <_io.BufferedReader name='data/cow_mesh/cow_texture.png'>

Could someone help?

user3368526
  • 2,168
  • 10
  • 37
  • 52

0 Answers0