Skip to content

G12c4/Id-card-reader-ocr-llm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

OCR+OpenAi Identity document Extractor

This is a Python demo proof of concept project that uses EasyOCR and OpenAI to extract specific information from an image and format it into a specific structure.

Installation

Before you begin, ensure that you have the latest version of Python installed. We recommend Python 3.7 or later. You can verify your Python installation by using the following command:

python --version

To install the necessary libraries for this project, use pip, which is a package manager for Python.

Use the following commands to install the required libraries:

pip install openai
pip install easyocr
pip install rich

Usage

After you have installed the necessary libraries, you can run the Python script with the following command:

python main.py

Before running the script, make sure to replace the openai_key in main function with your actual OpenAI key and file_path with the path to the image file you want to process.

The script reads an image, applies OCR to extract text data, formats the text data into a structure as defined by the OCRResult dataclass, and then prints this structured information.

License

This project is licensed under the terms of the MIT license.

For any issues or suggestions related to this project, please open an issue on this GitHub repository. Contributions are always welcome.

Acknowledgments

This project uses OpenAI and EasyOCR libraries to process images and extract textual information. We express our gratitude to the developers of these libraries.

About

Identity document OCR+OpenAI Information Extractor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages