yccyenchicheng / SDFusion

MIT License
406 stars 34 forks source link

set_input self.img = input['img'] KeyError: 'img' #18

Open lenashamseldin opened 1 year ago

lenashamseldin commented 1 year ago

Hi, hope you can help in solving this error: when running the third step in training for single-view reconstruction: ./launchers/train_sdfusion_img2shape.sh

I get this error: Traceback (most recent call last): File "train.py", line 172, in train_main_worker(opt, model, train_dl, test_dl, test_dl_for_eval, visualizer, device) File "train.py", line 51, in train_main_worker model.set_input(data) File "/home/paperspace/sdf/SDFusion/models/sdfusion_img2shape_model.py", line 240, in set_input self.img = input['img'] KeyError: 'img'

The conclusion I've come to so far is that the code is written for training on pix3d (in step 3 of training) while I'm training on ShapeNet v1. The dictionary in the file snet_dataset.py does not contain a key called 'img' like the one in pix3d_dataset.py but the error shows it's still expected as an argument.

I tried adding the img in the dictionary but it didn't work.The previous 2 steps in training work fine, but I'm having issues here. Thanks in advance...