def datasets(args): train = Dataset( csv_views=args.data_views, csv_bboxes=args.data_boxes, root_dir=args.images, subset="train", random=True, only_biopsied=args.only_biopsied, transform=transforms(train=True), skip_preprocessing=True, downscale=args.downscale, max_slice_offset=args.slice_offset, seed=args.seed, ) valid = Dataset( csv_views=args.data_views, csv_bboxes=args.data_boxes, root_dir=args.images, subset="validation", random=False, transform=transforms(train=False), skip_preprocessing=True, downscale=args.downscale, max_slice_offset=args.slice_offset, seed=args.seed, ) return train, valid
def datasets(args): train = Dataset(images_dir = args.images, subset = "train", image_size=args.image_size, transform=transforms(scale=args.aug_scale, angle=args.aug_angle, flip_prob=0.5),) valid = Dataset(images_dirs = args.images, subset = "valid", image_size = args.image_size,random_sampling = False,) return train,valid
def datasets(images, image_size, scale, angle): train = Dataset( images_dir=images, subset="train", image_size=image_size, transform=transforms(scale, angle, flip_prob=0.5), ) valid = Dataset( images_dir=images, subset="validation", image_size=image_size, random_sampling=False, ) return train, valid