torralba-lab / im2recipe-Pytorch

im2recipe Pytorch implementation
MIT License
268 stars 100 forks source link

Index Error while training #29

Open AmeenAli opened 4 years ago

AmeenAli commented 4 years ago

Hello
I am getting the following error while training : File "/data/home/ameen.ali/food/im2recipe-Pytorch/data_loader.py", line 103, in __getitem__ path = os.path.join(self.imgPath, loader_path, imgs[imgIdx]['id']) IndexError: list index out of range
ANy idea what is the problem ?

jmarintur commented 4 years ago

Hi,

Thanks for using our code. Are you using the LMDB files we provide? I am afraid those may need to be updated. I will check that this is not the issue.

Best, Javier

scoobym commented 4 years ago

I had the same problem.

jmarintur commented 4 years ago

Hi,

Checked! You need to create again the LMDBs (using mk_dataset.py). I'll try to update the current ones we provide.

Best, Javier

yenicelik commented 3 years ago

@jmarintur is this also the case for the recipe1M dataset? I am using the pre-trained lmdb files. Will these work without any change to the code when I use recipe1M? (asking as the recipe1M dataset spawns a train, test, val folder as opposed to the recipe1M+ images which do not spawn any such folders).