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: 3 months 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: 2024-10-31T07:34:59.000Z (4 months ago)
- Last Synced: 2024-11-07T00:48:08.413Z (4 months ago)
- Topics: computer-vision, object-detection, object-tracking, streamlit-dashboard, yolov5
- Language: Python
- Homepage:
- Size: 4.16 MB
- Stars: 108
- Watchers: 3
- Forks: 26
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-yolo-object-detection - RizwanMunawar/yolov5-object-tracking - object-tracking?style=social"/> : YOLOv5 Object Tracking + Detection + Object Blurring + Streamlit Dashboard Using OpenCV, PyTorch and Streamlit. (Applications)
- awesome-yolo-object-detection - RizwanMunawar/yolov5-object-tracking - object-tracking?style=social"/> : YOLOv5 Object Tracking + Detection + Object Blurring + Streamlit Dashboard Using OpenCV, PyTorch and Streamlit. (Applications)
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### Coming Soon
- Option to crop and save detected objects
- Dashboard design enhancement### Pre-Requsities
- Python 3.9 (Python 3.7/3.8 can work in some cases)### Steps to run Code
- Clone the repository
```
git clone https://github.com/RizwanMunawar/yolov5-object-tracking.git
```- Goto the cloned folder.
```
cd yolov5-object-tracking
```- 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 ..
```- Upgrade pip with mentioned command below.
```
pip install --upgrade pip
```- Install requirements with mentioned command below.
```
pip install -r requirements.txt
```- 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
```- 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
- https://medium.com/augmented-startups/yolov7-training-on-custom-data-b86d23e6623
- https://medium.com/augmented-startups/roadmap-for-computer-vision-engineer-45167b94518c
- https://medium.com/augmented-startups/yolor-or-yolov5-which-one-is-better-2f844d35e1a1
- https://medium.com/augmented-startups/train-yolor-on-custom-data-f129391bd3d6
- https://medium.com/augmented-startups/develop-an-analytics-dashboard-using-streamlit-e6282fa5e0f
- https://medium.com/augmented-startups/jetson-nano-is-rapidly-involving-in-computer-vision-solutions-5f588cb7c0db
- https://chr043416.medium.com/how-can-computer-vision-products-help-in-warehouses-aa1dd95ec79cFor 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/)