MCPcopy Create free account
hub / github.com/TencentARC/FreeSplatter / resize_without_crop

Function resize_without_crop

freesplatter/utils/infer_util.py:31–33  ·  view source on GitHub ↗
(pil_image, target_width, target_height)

Source from the content-addressed store, hash-verified

29
30
31def resize_without_crop(pil_image, target_width, target_height):
32 resized_image = pil_image.resize((target_width, target_height), Image.LANCZOS)
33 return np.array(resized_image)[:, :, :3]
34
35
36@torch.inference_mode()

Callers 1

remove_backgroundFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected