This repository contains multiple projects showcasing the application of YOLO (You Only Look Once) object detection. Each project demonstrates the use of YOLO for solving specific real-world problems.
YOLO is a state-of-the-art object detection algorithm that enables fast and accurate detection of objects in real time. This repository uses YOLOv4 and YOLOv8 for various projects, highlighting its versatility across different domains.
- Description: Detects and counts cars in a video feed or a real-time webcam stream.
- Implementation:
- Pre-trained YOLOv4 weights were used to detect cars in video frames.
- Each frame is processed using OpenCV to apply YOLO detection.
- A bounding box is drawn around detected cars, and a counter keeps track of unique cars using object tracking techniques like centroid tracking.
- Use Case: Useful for traffic management and analysis.
- Description: Detects and counts people in a defined area, such as public spaces or offices.
- Implementation:
- YOLOv4 weights trained on COCO dataset were used to identify humans in video streams.
- The area of interest is defined using a virtual boundary to count people entering or leaving.
- Frame processing and tracking were implemented using OpenCV and NumPy for efficient real-time performance.
- Use Case: Ideal for crowd management and monitoring occupancy levels.
- Description: Detects if individuals are wearing proper personal protective equipment (PPE), such as helmets or vests.
- Implementation:
- A custom YOLOv8 model was trained on a dataset of images with annotations for helmets, vests, and non-compliance.
- TensorFlow was used for data preprocessing and augmentation to improve model accuracy.
- The model detects PPE violations in real time using video feeds or images and highlights non-compliant individuals.
- Use Case: Ensures workplace safety compliance in industries like construction and manufacturing.
- Description: Identifies and detects poker hands using YOLO object detection.
- Implementation:
- A custom dataset of poker cards was collected and annotated using tools like LabelImg.
- YOLOv8 was trained to classify and detect individual cards in the hand.
- The model uses OpenCV to preprocess and detect the bounding boxes, while the logic to evaluate poker hands is integrated with the detection results.
- Use Case: Useful for gaming analytics and automated card identification.
- Clone this repository:
git clone https://github.com/GauravHaldar3804/Object-Detection-YOLO.git
2.Set up a Python virtual environment
python -m venv myvenv
source myvenv/bin/activate (Linux/MacOS)
myvenv\Scripts\activate ( Windows )
-
Install the required dependencies:
pip install -r requirements.txt
4.Download the YOLO weights and place them in the YOLO_Weights directory.
##Requirements Install all dependencies listed in requirements.txt. Some key libraries include:
OpenCV PyTorch NumPy