def METHOD_NAME(self, x, boxes):
    mask_prob = x
    scores = None
    if self.keypointer:
        mask_prob, scores = self.keypointer(x, boxes)
    assert len(boxes) == 1, "Only non-batched inference supported for now"
    boxes_per_image = [box.bbox.size(0) for box in boxes]
    mask_prob = mask_prob.split(boxes_per_image, dim=0)
    scores = scores.split(boxes_per_image, dim=0)
    results = []
    for prob, box, score in zip(mask_prob, boxes, scores):
        bbox = BoxList(box.bbox, box.size, mode="xyxy")
        for field in box.fields():
            bbox.add_field(field, box.get_field(field))
        prob = PersonKeypoints(prob, box.size)
        prob.add_field("logits", score)
        bbox.add_field("keypoints", prob)
        results.append(bbox)
    return results