  
      # <<< DETECTION IMAGE COMPILATION METHODS >>> #
      def _compile_detection_image(self, input_image):
          """ Compile the detection image for feeding into the model"""
          image = self._convert_color(input_image[..., :3])
  
          image_size = image.shape[:2]
          scale = self._set_scale(image_size)
          pad = self._set_padding(image_size, scale)
  
 
</s> remove         """ Convert the image to the correct color format """
 </s> add         """ Convert the image to the correct color format and strip alpha channel """ </s> remove         The normalization method is dictated by the cli argument:
 </s> add         The normalization method is dictated by the command line argument: </s> remove         qname_dict = dict(detect="extract_align_in",
                          align="extract_mask_in",
                          mask="extract_mask_out")
        qname = "extract_mask_out" if self.final_pass else qname_dict[self.phase]
 </s> add         if self.final_pass:
            qname = "extract_{}_out".format(self._final_phase)
        else:
            qname = "extract_{}_in".format(self._next_phase) </s> remove         feed_faces = np.stack([detected_face.feed_face for detected_face in detected_faces])
 </s> add         feed_faces = np.stack([detected_face.feed_face[..., :3]
                               for detected_face in detected_faces]) / 255.0 </s> remove         padding = int((size * (coverage_ratio - 0.625)) / 2)
 </s> add         adjusted_ratio = coverage_ratio - (1 - self._extract_ratio)
        padding = round((size * adjusted_ratio) / 2)
        image = self._convert_color(input_image)
  
      # <<< DETECTION IMAGE COMPILATION METHODS >>> #
      def _compile_detection_image(self, input_image):
          """ Compile the detection image for feeding into the model"""
        image = self._convert_color(input_image)
  
          image_size = image.shape[:2]
          scale = self._set_scale(image_size)
          pad = self._set_padding(image_size, scale)
  
keep keep keep keep replace keep keep keep keep keep
 Smart Mask - Extract code review

- Lint simple_tests.py
- Only reformat alignments file if it exists otherwise change filename
- Update legacy alignments to new format at all stages
- faces_detect.Mask.from_dict - logging format fix
- convert.py fix otf for new pipeline
- cli.py - Add note that masks not used. Revert convert masks
- faces_detect.py - Revert non-extract code
- Add .p and .pickle extensions for serializer
- plugins/extract revert some changes
- scripts/fsmedia - Revert code changes
- Pipeline - cleanup
- Consistant alpha channel stripping (fixes single-process)
- Store landmarks as numpy array
- Code attribution
- Normalize feed face and reference face to 0.0 - 1.0 in convert
- Lock in mask VRAM sized
- Add documentation to plugin_loader
- Update alignments tool to work with new format 
plugins/extract/detect/_base.py