MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / get_visual_ppl

Function get_visual_ppl

utils/poster_eval_utils.py:152–160  ·  view source on GitHub ↗
(image, text)

Source from the content-addressed store, hash-verified

150
151
152def get_visual_ppl(image, text):
153
154 img_uri = pil_to_data_uri(image, fmt="PNG")
155 content = [
156 {"type": "text", "text": text},
157 {"type": "image_url", "image_url": {"url": img_uri}},
158 ]
159
160 return compute_vlm_ppl(content)
161
162def estimate_visual_tokens(
163 images,

Callers 1

Calls 2

pil_to_data_uriFunction · 0.70
compute_vlm_pplFunction · 0.70

Tested by

no test coverage detected