davidnvq / grit

GRIT: Faster and Better Image-captioning Transformer (ECCV 2022)
185 stars 28 forks source link

Inference on new images using pretrained model #8

Closed tran-ngo closed 2 years ago

tran-ngo commented 2 years ago

I'd like to ask how to generate caption for new images using pretrained model. There seems to be evaluation code only. Thank you and have a great day!

davidnvq commented 2 years ago

Thanks for interest. I'll create a Jupyter notebook for this purpose. I will notify you here soon (within 1-2 days)?

davidnvq commented 2 years ago

@bt-ngo I have just added the inference code. Please feel free to try. https://github.com/davidnvq/grit#inference-on-rgb-image

eslambakr commented 2 years ago

Thank you very much for your keen efforts @davidnvq . I tried to run your inference code; "inference_caption.py" but unfortunately, I got despite the model is loaded correctly without any errors.

Your help is much appreciated! Thanks in advance!

eslambakr commented 2 years ago

I solved the issue by upgrading the Cuda and Pytorch version to match the versions mentioned in the readme. No it works perfectly! Thank you very much for sharing your amazing work and the source code!