修bug
This commit is contained in:
parent
388f5ed277
commit
8148a58584
@ -16,7 +16,7 @@ for file in os.listdir(src_dir):
|
|||||||
mask = mask.copy()
|
mask = mask.copy()
|
||||||
mask[mask == 15] = 255
|
mask[mask == 15] = 255
|
||||||
|
|
||||||
png_path = os.path.join(dst_dir, os.path.splitext(file)[0] + ".png")
|
png_path = os.path.join(dst_dir, os.path.splitext(file)[0].replace("mask", "img") + ".png")
|
||||||
Image.fromarray(mask.astype(np.uint8)).save(png_path)
|
Image.fromarray(mask.astype(np.uint8)).save(png_path)
|
||||||
print(f"已保存: {png_path}")
|
print(f"已保存: {png_path}")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user