INNER CODE UNIT · Python
mask_img
fashn-AI/fashn-vton-1.5 · scripts/debug_masks.py:71
mask_img = mask_img * 255
filepath = os.path.join(path, f"{name}.png")
cv2.imwrite(filepath, mask_img)
print(f" Saved: {filepath}")
def save_image(img: np.ndarray, path: str, name: str):
"""Save RGB image."""
filepath = os.path.join(path, f"{name}.png")
if img.shape[-1] == 3:
cv2.imwrite(filepath, cv2.cvtColor(img, cv2.COLOR_RGB2BGR))
else:
cv2.imwrite(filepath, img)
print(f" Saved: {filepath}")
def create_clothing_agnostic_image_debug(