sbt-idp/cope2n-ai-fi/modules/ocr_engine
2023-11-30 18:22:16 +07:00
..
externals/sdsv_dewarp Add everything 2023-11-30 18:22:16 +07:00
scripts Add everything 2023-11-30 18:22:16 +07:00
src Add everything 2023-11-30 18:22:16 +07:00
__init__.py Add everything 2023-11-30 18:22:16 +07:00
.gitignore Add everything 2023-11-30 18:22:16 +07:00
README.md Add everything 2023-11-30 18:22:16 +07:00
requirements.txt Add everything 2023-11-30 18:22:16 +07:00
run.py Add everything 2023-11-30 18:22:16 +07:00
settings.yml Add everything 2023-11-30 18:22:16 +07:00
TODO.todo Add everything 2023-11-30 18:22:16 +07:00

OCR Engine

OCR Engine is a Python package that combines text detection and recognition models from mmdet and mmocr to perform Optical Character Recognition (OCR) on various inputs. The package currently supports three types of input: a single image, a recursive directory, or a csv file.

Installation

To install OCR Engine, clone the repository and install the required packages:

git clone git@github.com:mrlasdt/ocr-engine.git
cd ocr-engine
pip install -r requirements.txt

Usage

To use OCR Engine, simply run the ocr_engine.py script with the desired input type and input path. For example, to perform OCR on a single image:

python ocr_engine.py --input_type image --input_path /path/to/image.jpg

To perform OCR on a recursive directory:

python ocr_engine.py --input_type directory --input_path /path/to/directory/

To perform OCR on a csv file:

python ocr_engine.py --input_type csv --input_path /path/to/file.csv

OCR Engine will automatically detect and recognize text in the input and output the results in a CSV file named ocr_results.csv.

Contributing

If you would like to contribute to OCR Engine, please fork the repository and submit a pull request. We welcome contributions of all types, including bug fixes, new features, and documentation improvements.

License

OCR Engine is released under the MIT License. See the LICENSE file for more information.