code: def _load_annotation(imgPath, class_dict):
      bboxesPaths = imgPath[:-4] + ".bboxes.tsv"
      labelsPaths = imgPath[:-4] + ".bboxes.labels.tsv"
      # if no ground truth annotations are available, return None
      if not os.path.exists(bboxesPaths) or not os.path.exists(
          labelsPaths
      ):
          return None
      bboxes = np.loadtxt(bboxesPaths, np.float32)
  
      # in case there's only one annotation and numpy read the array as single array,
      # we need to make sure the input is treated as a multi dimensional array instead of a list/ 1D array
      if len(bboxes.shape) == 1:
          bboxes = np.array([bboxes])
  
      with open(labelsPaths, "rb") as f:
          lines = f.readlines()
      labels = [_removeLineEndCharacters(s) for s in lines]
  
      label_idxs = np.asarray(
          [class_dict[l.decode("utf-8")] for l in labels]
      )
      label_idxs.shape = label_idxs.shape + (1,)
      annotations = np.hstack((bboxes, label_idxs))
  
      return annotations
  
file_path: CNTK/Examples/Image/Detection/utils/annotations/annotations_helper.py
imports: import numpy
  import os
label_desc: Use image node_id 4 for calling a global function with example usage: _load_annotation(imgPath, class_dict) and returns: annotations, None