Giter Site home page Giter Site logo

paddleocr-vn's Introduction

PaddleOCR-Vietnamese

Setup

pip install -r requirements.txt
pip install paddlepaddle-gpu

Train detection model

python3 tools/train.py -c ./configs/det/SAST.yml

Train recognition model

python3 tools/train.py -c ./configs/rec/SRN.yml

Evaluation detection

python3 tools/eval.py -c ./configs/det/SAST.yml

Evaluation recognition

python3 tools/eval.py -c ./configs/rec/SRN.yml

Predict detection

python3 tools/infer_det.py -c ./configs/det/SAST.yml -o Global.infer_img= #path_to_image

Predict recognition

python3 tools/infer_rec.py -c ./configs/rec/SRN.yml -o Global.infer_img=im0001_1.jpg

Convert to inference Model

python3 tools/export_model.py -c ./configs/det/SAST.yml  
python3 tools/export_model.py -c ./configs/rec/SRN.yml

Detection and recognition concatenate

python3 /content/drive/MyDrive/PaddleOCR/PaddleOCR/tools/infer/predict_system.py 
                --use_gpu=True \
                --det_algorithm="SAST" \
                --det_model_dir="./inference/SAST" \
                --rec_algorithm="SRN" \
                --rec_model_dir="./inference/SRN/" \
                --rec_image_shape="1, 64, 256" \
                --image_dir=#path_img \
                --rec_char_type="ch" \
                --drop_score=0.7 \
                --rec_char_dict_path="./ppocr/utils/dict/vi_vietnam.txt"

Build docker image

docker build -t sast_srn .

Run docker image

docker run -v test_data:/data/test_data:ro submission_output:/data/submission_output sast_srn /bin/bash run.sh

paddleocr-vn's People

Contributors

akemi0301 avatar neetnetnet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.