From 5ab3f585f1140513d630a95cd00a827093cc969f Mon Sep 17 00:00:00 2001 From: "yongle.wu" Date: Wed, 6 Mar 2024 15:35:07 +0800 Subject: [PATCH] Signed-off-by: yongle.wu add sast paddlepaddle model link #I9422B add sast paddlepaddle model --- cv/ocr/sast/paddlepaddle/README.md | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 cv/ocr/sast/paddlepaddle/README.md diff --git a/cv/ocr/sast/paddlepaddle/README.md b/cv/ocr/sast/paddlepaddle/README.md new file mode 100644 index 000000000..9cb886088 --- /dev/null +++ b/cv/ocr/sast/paddlepaddle/README.md @@ -0,0 +1,40 @@ +# SAST + +## Step 1: Installing +```bash +git clone --recursive https://github.com/PaddlePaddle/PaddleOCR.git +cd PaddleOCR +pip3 install -r requirements.txt +``` + +## 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 PP-OCR-DB + +```bash +# Notice: modify "configs/det/det_mv3_db.yml" file, set the datasets path as yours. +wget -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/pretrained/ResNet50_vd_ssld_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_vd_sast_icdar15.yml -o Global.use_visualdl=True \ +>train.log 2>&1 & +``` + -- Gitee