Downloads · 30 days
18
6% of all-time downloads
LinaAlhuri/Arabic-clip-vit-base-patch16
Arabic-clip-vit-base-patch16 is a text-to-image model from LinaAlhuri. Use it when you need an image from a text prompt. It is set up for transformers.
Arabic CLIP is an adaptation of the Contrastive Language-Image Pre-training (CLIP) for the Arabic language. CLIP is an OpenAI-developed model that learns conceptual concepts from images and relates them with textual d…
Downloads · 30 days
18
6% of all-time downloads
All-time downloads
321
Public
Repo size
15.1 GB
Likes
0
Public
Click a slice to open those files.
.msgpack15.8 GB · 99%
From the Hugging Face model README
Arabic CLIP is an adaptation of the Contrastive Language-Image Pre-training (CLIP) for the Arabic language. CLIP is an OpenAI-developed model that learns conceptual concepts from images and relates them with textual descriptions. This work attempts to improve the model's understanding and interpretation of visual information in the context of the Arabic language.
from transformers import AutoTokenizer, FlaxVisionTextDualEncoderModel
model = FlaxVisionTextDualEncoderModel.from_pretrained("LinaAlhuri/Arabic-clip-vit-base-patch16", logit_scale_init_value=1,from_pt=True)
model.save_pretrained("arabic_clip")
tokenizer = AutoTokenizer.from_pretrained("asafaya/bert-base-arabic", cache_dir=None, use_fast=True)
The aim was to create a comprehensive Arabic image-text dataset by combining various data sources due to the scarcity of Arabic resources. Challenges included limited Arabic data and the quality of translated datasets. The approach involved merging genuine datasets for rich information and using translated datasets to cover diverse domains, scenarios, and objects, striking a balance between their respective pros and cons.
| Dataset name | Images |
|---|---|
| Arabic Conceptual Captions | 1,427,210 |
| Arabic COCO 2014 | 414,113 |
| Arabic WIT | 109,366 |
| Arabic Flicker8K | 24,272 |
| Proposed (WAP) dataset | 151,252 |
| Total | 2,126,213 |
We have tested the efficacy of Arabic CLIP across different benchmarks tailored for tasks like zero-shot learning, image retrieval, localization, and image search.
To summarize the limitations into points
For gender bias, it is important to note that Arabic uses a two-gender system in which all nouns are classified as masculine or feminine. However, this is not the case for English. Translating the text from English to Arabic may result in information loss or even make it prone to gender bias.