class_docstr: COCO dataset for top-down pose estimation. 
  
  The dataset loads raw features and apply specified transforms
  to return a dict containing the image tensors and other information.
  
  COCO keypoint indexes:
  
      0: 'nose',
      1: 'left_eye',
      2: 'right_eye',
      3: 'left_ear',
      4: 'right_ear',
      5: 'left_shoulder',
      6: 'right_shoulder',
      7: 'left_elbow',
      8: 'right_elbow',
      9: 'left_wrist',
      10: 'right_wrist',
      11: 'left_hip',
      12: 'right_hip',
      13: 'left_knee',
      14: 'right_knee',
      15: 'left_ankle',
      16: 'right_ankle'
  
  Args:
      dataset_dir (str): Root path to the dataset.
      image_dir (str): Path to a directory where images are held.
      anno_path (str): Relative path to the annotation file.
      num_joints (int): Keypoint numbers
      trainsize (list):[w, h] Image target size
      transform (composed(operators)): A sequence of data transforms.
      bbox_file (str): Path to a detection bbox file
          Default: None.
      use_gt_bbox (bool): Whether to use ground truth bbox
          Default: True.
      pixel_std (int): The pixel std of the scale
          Default: 200.
      image_thre (float): The threshold to filter the detection box
          Default: 0.0.
code: def _box2cs(self, box):
      x, y, w, h = box[:4]
      center = np.zeros((2), dtype=np.float32)
      center[0] = x + w * 0.5
      center[1] = y + h * 0.5
      aspect_ratio = self.trainsize[0] * 1.0 / self.trainsize[1]
  
      if self.center_scale is not None and np.random.rand() < 0.3:
          center += (
              self.center_scale * (np.random.rand(2) - 0.5) * [w, h]
          )
  
      if w > aspect_ratio * h:
          h = w * 1.0 / aspect_ratio
      elif w < aspect_ratio * h:
          w = h * aspect_ratio
      scale = np.array(
          [w * 1.0 / self.pixel_std, h * 1.0 / self.pixel_std],
          dtype=np.float32,
      )
      if center[0] != -1:
          scale = scale * 1.25
  
      return center, scale
  
imports: import os
  import cv2
  import numpy
  import json
  import copy
  import pycocotools
  from pycocotools.coco import COCO
  from .dataset import DetDataset
  from ppdet.core.workspace import register, serializable
label_desc: Use image node_id 4 for calling the KeypointTopDownCocoDataset obj's underlying member method code with example usage: obj._box2cs(box) and returns: center,  scale