SpatialAttentionGAN
SaGAN PyTorch "Generative Adversarial Network with Spatial Attention for Face Attribute Editing"
Install / Use
/learn @elvisyjlin/SpatialAttentionGANREADME
Spatial Attention Generative Adversarial Network
This repository contains the PyTorch implementation of the ECCV 2018 paper "Generative Adversarial Network with Spatial Attention for Face Attribute Editing" (pdf).
My results with images and attention masks on CelebA 128 (original, eyeglasses, mouth_slightly_open, no_beard, smiling)

Requirements
- Python 3.5
- PyTorch 1.0.0
pip3 install -r requirements.txt
The training procedure described in paper takes 5.5GB memory on a single GPU.
-
Datasets
- CelebA
- Put Align&Cropped Images in
./data/celeba/*.jpg - Put Attributes Annotations in
./data/list_attr_celeba.txt
- Put Align&Cropped Images in
- CelebA
-
Pretrained models (download from http://bit.ly/sagan-results and decompress the zips to
./results)results ├── celeba_128_eyeglasses ├── celeba_128_mouth_slightly_open ├── celeba_128_no_beard └── celeba_128_smiling
Usage
Train a model with a target attribute
python3 train.py --experiment-name celeba_128_eyeglasses --target-attr Eyeglasses --gpu
Generate images from trained models
python3 generate.py --experiment-name celeba_128_eyeglasses --gpu
Related Skills
node-connect
348.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
348.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
