Generate and modify realistic human portraits from natural language descriptions using Stable Diffusion.
Designed for forensics, investigations, and creative industries, FaceForge AI turns witness descriptions into accurate portraits, allows targeted edits, and matches against a face database for possible identity suggestions.
- Overview
- Features
- Tech Stack
- Project Workflow
- Screenshots
- Flowchart
- Getting Started
- Usage
- Future Improvements
FaceForge AI enables text-driven portrait creation and targeted facial modifications.
The system follows these key steps:
- Generate a face from a natural language description.
- Edit specific facial features using inpainting.
- Match the final portrait with a face database using CLIP embeddings.
- Input a natural language prompt (e.g., "young woman with long black hair")
- Generate a realistic portrait using Stable Diffusion
- Mask specific facial regions
- Apply prompts like "change eyes to blue" or "add scar on cheek"
- Preserve the rest of the face while editing
- Encode the portrait with CLIP embeddings
- Compare against a curated database
- Display top 3 matches with confidence scores
- Diffusion Models: StableDiffusionPipeline, StableDiffusionInpaintPipeline
- Embeddings: OpenAI CLIP for similarity search
- Frontend: Gradio interface
- Language: Python 3.8+
- Dataset: Curated Asian celebrity faces (for cultural relevance)
- Execution: Google Colab / Local GPU
*Generates a realistic portrait directly from a text description.*
*Modify selected facial features without affecting the rest of the image.*
*Matches generated portraits with the closest identities from the database.*
*The complete process from description to identity suggestion.*
- Python 3.8+
- GPU (local or via Colab for best performance)
git clone https://github.com/Keerthana1226/FaceforgeAI
cd FaceForgeAIRun the Gradio interface:
python app.py- Add multiple ethnicity datasets for wider coverage
- Implement 3D face reconstruction
- Improve inpainting with higher resolution support
- Support voice-based descriptions



