class_docstr: Image database.
class_docstr_tok: ["Image","database","."]
code: def append_flipped_images(self):
      num_images = self.num_images
      widths = [
          PIL.Image.open(self.image_path_at(i)).size[0]
          for i in range(num_images)
      ]
      for i in range(num_images):
          boxes = self.roidb[i]["boxes"].copy()
          oldx1 = boxes[:, 0].copy()
          oldx2 = boxes[:, 2].copy()
          boxes[:, 0] = widths[i] - oldx2 - 1
          boxes[:, 2] = widths[i] - oldx1 - 1
          assert (boxes[:, 2] >= boxes[:, 0]).all()
          entry = {
              "boxes": boxes,
              "gt_overlaps": self.roidb[i]["gt_overlaps"],
              "gt_classes": self.roidb[i]["gt_classes"],
              "flipped": True,
          }
          self.roidb.append(entry)
      self._image_index = self._image_index * 2
  
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 13 for calling the imdb obj's underlying member method code with example usage: obj.append_flipped_images() without return types