https://github.com/pathanin-kht/objectdetector
Object Detector by YOLOv5
https://github.com/pathanin-kht/objectdetector
opencv python yolov5
Last synced: about 2 months ago
JSON representation
Object Detector by YOLOv5
- Host: GitHub
- URL: https://github.com/pathanin-kht/objectdetector
- Owner: pathanin-kht
- License: mit
- Created: 2025-01-10T08:14:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-04T18:37:25.000Z (over 1 year ago)
- Last Synced: 2025-03-27T05:48:31.212Z (over 1 year ago)
- Topics: opencv, python, yolov5
- Language: Python
- Homepage:
- Size: 494 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 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

### Installation
1. Clone or download the repository.
```bash
git clone https://github.com/pathanin-kht/ObjectDetector.git
3. Install the required dependencies:
```bash
pip install -r requirements.txt
4. Run the script.
```bash
python object_detection.py
## Acknowledgements
- **YOLOv5** for object detection [Ultralytics](https://github.com/ultralytics/yolov5)
- **OpenCV** for video handling [OpenCV](https://opencv.org/)
- **PyTorch** for deep learning [Pytorch](https://pytorch.org/)
- **NumPy** for numerical computation [Numpy](https://numpy.org/)
## License
This project is licensed under the [MIT License](LICENSE) - see the LICENSE file for details.
## Contact
For feedback or inquiries, feel free to reach out via [pathanin.kht@gmail.com](pathanin.kht@gmail.com).