# The code for Linguistic Image Understanding

##  Installation

Please find installation instructions in [install.md](install.md).


## 2. Start

### 1. Prepare Data
```bash
export OPENAI_KEY=[YOUR KEY HERE]
python main.py  --image_src [image_path] --out_image_name [out_file_name]
```

### 2. Train C3 Model

#### Prepare data

#### Generation
```bash
python finetune.py --base_model 'llama-7b-hf' \
    --data_path '/instruction_data' --output_dir './lora-llama'
```

### 3. Call LIU model for evaluation in zero-shot

```bash
echo '(coco step1: zero-shot evaluation) load model'
python -m torch.distributed.launch --nproc_per_node=1 --master_port=$(rand 2000 4000) train_retrieval.py \
--config ./configs/retrieval_coco.yaml \
--output_dir output/retrieval_coco_ilu7b \
--evaluate
```

## Others

The project is based on [], [] and []. Thanks for these good projects.