MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / resize_image

Function resize_image

eval_code/recons/datasets/utils/cropping.py:14–16  ·  view source on GitHub ↗
(image: Image.Image, output_resolution: Tuple[int, int])

Source from the content-addressed store, hash-verified

12 bicubic = Image.BICUBIC
13
14def resize_image(image: Image.Image, output_resolution: Tuple[int, int]) -> Image.Image:
15 max_resize_scale = max(output_resolution[0] / image.size[0], output_resolution[1] / image.size[1])
16 return image.resize(output_resolution, resample=lanczos if max_resize_scale < 1 else bicubic)
17
18def resize_image_depth_and_intrinsic(
19 image: Image.Image,

Callers 4

get_dataMethod · 0.90
get_dataMethod · 0.90
get_dataMethod · 0.90

Calls 1

resizeMethod · 0.80

Tested by

no test coverage detected