Skip to content

KarimIbrahim11/Arabic-Book-Title-Recognition

Repository files navigation

Arabic-Book-Title-Recognition

This project provides an OCR (Optical Character Recognition) solution for detecting and recognizing Book titles from Images of Arabic Books. It utilizes YOLOv5 for text detection and EasyOCR for text recognition. The application is containerized using Docker and exposes API endpoints via Flask.

Methodology

  • YOLOv5: Transfer Learning for 40 epochs for text detection on the Books dataset from arabic-documents-ocr-dataset-kaggle.
  • EasyOCR: For text recognition only.
  • Flask: Python micro web framework for API endpoints.
  • Docker: Containerization technology for easy deployment.

Demo and Inference Results

00231 (1)

val_batch2_pred

Yolov5 Training Results and Metircs

Title Object Detection achieves 66 mAp. results

PR and F1

PR_curve F1_curve

Confusion Matrix (Only interested in Titles)

confusion_matrix

Installation

To run the Book Title OCR application, Docker must be installed on your system.

Clone the Repository

git clone https://github.com/your-repo/book-ocr-docker.git
cd book-ocr-docker

Build the Image

docker build -t book-ocr-docker .

Usage

Run the Docker Container

docker run -p 5000:5000 book-ocr-docker

The application will be accessible at http://127.0.0.1:5000/.

API Endpoints

The following API endpoints are available:

Endpoint for Uploading an Image

URL: http://127.0.0.1:5000/predict Method: [POST] Description: Upload an image containing Arabic Book for OCR processing.

Request Body

form-data Key: image in format {.png, .jpg, .jpeg} Value: Select your image file to upload.

Response

Returns Title string in arabic.

Resources

About

Arabic Book Title OCR

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published