All Projects → lars76 → Kmeans Anchor Boxes

lars76 / Kmeans Anchor Boxes

Licence: mit
k-means clustering with the Intersection over Union (IoU) metric as described in the YOLO9000 paper

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Kmeans Anchor Boxes

Tracking With Darkflow
Real-time people Multitracker using YOLO v2 and deep_sort with tensorflow
Stars: ✭ 515 (+9.81%)
Mutual labels:  object-detection, yolo2
Mxnet Yolo
YOLO: You only look once real-time object detector
Stars: ✭ 240 (-48.83%)
Mutual labels:  object-detection, yolo2
Satellite Image Object Detection
YOLO/YOLOv2 inspired deep network for object detection on satellite images (Tensorflow, Numpy, Pandas).
Stars: ✭ 115 (-75.48%)
Mutual labels:  object-detection, yolo2
Alturos.yolo
C# Yolo Darknet Wrapper (real-time object detection)
Stars: ✭ 308 (-34.33%)
Mutual labels:  object-detection, yolo2
Yolo Tf
TensorFlow implementation of the YOLO (You Only Look Once)
Stars: ✭ 200 (-57.36%)
Mutual labels:  object-detection, yolo2
Yolo2 Pytorch
PyTorch implementation of the YOLO (You Only Look Once) v2
Stars: ✭ 426 (-9.17%)
Mutual labels:  object-detection, yolo2
Dataset synthesizer
NVIDIA Deep learning Dataset Synthesizer (NDDS)
Stars: ✭ 417 (-11.09%)
Mutual labels:  object-detection
Ssd.pytorch
A PyTorch Implementation of Single Shot MultiBox Detector
Stars: ✭ 4,499 (+859.28%)
Mutual labels:  object-detection
Autonomousvehiclepaper
无人驾驶相关论文速递
Stars: ✭ 406 (-13.43%)
Mutual labels:  object-detection
Awesome Object Proposals
A curated list of object proposals resources for object detection
Stars: ✭ 400 (-14.71%)
Mutual labels:  object-detection
Adversarial Frcnn
A-Fast-RCNN (CVPR 2017)
Stars: ✭ 461 (-1.71%)
Mutual labels:  object-detection
Object Detection
Object detection project for real-time (webcam) and offline (video processing) application.
Stars: ✭ 454 (-3.2%)
Mutual labels:  object-detection
Detecto
Build fully-functioning computer vision models with PyTorch
Stars: ✭ 445 (-5.12%)
Mutual labels:  object-detection
Ssd Tensorflow
Single Shot MultiBox Detector in TensorFlow
Stars: ✭ 4,066 (+766.95%)
Mutual labels:  object-detection
Kaggle Imaterialist
The First Place Solution of Kaggle iMaterialist (Fashion) 2019 at FGVC6
Stars: ✭ 451 (-3.84%)
Mutual labels:  object-detection
Yolov4 Deepsort
Object tracking implemented with YOLOv4, DeepSort, and TensorFlow.
Stars: ✭ 408 (-13.01%)
Mutual labels:  object-detection
Jetson Inference
Hello AI World guide to deploying deep-learning inference networks and deep vision primitives with TensorRT and NVIDIA Jetson.
Stars: ✭ 5,191 (+1006.82%)
Mutual labels:  object-detection
Centerx
This repo is implemented based on detectron2 and centernet
Stars: ✭ 403 (-14.07%)
Mutual labels:  object-detection
Practical Deep Learning Book
Official code repo for the O'Reilly Book - Practical Deep Learning for Cloud, Mobile & Edge
Stars: ✭ 441 (-5.97%)
Mutual labels:  object-detection
Myvision
Computer vision based ML training data generation tool 🚀
Stars: ✭ 453 (-3.41%)
Mutual labels:  object-detection

kmeans-anchor-boxes

This repository contains an implementation of k-means clustering with the Intersection over Union (IoU) metric as described in the YOLO9000 paper [1].

Tests

According to the paper we should get 61.0 avg IoU with 5 clusters and 67.2 avg IoU with 9 clusters on the VOC 2007 data set:

Table

First I tried normal k-means clustering:

k-means k = 5

k-means k = 9

As the plots show the algorithm converges to lower values than expected. To resolve this problem, I changed k-means to not run until convergence. Whenever the values started to drop, the algorithm would start again with different initial means. By doing this for about 50 iterations, an average IoU of about 60 was possible.

However, this didn't seem good enough, because now the algorithm has to run for a long time to find the right values. So I started trying out different initialization methods and variants of k-means clustering. In the end the best results were obtained by just using the median to calculate the new centroids.

k-medians k = 5

k-medians k = 9

The end result is about 60.15 for k = 5 and 67.13 for k = 9 on the VOC 2007 data set. If you run the algorithm multiple times, the avg IoU can be higher. I got a few times for example 60.5 for k = 5. The result always depends on the chosen starting points during initialization.

Usage

To try out the results yourself, download the annotations here: http://host.robots.ox.ac.uk/pascal/VOC/voc2007/. Then change the constant ANNOTATIONS_PATH in test/test_voc2007.py and finally run:

python3 -m unittest discover -s tests/

References

[1] J. Redmon and A. Farhadi, “YOLO9000: Better, Faster, Stronger,” 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Jul. 2017.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].