Skip to content

pathanin-kht/ObjectDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Object Detection v1.0.0

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.
    git clone https://github.com/pathanin-kht/ObjectDetector.git
  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 pathanin.kht@gmail.com.