Downloads · 30 days
14
3% of all-time downloads
bsesic/HebrewManuscriptsMNIST
HebrewManuscriptsMNIST is a machine learning model from bsesic. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for keras. The card lists the license as mit.
This is a Convolutional Neural Network (CNN) model trained to recognize Hebrew letters and a stop symbols in images. The model can identify individual letters from a provided image, outputting their respective class a…
Downloads · 30 days
14
3% of all-time downloads
All-time downloads
453
Public
Repo size
8.3 MB
Likes
3
Public
Click a slice to open those files.
.keras8.3 MB · 100%
From the Hugging Face model README
This is a Convolutional Neural Network (CNN) model trained to recognize Hebrew letters and a stop symbols in images. The model can identify individual letters from a provided image, outputting their respective class along with probabilities.
This model is designed for the automatic recognition of Hebrew letters from images. The model can be used in applications such as:
from tensorflow.keras.models import load_model
import numpy as np
import cv2
# Load the model
model = load_model('path_to_model.hebrew_letter_model.keras')
# Preprocess an input image (example for one letter)
img = cv2.imread('path_to_image.jpg', cv2.IMREAD_GRAYSCALE)
img_resized = cv2.resize(img, (64, 64)) / 255.0
img_array = np.expand_dims(img_resized, axis=0)
# Predict
predictions = model.predict(img_array)
predicted_class = np.argmax(predictions, axis=1)[0]
# Class names for Hebrew letters
class_names = ['stop', 'א', 'ב', 'ג', 'ד', 'ה', 'ו', 'ז', 'ח', 'ט', 'י', 'ך', 'כ', 'ל', 'ם', 'מ', 'ן', 'נ', 'ס', 'ע', 'ף', 'פ', 'ץ', 'צ', 'ק', 'ר', 'ש', 'ת']
print("Predicted letter:", class_names[predicted_class])
If given an image with the Hebrew word "אברם" (Abram), the model can detect and classify the letters and stop symbols with probabilities.
The model was trained on a dataset containing Hebrew letters and stop symbols. The training dataset includes:
Data augmentation was applied to reduce overfitting and increase the model's generalizability to unseen data. This includes random rotations, zooms, and horizontal flips.
Performance may vary depending on the quality of the input images, noise levels, and whether the letters are handwritten or printed.
If you use this model in your work, please cite it as follows:
@misc{hebrew-letter-recognition,
title={Hebrew Manuscripts Letter Recognition Model},
author={Benjamin Schnabel},
year={2024},
howpublished={\url{https://huggingface.co/bsesic/HebrewManuscriptsMNIST}},
}
License:
This model is licensed under MIT License.