Skip to content

Repository files navigation

Personalized Wedding Photo Generator (Server)

Backend service for the NUS MSBA Capstone project: Personalized Wedding Photo Generation Using Generative AI.
Built with Flask (Python), integrating Stable Diffusion, IP-Adapter FaceID, InsightFace, and BLIP.


Getting Started

# Create virtual environment (optional)
python -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # Windows# Install dependencies
pip install -r requirements.txt
# Run development server
python server.py

Server runs at http://localhost:5000.


Project Structure

app/ # Application layer
│ ├── photo_generator.py # Photo generation workflow
│ └── server.py # Flask service entry
ip_adapter/ # IP-Adapter core modules
models/ # Model weights & configs
public/ # Generated outputs
uploaded/ # User-uploaded files

API Endpoints

  • POST /upload
    Upload face and background images.

  • POST /prepare
    Extract identity embeddings, analyse background.

  • POST /generate
    Generate personalized wedding photo.


Features

  • Face Embedding Extraction: Powered by InsightFace\
  • Background Harmonisation: BLIP caption + INR-Harmonization\
  • Identity Preservation: IP-Adapter FaceID\
  • Generation Pipeline: Stable Diffusion (Realistic Vision) + VAE\
  • Modular Design: Preprocessing, prompt construction, and generation are independent

Screenshots

Architecture diagram:
Architecture_Diagram

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages