“…Traditional selection method of anchors is difficult to improve the accuracy, so this paper adopts the method of calculating the anchors in YOLOv2 [
31], and uses the K‐means clustering algorithm to cluster the artificially labelled real bounding boxes in the training set, so as to obtain the best size of anchors. Then six anchors were selected according to the average IoU to predict the bounding box, thus to improve the detection accuracy [
19]. The distance function formula for clustering is
where, box represents the bounding box labelled in training samples, and centroid is the number of cluster centres, which is set as 9 here.…”