support img_h < 32

This commit is contained in:
WenmuZhou 2021-02-09 13:36:38 +08:00
parent ed2b527c9f
commit 33f302e5ff
1 changed files with 2 additions and 2 deletions

View File

@ -185,8 +185,8 @@ class DetResizeForTest(object):
resize_h = int(h * ratio)
resize_w = int(w * ratio)
resize_h = int(round(resize_h / 32) * 32)
resize_w = int(round(resize_w / 32) * 32)
resize_h = max(int(round(resize_h / 32) * 32), 32)
resize_w = max(int(round(resize_w / 32) * 32), 32)
try:
if int(resize_w) <= 0 or int(resize_h) <= 0: