                  length = int(((len_x ** 2) + (len_y ** 2)) ** 0.5)
              sizes.append(length)
          logger.trace("sizes: '%s'", sizes)
          return sizes
 
</s> remove         cv2.rectangle(image, (0, 0), (width - 1, height - 1),
                      color, 2)
 </s> add         cv2.rectangle(image, (0, 0), (width - 1, height - 1), color, 2)
        logger.trace("Created help text canvas") </s> remove             return faces
        valid_faces = list()
        sizes = self.extracted_faces.get_roi_size_for_frame(frame)
        for idx, size in enumerate(sizes):
            if size >= self.extracted_faces.size:
                valid_faces.append(faces[idx])
 </s> add             valid_faces = faces
        else:
            sizes = self.extracted_faces.get_roi_size_for_frame(frame)
            valid_faces = [faces[idx]
                           for idx, size in enumerate(sizes)
                           if size >= self.extracted_faces.size]
        logger.trace("frame: '%s', total_faces: %s, valid_faces: %s",
                     frame, len(faces), len(valid_faces)) </s> remove             dst_folder = os.path.join(output_folder, idx)
 </s> add             dst_folder = os.path.join(output_folder, str(idx)) </s> remove         filename = self.output_message.replace(" ", "_").lower()
        filename += "_" + now + ".txt"
 </s> add         filename = "{}_{}.txt".format(self.output_message.replace(" ", "_").lower(), now)
    @staticmethod
    def save_face_with_hash(filename, extension, face):
        """ Save a face and return it's hash """
        f_hash, img = hash_encode_image(face, extension)
        logger.trace("Saving face: '%s'", filename)
        with open(filename, "wb") as out_file:
            out_file.write(img)
        return f_hash
                  length = int(((len_x ** 2) + (len_y ** 2)) ** 0.5)
              sizes.append(length)
          logger.trace("sizes: '%s'", sizes)
          return sizes
    @staticmethod
    def save_face_with_hash(filename, extension, face):
        """ Save a face and return it's hash """
        f_hash, img = hash_encode_image(face, extension)
        logger.trace("Saving face: '%s'", filename)
        with open(filename, "wb") as out_file:
            out_file.write(img)
        return f_hash
keep keep keep add
 Add Face Hashes to Alignments (#550)

* Convert main scripts to use face hashes

* Alignment tool: Use hashes, add logging, add face rename function

* More logging. Update Manual tool to work with hashing 
tools/lib_alignments/media.py