This project is a deep learning-based character classification model that recognizes 80 different types of characters using convolutional neural networks (CNNs). The model is trained on a dataset of characters and can predict the class of a given character image with high accuracy.

1.Clone the Repository
git clone https://github.com/Infinity027/Text_classification.git
cd Text_classification- Install Dependencies
pip install -r requirements.txtTo train the model on your dataset, run:
python3 train.py --data_dir "data" --batch_size 32 --epoch 100Model Performance:
- Training data Accuracy: 96.43%
- Testing data Accuracy: 96%
To test the model run the test model, it will generate confusion matrix of testing data:
python3 testpy --test_dir "data/test" --batch_size 32 --model_path 'Modelv0_1.pth'for character segmentation from text images, I used OpenCV. It involves preprocessing images, detecting text lines, segmenting words and characters, and using a trained deep learning model for recognition. run following code for character segmentation
python3 Segment.py --image_path "test/test.png" --c 4 --min_area 100 --draw_plot 0Same 'character_recognition.py' python file extract the characters images from text image then sent it to model and predict the characters
python3 character_recognition.py --image_path "test/test.png" --c 4 --model_path 'modelv0_1.pth' --draw_plot 0output: 'It was the best of times, it was the worst of times, it was tbe age of wisdom, it was the agc of foolishness '




