Downloads · 30 days
4
2% of all-time downloads
hezarai/vit-gpt2-fa-image-captioning-flickr30k
vit-gpt2-fa-image-captioning-flickr30k is a image-to-text model from hezarai. Use it when you need a caption or text from an image. It is set up for hezar.
A Persian image captioning model constructed from a ViT + GPT2 architecture trained on flickr30k-fa (created by Sajjad Ayoubi). The encoder (ViT) was initialized from https://huggingface.co/google/vit-base-patch16-224…
Downloads · 30 days
4
2% of all-time downloads
All-time downloads
235
Public
Repo size
932 MB
Likes
0
Public
Click a slice to open those files.
.pt932 MB · 100%
From the Hugging Face model README
A Persian image captioning model constructed from a ViT + GPT2 architecture trained on flickr30k-fa (created by Sajjad Ayoubi). The encoder (ViT) was initialized from https://huggingface.co/google/vit-base-patch16-224 and the decoder (GPT2) was initialized from https://huggingface.co/HooshvareLab/gpt2-fa .
pip install hezar
from hezar.models import Model
model = Model.load("hezarai/vit-gpt2-fa-image-captioning-flickr30k")
captions = model.predict("example_image.jpg")
print(captions)