Skip to content

It's a project to detect traffic cones and recognize the color of cones.

Notifications You must be signed in to change notification settings

INFORTER0731/traffic_cones_detection

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub issues GitHub last commit

traffic_cones_detection

It's a project to detect traffic cones and recognize the colors as well. I used 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, 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

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

Prediction

If you want to detect cones directly, use predict.ipynb Open In Colab

You should use the weights I trained in model. Besides, I customized some files of yolov5, which are located in utils folder, you need to use them as well.

Result

Video

I clipped a video from one research project of ETH Zurich to test the peroformance.

cone1

Images

About

It's a project to detect traffic cones and recognize the color of cones.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 68.0%
  • Jupyter Notebook 32.0%