MCPcopy Create free account
hub / github.com/Atrovast/THGS / encode_image

Method encode_image

scripts/image_encoding.py:108–110  ·  view source on GitHub ↗
(self, input)

Source from the content-addressed store, hash-verified

106 return torch.gather(softmax, 1, best_id[..., None, None].expand(best_id.shape[0], len(self.negatives), 2))[:, 0, :]
107
108 def encode_image(self, input):
109 processed_input = self.process(input).half()
110 return self.model.encode_image(processed_input)
111
112
113

Callers 1

_embed_clip_sam_tilesFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected