(self, index)
| 265 | args.inference_size = self.render_size |
| 266 | |
| 267 | def __getitem__(self, index): |
| 268 | index = index % self.size |
| 269 | |
| 270 | img1 = frame_utils.read_gen(self.image_list[index][0]) |
| 271 | img2 = frame_utils.read_gen(self.image_list[index][1]) |
| 272 | |
| 273 | flow = frame_utils.read_gen(self.flow_list[index]) |
| 274 | |
| 275 | images = [img1, img2] |
| 276 | image_size = img1.shape[:2] |
| 277 | if self.is_cropped: |
| 278 | cropper = StaticRandomCrop(image_size, self.crop_size) |
| 279 | else: |
| 280 | cropper = StaticCenterCrop(image_size, self.render_size) |
| 281 | images = list(map(cropper, images)) |
| 282 | flow = cropper(flow) |
| 283 | |
| 284 | images = np.array(images).transpose(3, 0, 1, 2) |
| 285 | flow = flow.transpose(2, 0, 1) |
| 286 | return [images], [flow] |
| 287 | |
| 288 | def __len__(self): |
| 289 | return self.size * self.replicates |
nothing calls this directly
no test coverage detected