  class Detect(Detector):
      """ S3FD detector for face recognition """
      def __init__(self, **kwargs):
          git_model_id = 11
          model_filename = "s3fd_keras_v1.h5"
          super().__init__(git_model_id=git_model_id, model_filename=model_filename, **kwargs)
          self.name = "S3FD"
          self.input_size = 640
          self.vram = 4112
          self.vram_warnings = 1024  # Will run at this with warnings
 
</s> remove         """ Detect faces """
 </s> add         """ Process the output from the model to obtain faces

        Parameters
        ----------
        bounding_boxes_scales: list
            The output predictions from the S3FD model
        """ </s> remove 
class ReduceLayerO2K(keras.layers.Layer):
    """ Custom Keras Reduce layer generated by onnx2keras. """
    def __init__(self, axes=None, keepdims=True, **kwargs):
        self._axes = [axes] if isinstance(axes, int) else axes
        self._keepdims = bool(keepdims)
        super().__init__(**kwargs)

 </s> add  </s> remove         model_kwargs = dict(custom_objects=dict(O2K_Add=AddO2K,
                                                O2K_Slice=SliceO2K,
                                                O2K_Sum=SumO2K,
                                                O2K_Sqrt=SqrtO2K,
                                                O2K_Pow=PowO2K,
                                                O2K_ConstantLayer=ConstantLayerO2K,
                                                O2K_Div=DivO2K))
 </s> add         model_kwargs = dict(custom_objects=dict(L2Norm=L2Norm, SliceO2K=SliceO2K)) </s> remove         Parameters
        ----------
        inputs: Input tensor, or list/tuple of input tensors.
            The input to the layer
        **kwargs: Additional keyword arguments.
            Required for parent class but unused
        Returns
        -------
        A tensor or list/tuple of tensors.
            The layer output
        """
        return K.pow(*inputs)


class ConstantLayerO2K(keras.layers.Layer):
    """ Custom Keras Constant layer generated by onnx2keras. """
    def __init__(self, constant_obj, dtype, **kwargs):
        self._dtype = np.dtype(dtype).name
        self._constant = np.array(constant_obj, dtype=self._dtype)
        super().__init__(**kwargs)
 </s> add         f7_2 = ZeroPadding2D(1)(f7_2)
        cls6 = Conv2D(2, kernel_size=3, strides=1, name="conv7_2_mbox_conf")(f7_2)
        reg6 = Conv2D(4, kernel_size=3, strides=1, name="conv7_2_mbox_loc")(f7_2) </s> remove         return self._constant.shape

    def get_config(self):
        """ Returns the config of the layer.
 </s> add         name = "conv{}".format(idx)
        var_x = inputs
        for i in range(1, recursions + 1):
            rec_name = "{}_{}".format(name, i)
            var_x = ZeroPadding2D(1, name="{}.zeropad".format(rec_name))(var_x)
            var_x = Conv2D(filters,
                           kernel_size=3,
                           strides=1,
                           activation="relu",
                           name=rec_name)(var_x)
        return var_x

    @classmethod
    def conv_up(cls, inputs, filters, idx):
        """ Convolution up filter blocks with zero padding added.
        model_filename = "s3fd_keras_v2.h5"
  class Detect(Detector):
      """ S3FD detector for face recognition """
      def __init__(self, **kwargs):
          git_model_id = 11
        model_filename = "s3fd_keras_v2.h5"
          super().__init__(git_model_id=git_model_id, model_filename=model_filename, **kwargs)
          self.name = "S3FD"
          self.input_size = 640
          self.vram = 4112
          self.vram_warnings = 1024  # Will run at this with warnings
keep keep keep keep replace keep keep keep keep keep
 extract: S3FD - Convert to re-enable CPU 
plugins/extract/detect/s3fd.py