This payload can handle any of the following conditions:
- Swapping a face from a source image that contains a single face into a target image that contains a single face.
- Swapping a face from a source image that contains a single face into the first face in a target image that contains multiple faces.
- Swapping all of the faces from a source image containing multiple faces into the faces of a target image containing the same number of faces.
- Swapping all of the faces from a source image containing multiple faces into the first faces that are found in a target image containing more faces than the source image.
- If a source image contains more faces than the target image, the first X number of faces from the source image will be swapped in the target image, where X is the total number of faces in the target image.
{
"input": {
"source_image": "base64 encoded source image content",
"target_image": "base64 encoded target image content",
"source_indexes": "-1",
"target_indexes": "-1",
"background_enhance": true,
"face_restore": true,
"face_upsample": true,
"upscale": 1,
"codeformer_fidelity": 0.5,
"output_format": "JPEG"
}
}
{
"id": "83bbc301-5dcd-4236-9293-a65cdd681858",
"status": "IN_QUEUE"
}
{
"delayTime": 20275,
"executionTime": 43997,
"id": "sync-a3b54383-e671-4e24-a7bd-c5fec16fda3b",
"output": {
"status": "ok",
"image": "base64 encoded output image"
},
"status": "COMPLETED"
}