Skip to content

enesylmzx42/CNN-LetterRecognition-JS-Flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GIF

dd





Project Overview

This project aims to create a web application for letter recognition using Convolutional Neural Networks (CNNs) with JavaScript and Flask.

Description

The "CNN Letter Recognition with JS Flask" project combines frontend and backend technologies to deliver a web-based letter recognition system. Here's a breakdown of its components:

Frontend (JavaScript)

Interactive user interface developed with JavaScript. Allows users to upload images containing letters for recognition.

Backend (Flask)

Utilizes Flask, a Python web framework, for backend processing. Handles image processing tasks and interfaces with the CNN model.

Convolutional Neural Networks (CNNs)

Trained CNN model for letter recognition. Predicts letters present in input images.


Used Technologies

  • Tensorflow
  • Keras
  • Numpy
  • Panda
  • OpenCV
  • Python
  • JavaScript
  • Flask
  • HTML
  • CSS

CNN Model

This section describes the implementation of the Convolutional Neural Network (CNN) model for letter recognition in the project. Below are the steps involved:

Data Preprocessing

The dataset is loaded from the CSV file containing handwritten letters in pixel values. Data types are converted to 'float32' for compatibility with TensorFlow.

Exploratory Data Analysis (EDA)

Initial analysis of the dataset is performed using the data.head() and data.describe() methods to understand its structure and distribution.

Data Splitting

The dataset is split into features (X) and labels (y), where X contains pixel values of images and y contains corresponding labels.

Normalization

Pixel values in X are normalized by dividing them by 255.0 to scale them between 0 and 1.

Data Augmentation

Data augmentation is applied to increase the diversity of the dataset, improving model generalization. Augmentation techniques include rotation, width and height shifting, zooming, shearing, and horizontal flipping.

ttt

Model Architecture

A Sequential model is initialized to build the CNN architecture. Three convolutional layers with 64 filters each and ReLU activation are added, followed by max-pooling layers. The Flatten layer is added to convert the 2D feature maps into a 1D vector. Dropout is applied to mitigate overfitting. Dense layers with ReLU activation are added, followed by a final Dense layer with softmax activation for classification.


qq

Model Compilation

The model is compiled using the Adam optimizer with a learning rate of 0.001 and categorical cross-entropy loss function. Accuracy is chosen as the evaluation metric.

Model Training

The augmented data is fed into the model for training using the fit() method. Early stopping and model checkpointing callbacks are applied to prevent overfitting and save the best model.

Model Evaluation

The model is evaluated on the test dataset using the evaluate() method to obtain loss and accuracy metrics. Test accuracy and loss are printed to assess model performance.


acc

Model Summary

summary

About

Trained model for drawing based recognition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published