mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
Fix priors boxes generation in case of non square inputs for TensorFlow SSDs
This commit is contained in:
parent
1db5d82b7f
commit
fe7c93cc05
@ -35,8 +35,9 @@ class SSDAnchorGenerator:
|
||||
|
||||
widths += [sqrt(self.scales[layer_id] * self.scales[layer_id + 1])]
|
||||
heights += [sqrt(self.scales[layer_id] * self.scales[layer_id + 1])]
|
||||
widths = [w * self.image_width for w in widths]
|
||||
heights = [h * self.image_height for h in heights]
|
||||
min_size = min(self.image_width, self.image_height)
|
||||
widths = [w * min_size for w in widths]
|
||||
heights = [h * min_size for h in heights]
|
||||
return widths, heights
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user