MCPcopy Create free account
hub / github.com/ai4ce/RAP / __init__

Method __init__

matcher.py:22–27  ·  view source on GitHub ↗
(self, device, model_name=None)

Source from the content-addressed store, hash-verified

20 image_std = torch.tensor([0.5, 0.5, 0.5]).reshape(1, 3, 1, 1)
21
22 def __init__(self, device, model_name=None):
23 self.device = device
24 self.fast_nn_params = dict(device=device, dist='dot', block_size=2**13)
25 self.model = AsymmetricMASt3R.from_pretrained(model_name or "naver/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric").to(device).eval()
26 self.maxdim = max(self.model.patch_embed.img_size)
27 self.cmap = plt.get_cmap('jet')
28
29 def match_coarse_to_fine(self, query, reference, pts3d, intrinsics, max_match=100000, conf_thr=-1, vis_fig=None):
30 coarse_matches_im0, coarse_matches_im1 = self.match(query, reference, conf_thr)

Callers

nothing calls this directly

Calls 1

from_pretrainedMethod · 0.45

Tested by

no test coverage detected