(self, sits_number, sits_id, months, curr_sits_path)
| 213 | self.std = torch.tensor([33.2714, 25.5288, 23.9868, 30.5591], dtype=torch.float16).reshape(4, 1, 1) |
| 214 | |
| 215 | def load_data(self, sits_number, sits_id, months, curr_sits_path): |
| 216 | data = torch.zeros((len(months), self.num_channels, self.true_size, self.true_size), dtype=torch.float16) |
| 217 | days = [self.random_date_augmentation(month) for month in months] |
| 218 | name_rgb = [f'{sits_id}_{day}_rgb.jpeg' for day in days] |
| 219 | name_infra = [f'{sits_id}_{day}_infra.jpeg' for day in days] |
| 220 | for d, (n_rgb, n_infra) in enumerate(zip(name_rgb, name_infra)): |
| 221 | data[d, :3] = torchvision.io.read_image(join(curr_sits_path, n_rgb)) |
| 222 | data[d, 3] = torchvision.io.read_image(join(curr_sits_path, n_infra)) |
| 223 | return data, days |
| 224 | |
| 225 | def random_date_augmentation(self, month): |
| 226 | if self.split == 'train': |
nothing calls this directly
no test coverage detected