FaceBoxes-tensorflow icon indicating copy to clipboard operation
FaceBoxes-tensorflow copied to clipboard

Understanding unnormalized_height and unnormalized_width

Open mrgloom opened this issue 6 years ago • 2 comments

https://github.com/TropComplique/FaceBoxes-tensorflow/blob/545ec4f4f3c55c3592ee189ed56a11a3fd017194/src/anchor_generator.py#L121

I wonder why we make division in one case, but do multiplication in another case?

ratio_sqrt = tf.sqrt(aspect_ratio)
unnormalized_height = scale / ratio_sqrt
unnormalized_width = scale * ratio_sqrt

mrgloom avatar Mar 26 '19 15:03 mrgloom

Because then

sqrt(unnormalized_height * unnormalized_width) = scale,
unnormalized_width / unnormalized_height = aspect_ratio

Also see my definitions of aspect_ratio and scale: https://github.com/TropComplique/FaceBoxes-tensorflow/blob/master/src/anchor_generator.py#L21.

TropComplique avatar Apr 10 '19 21:04 TropComplique

width, height are in [0,1] range? Why then width and height depend on image size. (in 5.)?

mrgloom avatar Apr 11 '19 09:04 mrgloom