(batch)
| 26 | |
| 27 | |
| 28 | def horizontally_flip(batch): |
| 29 | |
| 30 | rgb_img=batch["rgb_img"] |
| 31 | rgb_img=torchvision.transforms.functional.hflip(rgb_img) |
| 32 | batch["rgb_img"]=rgb_img |
| 33 | |
| 34 | return batch |
| 35 | |
| 36 | |
| 37 | def generate_latents_dinov2(args, batch, preprocessor, model, output_latents_path): |