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

Function load_and_resize14

eval_code/recons/interfaces/pi3.py:79–86  ·  view source on GitHub ↗
(filelist: List[str], new_width: int, device: str, verbose: bool)

Source from the content-addressed store, hash-verified

77
78
79def load_and_resize14(filelist: List[str], new_width: int, device: str, verbose: bool):
80 imgs = load_images(filelist, new_width=new_width, verbose=verbose).to(device)
81
82 ori_h, ori_w = imgs.shape[-2:]
83 patch_h, patch_w = ori_h // 14, ori_w // 14
84 # (N, 3, h, w) -> (1, N, 3, h_14, w_14)
85 imgs = F.interpolate(imgs, (patch_h * 14, patch_w * 14), mode="bilinear", align_corners=False, antialias=True).unsqueeze(0)
86 return imgs
87
88def infer_monodepth(file: str, model: Pi3, hydra_cfg: DictConfig):
89

Callers 5

infer_monodepthFunction · 0.70
infer_videodepthFunction · 0.70
infer_cameras_w2cFunction · 0.70
infer_cameras_c2wFunction · 0.70
infer_mv_pointcloudsFunction · 0.70

Calls 1

load_imagesFunction · 0.70

Tested by

no test coverage detected