Restore Face
restore_faceRestore and enhance faces in an image with the Brainiall face-restoration engine.
Detects all faces via RetinaFace, restores quality (fixes blur, noise, compression artifacts), and pastes them back. Optionally enhances the background with the Brainiall image-upscaling engine. GPU-accelerated, sub-3s latency.
Args: image_base64: Base64-encoded image data containing faces (PNG, JPEG, WebP). upscale: Output upscale factor -- 1 to 4 (default: 2). enhance_background: Whether to enhance background with the Brainiall image-upscaling engine (default: true).
Returns: dict with keys: - image (str): Base64-encoded restored image - format (str): Output image format - width (int): Output width - height (int): Output height - upscale (int): Scale factor applied - processing_time_ms (float): Processing time in milliseconds
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| upscale | No | Output upscale factor: 1-4 (default: 2) | |
| image_base64 | Yes | Base64-encoded image data containing one or more faces. | |
| enhance_background | No | Enhance background with the Brainiall image-upscaling engine (default: true) |