class_docstr: MS COCO detection dataset.
  
  Parameters
  ----------
  root : str, default '~/.mxnet/datasets/coco'
      Path to folder storing the dataset.
  splits : list of str, default ['instances_val2017']
      Json annotations name.
      Candidates can be: instances_val2017, instances_train2017.
  transform : callable, default None
      A function that takes data and label and transforms them. Refer to
      :doc:`./transforms` for examples.
  
      A transform function for object detection should take label into consideration,
      because any geometric modification will require label to be modified.
  min_object_area : float
      Minimum accepted ground-truth area, if an object's area is smaller than this value,
      it will be ignored.
  skip_empty : bool, default is True
      Whether skip images with no valid object. This should be `True` in training, otherwise
      it will cause undefined behavior.
  use_crowd : bool, default is True
      Whether use boxes labeled as crowd instance.
class_docstr_tok: ["MS","COCO","detection","dataset",".","Parameters","--","--","--","--","--","root",":","str",",","default","'~\/.mxnet\/datasets\/coco'","Path","to","folder","storing","the","dataset",".","splits",":","list","of","str",",","default","[","'instances_val2017","'","]","Json","annotations","name",".","Candidates","can","be",":","instances_val2017",",","instances_train2017",".","transform",":","callable",",","default","None","A","function","that","takes","data","and","label","and","transforms","them",".","Refer","to",":","doc",":","`",".\/transforms","`","for","examples",".","A","transform","function","for","object","detection","should","take","label","into","consideration",",","because","any","geometric","modification","will","require","label","to","be","modified",".","min_object_area",":","float","Minimum","accepted","ground-truth","area",",","if","an","object","'s","area","is","smaller","than","this","value",",","it","will","be","ignored",".","skip_empty",":","bool",",","default","is","True","Whether","skip","images","with","no","valid","object",".","This","should","be","`","True","`","in","training",",","otherwise","it","will","cause","undefined","behavior",".","use_crowd",":","bool",",","default","is","True","Whether","use","boxes","labeled","as","crowd","instance","."]
docstr: Load all image paths and labels from JSON annotation files into buffer.
docstr_tok: ["Load","all","image","paths","and","labels","from","JSON","annotation","files","into","buffer","."]
code: def _load_jsons(self):
      """Load all image paths and labels from JSON annotation files into buffer."""
      items = []
      labels = []
      im_aspect_ratios = []
      # lazy import pycocotools
      try_import_pycocotools()
      from pycocotools.coco import COCO
  
      for split in self._splits:
          anno = (
              os.path.join(self._root, self.annotation_dir, split)
              + ".json"
          )
          _coco = COCO(anno)
          self._coco.append(_coco)
          classes = [
              c["name"] for c in _coco.loadCats(_coco.getCatIds())
          ]
          if not classes == self.classes:
              raise ValueError(
                  "Incompatible category names with COCO: "
              )
          assert classes == self.classes
          json_id_to_contiguous = {
              v: k for k, v in enumerate(_coco.getCatIds())
          }
          if self.json_id_to_contiguous is None:
              self.json_id_to_contiguous = json_id_to_contiguous
              self.contiguous_id_to_json = {
                  v: k for k, v in self.json_id_to_contiguous.items()
              }
          else:
              assert self.json_id_to_contiguous == json_id_to_contiguous
  
          # iterate through the annotations
          image_ids = sorted(_coco.getImgIds())
          for entry in _coco.loadImgs(image_ids):
              abs_path = self._parse_image_path(entry)
              if not os.path.exists(abs_path):
                  raise IOError(
                      "Image: {} not exists.".format(abs_path)
                  )
              label = self._check_load_bbox(_coco, entry)
              if not label:
                  continue
              im_aspect_ratios.append(
                  float(entry["width"]) / entry["height"]
              )
              items.append(abs_path)
              labels.append(label)
      return items, labels, im_aspect_ratios
  
imports: from __future__ import absolute_import
  from __future__ import division
  import os
  import numpy
  from PIL import Image
  import mxnet
  from .utils import try_import_pycocotools
  from ..base import VisionDataset
  from ...utils import try_import_dali
  from ...utils.bbox import bbox_xywh_to_xyxy, bbox_clip_xyxy
label_desc: Use image node_id 10 for calling the COCODetection obj's underlying member method code with example usage: obj._load_jsons() and returns: items,  labels,  im_aspect_ratios