Skip to content

Commit 7b331fe

Browse files
authored
Update split_train.py
Changed file extensions search from jpg to png (to match denoiser output)
1 parent 564da98 commit 7b331fe

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

partinet/process_utils/split_train.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def main(labels_path: str, images_path: str, output_dir: str):
3636
if idx in train_idx:
3737
# Copy training images and labels
3838
shutil.copy(
39-
os.path.join(images_path, file_name + ".jpg"),
40-
os.path.join(output_dir, "images", "train", file_name + ".jpg")
39+
os.path.join(images_path, file_name + ".png"),
40+
os.path.join(output_dir, "images", "train", file_name + ".png")
4141
)
4242
shutil.copy(
4343
os.path.join(labels_path, file_name + ".txt"),
@@ -46,8 +46,8 @@ def main(labels_path: str, images_path: str, output_dir: str):
4646
elif idx in val_idx:
4747
# Copy validation images and labels
4848
shutil.copy(
49-
os.path.join(images_path, file_name + ".jpg"),
50-
os.path.join(output_dir, "images", "val", file_name + ".jpg")
49+
os.path.join(images_path, file_name + ".png"),
50+
os.path.join(output_dir, "images", "val", file_name + ".png")
5151
)
5252
shutil.copy(
5353
os.path.join(labels_path, file_name + ".txt"),

0 commit comments

Comments
 (0)