# open image
img = Image.open(BytesIO(base64.b64decode(img_b64.encode('ascii'))))

# infer result
detections=yolov8_detector(img, size=size, conf_thres=conf_thres, iou_thres=iou_thres)