class_docstr: Generate data for a KITTI dataset.
  
  See http://www.cvlibs.net/datasets/kitti/ for more information.
class_docstr_tok: ["Generate","data","for","a","KITTI","dataset",".","See","http",":","\/\/www.cvlibs.net\/datasets\/kitti\/","for","more","information","."]
docstr: Load annotations for an image_index.
          
docstr_tok: ["Load","annotations","for","an","image_index","."]
code: def load_annotations(self, image_index):
      """Load annotations for an image_index."""
      image_data = self.image_data[image_index]
      annotations = {
          "labels": np.empty((len(image_data),)),
          "bboxes": np.empty((len(image_data), 4)),
      }
  
      for idx, ann in enumerate(image_data):
          annotations["bboxes"][idx, 0] = float(ann["x1"])
          annotations["bboxes"][idx, 1] = float(ann["y1"])
          annotations["bboxes"][idx, 2] = float(ann["x2"])
          annotations["bboxes"][idx, 3] = float(ann["y2"])
          annotations["labels"][idx] = int(ann["cls_id"])
  
      return annotations
  
file_path: ImageAI/imageai_tf_deprecated/Detection/keras_retinanet/preprocessing/kitti.py
imports: import csv
  import os.path
  import numpy
  from PIL import Image
  from .generator import Generator
  from ..utils.image import read_image_bgr
label_desc: Use image node_id 11 for calling the KittiGenerator obj's underlying member method code with example usage: obj.load_annotations(image_index) and returns: annotations