python setup.py
# copy folder dataset provided (mcocr_private_test_data, mcocr_train_data,mcocr_val_data, warmup_data) to dataset/ folder
(detail description was writen in file):
cd prepare_data
python task1_diqa.py # for task 1
python task2.py # for task 2 detect
python task2_ocr.py # for task 2 ocr
pip install torch==1.7.0+cu101 torchvision==0.8.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt
For task 1:
cd task1_diqa
python train_recognition.py --batch_size 32 --epochs 100
For task 2 detect using Yolov5:
download pretrain yolov5s (v4.0) in: here and put them in task2 folder
cd task2
python train.py --img 1024 --batch 8 --epochs 100 --weights yolov5s.pt --data receipt.yaml
# weights and logs saved in runs/train/
For task 2 ocr using library VietOCR:
cd task2
python train_recognition.py
Model | size(MB) |
---|---|
Task1_DIQA | 5.2 |
Task2_YOLOv5 | 14.8 |
Task2_Seq2seq | 89.6 |
Task2_Transformer | 151.8 |
Download and put them in weights folder.
For task 1:
cd task1_diqa
python predict.py
For task 2:
cd task2
python main.py
python submit.py