  
  def read_image_batch(filenames):
      """ Load a batch of images from the given file locations.
  
      Leverages multi-threading to load multiple images from disk at the same time
      leading to vastly reduced image read times.
  
      Notes
      -----
      Images are loaded concurrently, so the order of the returned batch will likely not be the same
      as the order of the input filenames. Filenames are returned with the batch in the correct order
      corresponding to the returned batch.
  
      Parameters
      ----------
      filenames: list
          A list of ``str`` full paths to the images to be loaded.
 
</s> remove     list
        Filenames in the correct order as they are returned
 </s> add  </s> remove         The batch of images in `BGR` channel order.
 </s> add         The batch of images in `BGR` channel order returned in the order of :attr:`filenames` </s> remove         batch = []
        filenames = []
 </s> add         batch = [None for _ in range(len(filenames))]
        # There is no guarantee that the same filename will not be passed through multiple times
        # (and when shuffle is true this can definitely happen), so we can't just call
        # filenames.index().
        return_indices = {filename: [idx for idx, fname in enumerate(filenames)
                                     if fname == filename]
                          for filename in set(filenames)} </s> remove         filenames, batch = read_image_batch(filenames)
 </s> add         batch = read_image_batch(filenames) </s> remove     return filenames, batch
 </s> add     return batch
    Leverages multi-threading to load multiple images from disk at the same time leading to vastly
    reduced image read times.
  
  def read_image_batch(filenames):
      """ Load a batch of images from the given file locations.
  
    Leverages multi-threading to load multiple images from disk at the same time leading to vastly
    reduced image read times.
    Leverages multi-threading to load multiple images from disk at the same time leading to vastly
    reduced image read times.
    Leverages multi-threading to load multiple images from disk at the same time leading to vastly
    reduced image read times.
    Leverages multi-threading to load multiple images from disk at the same time leading to vastly
    reduced image read times.
    Leverages multi-threading to load multiple images from disk at the same time leading to vastly
    reduced image read times.
    Leverages multi-threading to load multiple images from disk at the same time leading to vastly
    reduced image read times.
    Leverages multi-threading to load multiple images from disk at the same time leading to vastly
    reduced image read times.
    Leverages multi-threading to load multiple images from disk at the same time leading to vastly
    reduced image read times.
  
      Parameters
      ----------
      filenames: list
          A list of ``str`` full paths to the images to be loaded.
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
 lib.image.read_image_batch - Force deterministic return order 
lib/image.py