Skip to content

Maheswara660/Object-Detection-In-Images

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Object Detection In Images

A powerful object detection application capable of identifying objects in uploaded images using the YOLOv8 model. This project features a Flask backend and a user-friendly frontend interface.


🚀 Technologies Used

Python Flask YOLOv8 OpenCV HTML5 CSS3 JavaScript


📂 Project Structure

Object Detection In Images/
├── static/
│   ├── index.html      # Frontend interface
│   ├── script.js       # Frontend logic
│   └── style.css       # Styling
├── templates/          # Flask templates
├── uploads/            # Directory for uploaded images
├── app.py              # Flask application entry point
├── detector.py         # Object detection logic using YOLO
├── requirements.txt    # Project dependencies
├── yolov8n.pt          # YOLOv8 nano model weights
├── yolov8m.pt          # YOLOv8 medium model weights
├── .gitignore
└── README.md

🛠️ Installation & Setup

Prerequisites

  • Python - for compiling the code
  • Git - for downloading this project
  • Git LFS - Enable Git LFS for downloading YOLOv8 models

Steps

  1. Clone the repository:

    git clone https://github.com/Maheswara660/Object-Detection-In-Images.git
    cd Object-Detection-In-Images
    git lfs install
    git lfs pull
  2. Set up the Virtual Environment:

    Navigate to the project root and create a virtual environment.

    • macOS/Linux:

      python3 -m venv venv
      source venv/bin/activate
    • Windows (Command Prompt):

      python -m venv venv
      venv\Scripts\activate.bat
    • Windows (PowerShell):

      python -m venv venv
      venv\Scripts\Activate.ps1
  3. Install Dependencies: Install the required packages from requirements.txt.

    pip install -r requirements.txt

▶️ Usage & Execution

Running the Application

Ensure your virtual environment is activated and you are in the project root directory.

# Set Flask app environment variable (optional but recommended)
export FLASK_APP=app.py
export FLASK_ENV=development

# Run the application
flask run

Or simply run:

python app.py

The application will start at http://127.0.0.1:5000/.

Using the Interface

  1. Open your web browser and navigate to http://localhost:5000.
  2. Upload an image using the upload button.
  3. Adjust the confidence threshold if needed.
  4. View the detected objects and their bounding boxes on the processed image.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

A powerful web-based object detection application built with Python, Flask, and YOLOv8. Upload images to instantly identify and visualize objects with bounding boxes and confidence scores.

Topics

Resources

License

Stars

Watchers

Forks

Contributors