bug fix for single human parsing

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/12869114
* fix bug: single human parsing, 当src_h, src_w相等时,new_h, new_w = 0, 0, 出现bug
This commit is contained in:
hejunjie.hjj
2023-06-08 19:36:18 +08:00
committed by wenmeng.zwm
parent 75c90d8a98
commit ae672b73df

View File

@@ -18,7 +18,7 @@ def center_to_target_size_test(img, target_size):
new_h, new_w = 0, 0
tfm_list = []
if src_h > trg_h and src_w > trg_w:
if src_h > src_w:
if src_h >= src_w:
new_h = trg_h
new_w = int(new_h * src_w / src_h)
if new_w > trg_w: