          self.image = image[self.y: self.y + self.h,
                             self.x: self.x + self.w]
  
      def to_alignment(self):
          """ Convert a detected face to alignment dict """
          alignment = dict()
          alignment["x"] = self.x
          alignment["w"] = self.w
          alignment["y"] = self.y
          alignment["h"] = self.h
 
</s> remove         if image.any():
 </s> add         # Manual tool does not know the final hash so default to None
        self.hash = alignment.get("hash", None)
        if image is not None and image.any(): </s> remove             bottom_right = (alignment["x"] + alignment["w"],
                            alignment["y"] + alignment["h"])
            rectangle(self.image, top_left, bottom_right,
                      color, thickness)
 </s> add             bottom_right = (alignment["x"] + alignment["w"], alignment["y"] + alignment["h"])
            logger.trace("Drawing bounding box: (top_left: %s, bottom_right: %s, color: %s, "
                         "thickness: %s)", top_left, bottom_right, color, thickness)
            cv2.rectangle(self.image,  # pylint: disable=no-member
                          top_left,
                          bottom_right,
                          color,
                          thickness) </s> remove         self.image = zeros((height, width, 3), uint8)
 </s> add         self.image = np.zeros((height, width, 3), np.uint8)
        """ Convert a detected face to alignment dict

            NB: frame_dims should be the height and width
                of the original frame. """

          self.image = image[self.y: self.y + self.h,
                             self.x: self.x + self.w]
  
      def to_alignment(self):
        """ Convert a detected face to alignment dict

            NB: frame_dims should be the height and width
                of the original frame. """

          alignment = dict()
          alignment["x"] = self.x
          alignment["w"] = self.w
          alignment["y"] = self.y
          alignment["h"] = self.h
keep keep keep keep replace keep keep keep keep keep
 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 
lib/faces_detect.py