Full Stack Web App

PyTorch CNN + React Web App

Image classification web app built with React and powered by a custom-trained PyTorch CNN. Users upload photos and receive predictions, whether it’s a cat, dog, or something else. Designed for scalability and speed, the frontend built in React, while the backend runs a deep learning model built with PyTorch. No Pretrained model, all coded, built, trained, and deployed from my computer.

Accuracy
0 %
Training Images
0 +
Testing Images
0 +

Tech Stack

React

React + Vite was used as the framework for developing the frontend. Typescript + HTML + CSS were the languages used.

PyTorch

Convolutional Neural Network developed using PyTorch (Python). 

Flask

Flask API in Python was used for requests from the front end to execute predictions for uploaded images.

VPS

React Front End + Python Backend are hosted on their own unique subdomains on my VPS. Both with SSL certificates.

Dealing With Overfitting

A common pitfall in not only my experience but lots of machine learning project is overfitting. Ample measures such image rotation, image distortion, neuron dropout, and more were used to reduce overfitting. 

Accuracy vs Efficiency

Efficiency was prioritized early on to develop a working model. Accuracy was focused on more later on. Entire CNN was trained on my personal computer using an RTX 2090 on 40k images.

Outcome

This was a succesful project training and deploying a custom trained CNN using PyTorch and combining that with a fully fledged out front end in React. I learned a lot and had a good time troubleshooting, learning how to optimize, and using React + Typescript.