yolov5-master
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.1%) to scientific vocabulary
Repository
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
YOLOv5-Based Object Detection for Real-Time Object Recognition
Project Overview
This project utilizes YOLOv5, a deep learning-based object detection model, to analyze video data and implement real-time object detection. The technology identifies and tracks specific objects (e.g., blankets, furniture) efficiently and accurately within video frames.
Key Steps:
- Video Data Collection: Gather videos such as
TEST1.mp4,TEST2.mp4, etc. YOLOv5 Model Training: Improve detection accuracy using a pre-trained YOLOv5 model.
Object Detection: Analyze videos to store and visualize detected object information.
Webcam Detection: Perform real-time object detection from live video feeds.
Background Information
Necessity of Robot Vacuums
Robot vacuums have become essential in reducing domestic chores. Efficient obstacle avoidance and focused cleaning on specific areas are critical features.
Role of Object Detection
Traditional robot vacuums rely on basic sensors, limiting their ability to recognize obstacles or navigate complex environments effectively. YOLOv5’s object detection capabilities enable adaptive and intelligent behaviors in robot vacuums.
YOLOv5 Features
YOLOv5 is a lightweight model suitable for real-time object detection. It operates efficiently on both GPUs and CPUs, making it adaptable for hardware-limited devices like robot vacuums.
Project Objectives
- Obstacle and Object Detection: Design a system enabling a robot vacuum to detect obstacles and specific objects (e.g., chairs, tables, toys).
- Dynamic Navigation: Facilitate adaptive cleaning paths and focused cleaning around detected objects.
Project Phases
- Data Collection: Record images and videos from diverse environments where robot vacuums operate.
- Data Labeling: Use tools like DarkLabel to annotate objects in the dataset.
- YOLOv5 Model Training: Train YOLOv5 using the labeled dataset.
- Object Detection Implementation: Deploy the trained model to detect objects in videos and live streams.
Project Strengths
- Real-Time Obstacle Avoidance: Efficient real-time detection and path optimization through YOLOv5.
- Targeted Object Detection: Enable focused cleaning or avoidance around specific objects (e.g., toys, cables).
- Broad Applicability: Enhances robot vacuum performance in households, offices, factories, and more.
Project Significance
- Advancing Smart Homes: Aligns with IoT and AI trends in smart home environments.
- Improving Efficiency: Outperforms traditional sensor-based robot vacuums in navigation and cleaning efficiency.
- Industry Potential: Applicable to warehouse and logistics robots beyond vacuum cleaners.
Challenges
- Data Scarcity: Limited datasets with diverse environments and objects may restrict model performance.
- Model Optimization: YOLOv5 requires additional optimization for hardware-constrained platforms like robot vacuums.
Literature Review
Overview of YOLOv5
YOLO (You Only Look Once) is a leading object detection algorithm. YOLOv5 features significant improvements in efficiency and accuracy.
Robot Vacuum Case Studies
Existing products like iRobot’s Roomba and LG CordZero rely on IR sensors and cameras. Incorporating object detection addresses their limitations.
Data Acquisition
- Video Capture: Use smartphones to record environments (e.g., living rooms, kitchens) for robot vacuums.
- DarkLabel Annotation: Annotate objects such as chairs, tables, and obstacles in the collected videos.
Training on NVIDIA Jetson Nano
Setup and Configuration
1. Jetson Nano Configuration: Install JetPack SDK, including CUDA, cuDNN, and TensorRT.
2. Library Installation:
bash
sudo apt-get update
sudo apt-get install python3-pip
pip3 install numpy torch torchvision
pip3 install -r requirements.txt
- YOLOv5 Setup: Clone the YOLOv5 repository and configure the environment.
bash git clone https://github.com/ultralytics/yolov5
Dataset Preparation
- Upload labeled datasets (annotated with DarkLabel) to Jetson Nano.
- Create a data.yaml file:
```yaml
train: D:\yolov5-master\yolov5-master\data\train\images
val: D:\yolov5-master\yolov5-master\data\valid\images
test: D:\yolov5-master\yolov5-master\data\test\images
nc: 1 names: ['pixel'] ```
Model Training
Train YOLOv5 on Jetson Nano:
bash
python3 train.py --data data.yaml --cfg yolov5s.yaml --weights yolov5s.pt --batch-size 8 --epochs 20
Parameters:
- --data: Path to dataset configuration.
- --cfg: Model configuration file (e.g., yolov5s.yaml).
- --weights: Pre-trained weights file.
- --batch-size: Adjust for Jetson Nano’s memory capacity.
- --epochs: Number of training iterations.
Object Detection Execution
- **Real-Time Detection with Webcam:
bash python3 detect.py --source 0 --weights runs/train/expX/weights/best.pt --img 640 --conf-thres 0.5 - **Video File Detection:
bash python3 detect.py --source TEST1.mp4 --weights runs/train/expX/weights/best.pt --img 640 --conf-thres 0.5
Evaluation Metrics
- **Confusion Matrix
- **F1-Confidence Curve
- **Precision-Recall Curve
- Precision-Confidence Curve
- Labels Correlogram
- results
Validation
- Testing on New Data: Use
TEST1.mp4toTEST4.mp4for validation. - Real-Time Testing: Verify detection accuracy using a webcam in real-world scenarios.
- Performance Summary:
- Objects detected with high confidence (e.g., chairs: 0.85+, bags: 0.9+).
Limitations and Improvements
Challenges:
- Dataset variability impacts detection accuracy.
- FPS limitation (15-20) on Jetson Nano.
Proposed Solutions:
- Data augmentation and additional training for diverse environments.
- Optimize with TensorRT to improve FPS.
- Expand object categories (e.g., cables, pets).
Conclusion
The YOLOv5-based object detection system demonstrated high accuracy and real-time performance, making it suitable for applications like robot vacuums. With further data augmentation and optimization, the model can achieve even better performance in real-world scenarios.
Owner
- Login: Kimjinma
- Kind: user
- Repositories: 1
- Profile: https://github.com/Kimjinma
Citation (CITATION.cff)
cff-version: 1.2.0
preferred-citation:
type: software
message: If you use YOLOv5, please cite it as below.
authors:
- family-names: Jocher
given-names: Glenn
orcid: "https://orcid.org/0000-0001-5950-6979"
title: "YOLOv5 by Ultralytics"
version: 7.0
doi: 10.5281/zenodo.3908559
date-released: 2020-5-29
license: AGPL-3.0
url: "https://github.com/ultralytics/yolov5"
GitHub Events
Total
- Delete event: 1
- Issue comment event: 4
- Public event: 1
- Pull request event: 3
- Create event: 1
Last Year
- Delete event: 1
- Issue comment event: 4
- Public event: 1
- Pull request event: 3
- Create event: 1
Dependencies
- actions/checkout v4 composite
- actions/setup-python v5 composite
- slackapi/slack-github-action v2.0.0 composite
- contributor-assistant/github-action v2.6.1 composite
- actions/checkout v4 composite
- docker/build-push-action v6 composite
- docker/login-action v3 composite
- docker/setup-buildx-action v3 composite
- docker/setup-qemu-action v3 composite
- ultralytics/actions main composite
- actions/checkout v4 composite
- ultralytics/actions/retry main composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- actions/stale v9 composite
- pytorch/pytorch 2.0.0-cuda11.7-cudnn8-runtime build
- gcr.io/google-appengine/python latest build
- matplotlib >=3.3.0
- numpy >=1.22.2
- opencv-python >=4.6.0
- pandas >=1.1.4
- pillow >=7.1.2
- psutil *
- py-cpuinfo *
- pyyaml >=5.3.1
- requests >=2.23.0
- scipy >=1.4.1
- seaborn >=0.11.0
- thop >=0.1.1
- torch >=1.8.0
- torchvision >=0.9.0
- tqdm >=4.64.0
- ultralytics >=8.1.47
- PyYAML >=5.3.1
- gitpython >=3.1.30
- matplotlib >=3.3
- numpy >=1.23.5
- opencv-python >=4.1.1
- pandas >=1.1.4
- pillow >=10.3.0
- psutil *
- requests >=2.32.2
- scipy >=1.4.1
- seaborn >=0.11.0
- setuptools >=70.0.0
- thop >=0.1.1
- torchvision >=0.9.0
- tqdm >=4.66.3
- Flask ==2.3.2
- gunicorn ==22.0.0
- pip ==23.3
- werkzeug >=3.0.1
- zipp >=3.19.1