              pad_l = (self.input_size - width) // 2
              pad_r = (self.input_size - width) - pad_l
              pad_t = (self.input_size - height) // 2
              pad_b = (self.input_size - height) - pad_t
              image = cv2.copyMakeBorder(  # pylint:disable=no-member
                  image,
                  pad_t,
                  pad_b,
                  pad_l,
                  pad_r,
                  cv2.BORDER_CONSTANT)  # pylint:disable=no-member
          logger.trace("Padded image shape: %s", image.shape)
          return image
  
      # <<< FINALIZE METHODS >>> #
      @staticmethod
 
</s> remove             # Hacky split across 2 plugins
            available_vram = (vram_free - vram_required) // 2
            for plugin in (self._aligner, self._detector):
 </s> add             # Hacky split across 3 plugins
            available_vram = (vram_free - vram_required) // 3
            for plugin in (self._detector, self._aligner, self._masker): </s> remove                 offset:offset + foregrounds[idx].shape[1]] = foregrounds[idx]
 </s> add                 offset:offset + foregrounds[idx].shape[1], :3] = foregrounds[idx] </s> remove         adjusted_ratio = coverage_ratio - (1 - self._extract_ratio)
        padding = round((size * adjusted_ratio) / 2)
 </s> add         padding = int((size * (coverage_ratio - 0.625)) / 2) </s> remove         face = np.expand_dims(face - self.average_img, axis=0)
 </s> add         face = face[None, :, :, :3] - self.average_img </s> remove             for plugin in (self._aligner, self._detector):
 </s> add             for plugin in (self._detector, self._aligner, self._masker):
            image = cv2.copyMakeBorder(image,  # pylint:disable=no-member
                                       pad_t,
                                       pad_b,
                                       pad_l,
                                       pad_r,
                                       cv2.BORDER_CONSTANT)  # pylint:disable=no-member
              pad_l = (self.input_size - width) // 2
              pad_r = (self.input_size - width) - pad_l
              pad_t = (self.input_size - height) // 2
              pad_b = (self.input_size - height) - pad_t
            image = cv2.copyMakeBorder(image,  # pylint:disable=no-member
                                       pad_t,
                                       pad_b,
                                       pad_l,
                                       pad_r,
                                       cv2.BORDER_CONSTANT)  # pylint:disable=no-member
            image = cv2.copyMakeBorder(image,  # pylint:disable=no-member
                                       pad_t,
                                       pad_b,
                                       pad_l,
                                       pad_r,
                                       cv2.BORDER_CONSTANT)  # pylint:disable=no-member
            image = cv2.copyMakeBorder(image,  # pylint:disable=no-member
                                       pad_t,
                                       pad_b,
                                       pad_l,
                                       pad_r,
                                       cv2.BORDER_CONSTANT)  # pylint:disable=no-member
            image = cv2.copyMakeBorder(image,  # pylint:disable=no-member
                                       pad_t,
                                       pad_b,
                                       pad_l,
                                       pad_r,
                                       cv2.BORDER_CONSTANT)  # pylint:disable=no-member
            image = cv2.copyMakeBorder(image,  # pylint:disable=no-member
                                       pad_t,
                                       pad_b,
                                       pad_l,
                                       pad_r,
                                       cv2.BORDER_CONSTANT)  # pylint:disable=no-member
            image = cv2.copyMakeBorder(image,  # pylint:disable=no-member
                                       pad_t,
                                       pad_b,
                                       pad_l,
                                       pad_r,
                                       cv2.BORDER_CONSTANT)  # pylint:disable=no-member
            image = cv2.copyMakeBorder(image,  # pylint:disable=no-member
                                       pad_t,
                                       pad_b,
                                       pad_l,
                                       pad_r,
                                       cv2.BORDER_CONSTANT)  # pylint:disable=no-member
          logger.trace("Padded image shape: %s", image.shape)
          return image
  
      # <<< FINALIZE METHODS >>> #
      @staticmethod
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

Smart Masks - Initial Commit 
plugins/extract/detect/_base.py