MCPcopy Create free account
hub / github.com/ElliotVincent/SitsSCD / load_data

Method load_data

data/data.py:170–177  ·  view source on GitHub ↗
(self, sits_number, sits_id, months, curr_sits_path)

Source from the content-addressed store, hash-verified

168 '12'])]
169
170 def load_data(self, sits_number, sits_id, months, curr_sits_path):
171 data = torch.zeros((len(months), self.num_channels, self.true_size, self.true_size), dtype=torch.float16)
172 name_rgb = [f'{sits_id}_{self.month_string[month]}.jpg' for month in months]
173 for month_id, month in enumerate(months):
174 if month in self.month_list[sits_number]:
175 data[month_id] = torchvision.io.read_image(join(curr_sits_path, name_rgb[month_id]))
176 days = [self.monthly_dates[month] for month in months]
177 return data, days
178
179
180class DynamicEarthNet(SitsDataset):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected