Let’s say I’m fetching annotations from a CVAT job:
with make_client(host=HOST, port=PORT, credentials=(USER, PASS)) as client:
job = client.jobs.retrieve(id)
annotations = job.get_annotations()
shape = annotations.shapes[0]
If shape.type
is mask
, how is it encoded in the list found in shape.points
? How does one decode it to make sense of it as a mask array?
I could not find in the documentation how this data is encoded. The list length is not even, so it can’t simply be a flattened array of x-y pairs (e.g., [x1, y1, x2, y2, ..., xn, yn]
) indicating which pixels are masked.