Inference

class plugins.train.model._base.inference.Inference(saved_model: Model, switch_sides: bool)

Bases: object

Calculates required layers and compiles a saved model for inference.

Parameters:
  • saved_model (keras.Model) – The saved trained Faceswap model

  • switch_sides (bool) – True if the swap should be performed “B” > “A” False if the swap should be “A” > “B”

Methods Summary

__call__()

Obtain the inference model.

Methods Documentation

__call__() Model

Obtain the inference model.

Return type:

The built Keras inference model for the requested swap side

__call__() Model

Obtain the inference model.

Return type:

The built Keras inference model for the requested swap side