                  temp_list.append(
                      [img,
                       self.calc_landmarks_face_yaw(np.array(landmarks))])
          elif group_method == 'group_hist':
              temp_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="Reloading",
                       file=sys.stdout)
              ]
          else:
              raise ValueError("{} group_method not found.".format(group_method))
  
          return self.splice_lists(img_list, temp_list)
  
 
</s> remove             self.launch_aligner()
            temp_list = []
            for img in tqdm(self.find_images(input_dir),
                            desc="Reloading",
                            file=sys.stdout):
                landmarks = self.get_landmarks(img)
                temp_list.append(
                    [img,
                     self.calc_landmarks_face_yaw(np.array(landmarks))])
 </s> add             filename_list, image_list, landmarks = self._get_landmarks()
            yaws = [self.calc_landmarks_face_yaw(mark) for mark in landmarks]
            temp_list = list(zip(filename_list, yaws)) </s> remove         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)
        ]
 </s> add         logger.info("Calculating histograms...")
        histograms = [cv2.calcHist([img], [0], None, [256], [0, 256]) for img in image_list]
        img_list = list(zip(filename_list, histograms)) </s> remove             self.launch_aligner()
            temp_list = []
            for img in tqdm(self.find_images(input_dir),
                            desc="Reloading",
                            file=sys.stdout):
                landmarks = self.get_landmarks(img)
                temp_list.append([img, np.array(landmarks)
                                  if landmarks
                                  else np.zeros((68, 2))])
 </s> add             filename_list, image_list, landmarks = self._get_landmarks()
            temp_list = list(zip(filename_list, landmarks)) </s> remove             temp_list = [[img, self.estimate_blur(read_image(img, raise_error=True))]
                         for img in
                         tqdm(self.find_images(input_dir),
                              desc="Reloading",
                              file=sys.stdout)]
 </s> add             filename_list, image_list = self._get_images()
            blurs = [self.estimate_blur(img) for img in image_list]
            temp_list = list(zip(filename_list, blurs)) </s> remove         img_list = [
            [img,
             cv2.calcHist([read_image(img, raise_error=True)], [0], None, [256], [0, 256]), 0]
            for img in
            tqdm(self.find_images(input_dir), desc="Loading", file=sys.stdout)
        ]
 </s> add         logger.info("Calculating histograms...")
        histograms = [cv2.calcHist([img], [0], None, [256], [0, 256]) for img in image_list]
        img_list = list(list(items) for items in zip(filename_list, histograms, scores))
            filename_list, image_list = self._get_images()
            histograms = [cv2.calcHist([img], [0], None, [256], [0, 256]) for img in image_list]
            temp_list = list(zip(filename_list, histograms))
                  temp_list.append(
                      [img,
                       self.calc_landmarks_face_yaw(np.array(landmarks))])
          elif group_method == 'group_hist':
            filename_list, image_list = self._get_images()
            histograms = [cv2.calcHist([img], [0], None, [256], [0, 256]) for img in image_list]
            temp_list = list(zip(filename_list, histograms))
            filename_list, image_list = self._get_images()
            histograms = [cv2.calcHist([img], [0], None, [256], [0, 256]) for img in image_list]
            temp_list = list(zip(filename_list, histograms))
            filename_list, image_list = self._get_images()
            histograms = [cv2.calcHist([img], [0], None, [256], [0, 256]) for img in image_list]
            temp_list = list(zip(filename_list, histograms))
            filename_list, image_list = self._get_images()
            histograms = [cv2.calcHist([img], [0], None, [256], [0, 256]) for img in image_list]
            temp_list = list(zip(filename_list, histograms))
            filename_list, image_list = self._get_images()
            histograms = [cv2.calcHist([img], [0], None, [256], [0, 256]) for img in image_list]
            temp_list = list(zip(filename_list, histograms))
            filename_list, image_list = self._get_images()
            histograms = [cv2.calcHist([img], [0], None, [256], [0, 256]) for img in image_list]
            temp_list = list(zip(filename_list, histograms))
            filename_list, image_list = self._get_images()
            histograms = [cv2.calcHist([img], [0], None, [256], [0, 256]) for img in image_list]
            temp_list = list(zip(filename_list, histograms))
            filename_list, image_list = self._get_images()
            histograms = [cv2.calcHist([img], [0], None, [256], [0, 256]) for img in image_list]
            temp_list = list(zip(filename_list, histograms))
          else:
              raise ValueError("{} group_method not found.".format(group_method))
  
          return self.splice_lists(img_list, temp_list)
  
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
 ENHANCEMENT: Sort image multi-threading and code clarity (#912)

* Use multi-threaded loading

* fast reload

* remove landmark stub

* saves

* correct face sort

* pep8 
tools/sort.py