Skip to content

Skill-issue-coding/ml-model-for-image-classification

Repository files navigation

Image Classification: Cats vs Dogs

License Contributors Website

Important

The frontend was not the focus of this project..... as you can see, soooooo sorry for the spaghetti code.

Project Overview

This project classifies images of cats and dogs using machine learning. It uses a trained model to predict whether an uploaded image contains a cat or a dog.

You can try the live version of the app: Website Screenshot

Features

  • Upload an image to classify it as a cat or dog 🐱🐶
  • Uses a pre-trained machine learning model for accurate predictions
  • Built with Python (Flask) and Next.js for backend and frontend
  • Provides instant results after image upload

Concept explanation

  • You can go through the Google presentation here

Installation

  1. Clone the repository:

    git clone https://github.com/AntonMartic/ml-model-for-image-classification.git
  2. Navigate to the project directory:

    cd ml-model-for-image-classification
  3. Set up a virtual environment:

    cd server
    python -m venv venv
    source venv/bin/activate  # Windows: venv\Scripts\activate
  4. Install Python dependencies:

    pip install -r requirements.txt
  5. Install frontend dependencies:

    npm install
  6. Run the Flask backend:

    cd server
    python server.py # Windows: py server.py

    The backend will be available at http://127.0.0.1:8080

  7. Start the Next.js frontend:

    npm run dev

    The frontend will be available at http://localhost:3000

  8. Upload an image and classify it!

License

This project is licensed under the MIT License.
See the LICENSE file for more details.

About

The project involves using machine learning techniques to classify images of cats and dogs. We use the Histogram of Oriented Gradients (HOG) feature descriptor along with a classifier to make predictions.

Resources

License

Stars

Watchers

Forks

Contributors