Downloads · 30 days
0
srikarthikv/kannada-ocr-443-classes
kannada-ocr-443-classes is a machine learning model from srikarthikv. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A deep learning model for Kannada character recognition using transfer learning with VGG16.
Downloads · 30 days
0
Access
Public
Updated Oct 23, 2025
Repo size
337 MB
Likes
1
Public
Click a slice to open those files.
.h5169 MB · 100%
From the Hugging Face model README
A deep learning model for Kannada character recognition using transfer learning with VGG16.
VGG16 (frozen weights)
├── BatchNormalization
├── Flatten
├── Dense(1024, relu) + L2 regularization
├── BatchNormalization + Dropout(0.5)
├── Dense(512, relu) + L2 regularization
├── BatchNormalization + Dropout(0.4)
└── Dense(443, softmax)
from huggingface_hub import hf_hub_download
import tensorflow as tf
import pandas as pd
# Download model and class names
model_path = hf_hub_download(repo_id="srikarthikv/kannada-ocr-443-classes", filename="kannada_model_full.h5")
class_names_path = hf_hub_download(repo_id="srikarthikv/kannada-ocr-443-classes", filename="class_names.csv")
# Load model
model = tf.keras.models.load_model(model_path)
# Load class names
class_df = pd.read_csv(class_names_path)
class_names = class_df['class_name'].tolist()
import cv2
import numpy as np
def preprocess_image(image_path):
# Read and resize image
img = cv2.imread(image_path)
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
img = cv2.resize(img, (128, 128))
# Normalize and add batch dimension
img = img.astype(np.float32) / 255.0
img = np.expand_dims(img, axis=0)
return img
# Make prediction
image = preprocess_image("path/to/kannada_character.jpg")
predictions = model.predict(image)
# Get top prediction
top_class_idx = np.argmax(predictions[0])
confidence = predictions[0][top_class_idx]
predicted_character = class_names[top_class_idx]
print(f"Predicted Character: {predicted_character}")
print(f"Confidence: {confidence:.4f}")
Run the Streamlit UI for testing:
pip install streamlit opencv-python
streamlit run test_model_ui.py
kannada_model_full.h5 - Complete trained model (168 MB)class_names.csv - Character class mappingstest_model_ui.py - Interactive Streamlit UI for testing| Metric | Value |
|---|---|
| Model Size | 168 MB |
| Parameters | 17.3M total (2.6M trainable) |
| Training Time | 3h 9m |
| GPU Memory | ~12GB (dual RTX 4090) |
| Inference Time | ~10ms per image |
🤗 Model: srikarthikv/kannada-ocr-443-classes
This model is released under MIT License for research and educational purposes.
@misc{kannada-ocr-443,
title={Kannada OCR Model with 443 Character Classes},
author={Your Name},
year={2025},
url={https://huggingface.co/srikarthikv/kannada-ocr-443-classes}
}