LiveFaceSwap Reference Image Prep
A small, deterministic image utility for preparing authorized portrait reference images. It normalizes EXIF orientation, converts the image to RGB, crops it to a square around an adjustable focal point, and returns a consistently sized PNG.
This utility does not perform face swapping or identity transformation. It is intended as a transparent preprocessing step for portrait and camera workflows such as LiveFaceSwap AI.
Inputs
image: JPG, PNG, or WebP input image.size: Output width and height: 512, 768, or 1024 pixels.focus_x: Horizontal crop focus from 0 (left) to 1 (right).focus_y: Vertical crop focus from 0 (top) to 1 (bottom).
Output
A square RGB PNG with normalized orientation and metadata removed.
Only process images you have permission to use, and do not use portrait references for impersonation, fraud, harassment, or other deceptive activity.
Local development
cog predict -i image=@portrait.jpg -i size=1024 -i focus_x=0.5 -i focus_y=0.42
Install the Python package locally and use the CLI:
python -m pip install .
livefaceswap-reference-prep portrait.jpg prepared.png --size 1024
Run the Streamlit application:
python -m pip install -r requirements.txt
streamlit run app.py
Run the published container with mounted input and output directories:
docker run --rm \
-v "$PWD/input:/input:ro" \
-v "$PWD/output:/output" \
ghcr.io/livefaceswapai/livefaceswap-reference-prep:latest \
/input/portrait.jpg /output/prepared.png --size 1024
License
MIT
Release files for livefaceswap-reference-prep 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| livefaceswap_reference_prep-0.1.0.tar.gz | 12.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| livefaceswap_reference_prep-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.8 kB
Release files / livefaceswap_reference_prep-0.1.0.tar.gz
| Download URL | livefaceswap_reference_prep-0.1.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a102128ad67d2908197a09fde8811348b703879a5dc26deddba135dc8c5dd0f5
|
|
BLAKE2b-256 checksum How to use checksums |
81c2ceffdc41c7ed27f90994a54a2a60d42e99cffefd03e2087768ec0b0fb4ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency logRelease files / livefaceswap_reference_prep-0.1.0-py3-none-any.whl
| Download URL | livefaceswap_reference_prep-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c78ea125c1fbc72224588323e2da9846f720f9e3515fa958bd7b19e833a8c479
|
|
BLAKE2b-256 checksum How to use checksums |
912d00d04633fdb98f2e0291a43f71530d435d434068b200f8fbc25dfa4467e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.
Transparency log