class_docstr: Trains post-hoc detection SVMs for all classes using the algorithm
  and hyper-parameters of traditional R-CNN.
class_docstr_tok: ["Trains","post-hoc","detection","SVMs","for","all","classes","using","the","algorithm","and","hyper-parameters","of","traditional","R-CNN","."]
code: def get_pos_examples(self):
      counts = self._get_pos_counts()
      for i in range(len(counts)):
          self.trainers[i].alloc_pos(counts[i])
  
      _t = Timer()
      roidb = self.imdb.roidb
      num_images = len(roidb)
      for i in range(num_images):
          # im = cv2.imread(self.imdb.image_path_at(i))
          # if roidb[i]['flipped']:
          #    im = im[:, ::-1, :]
          # im = self.imdb.image_path_at(i)
          gt_inds = np.where(roidb[i]["gt_classes"] > 0)[0]
          gt_boxes = roidb[i]["boxes"][gt_inds]
          _t.tic()
          scores, boxes, feat = self.im_detect(
              self.net,
              i,
              gt_boxes,
              self.feature_scale,
              gt_inds,
              boReturnClassifierScore=False,
          )
          _t.toc()
          # feat = self.net.blobs[self.layer].data
          for j in range(1, self.imdb.num_classes):
              cls_inds = np.where(roidb[i]["gt_classes"][gt_inds] == j)[
                  0
              ]
              if len(cls_inds) > 0:
                  cls_feat = feat[cls_inds, :]
                  self.trainers[j].append_pos(cls_feat)
          if i % 50 == 0:
              print(
                  "get_pos_examples: {:d}/{:d} {:.3f}s".format(
                      i + 1, len(roidb), _t.average_time
                  )
              )
  
imports: from timer import Timer
  from sklearn import svm
  import numpy
label_desc: Use image node_id 4 for calling the SVMTrainer obj's underlying member method code with example usage: obj.get_pos_examples() without return types