An AI-powered character recognition system that converts Brahmilipi script images to Kannada Unicode characters using deep learning and computer vision techniques.
- Deep Learning Model: CNN-based architecture with TensorFlow/Keras for accurate character recognition
- Synthetic Data Generation: Advanced pipeline creating training data with noise injection and geometric transformations
- Web Interface: Flask-based application with real-time image upload and prediction
- Multi-Character Support: Recognizes 7 core Kannada vowels and consonants (เฒ , เฒ, เฒ, เฒ, เฒ, เฒ, เฒ)
- Image Processing: Robust preprocessing pipeline with OpenCV for various image formats
- Backend: Python, Flask
- Machine Learning: TensorFlow, Keras, scikit-learn
- Computer Vision: OpenCV
- Frontend: HTML, CSS, JavaScript (jQuery)
- Data Processing: NumPy, JSON
- Python 3.8 or higher
- pip package manager
-
Clone the repository
git clone <repository-url> cd Bralmilipi_to_Kannada_Translator
-
Install dependencies
pip install -r requirements.txt
-
Train the model (if not already trained)
python src/train_model.py
-
Start the Flask server
python src/main.py
-
Access the application
- Open your browser and navigate to
http://127.0.0.1:5000 - Upload an image containing Brahmilipi characters
- Get instant Kannada character predictions
- Open your browser and navigate to
from src.train_model import predict_character, generate_synthetic_images
# Generate test image
synthetic_images, labels = generate_synthetic_images(num_images_per_class=1)
test_image = synthetic_images[0]
# Predict character
predicted_char = predict_character(test_image)
print(f"Predicted character: {predicted_char}")Bralmilipi_to_Kannada_Translator/
โโโ src/
โ โโโ main.py # Flask web application
โ โโโ train_model.py # Model training and prediction
โ โโโ preprocess.py # Image preprocessing utilities
โ โโโ utils.py # Helper functions
โ โโโ templates/
โ โ โโโ index.html # Main web interface
โ โ โโโ display_images.html # Image display page
โ โโโ static/
โ โโโ uploads/ # Uploaded images directory
โโโ data/
โ โโโ mapping.json # Character mappings
โโโ character_mappings.json # Model character mappings
โโโ kannada_synthetic_character_model.h5 # Trained model
โโโ requirements.txt # Python dependencies
โโโ README.md # Project documentation
- Input Layer: 64x64x1 grayscale images
- Convolutional Layers: 2 Conv2D layers with BatchNormalization
- Pooling: MaxPooling2D for feature reduction
- Regularization: Dropout layers (0.25-0.5) to prevent overfitting
- Output: 7-class softmax classification for Kannada characters
- Training Accuracy: ~85% (with synthetic data)
- Validation Accuracy: ~79%
- Test Accuracy: ~75%
Note: Performance can be improved with real character image datasets
| Brahmilipi | Kannada | Unicode |
|---|---|---|
| Image1 | เฒ | U+0C85 |
| Image2 | เฒ | U+0C86 |
| Image3 | เฒ | U+0C87 |
| Image4 | เฒ | U+0C88 |
| Image5 | เฒ | U+0C89 |
| Image6 | เฒ | U+0C95 |
| Image7 | เฒ | U+0C8A |
- Currently trained on synthetic data - real character images would improve accuracy
- Limited to 7 characters - can be extended to full Kannada alphabet
- Model accuracy needs improvement with better training data
- Expand character set to complete Kannada alphabet
- Implement real character image dataset collection
- Add data augmentation techniques
- Improve model architecture for better accuracy
- Add batch processing capabilities
- Implement character sequence recognition
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- TensorFlow team for the deep learning framework
- OpenCV community for computer vision tools
- Flask team for the web framework
- Contributors to the Kannada Unicode standard