Skip to content

SagarJadhav30/Object_detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

84 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Object_detection

best smart application πŸ–ΌοΈ Object Detection Image

An end-to-end web application that allows users to upload images and receive annotated results with detected objects using a YOLOv5 model. The system comprises a React frontend and a Flask backend, facilitating seamless object detection and visualization. πŸ“Έ Demo

Replace with an actual image or GIF showcasing your project's functionality. πŸš€ Features

Image Upload: Users can upload images through the web interface.

Object Detection: Utilizes a YOLOv5 model to detect and classify objects within the uploaded images.

Annotated Results: Returns images with bounding boxes and labels indicating detected objects.

Responsive Frontend: Built with React and Tailwind CSS for a responsive and user-friendly interface.

Backend API: Flask-based API handles image processing and model inference.

πŸ› οΈ Tech Stack

Frontend: React, Vite, Tailwind CSS

Backend: Flask, PyTorch, YOLOv5

Model: Pre-trained YOLOv5 model (yolov5mu.pt)

Others: PostCSS, ESLint

πŸ“‚ Project Structure

Object-Detection-Image/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”œβ”€β”€ server.py
β”‚   β”œβ”€β”€ uploads/
β”‚   β”‚   β”œβ”€β”€ annotated_image.jpg
β”‚   β”‚   β”œβ”€β”€ car.jpg
β”‚   β”‚   β”œβ”€β”€ cat.jpg
β”‚   β”‚   └── dog.jpg
β”‚   β”œβ”€β”€ yolov5/
β”‚   └── yolov5mu.pt
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ eslint.config.js
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ package-lock.json
β”‚   β”œβ”€β”€ postcss.config.js
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   └── vite.svg
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ App.css
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   β”‚   └── react.svg
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   └── ObjectDetection.jsx
β”‚   β”‚   β”œβ”€β”€ index.css
β”‚   β”‚   └── main.jsx
β”‚   β”œβ”€β”€ tailwind.config.js
β”‚   └── vite.config.js
└── README.md

βš™οΈ Installation Backend Setup

Navigate to the backend directory:

cd backend

Create and activate a virtual environment (optional but recommended):

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

Install dependencies:

pip install -r requirements.txt

Run the Flask server:

python server.py

The backend server will start on http://localhost:5000.

Frontend Setup

Navigate to the frontend directory:

cd frontend

Install dependencies:

npm install

Start the development server:

npm run dev

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

πŸ§ͺ How It Works

Image Upload: Users upload an image through the React frontend.

API Request: The image is sent to the Flask backend via a POST request.

Object Detection: The backend processes the image using the YOLOv5 model and generates an annotated image with detected objects.

Response: The annotated image is sent back to the frontend and displayed to the user.

Include relevant screenshots here. πŸ“ˆ Future Enhancements

Real-Time Detection: Extend functionality to support real-time object detection via webcam.

Model Selection: Allow users to choose between different YOLO models or custom-trained models.

Performance Optimization: Implement caching and optimize model loading for faster inference.

πŸ“„ License

This project is licensed under the MIT License.

About

best smart application

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages