feat generate to product image 新增 image_strength参数

fix print 透明图异常问题
This commit is contained in:
zhouchengrong
2024-07-02 11:45:40 +08:00
parent 4888935ef7
commit 35f5c6d4e9
2 changed files with 3 additions and 2 deletions

View File

@@ -118,6 +118,7 @@ class PrintPainting(object):
print_background = cv2.cvtColor(np.array(source_image_pil), cv2.COLOR_RGBA2BGR)
mask_background = cv2.cvtColor(np.array(source_image_pil_mask), cv2.COLOR_RGBA2BGR)
ret, mask_background = cv2.threshold(mask_background, 124, 255, cv2.THRESH_BINARY)
else:
mask = self.get_mask_inv(image)
mask = np.expand_dims(mask, axis=2)