Transform your images into stunning anime-style artwork with our production-ready API service. Built with FastAPI and powered by advanced deep learning models.
This project implements a production-ready API service for the Scenimefy model, which transforms regular images into anime-style artwork. The implementation includes:
- FastAPI endpoint for image processing
- Celery backend for asynchronous task processing
- Efficient image transformation pipeline
- Production-ready deployment setup
The API service is built using:
- FastAPI for the REST API
- Celery for background task processing
- PyTorch for model inference
- PIL for image processing
This implementation is based on the Scenimefy model, which combines elements from:
- Contrastive Learning for Unpaired Image-to-Image Translation (ECCV 2020)
- StyleGAN2 architecture
- ResNet-based generator architecture
Below are the side-by-side comparisons of the original and their anime-stylized versions.
| Original | Anime Style |
|---|---|
![]() |
![]() |
| Original | Anime Style |
|---|---|
![]() |
![]() |
| Original | Anime Style |
|---|---|
![]() |
![]() |
| Original | Anime Style |
|---|---|
![]() |
![]() |
| Original | Anime Style |
|---|---|
![]() |
![]() |
- Clone the repository
- Install dependencies:
pip install -r requirements.txt- Start the FastAPI server:
uvicorn api:app --reload- Start Celery worker:
celery -A tasks worker --loglevel=infoSend a POST request to /stylize endpoint with an image file:
import requests
url = "http://localhost:8000/stylize"
files = {"file": open("image.jpg", "rb")}
response = requests.post(url, files=files)This project is for demonstration purposes only. The underlying model architecture is based on academic research and open-source implementations.





.jpg)

.jpg)

.jpg)