          """ Draw the bounding box around faces """
          color = self.colors[color_id]
          for alignment in self.alignments:
              top_left = (alignment["x"], alignment["y"])
              bottom_right = (alignment["x"] + alignment["w"],
                              alignment["y"] + alignment["h"])
              rectangle(self.image, top_left, bottom_right,
                        color, thickness)
  
      def draw_extract_box(self, color_id=2, thickness=1):
          """ Draw the extracted face box """
          if not self.roi:
              return
 
</s> remove         self.image = zeros((height, width, 3), uint8)
 </s> add         self.image = np.zeros((height, width, 3), np.uint8) </s> remove             putText(self.image, str(idx), top_left, FONT_HERSHEY_DUPLEX, 1.0,
                    color, thickness)
            polylines(self.image, [roi], True, color, thickness)
 </s> add             cv2.putText(self.image,  # pylint: disable=no-member
                        str(idx),
                        top_left,
                        cv2.FONT_HERSHEY_DUPLEX,  # pylint: disable=no-member
                        1.0,
                        color,
                        thickness)
            cv2.polylines(self.image, [roi], True, color, thickness)  # pylint: disable=no-member </s> remove                 circle(self.image, (pos_x, pos_y), radius, color, -1)
 </s> add                 cv2.circle(self.image,  # pylint: disable=no-member
                           (pos_x, pos_y),
                           radius,
                           color,
                           -1)
            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)
          """ Draw the bounding box around faces """
          color = self.colors[color_id]
          for alignment in self.alignments:
              top_left = (alignment["x"], alignment["y"])
            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)
            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)
            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)
            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)
  
      def draw_extract_box(self, color_id=2, thickness=1):
          """ Draw the extracted face box """
          if not self.roi:
              return
keep keep keep keep replace replace replace 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 
tools/lib_alignments/annotate.py