(self, odgt, opt, **kwargs)
| 21 | |
| 22 | class BaseDataset(torch.utils.data.Dataset): |
| 23 | def __init__(self, odgt, opt, **kwargs): |
| 24 | # parse options |
| 25 | self.imgSizes = opt.imgSizes |
| 26 | self.imgMaxSize = opt.imgMaxSize |
| 27 | # max down sampling rate of network to avoid rounding during conv or pooling |
| 28 | self.padding_constant = opt.padding_constant |
| 29 | |
| 30 | # parse the input list |
| 31 | self.parse_input_list(odgt, **kwargs) |
| 32 | |
| 33 | # mean and std |
| 34 | self.normalize = transforms.Normalize( |
| 35 | mean=[0.485, 0.456, 0.406], |
| 36 | std=[0.229, 0.224, 0.225]) |
| 37 | |
| 38 | def parse_input_list(self, odgt, max_sample=-1, start_idx=-1, end_idx=-1): |
| 39 | if isinstance(odgt, list): |
nothing calls this directly
no test coverage detected