Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Translation and pre-processing code for the AraCLIP

A set of scripts to machine translate the subset of (synthetic) Conceptual Captions used in BLIP. The conda environment.yml file allows you to recreate the environment we used via conda env create -f environment.yml (creates env named translate).

Step 1: Download data

wget https://storage.googleapis.com/sfr-vision-language-research/BLIP/datasets/ccs_synthetic_filtered_large.json -P data

Step 2: Arabic captions

Convert to tabular and save data to .feather. File is saved as data/ccs_synthetic.feather

python 01_ccs_to_df.py

Now translate captions from English -> Arabic.

python 01_translate_ar.py

Step 3: Pre-Processing

filter_remove_unrelated_examples_from_translation.py has the pre-processing that has been done for this work, you can go through the process manually in the file.

Original code for the translation

You can find the original code in this repository. This code helped us a lot.

License

Distributed under the MIT License. See LICENSE for more information.

About

This repo has the code for the translation and pre-processing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages