fix: 修复sketch类型为others时 跳过 上印花 导致的尺寸与分割尺寸不一致问题, 修复others分割出后片的问题
This commit is contained in:
zcr
2026-02-03 16:22:47 +08:00
parent c1b80c58f1
commit f017d7e212
2 changed files with 4 additions and 0 deletions

View File

@@ -51,6 +51,8 @@ class Segmentation:
if not _ or result["image"].shape[:2] != seg_result.shape:
# 推理获得seg 结果
seg_result = get_seg_result(result['image'])
if result['name'] == 'others':
seg_result = seg_result.clip(max=1)
self.save_seg_result(seg_result, result['image_id'])
result['seg_result'] = seg_result