This Python-based machine learning algorithm is designed to recognize a limited set of characters formed by 10x10 pixel images. The code performs a defined number of iterations for training and then carries out inference with slight alterations in the characters. It also generates a learning curve graph and a confusion matrix after evaluation.
This project implements a character recognition system using a simple machine learning model. The algorithm is trained on 10x10 pixel images representing characters and then evaluated using slightly altered test images to assess the model's generalization ability. After training, the following outputs are generated:
- Learning curve
- Confusion matrix
- Recognition of characters formed by 10x10 pixels.
- Iterative training to optimize model performance.
- Inference with slight variations in the characters.
- Visualization of learning curve.
- Generation of confusion matrix to assess performance.
To use this project, make sure to have Python 3.12.2 installed along with the necessary libraries. You can install the required libraries using the following command:
pip install -r requirements.txt
- Python 3.12
- Seaborn
- Pandas
- NumPy
- Matplotlib
-
Training the Model:
Run themain.py
script to train the model with the predefined dataset of 10x10 pixel characters.python main.py
-
Inference:
After training, the model will make predictions on test data with slight modifications to the characters. -
Output:
- A graph displaying the learning curve will be shown.
- A confusion matrix will be printed, showing the model's performance across various classes.
main.py
: The main script to train the model and generate visualizations.Images/
: Folder containing the dataset (training and testing images).multiclass.py
: Contains the machine learning model architecture and training functions.