File size: 554 Bytes
8c868ea
 
 
 
 
 
 
 
 
 
d480281
8c868ea
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
language:
- fa
metrics:
- wer
pipeline_tag: image-to-text
---

A Persian image captioning model constructed from a ViT + GPT2 architecture trained on flickr30k-fa.
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 .

## Usage
```
pip install hezar
```
```python
from hezar import Model

model = Model.load("hezarai/vit-gpt2-fa-image-captioning-flickr30k")
captions = model.predict("example_image.jpg")
print(captions)
```