in cvat-serverless/functions/endpoints/openvino_reidentification.py [0:0]
def call(data):
buf0 = io.BytesIO(base64.b64decode(data["image0"]))
buf1 = io.BytesIO(base64.b64decode(data["image1"]))
threshold = float(data.get("threshold", 0.5))
max_distance = float(data.get("max_distance", 50))
image0 = Image.open(buf0)
image1 = Image.open(buf1)
boxes0 = data["boxes0"]
boxes1 = data["boxes1"]
results = infer(image0, boxes0, image1, boxes1, threshold, max_distance)
return JsonResponse(results, safe=False)