  
              face = detected_face["face"]
              resized_face = face.aligned_face
  
              face.hash, img = hash_encode_image(resized_face, extension)
              self.save_queue.put((out_filename, img))
              final_faces.append(face.to_alignment())
          self.alignments.data[os.path.basename(filename)] = final_faces
 
</s> remove         f_hash, img = hash_encode_image(face, extension)
 </s> add         f_hash, img = encode_image_with_hash(face, extension) </s> remove         preds = np.array([self.vgg_face.predict(cv2_read_img(img, raise_error=True))
 </s> add         preds = np.array([self.vgg_face.predict(read_image(img, raise_error=True)) </s> remove         image = cv2_read_img(filename, raise_error=True)
 </s> add         image = read_image(filename, raise_error=True) </s> remove         processed.insert(0, sample)
        logger.trace("Processed face: (filename: '%s', side: '%s', shapes: %s)",
                     filename, side, [img.shape for img in processed])
 </s> add 
            face.hash, img = encode_image_with_hash(resized_face, extension)
  
              face = detected_face["face"]
              resized_face = face.aligned_face
  
            face.hash, img = encode_image_with_hash(resized_face, extension)
              self.save_queue.put((out_filename, img))
              final_faces.append(face.to_alignment())
          self.alignments.data[os.path.basename(filename)] = final_faces
keep keep keep keep replace keep keep keep
 Optimize Data Augmentation (#881)

* Move image utils to lib.image
* Add .pylintrc file
* Remove some cv2 pylint ignores
* TrainingData: Load images from disk in batches
* TrainingData: get_landmarks to batch
* TrainingData: transform and flip to batches
* TrainingData: Optimize color augmentation
* TrainingData: Optimize target and random_warp
* TrainingData - Convert _get_closest_match for batching
* TrainingData: Warp To Landmarks optimized
* Save models to threadpoolexecutor
* Move stack_images, Rename ImageManipulation. ImageAugmentation Docstrings
* Masks: Set dtype and threshold for lib.masks based on input face
* Docstrings and Documentation 
scripts/extract.py