Generate images using BigGAN that maximally drive a neural encoding model of your choice.
Examples below use a face-selective area (FFA) encoding model:
Maximized
Minimized
pip install torch torchvision pytorch-pretrained-biggan matplotlib numpy tqdm pillow openai-clip scipyOpen encoder-driven-gan.ipynb and plug in your encoding model.
We have provided example FFA weights trained on ResNet50-CLIP (subject S1, Murty185) in ./weights/ so you can try it out right away.
BigGAN synthesis code adapted from Alex Abate.
Encoding model interface by Alish Dipani.
Example weights from Murty185 Dataset.








