def load_coco_detection_annotations(json_path, extra_attrs=True):
    """Loads the COCO annotations from the given JSON file.

    See :ref:`this page <COCODetectionDataset-import>` for format details.

    Args:
        json_path: the path to the annotations JSON file
        extra_attrs (True): whether to load extra annotation attributes.
            Supported values are:

            -   ``True``: load all extra attributes found
            -   ``False``: do not load extra attributes
            -   a name or list of names of specific attributes to load

    Returns:
        a tuple of

        -   info: a dict of dataset info
        -   classes_map: a dict mapping class IDs to labels
        -   supercategory_map: a dict mapping class labels to category dicts
        -   images: a dict mapping image IDs to image dicts
        -   annotations: a dict mapping image IDs to list of
            :class:`COCOObject` instances, or ``None`` for unlabeled datasets
    """
    d = etas.load_json(json_path)
    return _parse_coco_detection_annotations(d, extra_attrs=extra_attrs)
Loads the COCO annotations from the given JSON file.

    See :ref:`this page <COCODetectionDataset-import>` for format details.

    Args:
        json_path: the path to the annotations JSON file
        extra_attrs (True): whether to load extra annotation attributes.
            Supported values are:

            -   ``True``: load all extra attributes found
            -   ``False``: do not load extra attributes
            -   a name or list of names of specific attributes to load

    Returns:
        a tuple of

        -   info: a dict of dataset info
        -   classes_map: a dict mapping class IDs to labels
        -   supercategory_map: a dict mapping class labels to category dicts
        -   images: a dict mapping image IDs to image dicts
        -   annotations: a dict mapping image IDs to list of
            :class:`COCOObject` instances, or ``None`` for unlabeled datasets
    
fiftyone/utils/coco.py