peter65374/face-swap-detect

Multiple faces swap and detection by through insightface lib with GFPGAN enhancement.

  • Public
  • 21.8M runs

Run face-swap-detect with an API

Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.

Input schema

The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.

Field Type Default value Description
target_image
string
Faces in target image would be changed.
model_faces
string
Model Faces would be swapped into target image.
inference_mode
string (enum)
swap

Options:

swap, detect

Face swap mode or detection mode. Default is swap.

Output schema

The shape of the response you’ll get when you run this model with an API.

Schema
{'anyOf': [{'items': {'items': {}, 'type': 'array'}, 'type': 'array'},
           {'format': 'uri', 'type': 'string'}],
 'title': 'Output'}
Example API response
View prediction
'https://storage.googleapis.com/replicate-files/USBcM5eWL938Z6B69EwmH4ZyO89BtWjNEb2XZh5eEYEou30RA/tmp3y51awp1.png'