def __init__(self, dataset, detection_type='bbox'):
    "COCOWrapper constructor.\n\n    See http://mscoco.org/dataset/#format for a description of the format.\n    By default, the coco.COCO class constructor reads from a JSON file.\n    This function duplicates the same behavior but loads from a dictionary,\n    allowing us to perform evaluation without writing to external storage.\n\n    Args:\n      dataset: a dictionary holding bounding box annotations in the COCO format.\n      detection_type: type of detections being wrapped. Can be one of ['bbox',\n        'segmentation']\n\n    Raises:\n      ValueError: if detection_type is unsupported.\n    "
    supported_detection_types = ['bbox', 'segmentation']
    if (detection_type not in supported_detection_types):
        raise ValueError('Unsupported detection type: {}. Supported values are: {}'.format(detection_type, supported_detection_types))
    self._detection_type = detection_type
    coco.COCO.__init__(self)
    self.dataset = dataset
    self.createIndex()
COCOWrapper constructor.

See http://mscoco.org/dataset/#format for a description of the format.
By default, the coco.COCO class constructor reads from a JSON file.
This function duplicates the same behavior but loads from a dictionary,
allowing us to perform evaluation without writing to external storage.

Args:
  dataset: a dictionary holding bounding box annotations in the COCO format.
  detection_type: type of detections being wrapped. Can be one of ['bbox',
    'segmentation']

Raises:
  ValueError: if detection_type is unsupported.
def __init__(self, dataset, detection_type='bbox'):
    "COCOWrapper constructor.\n\n    See http://mscoco.org/dataset/#format for a description of the format.\n    By default, the coco.COCO class constructor reads from a JSON file.\n    This function duplicates the same behavior but loads from a dictionary,\n    allowing us to perform evaluation without writing to external storage.\n\n    Args:\n      dataset: a dictionary holding bounding box annotations in the COCO format.\n      detection_type: type of detections being wrapped. Can be one of ['bbox',\n        'segmentation']\n\n    Raises:\n      ValueError: if detection_type is unsupported.\n    "
    supported_detection_types = ['bbox', 'segmentation']
    if (detection_type not in supported_detection_types):
        raise ValueError('Unsupported detection type: {}. Supported values are: {}'.format(detection_type, supported_detection_types))
    self._detection_type = detection_type
    coco.COCO.__init__(self)
    self.dataset = dataset
    self.createIndex()