class_docstr: Image database.
class_docstr_tok: ["Image","database","."]
code: def create_roidb_from_box_list(self, box_list, gt_roidb):
      assert (
          len(box_list) == self.num_images
      ), "Number of boxes must match number of ground-truth images"
      roidb = []
      for i in range(self.num_images):
          boxes = box_list[i]
          num_boxes = boxes.shape[0]
          overlaps = np.zeros(
              (num_boxes, self.num_classes), dtype=np.float32
          )
  
          if gt_roidb and gt_roidb[i]:
              gt_boxes = gt_roidb[i]["boxes"]
              gt_classes = gt_roidb[i]["gt_classes"]
              if (
                  len(gt_classes) > 0
              ):  # for pascal every image has at least one annotated object. This is not the case however if including negative images
                  gt_overlaps = bbox_overlaps(
                      boxes.astype(np.float), gt_boxes.astype(np.float)
                  )
  
                  argmaxes = gt_overlaps.argmax(axis=1)
                  maxes = gt_overlaps.max(axis=1)
                  I = np.where(maxes > 0)[0]
                  overlaps[I, gt_classes[argmaxes[I]]] = maxes[I]
  
          overlaps = scipy.sparse.csr_matrix(overlaps)
          roidb.append(
              {
                  "boxes": boxes,
                  "gt_classes": np.zeros((num_boxes,), dtype=np.int32),
                  "gt_overlaps": overlaps,
                  "flipped": False,
              }
          )
      return roidb
  
imports: import os
  import os.path
  import PIL
  import numpy
  import scipy.sparse
  from builtins import range
  import sys
  from .utils.cython_bbox import bbox_overlaps
label_desc: Use image node_id 15 for calling the imdb obj's underlying member method code with example usage: obj.create_roidb_from_box_list(box_list, gt_roidb) and returns: roidb