ImageCaptioning.pytorch icon indicating copy to clipboard operation
ImageCaptioning.pytorch copied to clipboard

Error while running eval.py on pretrained models

Open KahHwa opened this issue 6 years ago • 4 comments

Hello,

This seems like a stupid question but why am i getting this error when i run the eval.py on the top down model. Does the code not work on python3?

UnicodeDecodeError: 'ascii' codec can't decode byte 0x84 in position 0: ordinal not in range(128)

KahHwa avatar Oct 25 '18 13:10 KahHwa

I used pickle.load(f, encodings='latin1') instead of the cPickle.load(f). WIll this work instead ? All the deprecated functions, I have changed them as well so that I can generate captions from the pretrained models.

So far the results are reasonable for resnet101 but with resnet152 the captions are just totally off. Why is the output so different? sample2

sample1

KahHwa avatar Oct 25 '18 14:10 KahHwa

hi, @KahHwa i think you r right, i also found caption generated with resnet152 were totally not reasonable, but with resnet101 they were ok. it seems there are something wrong with the pretrained resnet152 author provided

08tjlys avatar Jul 14 '21 11:07 08tjlys

Because the models are trained with resnet101 feature. If you want to use rednet152, you need to train on your own.

ruotianluo avatar Jul 14 '21 15:07 ruotianluo

thanks for that information!

08tjlys avatar Jul 16 '21 10:07 08tjlys