          """
          input_dir = self.args.input_dir
          logger.info("Preparing to group...")
          if group_method == 'group_blur':
              temp_list = [[img, self.estimate_blur(cv2.imread(img))]
                           for img in
                           tqdm(self.find_images(input_dir),
                                desc="Reloading",
                                file=sys.stdout)]
          elif group_method == 'group_face_cnn':
 
</s> remove                  cv2.calcHist([cv2.imread(img)], [0], None, [256], [0, 256])]
 </s> add                  cv2.calcHist([cv2_read_img(img, raise_error=True)], [0], None, [256], [0, 256])] </s> remove         image = cv2.imread(image_file)
 </s> add         image = cv2_read_img(image_file, raise_error=True) </s> remove         Estimate the amount of blur an image has
        with the variance of the Laplacian.
        Normalize by pixel number to offset the effect
        of image size on pixel gradients & variance
 </s> add         Estimate the amount of blur an image has with the variance of the Laplacian.
        Normalize by pixel number to offset the effect of image size on pixel gradients & variance </s> remove             [img, cv2.calcHist([cv2.imread(img)], [0], None, [256], [0, 256])]
 </s> add             [img, cv2.calcHist([cv2_read_img(img, raise_error=True)], [0], None, [256], [0, 256])] </s> remove              cv2.calcHist([cv2.imread(img)], [0], None, [256], [0, 256]), 0]
 </s> add              cv2.calcHist([cv2_read_img(img, raise_error=True)], [0], None, [256], [0, 256]), 0]
            temp_list = [[img, self.estimate_blur(cv2_read_img(img, raise_error=True))]
          """
          input_dir = self.args.input_dir
          logger.info("Preparing to group...")
          if group_method == 'group_blur':
            temp_list = [[img, self.estimate_blur(cv2_read_img(img, raise_error=True))]
                           for img in
                           tqdm(self.find_images(input_dir),
                                desc="Reloading",
                                file=sys.stdout)]
          elif group_method == 'group_face_cnn':
keep keep keep keep replace keep keep keep keep keep
 Centralize cv2 image reading and handle bad filenames 
tools/sort.py