Skip to content

An object detection system using YOLOv5 and OpenCV to detect objects in real-time from a webcam, with features for recording and capturing frames.

License

Notifications You must be signed in to change notification settings

pathanin-kht/Object-Detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Object Detection

Overview

This project implements an object detection system using YOLOv5 and OpenCV. It detects objects in real-time from a webcam feed, displaying relevant information such as FPS and detected objects. The system also allows users to record video and capture frames on demand using a pre-trained YOLOv5 model from the Ultralytics repository.

Features

  • Real-time Object Detection: Detects and classifies objects in the camera stream.
  • FPS Display: Shows real-time FPS to monitor performance.
  • Recording: Toggle video recording with the press of a button. Saves the video in MP4 format.
  • Frame Capture: Capture and save frames as images with a timestamped filename.
  • Alert on Detection: Highlights the number of detected objects and alerts the user.

Controls

  • Press 'q': Quit the program.
  • Press 'r': Toggle video recording on/off.
  • Press 'c': Capture the current frame as a JPG image.

Example

TestCase

Installation

  1. Clone or download the repository.
  2. Install the required dependencies:
    pip install -r requirements.txt
  3. Run the script.
    python object_detection.py
    

Acknowledgements

  • YOLOv5 for object detection Ultralytics
  • OpenCV for video handling OpenCV
  • PyTorch for deep learning Pytorch
  • NumPy for numerical computation Numpy

License

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

Contact

For feedback or inquiries, feel free to reach out via [email protected].

About

An object detection system using YOLOv5 and OpenCV to detect objects in real-time from a webcam, with features for recording and capturing frames.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages