GithubHelp home page GithubHelp logo

paddle-ocr's Introduction

Inference code for Lightweight Text Detection

The inference code for paddle text detection, angle classification & recognition models using onnxruntime.

Used PaddlePaddle models: ch_ppocr_mobile_v2.0_xx

Usage

We support either text detection pipeline (use --run_detection argument) or full pipeline with recognition (--run_pipeline). Note that these arguments conflict with each other.

usage: inference.py [-h] [--det_model_dir DET_MODEL_DIR]
                    [--rec_model_dir REC_MODEL_DIR] [-i IMAGE_PATH]
                    [--onnx_check] [--run_detection | --run_pipeline]
                    [--det_db_thresh DET_DB_THRESH]
                    [--det_db_box_thresh DET_DB_BOX_THRESH]
                    [--det_db_unclip_ratio DET_DB_UNCLIP_RATIO]
                    [--max_batch_size MAX_BATCH_SIZE]
                    [--use_dilation USE_DILATION]
                    [--label_list LABEL_LIST]
                    [--rec_batch_num REC_BATCH_NUM]
                    [--rec_char_dict_path REC_CHAR_DICT_PATH]
                    [--use_space_char USE_SPACE_CHAR]
                    [--vis_font_path VIS_FONT_PATH] [--drop_score DROP_SCORE]

optional arguments:
  -h, --help            show this help message and exit
  --det_model_dir DET_MODEL_DIR
                        Path to onnx detection model weights
  --rec_model_dir REC_MODEL_DIR
                        Path to onnx text recognition model weights
  -i IMAGE_PATH, --image_path IMAGE_PATH
                        Path to test image
  --onnx_check          Pass if want to check onnx model with onnx.checker
  --run_detection       Run detection model
  --run_pipeline        Run full recognition pipeline
  --det_db_thresh DET_DB_THRESH
  --det_db_box_thresh DET_DB_BOX_THRESH
  --det_db_unclip_ratio DET_DB_UNCLIP_RATIO
  --max_batch_size MAX_BATCH_SIZE
  --use_dilation USE_DILATION
  --label_list LABEL_LIST
  --rec_batch_num REC_BATCH_NUM
  --rec_char_dict_path REC_CHAR_DICT_PATH
  --use_space_char USE_SPACE_CHAR
  --vis_font_path VIS_FONT_PATH
  --drop_score DROP_SCORE

Visualization

Full Pipeline

Detection Only

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.