vehicle-orientation-detection
A college course project. Achieved vehicle orientation detection based on YOLOv5.
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 (11.3%) to scientific vocabulary
Repository
A college course project. Achieved vehicle orientation detection based on YOLOv5.
Basic Info
- Host: GitHub
- Owner: Steven8686
- License: agpl-3.0
- Language: Python
- Default Branch: main
- Size: 53.6 MB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
readme.md
Vehicle Orientation Detection (Based on YOLOv5)
YOLOv5: ultralytics/yolov5: YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
A vehicle-orientation detection system based on YOLOv5 for real-time vehicle location detection. It uses the relative location of tires to obtain the direction. The code is compatible with PyTorch 1.7+ and supports GPU acceleration.
Due to various objective factors and the author's own limitations in coding ability, please forgive any shortcomings. Your valuable suggestions for improvement are sincerely hoped for.
!!!Disclaimer: The functionalities provided by this project have not been fully tested. The authors do not take any responsibility for issues arising from its use!!!
🚀 Major Functions
- ✅ Vehicle detection: High quality YOLOv5 object detection.
- 🧭 Orientation: Method of detecting orientations of complex objects based on key points.
- 📊 Visualized output: Output marked with ellipses and arrow lines.
📦 Quick start
Environment
```bash
clone project
git clone https://github.com/Steven8686/vehicleorientationdetect.git cd vehicle-orientation-detection
installation (Python 3.8+)
pip install -r requirements.txt ```
Model test
bash
python detect.py --weights ./orientation/vehicle_orientation.pt --img 640 --conf 0.25 --source ./orientation/test_picture/test.jpg --ori_mode e-lsm
pre-trained model (based on dataset of our own) is saved as ./orientation/vehicle_orientation.pt
Parameters
This project has 3 more parameters compared to original YOLOv5. Description: (original parameters of YOLOv5 are not mentioned here)
bash
--ori_mode # Modes for ellipses(tires) detection, Including "e-lsm", "lsm", "e-hough", "hough",default="e-lsm"
--ori_detect # Enables orientation detection. If False, there's no difference between original yolov5 for detect.py
--ori_savepath # Save path for orientation detection. Default=runs/detect/expx/orientation.jpg/mp4.
Extra information
In this version, due to some historic reasons, classes.txt (./orientation/classes.txt) defined 6 categories, representing:
| label | meaning | | :---- | :----------------------------------------------------------- | | sr | static right (static tires on the right side of vehicle, usually back wheel) | | mr | movable right (movable tires on the right side of vehicle, usually front wheel) | | ml | movable left | | sl | static left | | l | left (Left side of vehicle) | | r | right (Right side of vehicle) |
In fact, 3 categories (car, front, back) are enough for detection. Currently used 6 categories have decreased the accuracy of YOLO detection and resulted in duplicate detections. We plan to correct and optimize this problem later.
Future Plans
- Modify the way of labeling data and correspondent code.
- Optimize the save process and keep it the same as original YOLOv5.
- Optimize the tire detection logic. Plan to add a direct way of plotting the arrow using the detection boxes as well as optimize performance.
Owner
- Login: Steven8686
- Kind: user
- Repositories: 1
- Profile: https://github.com/Steven8686
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
- Watch event: 3
- Delete event: 1
- Push event: 2
- Create event: 3
Last Year
- Watch event: 3
- Delete event: 1
- Push event: 2
- Create event: 3