region:us
---
{}
---
### Pretrain Phase 1
```bash
python -m torch.distributed.launch --nproc_per_node=1 --use_env train_vlp_v2.py --batch-size 4 --epochs 80 --opt sgd --lr 0.01 --output_dir out/vlp_v2 --training-refurbish True --noise-rate 0.15 --noise-type omit_last --random-shuffle False  --input-size=128  --num_workers=2
```

### Pretrain Phase 2
Irrespective of the chosen pre-training strategy, when undertaking downstream sign language translation tasks, 
you only need to utilize the --finetune hyperparameter to designate the relevant pre-trained model.
```bash
python -m torch.distributed.launch --nproc_per_node=1 --use_env train_slt.py --batch-size 2 --epochs 200 --num_workers=2 --input-size=128 --opt sgd --lr 0.01 --output_dir out/ASL-Gloss-Free \
--finetune ./out/vlp_v2/checkpoint.pth
```

### Evaluation

```bash
python -m torch.distributed.launch --nproc_per_node=1 --use_env train_slt.py --batch-size 2 --epochs 200 --opt sgd --lr 0.01 --output_dir out/ASL-Gloss-Free-2 --resume out/ASL-Gloss-Free-2/best_checkpoint.pth --eval --num_workers=2
```
However, to use these commands, you need to install the [nlgeval](https://github.com/Maluuba/nlg-eval) package, one can also refer to the [README.md](./metrics/README.md) for instructions on how to install it.

## Citation

```bibtex
@InProceedings{Zhou_2023_ICCV,
    author    = {Zhou, Benjia and Chen, Zhigang and Clap\'es, Albert and Wan, Jun and Liang, Yanyan and Escalera, Sergio and Lei, Zhen and Zhang, Du},
    title     = {Gloss-Free Sign Language Translation: Improving from Visual-Language Pretraining},
    booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
    month     = {October},
    year      = {2023},
    pages     = {20871-20881}
}
```
