torralba-lab / im2recipe

Code supporting the CVPR 2017 paper "Learning Cross-modal Embeddings for Cooking Recipes and Food Images"
MIT License
365 stars 89 forks source link

Issues on Maiking HDF5 #11

Closed kusa125 closed 6 years ago

kusa125 commented 6 years ago

I had following error when I followed the instruction and did python mk_dataset.py -vocab ../data/text/vocab.txt -dataset ../../../recipe1M/ -h5_data ../data/data.h5 stvecs ../th-skip/data/text/

Loading skip-thought vectors... ((5276564, 10), 504488, 504488, 504488) ((1133569, 10), 108203, 108203, 108203) ((1128236, 10), 107948, 107948, 107948) ('Done.', 4.497858047485352) Loading dataset. Loading ingr vocab. ('Image path is:', '../../../recipe1M/images') ('H5 file is', '../th-skip/data/dataset.h5') {'test': 100807, 'train': 471460, 'val': 100297} Assembling dataset. File "mk_dataset.py", line 158, in stpos = stid2idx[partition][entry['id']] #select the sample corresponding to the index in the skip-thoughts data KeyError: 'b331fef00f'

Could you please help me or give me any advice?

I'm sorry if I'm asking something silly. I'm new to python & github. Thanks

nhynes commented 6 years ago

Can you verify that you're loading the Skip-Thoughts vectors using this block of code?

kusa125 commented 6 years ago

Thank you for your reply. I ran the code but the output was same apparently. ('Image path is:', '../../../recipe1M/images') ('H5 file is', '../data/data.h5') {'test': 100807, 'train': 471460, 'val': 100297} Assembling dataset.

720638it [5:40:13, 37.91it/s]Traceback (most recent call last):/pyscripts$ File "var.py", line 158, in stpos = stid2idx[partition][entry['id']] #select the sample corresponding to the index in the skip-thoughts data KeyError: 'b331fef00f'

Are there other ways to verify that?