Janus AI is a Django-based application leveraging the capabilities of Mediapipe and OpenCV to facilitate face swapping in both images and video.
This project demonstrates how to perform face swapping in real-time videos using facial landmarks. It uses the mediapipe
library to detect facial landmarks and OpenCV
for image processing.
Clone the repository:
git clone https://github.com/GBU31/Janus_AI.git
Install the required dependencies:
pip install -r requirements.txt
Apply migrations:
python3 manage.py migrate
Run the Django server:
python3 manage.py runserver
curl -X POST -H "Content-Type: multipart/form-data" -F "image_one=@./image_one.jpg" -F "image_two=@./image_two.jpg" http://localhost:8000/api
import requests
url = "http://localhost:8000/api"
files = {
"image_one": ("image_one.jpg", open("image_one.jpg", "rb")),
"image_two": ("image_two.jpg", open("image_two.jpg", "rb")),
}
response = requests.post(url, files=files)
print(response.json())