GithubHelp home page GithubHelp logo

yolov5_object_detection's Introduction

YOLOv5 Object Detection

This repository contains a Python script for performing object detection using the YOLOv5 model. It captures video frames from a webcam and overlays bounding boxes on detected objects, counting the number of detections for a specific class and displaying an alert message if a threshold is met.

Prerequisites

Before running the code, ensure you have the following dependencies installed:

  • Python 3.x
  • OpenCV (opencv-python)
  • PyTorch (torch)
  • NumPy (numpy)

Installation

  1. Clone or download this repository to your local machine.
git clone https://github.com/PattasuBalu/yolo_object_detection.git
  1. Navigate to the cloned repository folder:
cd yolo_object_detection
  1. Install the required packages by running:
pip install -r requirements.txt
  1. Open the Python script alerting_and_count.py and make the following adjustments:

    • Update the weights_path variable to point to the location of your custom YOLOv5 model weights.(mostly a .pt file)
    • Ensure your webcam is accessible via camera index 0, or change the index if needed.
  2. Save the script and run it using:

python alerting_and_count.py

yolov5_object_detection's People

Contributors

sanjay-29-29 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.