Open baljit92 opened 5 years ago
Look in the file gen_anchors.py for the line:
centroids = run_kmeans(annotation_dims, num_anchors)
right after this line, do the math to compute what you need. In numpy syntax (which is the type of data centroids is), do something like this:
centroids[:,0] / centroids[:,1]
That will give you the ratio for each box. Then you must also know the scaling factor. A size in the centroids array relates to the grid size in the network, so multiply by that number. Let's pretend it is "43", then type
centroids * 43
You will need to learn a bit about numpy to do what I suggest.
Is there a way to use the anchor boxes generated using kMeans in Yolo with retina net. Retinanet takes into account the ratio and scales and then generates the anchor boxes based on that
So is there a way I can print out the ratios and scales for the generated anchor boxes?