traffic_cones_detection

所属分类:聚类算法
开发工具:Python
文件大小:14953KB
下载次数:2
上传日期:2021-12-15 08:23:04
上 传 者sh-1993
说明:  这是一个检测交通锥并识别锥的颜色的项目。
(It s a project to detect traffic cones and recognize the color of cones.)

文件列表:
images (0, 2021-12-15)
images\1.jpeg (134562, 2021-12-15)
images\10.jpeg (183808, 2021-12-15)
images\11.jpeg (119104, 2021-12-15)
images\12.jpeg (104946, 2021-12-15)
images\13.jpeg (164466, 2021-12-15)
images\14.jpeg (199732, 2021-12-15)
images\15.jpeg (82335, 2021-12-15)
images\16.jpeg (108950, 2021-12-15)
images\2.jpeg (140503, 2021-12-15)
images\3.jpeg (150482, 2021-12-15)
images\4.jpeg (111504, 2021-12-15)
images\5.jpeg (190816, 2021-12-15)
images\6.jpeg (125291, 2021-12-15)
images\7.jpeg (92305, 2021-12-15)
images\8.jpeg (344077, 2021-12-15)
images\9.jpeg (244095, 2021-12-15)
model (0, 2021-12-15)
model\best.pt (14362015, 2021-12-15)
predict.ipynb (6232, 2021-12-15)
train.ipynb (6684, 2021-12-15)
utils (0, 2021-12-15)
utils\detect.py (8296, 2021-12-15)
utils\plots.py (19164, 2021-12-15)

[![GitHub issues](https://img.shields.io/github/issues/jhan15/traffic_cones_detection)](https://github.com/jhan15/traffic_cones_detection/issues) ![GitHub last commit](https://img.shields.io/github/last-commit/jhan15/traffic_cones_detection?color=ff69b4) # traffic_cones_detection It's a project to detect traffic cones and recognize the colors as well. I used [yolov5](https://github.com/ultralytics/yolov5) to train and detect cones. Furthermore, I used k-means to determine the dominant color to classify cone color. Currently, the supported colors are red, yellow, green, and blue. Other colors are classified as unknown. ## Dataset and annotation I used a self-collected cone dataset with 303 cone images. It's not a perfect practice because it's a small dataset. I also need to annotate the images myself. Here, I utilized an online annotation website [Roboflow](https://roboflow.com/), it provides services such as annotation, pre-processig, and augmentation. However, it has limitation of 1,000 source images and 5,000 generated images for free users. ## Model ```bash Model ├── cone detection: yolov5s └── color recognition: dominant color (k-means) ``` ## Usage You can try the codes in colab if you are interested in. #### Train If you have an annotated dataset, you can train directly use train.ipynb [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/jhan15/traffic_cones_detection/blob/master/train.ipynb) #### Prediction If you want to detect cones directly, use predict.ipynb [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/jhan15/traffic_cones_detection/blob/master/predict.ipynb) You should use the weights I trained in [model](https://github.com/jhan15/traffic_cones_detection/tree/master/model). Besides, I customized some files of yolov5, which are located in [utils](https://github.com/jhan15/traffic_cones_detection/tree/master/utils) folder, you need to use them as well. ## Result #### Video I clipped a video from one research project of [ETH Zurich](https://www.trace.ethz.ch/publications/2019/TrafficCone/) to test the peroformance. ![cone1](https://user-images.githubusercontent.com/62132206/120334300-d1a31e80-c2f0-11eb-962e-17c4d5481917.gif) #### Images

近期下载者

相关文件


收藏者