duanzhiihao / RAPiD

RAPiD: Rotation-Aware People Detection in Overhead Fisheye Images (CVPR 2020 Workshops)
http://vip.bu.edu/rapid/
Other
213 stars 63 forks source link

How to find the size of the anchor? #5

Closed hoangnt2601 closed 3 years ago

hoangnt2601 commented 4 years ago

I tried using this to find anchors after recalculating the coordinates but it couldn't same your source code like this: anchors = np.array([ [18.7807, 33.4659], [28.8912, 61.7536], [48.6849, 68.3897], [45.0668, 101.4673], [63.0952, 113.5382], [81.3909, 134.4554], [91.7364, 144.9949], [137.5189, 178.4791], [194.4429, 250.7985] ], dtype=np.float32)

duanzhiihao commented 4 years ago

Hi, we generated the anchor boxes by: 1) Run 9-means on the MW-R dataset (We used the MATLAB build-in k-means function) 2) Average the results with the YOLOv3 anchors.

cs-heibao commented 3 years ago

@duanzhiihao Hi, I've also recalculate my own dataset's corresponding anchor size using the follow script and got the anchor sizes are follows:

# anchors = [
        #     [9.29564, 38.09912889], [11.05866, 56.49457778], [14.75588, 48.08206222],
        #     [15.2706, 74.80924444], [19.82166, 96.12263111], [21.03736, 65.68007111],
        #     [26.4014 , 117.29784889], [28.75392, 86.42638222], [38.936, 123.75338667]
        # ]

while use the clustered result, the location regression is not well, but use your default anchor size gets better result.