fix "\\" to "/" for compatiblity

This commit is contained in:
Kohya S
2023-08-24 19:19:53 +09:00
parent b44644bcec
commit a46a4781e8
2 changed files with 2 additions and 2 deletions

View File

@@ -121,7 +121,7 @@ CANNY_DIR = "path/to/canny/images"
os.makedirs(CANNY_DIR, exist_ok=True)
img_files = glob.glob(IMAGES_DIR + "/*.png")
for img_file in img_files:
can_file = CANNY_DIR + "\\" + os.path.basename(img_file)
can_file = CANNY_DIR + "/" + os.path.basename(img_file)
if os.path.exists(can_file):
print("Skip: " + img_file)
continue

View File

@@ -126,7 +126,7 @@ CANNY_DIR = "path/to/canny/images"
os.makedirs(CANNY_DIR, exist_ok=True)
img_files = glob.glob(IMAGES_DIR + "/*.png")
for img_file in img_files:
can_file = CANNY_DIR + "\\" + os.path.basename(img_file)
can_file = CANNY_DIR + "/" + os.path.basename(img_file)
if os.path.exists(can_file):
print("Skip: " + img_file)
continue