Skip to content

Code for the report "MC-OCR Challenge 2021: Simple approach for receipt information extraction and quality evaluation" RIVF2021

Notifications You must be signed in to change notification settings

cuongngm/IQA_IE_receipt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RIVF2021 MC-OCR Solutions

Setup folder

python setup.py
# copy folder dataset provided (mcocr_private_test_data, mcocr_train_data,mcocr_val_data, warmup_data) to dataset/ folder

Prepare data

(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

Install

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

Train

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

Checkpoints

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.

Predict

For task 1:

cd task1_diqa
python predict.py

For task 2:

cd task2
python main.py

Submit results

python submit.py

About

Code for the report "MC-OCR Challenge 2021: Simple approach for receipt information extraction and quality evaluation" RIVF2021

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages