All Projects
Academic
Completed

Persian OCR App

A custom OCR application for Persian (Farsi) character recognition, built with a custom TensorFlow neural network, a Django REST backend, and a mobile client.

Overview

A custom OCR application for Persian (Farsi) character recognition, built with a custom TensorFlow neural network, a Django REST backend, and a mobile client.

PythonDjangoDjango REST FrameworkTensorFlowOpenCVPostgreSQLDockerDocker ComposeReact.jsTypeScriptTailwindCSS

Problem

Existing OCR solutions for Persian script are limited or proprietary. The project aimed to build a ground-up OCR pipeline with a custom-trained model capable of recognizing Persian alphabet characters from raw image input.

Solution

Designed and trained a custom CNN using TensorFlow for Persian character recognition. OpenCV handles preprocessing (thresholding, normalization, segmentation). Django REST backend serves inference. Mobile client captures images and displays results.

Architecture

Mobile client (image capture) → Django REST API → TensorFlow model inference with OpenCV preprocessing → character recognition result returned. Three-person team: backend, mobile, and AI engineer.

Challenges

  • Collecting and preprocessing sufficient labeled training data for a Persian OCR dataset.

  • Tuning the CNN architecture to handle variability in handwritten Persian character forms.

Outcomes

  • Functional Persian OCR API demonstrating feasibility of a fully custom pipeline without third-party OCR services.

Lessons Learned

  • Data quality matters far more than model architecture for OCR accuracy in practice.

  • OpenCV preprocessing improvements can outperform additional training epochs for constrained datasets.

Academic
Backend Engineer
Team of 3
September 2022 — January 2023