Spaces:
Running
A newer version of the Streamlit SDK is available:
1.42.0
title: Face Swap App
emoji: 🤖
colorFrom: purple
colorTo: pink
sdk: streamlit
sdk_version: 1.27.0
app_file: app.py
pinned: false
Face Swapping App by Adil Khan
Welcome to the Face Swapping App repository! This application leverages Streamlit and OpenCV, powered by InsightFace, to perform seamless face swapping on images and videos. Whether you want to swap faces in pictures or videos, this app provides a simple and efficient solution.
Features
- Image Face Swap: Effortlessly swap faces between a source and target image.
- Video Face Swap: Apply face swapping across all frames of a target video using a source face image.
- High Precision: Built on InsightFace deep learning models for accurate face detection and swapping.
- User-Friendly Interface: Interact with the app through a sleek and intuitive Streamlit interface.
How It Works
Image Face Swapping:
- Detects faces in both the source and target images.
- Replaces the target face with the source face using the
inswapper_128.onnx
model.
Video Face Swapping:
- Processes each frame of the video to detect and swap faces to match the source face.
Installation
Follow these steps to get started:
Clone the repository:
git clone https://github.com/AdiKhanOfficial/face-swap-app.git cd face-swap-app
Install dependencies:
pip install -r requirements.txt
Run the app:
- For the Streamlit interface:
streamlit run app.py
- Or, simply run:
python run.py
- For the Streamlit interface:
Requirements
- Python 3.9
- Streamlit
- OpenCV
- InsightFace
Download Links:
Usage
- Open the application using Streamlit or
run.py
. - Upload your source face image and the target image/video.
- Click the process button and let the magic happen!
- Once processing is complete, download the swapped images or videos directly from the app.
Results
![](https://raw.githubusercontent.com/AdiKhanOfficial/face_swapping/refs/heads/main/Results/Result.jpg)
Contributing
Contributions are welcome! If you’d like to improve the app or add new features, feel free to fork the repository, make your changes, and submit a pull request.
License
This project is licensed under the MIT License.
About
Developed by Adil Khan.
For more projects and updates, visit my GitHub Profile or follow me on social media.
Feel free to reach out with any questions or feedback! 😊