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

Function draw_points

data/draw_marker.py:11–15  ·  view source on GitHub ↗
(draw, image, data_entry, points)

Source from the content-addressed store, hash-verified

9 return (np.array(point[0]) / 1000) * np.array([width, height])
10
11def draw_points(draw, image, data_entry, points):
12 for color, key in points:
13 point = scale_point(data_entry[key], image.width, image.height)
14 point = tuple(map(int, point))
15 draw.ellipse([point[0]-20, point[1]-20, point[0]+20, point[1]+20], fill=color)
16
17def draw_thick_bbox(draw, image, bbox, color, stroke=20):
18 bbox = scale_bbox(bbox, image.width, image.height)

Calls 1

scale_pointFunction · 0.70

Tested by

no test coverage detected