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

Method whole_inference

modeling/pi3/models/segformer/model.py:71–83  ·  view source on GitHub ↗

Inference with full image.

(self, img, img_meta, rescale)

Source from the content-addressed store, hash-verified

69 return out
70
71 def whole_inference(self, img, img_meta, rescale):
72 """Inference with full image."""
73
74 seg_logit = self.encode_decode(img, img_meta)
75 if rescale:
76 seg_logit = resize(
77 seg_logit,
78 size=img_meta[0]['ori_shape'][:2],
79 mode='bilinear',
80 align_corners=self.align_corners,
81 warning=False)
82
83 return seg_logit
84
85 def inference(self, img, img_meta, rescale):
86 """Inference with slide/whole style.

Callers 1

inferenceMethod · 0.95

Calls 2

encode_decodeMethod · 0.95
resizeFunction · 0.85

Tested by

no test coverage detected