MCPcopy Create free account
hub / github.com/NVlabs/RADIO / transform

Method transform

examples/common/resize_transform.py:74–80  ·  view source on GitHub ↗
(self, inpt: Any, params: Dict[str, Any])

Source from the content-addressed store, hash-verified

72 return dict(size=size)
73
74 def transform(self, inpt: Any, params: Dict[str, Any]) -> Any:
75 if isinstance(inpt, Image.Image):
76 inpt = inpt.convert('RGB')
77
78 size = params['size']
79
80 return transforms.functional.resize(inpt, size=size, interpolation=transforms.InterpolationMode.BICUBIC)
81
82
83class PadToSquare(TV2Compat):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected