MCPcopy Create free account
hub / github.com/OpenBMB/AgentCPM-GUI / encode_image

Function encode_image

eval/grounding_eval/code/GPT-4o/bbox2text_eval.py:35–39  ·  view source on GitHub ↗
(image_path)

Source from the content-addressed store, hash-verified

33
34# Function to encode the image
35def encode_image(image_path):
36 image = Image.open(image_path)
37 w, h = image.width, image.height
38 with open(image_path, "rb") as image_file:
39 return base64.b64encode(image_file.read()).decode("utf-8"),w, h
40
41async def call_Qwenvl(item, client, model_name):
42 """

Callers 1

call_QwenvlFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected