diff --git a/cv/ocr/dbnetpp/paddlepaddle/README.md b/cv/ocr/dbnetpp/paddlepaddle/README.md new file mode 100644 index 0000000000000000000000000000000000000000..407911606ba3bf9fe2d77a7c50c9c111f2c7058f --- /dev/null +++ b/cv/ocr/dbnetpp/paddlepaddle/README.md @@ -0,0 +1,41 @@ +# dbnet++ + +## Step 1: Installing +```bash +git clone -b release/2.6 https://github.com/PaddlePaddle/PaddleOCR.git +cd PaddleOCR +pip3 install -r requirements.txt +python3 setup.py develop +``` + +## Step 2: Download data + +Download the [ICDAR2015 Dataset](https://deepai.org/dataset/icdar-2015) + +```bash +# ICDAR2015 PATH as follow: +ls -al /home/datasets/ICDAR2015/text_localization +total 133420 +drwxr-xr-x 4 root root 179 Jul 21 15:54 . +drwxr-xr-x 3 root root 39 Jul 21 15:50 .. +drwxr-xr-x 2 root root 12288 Jul 21 15:53 ch4_test_images +-rw-r--r-- 1 root root 44359601 Jul 21 15:51 ch4_test_images.zip +-rw-r--r-- 1 root root 90667586 Jul 21 15:51 ch4_training_images.zip +drwxr-xr-x 2 root root 24576 Jul 21 15:53 icdar_c4_train_imgs +-rw-r--r-- 1 root root 468453 Jul 21 15:54 test_icdar2015_label.txt +-rw-r--r-- 1 root root 1063118 Jul 21 15:54 train_icdar2015_label.txt + +``` + +## Step 3: Run dbnet++ + +```bash +# Notice: modify "configs/det/det_r50_db++_icdar15.yml" file, set the datasets path as yours. +wget -P ./pretrain_models/https://paddleocr.bj.bcebos.com/dygraph_v2.1/en_det/ResNet50_dcn_asf_synthtext_pretrained.pdparams +export FLAGS_cudnn_exhaustive_search=True +export FLAGS_cudnn_batchnorm_spatial_persistent=True +export CUDA_VISIBLE_DEVICES=0,1,2,3 +python3 -u -m paddle.distributed.launch --gpus '0,1,2,3' tools/train.py -c configs/det/det_r50_db++_icdar15.yml -o Global.use_visualdl=True \ +>train.log 2>&1 & +``` +