class_docstr: COCO keypoint detection dataset.
  
  Parameters
  ----------
  root : str, default '~/mxnet/datasets/coco'
      Path to folder storing the dataset.
  splits : list of str, default ['person_keypoints_val2017']
      Json annotations name.
      Candidates can be: person_keypoints_val2017, person_keypoints_train2017.
  check_centers : bool, default is False
      If true, will force check centers of bbox and keypoints, respectively.
      If centers are far away from each other, remove this label.
  skip_empty : bool, default is False
      Whether skip entire image if no valid label is found. Use `False` if this dataset is
      for validation to avoid COCO metric error.
docstr: Check and load ground-truth keypoints
docstr_tok: ["Check","and","load","ground-truth","keypoints"]
code: def _check_load_keypoints(self, coco, entry):
      """Check and load ground-truth keypoints"""
      ann_ids = coco.getAnnIds(imgIds=entry["id"], iscrowd=False)
      objs = coco.loadAnns(ann_ids)
      # check valid bboxes
      valid_objs = []
      width = entry["width"]
      height = entry["height"]
  
      for obj in objs:
          contiguous_cid = self.json_id_to_contiguous[
              obj["category_id"]
          ]
          if contiguous_cid >= self.num_class:
              # not class of interest
              continue
          if max(obj["keypoints"]) == 0:
              continue
          # convert from (x, y, w, h) to (xmin, ymin, xmax, ymax) and clip bound
          xmin, ymin, xmax, ymax = bbox_clip_xyxy(
              bbox_xywh_to_xyxy(obj["bbox"]), width, height
          )
          # require non-zero box area
          if obj["area"] <= 0 or xmax <= xmin or ymax <= ymin:
              continue
  
          # joints 3d: (num_joints, 3, 2); 3 is for x, y, z; 2 is for position, visibility
          joints_3d = np.zeros(
              (self.num_joints, 3, 2), dtype=np.float32
          )
          for i in range(self.num_joints):
              joints_3d[i, 0, 0] = obj["keypoints"][i * 3 + 0]
              joints_3d[i, 1, 0] = obj["keypoints"][i * 3 + 1]
              # joints_3d[i, 2, 0] = 0
              visible = min(1, obj["keypoints"][i * 3 + 2])
              joints_3d[i, :2, 1] = visible
              # joints_3d[i, 2, 1] = 0
  
          if np.sum(joints_3d[:, 0, 1]) < 1:
              # no visible keypoint
              continue
  
          if self._check_centers:
              bbox_center, bbox_area = self._get_box_center_area(
                  (xmin, ymin, xmax, ymax)
              )
              kp_center, num_vis = self._get_keypoints_center_count(
                  joints_3d
              )
              ks = np.exp(
                  -2
                  * np.sum(np.square(bbox_center - kp_center))
                  / bbox_area
              )
              if (num_vis / 80.0 + 47 / 80.0) > ks:
                  continue
  
          valid_objs.append(
              {"bbox": (xmin, ymin, xmax, ymax), "joints_3d": joints_3d}
          )
  
      if not valid_objs:
          if not self._skip_empty:
              # dummy invalid labels if no valid objects are found
              valid_objs.append(
                  {
                      "bbox": np.array([-1, -1, 0, 0]),
                      "joints_3d": np.zeros(
                          (self.num_joints, 3, 2), dtype=np.float32
                      ),
                  }
              )
      return valid_objs
  
imports: from __future__ import absolute_import
  from __future__ import division
  import os
  import copy
  import numpy
  import mxnet
  from .utils import try_import_pycocotools
  from ..base import VisionDataset
  from ...utils.bbox import bbox_xywh_to_xyxy, bbox_clip_xyxy
label_desc: Use image node_id 10 for calling the COCOKeyPoints obj's underlying member method code with example usage: obj._check_load_keypoints(coco, entry) and returns: valid_objs