This is a PyTorch Re-Implementation of CRAFT: Character Region Awareness for Text Detection.
Model | Recall | Precision | F-score |
---|---|---|---|
Original | 93.1 | 97.4 | 95.2 |
Re-Implement | 91.98 | 92.32 | 92.15 |
Only tested on
- Anaconda3
- Python 3.7.1
- PyTorch 1.0.1
- opencv-python 4.0.0.21
- easydict 1.9
git clone https://github.com/SakuraRiven/CRAFT.git
cd CRAFT
Make a new folder pths
and put the download pths into pths
mkdir pths
cd pths
mkdir backbone pretrain ft
cd ..
mv vgg16_bn-6c64b313.pth pths/backbone/
mv model_iter_50000.pth pths/pretrain/
mv model_iter_31600.pth pths/ft/
Here is an example:
.
├── CRAFT
│ ├── evaluate
│ ├── pths
│ └── sync_batchnorm
└── data
├── ICDAR2013
├── ICDAR2017
└── SynthText
CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py
CUDA_VISIBLE_DEVICES=0,1,2 python finetune.py
CUDA_VISIBLE_DEVICES=0 python detect.py
CUDA_VISIBLE_DEVICES=0 python eval.py