  
          logger.info("Sorting by histogram similarity...")
  
          img_list = [
              [img, cv2.calcHist([cv2_read_img(img, raise_error=True)], [0], None, [256], [0, 256])]
              for img in
              tqdm(self.find_images(input_dir), desc="Loading", file=sys.stdout)
          ]
  
          img_list_len = len(img_list)
 
</s> remove              cv2.calcHist([cv2_read_img(img, raise_error=True)], [0], None, [256], [0, 256]), 0]
 </s> add              cv2.calcHist([read_image(img, raise_error=True)], [0], None, [256], [0, 256]), 0] </s> remove                  cv2.calcHist([cv2_read_img(img, raise_error=True)], [0], None, [256], [0, 256])]
 </s> add                  cv2.calcHist([read_image(img, raise_error=True)], [0], None, [256], [0, 256])] </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             temp_list = [[img, self.estimate_blur(cv2_read_img(img, raise_error=True))]
 </s> add             temp_list = [[img, self.estimate_blur(read_image(img, raise_error=True))] </s> remove import numpy as np
import cv2


from lib.faces_detect import DetectedFace


 </s> add 
            [img, cv2.calcHist([read_image(img, raise_error=True)], [0], None, [256], [0, 256])]
  
          logger.info("Sorting by histogram similarity...")
  
          img_list = [
            [img, cv2.calcHist([read_image(img, raise_error=True)], [0], None, [256], [0, 256])]
              for img in
              tqdm(self.find_images(input_dir), desc="Loading", file=sys.stdout)
          ]
  
          img_list_len = len(img_list)
keep keep keep keep replace keep keep 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 
tools/sort.py