MCPcopy Create free account
hub / github.com/CompVis/zigma / get_transforms_image

Function get_transforms_image

datasets/video_utils.py:576–587  ·  view source on GitHub ↗
(image_size=256)

Source from the content-addressed store, hash-verified

574
575
576def get_transforms_image(image_size=256):
577 transform = transforms.Compose(
578 [
579 transforms.Lambda(lambda pil_image: center_crop_arr(pil_image, image_size)),
580 transforms.RandomHorizontalFlip(),
581 transforms.ToTensor(),
582 transforms.Normalize(
583 mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5], inplace=True
584 ),
585 ]
586 )
587 return transform

Callers

nothing calls this directly

Calls 1

center_crop_arrFunction · 0.70

Tested by

no test coverage detected