Load the proper dataset based on the parsed arguments :param args: The arguments in which is specified which dataset should be used :return: a 5-tuple consisting of: - The train data set - The project data set (usually train data set without augmenta
(args: argparse.Namespace)
| 11 | |
| 12 | |
| 13 | def get_data(args: argparse.Namespace): |
| 14 | """ |
| 15 | Load the proper dataset based on the parsed arguments |
| 16 | :param args: The arguments in which is specified which dataset should be used |
| 17 | :return: a 5-tuple consisting of: |
| 18 | - The train data set |
| 19 | - The project data set (usually train data set without augmentation) |
| 20 | - The test data set |
| 21 | - a tuple containing all possible class labels |
| 22 | - a tuple containing the shape (depth, width, height) of the input images |
| 23 | """ |
| 24 | if args.dataset =='CUB-200-2011': |
| 25 | return get_birds(True, './data/CUB_200_2011/dataset/train_corners', './data/CUB_200_2011/dataset/train_crop', './data/CUB_200_2011/dataset/test_full') |
| 26 | if args.dataset == 'CARS': |
| 27 | return get_cars(True, './data/cars/dataset/train', './data/cars/dataset/train', './data/cars/dataset/test') |
| 28 | raise Exception(f'Could not load data set "{args.dataset}"!') |
| 29 | |
| 30 | def get_dataloaders(args: argparse.Namespace): |
| 31 | """ |
no test coverage detected