Logo Lanfrica

Nati-Tsehaye/Amharic-OCR-ML

Domain:

natural language processing

Record type:

software
Creator:
Nat
Host:
# Amharic OCR This project implements an Optical Character Recognition (OCR) system for reading and interpreting Amharic text from images. It uses a Convolutional Neural Network (CNN) to recognize characters and translate them into readable text. ## Table of Contents - Introduction - Dataset - Installation - Usage - Model Architecture - Training - Testing - Contributing - License ## Introduction The Amharic language is one of the most widely spoken languages in Ethiopia. This project aims to provide a reliable OCR solution that can help digitize printed Amharic text, making it more accessible for various applications, including document analysis, digital libraries, and translation services. ## Dataset The model is trained on a dataset of Amharic text images. The dataset consists of: - Images of printed Amharic characters and words. - Label files that correspond to the text within the images. The dataset can be loaded from `.npy` files that contain both the images and their associated labels. ## Installation To set up the environment for this project, follow these steps: 1. Clone this repository: ```bash git clone cd amharic-ocr ``` 2. Create a virtual environment (optional but recommended): ```bash python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` ``` 3. Install the required packages: ```bash pip install -r requirements.txt ``` ## Usage ### Training the Model To train the model, execute the following command: ```bash python train.py ``` Make sure to update the paths in `train.py` to point to your training data. ### Making Predictions To use the trained model for predictions, run the following command: ```bash python predict.py --image ``` Replace ` ` with the path to the image you want to process. ### Example Here’s an example of how to use the prediction function in Python: ```python from predict import predict_image image_path = 'path/to/test_image.png' predicted_text = predict_image(image_path) print(f" …