def match(cls, responses, targets) -> float:
        """Exact match between targets and responses."""
        logging.debug(f"{responses=}, {targets=}")
        targets = ast.literal_eval(targets)
        try:
            responses = ast.literal_eval(responses)
        except SyntaxError:
            return 0

        try:
            iou_scores = calculate_iou(
                [
                    responses,
                ],
                [
                    targets,
                ],
            )
            if not iou_scores:
                return 0
        except:
            return 0

        # Take the mean IoU score for now.
        return sum(iou_scores) / len(iou_scores)
Exact match between targets and responses.
vlmeval/dataset/utils/megabench/scoring/nbbox_iou.py