Skip to content

Anjanamb/Flask-Image-Classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Image Classifier

Flask web app for real-time image classification using a pretrained MobileNetV2 (ImageNet weights). Upload an image, get the top class with confidence.

Python Flask TensorFlow License: MIT


Features

  • Upload any image via a Bootstrap-styled web form
  • Real-time classification using MobileNetV2 pretrained on ImageNet (1000 classes)
  • Predicted label + confidence percentage

Project structure

Flask-Image-Classifier/
├── app.py                # Flask application
├── templates/
│   └── index.html        # Bootstrap upload form
└── images/               # Uploaded images (auto-saved)

Quickstart

git clone https://github.com/Anjanamb/Flask-Image-Classifier.git
cd Flask-Image-Classifier
pip install flask tensorflow
python app.py

Open http://127.0.0.1:3000/, upload an image, click Predict Image.

How it works

The uploaded image is resized to 224×224, preprocessed for MobileNetV2, and decoded with decode_predictions. Example output:

Labrador retriever (95.23%)

Roadmap

  • Top-K predictions (not just top-1)
  • Display the uploaded image alongside the prediction
  • Dockerfile
  • Fine-tuning script for custom datasets

License

MIT — see anjanamb.github.io for more projects.

About

Flask web app for real-time image classification using pretrained MobileNetV2 (ImageNet weights).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors