Sindhi Handwritten Character Classification using CNN
Model Overview
This model is a Convolutional Neural Network (CNN) trained to classify handwritten Sindhi characters.
It is designed for Optical Character Recognition (OCR) research and educational use.
The model was trained on a custom dataset containing multiple handwritten samples of Sindhi alphabet characters.
Model Details
- Framework: TensorFlow / Keras
- Model Type: Convolutional Neural Network (CNN)
- Task: Multi-class image classification
- Input Type: Grayscale handwritten character images
- Number of Classes: 52 Sindhi characters
- Model Format:
.h5(Keras SavedModel)
Performance
Test Accuracy
- Accuracy: 88.79%
Classification Report Summary
| Metric | Score |
|---|---|
| Precision (Macro Avg) | 0.897 |
| Recall (Macro Avg) | 0.888 |
| F1-Score (Macro Avg) | 0.887 |
Training Summary
- Initial learning rate:
0.001 - Reduced learning rates:
0.0005 → 0.00025 - Total epochs: 30
Training Behavior
- Training accuracy increased steadily up to ~74%
- Validation accuracy peaked around ~87–88%
- Final model selected based on best validation performance
Input Preprocessing
The model expects images in the same format as training:
- Convert to grayscale
- Resize to training size (e.g., 64×64)
- Normalize pixel values to
[0, 1] - Add batch dimension
Example
import cv2
import numpy as np
from tensorflow.keras.models import load_model
model = load_model("sindhi_cnn_best.h5")
img = cv2.imread("test.png", cv2.IMREAD_GRAYSCALE)
img = cv2.resize(img, (64, 64))
img = img.astype("float32") / 255.0
img = img.reshape(1, 64, 64, 1)
pred = model.predict(img)
class_id = np.argmax(pred)
print(class_id)
Limitations
- Works only for isolated handwritten characters
- Not trained for full words or sentences
- Performance depends on handwriting quality and dataset similarity
Applications
- Sindhi OCR systems
- Educational tools for Sindhi language learning
- Historical document digitization
- Research in handwritten character recognition
Citation
@misc{sindhi_cnn_2026,
title = {Sindhi Handwritten Character Classification using CNN},
author = {Danish Mahdi},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/DanishMahdi/snd-handwritten-character-recognition-cnn}}
}