def bounding_box_to_annotations(bbx):
    """Converts :any:`bob.ip.facedetect.BoundingBox` to dictionary annotations.

    Parameters
    ----------
    bbx : :any:`bob.ip.facedetect.BoundingBox`
        The given bounding box.

    Returns
    -------
    dict
        A dictionary with topleft and bottomright keys.
    """
    landmarks = {
        'topleft': bbx.topleft,
        'bottomright': bbx.bottomright,
    }
    return landmarks