Skip to content
Snippets Groups Projects
Commit 6715925a authored by Tamino Huxohl's avatar Tamino Huxohl
Browse files

implement new patch dataset parameters into training

parent 82eb0bf4
No related branches found
No related tags found
No related merge requests found
...@@ -158,6 +158,29 @@ if __name__ == "__main__": ...@@ -158,6 +158,29 @@ if __name__ == "__main__":
default="mean", default="mean",
help="type of normalization applied to the reconstructions", help="type of normalization applied to the reconstructions",
) )
parser.add_argument(
"--patch_size",
type=int,
default=32,
help="the size of patches extracted for each reconstruction"
)
parser.add_argument(
"--patch_offset",
type=int,
default=20,
help="offset to ignore the border of the image"
)
parser.add_argument(
"--number_of_patches",
type=int,
default=100,
help="number of patches extracted for each image"
)
parser.add_argument(
"--no_shuffle",
action="store_true"
help="do not shuffle patches in the dataset"
)
# Training Args # Training Args
parser.add_argument( parser.add_argument(
...@@ -265,6 +288,10 @@ if __name__ == "__main__": ...@@ -265,6 +288,10 @@ if __name__ == "__main__":
for split in ["train", "validation"]: for split in ["train", "validation"]:
dataset = MuMapPatchDataset( dataset = MuMapPatchDataset(
args.dataset_dir, args.dataset_dir,
patches_per_image=args.number_of_patches,
patch_size=args.patch_size,
patch_offset=args.patch_offset,
shuffle=not args.no_shuffle,
split_name=split, split_name=split,
transform_normalization=transform_normalization, transform_normalization=transform_normalization,
transform_augmentation=transform_augmentation, transform_augmentation=transform_augmentation,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment