support img_h < 32 (#1992)

revert-2226-fix_mem
zhoujun 4 years ago committed by GitHub
parent 0b53465894
commit 3ab2d46310
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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:

Loading…
Cancel
Save