a-PyTorch-Tutorial-to-Image-Captioning
a-PyTorch-Tutorial-to-Image-Captioning copied to clipboard
always returns the same caption
I used the pretrained checkpoint and wordmap, when I ran it through different images, it always returns the same caption? Why could this be? Could you please help me?
I had the same problem and commenting out img = imresize(img, (256, 256)) [line 36 in caption.py], thus not resizing the input resolved the issue.
It's better to add img_as_ubyte to change img array from float to integer.
img = img_as_ubyte(imresize(img, (256, 256)))
that
It's better to add img_as_ubyte to change img array from float to integer.
img = img_as_ubyte(imresize(img, (256, 256)))
this helped perfectly, thank you