This project was developed as part of the internship/practice program at the Transilvania University of Brașov (UNITBV), Faculty of Economic Sciences and Business Administration, Economic Informatics (2nd Year).
The primary objective of the project is to implement an efficient Optical Character Recognition (OCR) pipeline to analyze and structure text extracted from various documents or images.
- Text Extraction (OCR): Utilizes EasyOCR for detecting and transcribing text from various image formats, featuring multi-language support (including Romanian and English).
- Intelligent Post-Processing: Automatically fixes grammatical errors common in raw OCR outputs, extracts key entities (dates, names, totals), and synthesizes information from scanned documents.
├── images/ # Directory for input ID cards and images to be processed
├── README.md # Project documentation
├── main.py # Main Python script responsible for running EasyOCR and the processing pipeline
├── requirements.txt # Project dependencies
└── rezultate.json # JSON output file containing the extracted data results
- Python 3.11.9
- EasyOCR
- OpenCV
- NumPy
git clone https://github.com/ciufuu/ocr-id-card-recognition.git
cd ocr-id-card-recognitionIt is highly recommended to use a virtual environment (venv):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt*Note: Core dependencies include easyocr, torch and OpenCV *
Run the main script:
python main.py
The program will:
- Load the ID card image
- Preprocess the image
- Apply OCR using EasyOCR
- Display extracted text in structured format
- Image Preprocessing
- Grayscale conversion
- Noise reduction
- Contrast enhancement
- OCR Processing
- EasyOCR model detects text regions
- Extracts raw text from image
- Post-processing
- Cleans and formats extracted text
- Maps values to fields (Name, CNP, etc.)
- Institution: Transilvania University of Brașov (UNITBV)
- Coordinator: Professor Maican
- Timeline: April 2026
This repository is created solely for academic and evaluation purposes within the university framework.
- Results depend on image quality
- Works best on clear scanned documents
- Can be extended to other document types