--- license: mit tags: - gan - pytorch - vision - dcgan - faces - humans - face metrics: - loss datasets: - SDbiaseval/faces --- # FaceGen v1 - 128px DCGAN This model is a Deep Convolutional Generative Adversarial Network (DCGAN) trained to generate high-quality 128x128 images of human faces. It was trained for 250 epochs on a curated dataset of feline images, pushing the boundaries of traditional GAN architectures at this resolution. ## Sample Here's a sample after epoch 200: ![image](https://cdn-uploads.huggingface.co/production/uploads/697f2832c2c5e4daa93cece7/xeVq-Mv_NSjbRNWOp6jMK.png) ## Model Details - **Architecture:** DCGAN (Deep Convolutional GAN) - **Resolution:** 128x128 pixels (RGB) - **Parameters:** ~186M (Generator) - **Training Duration:** ~22 hours on NVIDIA RTX 5060 Ti 16GB - **Framework:** PyTorch with Mixed Precision (AMP) ## Training Hyperparameters - **Batch Size:** 128 - **Learning Rate:** 0.0002 - **Optimizer:** Adam (Beta1: 0.5, Beta2: 0.999) - **Latent Vector (Z):** 128 dimensions ## Training details The full training code can be found as `train.py` in this repo. The training data we used was from HF: stable-bias/faces ## Intended Use This model is intended for artistic and research purposes. It demonstrates how GANs can capture complex faces and even eye reflections at medium resolutions. ## How to use To use this model, clone this repository and run the provided inference script. Ensure you have `matplotlib`, `torch` and `torchvision` installed. ```bash python3 inference.py ``` **Sample output:** ![image](https://cdn-uploads.huggingface.co/production/uploads/697f2832c2c5e4daa93cece7/zi_BYFDeK0x1aTEYpSLCj.png)