Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rizwanmunawar/yolov5-object-tracking
YOLOv5 Object Tracking + Detection + Object Blurring + Streamlit Dashboard Using OpenCV, PyTorch and Streamlit
https://github.com/rizwanmunawar/yolov5-object-tracking
computer-vision object-detection object-tracking streamlit-dashboard yolov5
Last synced: 4 days ago
JSON representation
YOLOv5 Object Tracking + Detection + Object Blurring + Streamlit Dashboard Using OpenCV, PyTorch and Streamlit
- Host: GitHub
- URL: https://github.com/rizwanmunawar/yolov5-object-tracking
- Owner: RizwanMunawar
- License: agpl-3.0
- Created: 2022-09-11T11:01:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-08T07:48:20.000Z (13 days ago)
- Last Synced: 2025-02-10T18:03:38.044Z (11 days ago)
- Topics: computer-vision, object-detection, object-tracking, streamlit-dashboard, yolov5
- Language: Python
- Homepage:
- Size: 4.16 MB
- Stars: 112
- Watchers: 2
- Forks: 26
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# yolov5-object-tracking
### New Features
- YOLOv5 Object Tracking Using Sort Tracker
- Added Object blurring Option
- Added Support of Streamlit Dashboard
- Code can run on Both (CPU & GPU)
- Video/WebCam/External Camera/IP Stream Supported### Pre-Requsities
- Python 3.9 (Python 3.7/3.8 can work in some cases)### Steps to run Code
1 - Clone the repository
```
git clone https://github.com/RizwanMunawar/yolov5-object-tracking.git
```2 - Goto the cloned folder.
```
cd yolov5-object-tracking
```3 - Create a virtual envirnoment (Recommended, If you dont want to disturb python packages)
```
### For Linux Users
python3 -m venv yolov5objtracking
source yolov5objtracking/bin/activate### For Window Users
python3 -m venv yolov5objtracking
cd yolov5objtracking
cd Scripts
activate
cd ..
cd ..
```4 - Upgrade pip with mentioned command below.
```
pip install --upgrade pip
```5 - Install requirements with mentioned command below.
```
pip install -r requirements.txt
```6 - Run the code with mentioned command below.
```
#for detection only
python ob_detect.py --weights yolov5s.pt --source "your video.mp4"#for detection of specific class (person)
python ob_detect.py --weights yolov5s.pt --source "your video.mp4" --classes 0#for object detection + object tracking
python obj_det_and_trk.py --weights yolov5s.pt --source "your video.mp4"#for object detection + object tracking + object blurring
python obj_det_and_trk.py --weights yolov5s.pt --source "your video.mp4" --blur-obj#for object detection + object tracking + object blurring + different color for every bounding box
python obj_det_and_trk.py --weights yolov5s.pt --source "your video.mp4" --blur-obj --color-box#for object detection + object tracking of specific class (person)
python obj_det_and_trk.py --weights yolov5s.pt --source "your video.mp4" --classes 0
```7 - Output file will be created in the working-dir/runs/detect/exp with original filename
### Streamlit Dashboard
- If you want to run detection on streamlit app (Dashboard), you can use mentioned command below.Note: Make sure, to add video in the yolov5-object-tracking folder, that you want to run on streamlit dashboard. Otherwise streamlit server will through an error.
```
python -m streamlit run app.py
```
YOLOv5 Object Detection
YOLOv5 Object Tracking
YOLOv5 Object Tracking + Object Blurring
YOLOv5 Streamlit Dashboard
![]()
![]()
![]()
![]()
### References
- https://github.com/ultralytics/yolov5
- https://github.com/abewley/sort
### My Medium Articles
1. [YOLOv7 Training on Custom Data](https://medium.com/augmented-startups/yolov7-training-on-custom-data-b86d23e6623) – Guide to training YOLOv7 on custom datasets.
2. [Roadmap for Computer Vision Engineer](https://medium.com/augmented-startups/roadmap-for-computer-vision-engineer-45167b94518c) – A step-by-step career guide for aspiring computer vision engineers.
3. [YOLOR or YOLOv5: Which One is Better?](https://medium.com/augmented-startups/yolor-or-yolov5-which-one-is-better-2f844d35e1a1) – Comparative analysis of YOLOR vs. YOLOv5 for model selection.
4. [Train YOLOR on Custom Data](https://medium.com/augmented-startups/train-yolor-on-custom-data-f129391bd3d6) – Instructions for customizing YOLOR on unique datasets.
5. [Develop an Analytics Dashboard Using Streamlit](https://medium.com/augmented-startups/develop-an-analytics-dashboard-using-streamlit-e6282fa5e0f) – Tutorial on building data dashboards with Streamlit.
6. [Jetson Nano in Computer Vision Solutions](https://medium.com/augmented-startups/jetson-nano-is-rapidly-involving-in-computer-vision-solutions-5f588cb7c0db) – Insight on Jetson Nano's role in embedded AI projects.
7. [How Computer Vision Products Help in Warehouses](https://chr043416.medium.com/how-can-computer-vision-products-help-in-warehouses-aa1dd95ec79c) – Overview of computer vision applications in warehouse efficiency.For more details, you can reach out to me on [Medium](https://chr043416.medium.com/) or can connect with me on [LinkedIn](https://www.linkedin.com/in/muhammadrizwanmunawar/)