mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-25 04:29:22 +01:00
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:
committed by
wenmeng.zwm
parent
75c90d8a98
commit
ae672b73df
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user