Skip to content

A lightweight ML-powered prediction API built with Flask. Includes model inference, Postman instructions, and a clean requirements file.

License

Notifications You must be signed in to change notification settings

Kalana-S/CNN-Image-Classification-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📘 CNN-Image-Classification-System

This is a simple machine learning prediction API built using Python, Flask, and a trained ML model.
It allows you to send data through Postman and receive prediction results instantly.

🚀 Features

  • Simple and lightweight Flask API
  • Accepts image input through Postman
  • Returns model prediction in real time.
  • Includes example request + response
  • Easy to deploy and extend

📁 Project Structure

/project
│── models
|   |── Cats_Dogs_IMG_Classification_2.ipynb
|   |── final_model.keras
│── main.py
│── requirements.txt
│── README.md
│── License

🧰 Technologies Used

  • Python – Core development
  • Flask – Web application framework
  • Tensorflow, NumPy – Data processing & ML model training
  • Matplotlib – Interactive plots
  • Keras – Model & metadata storage

⚙️ Installation & Setup

  1. Clone the repository:

    git clone https://github.com/YourUsername/CNN-Image-Classification-System.git
    cd CNN-Image-Classification-System
  2. Create virtual environment (optional but recommended):

    python -m venv venv
    venv\Scripts\activate   # For Windows
    # OR
    source venv/bin/activate  # For macOS/Linux
  3. Install dependencies:

    pip install -r requirements.txt
  4. Run the Flask server:

    python main.py

Server will start at: 👉 http://127.0.0.1:5000

📬 How to Use Postman for Prediction

Step 1 — Open Postman

  • Download from: https://www.postman.com/downloads/
  • Open the Postman app

Step 2 — Create a new POST request

  1. Click New → HTTP Request
  2. Select POST
  3. Enter your API URL: http://127.0.0.1:5000/predict

Step 3 — Upload Image

  • In Postman: Body → form-data

  • Add the following key–value pair:

    KEY TYPE VALUE
    file File (choose an image file)
    • Key must be exactly: file
    • Type must be: File
    • Allowed formats: .jpg, .jpeg, .png

Step 4 — Send Request & Get Response

Click Send and you’ll receive a prediction similar to:

  {
    "prediction": "dog",
    "confidence": 0.9123
  }

or

  {
  "prediction": "cat",
  "confidence": 0.7344
  }

📄 Requirements

See requirements.txt for exact package versions.

🤝 Contribution

Pull requests are welcome! For major changes, please open an issue first to discuss what you'd like to improve.

📜 License

This project is licensed under the MIT License – see the LICENSE file for details.

About

A lightweight ML-powered prediction API built with Flask. Includes model inference, Postman instructions, and a clean requirements file.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published