A project that uses StyleGAN3, InterfaceGAN, and DeepFace to generate high-resolution human faces with age transformation, and automatically analyzes age, gender, and emotion.
- ✅ High-resolution face generation with StyleGAN3
- ✅ Age transformation using InterfaceGAN direction vectors
- ✅ Automatic analysis of age, gender, and emotion using DeepFace
- ✅ Outputs downloadable Excel and animated GIF
- ✅ Easy-to-use Gradio interface (runs in Colab or locally)
- Open a new notebook in Google Colab
- Run the following cells step-by-step:
# 1️⃣ Download and run the setup script
!wget -O setup.sh https://raw.githubusercontent.com/yourusername/cross-age-face-project/main/setup.sh
!bash setup.sh
# 2️⃣ Run the main app
!python /content/cross_age_face_project/app.py
⸻
🗂 Directory Structure
/content/
├── cross_age_face_project/
│ ├── app.py # Main Gradio interface script
│ └── data/generated_faces/ # Output folder (GIFs, Excel)
├── drive/MyDrive/stylegan3-main/models/
│ └── stylegan3-t-ffhq-1024x1024.pkl
├── interfacegan/boundaries/
│ └── stylegan_ffhq_age_boundary.npy
⸻
⚙️ Tech Stack
Category Tool / Library
Face Generator StyleGAN3
Age Direction InterfaceGAN
Face Analysis DeepFace
UI Interface Gradio
Backend Python 3.11, PyTorch, NumPy, Pillow, pandas
⸻
🧪 Sample Output
Alpha Age Gender Emotion
-10 12 Woman happy
0 30 Man neutral
+10 60 Man sad
• The GIF shows aging from child to elderly.
• Excel files store analysis results for all generated faces.
⸻
📄 License
This project is licensed under the MIT License.
StyleGAN3 and InterfaceGAN follow their respective licenses.
⸻
🙌 Acknowledgments
• NVIDIA for StyleGAN3
• GenForce team for InterfaceGAN
• Sefik Ilkin Serengil for DeepFace
• Gradio team for seamless UI integration
⸻
✨ Author
Your Name
Feel free to fork, star ⭐, and improve the project. Contributions are welcome!
---
Let me know if you’d like:
- A version for **Hugging Face Spaces**
- Badges (e.g., Python version, License)
- Korean/Chinese bilingual version
Or I can generate `setup.sh`, `requirements.txt`, and upload instructions too!