YOLOv2 icon indicating copy to clipboard operation
YOLOv2 copied to clipboard

Output of Dimension Cluster

Open dhruvp opened this issue 7 years ago • 1 comments

https://github.com/leetenki/YOLOv2/blob/cd2b69c36ccee8babc0ba013ab47bc8f4177c850/dimension_cluster.py#L66

Hi!

Thanks for your really nicely documented work! I had a quick question on the above snippet ^^. Why is it that you multiply the final centroid width and height by the grid width and height?

In my use case, the centroid widths and height correspond to say 20 pixels in the true image. I imagine this should then be divided by the grid width and height to determine the final anchor values (as the anchor values are multiplied by the grid width and height correct?).

Could you help me understand why you instead multiply by the grid dimensions to get the anchor values? If I did this method I would get anchor values of (260 etc.)

dhruvp avatar Dec 13 '17 20:12 dhruvp

@dhruvp Hello. I currently bumped into the same question as you. Though this is only my guess, since we can't see the annotation file, the width and height in the annotation file seems to be written in the relative coordinate. That is,

relative_object_width = object_width/image_width/grid_width

shikiponn avatar Mar 27 '18 02:03 shikiponn