Description Usage Arguments Value
Allows to cluster 2-dimensional with k-means using intersection over union distance. This is useful for anchors initialization in the YOLO-family of models for object detection. See Redmon et al. (2016) <arXiv:1612.08242>, Redmon et al. (2016) <arXiv:1804.02767>.
1 2 | kmeans_iou(x, k, iter = 10, init = x[sample(nrow(x), size = k), , drop
= FALSE], early_stop = 3L, verbose = FALSE)
|
x |
input 2-d matrix: first column is wisth, second column is height of the bounding box |
k |
number of clusters |
iter |
number of k-means iterations |
init |
2-d matrix of initial centroids. Should have |
early_stop |
integer - stop k-means if there is no improvement during last |
verbose |
logical, whether to print information during fitting the model |
list of 2 values. First is a matrix of cluster centers, second is cluster membership indices.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.