[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71084":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":21,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":26,"lastSyncTime":27,"discoverSource":28},71084,"stylegan3","NVlabs\u002Fstylegan3","NVlabs","Official PyTorch implementation of StyleGAN3",null,"Python",6926,1237,60,182,0,6,40.28,"Other",false,"main",true,[],"2026-06-12 02:02:47","## Alias-Free Generative Adversarial Networks (StyleGAN3)\u003Cbr>\u003Csub>Official PyTorch implementation of the NeurIPS 2021 paper\u003C\u002Fsub>\n\n![Teaser image](.\u002Fdocs\u002Fstylegan3-teaser-1920x1006.png)\n\n**Alias-Free Generative Adversarial Networks**\u003Cbr>\nTero Karras, Miika Aittala, Samuli Laine, Erik H&auml;rk&ouml;nen, Janne Hellsten, Jaakko Lehtinen, Timo Aila\u003Cbr>\nhttps:\u002F\u002Fnvlabs.github.io\u002Fstylegan3\u003Cbr>\n\nAbstract: *We observe that despite their hierarchical convolutional nature, the synthesis process of typical generative adversarial networks depends on absolute pixel coordinates in an unhealthy manner. This manifests itself as, e.g., detail appearing to be glued to image coordinates instead of the surfaces of depicted objects. We trace the root cause to careless signal processing that causes aliasing in the generator network. Interpreting all signals in the network as continuous, we derive generally applicable, small architectural changes that guarantee that unwanted information cannot leak into the hierarchical synthesis process. The resulting networks match the FID of StyleGAN2 but differ dramatically in their internal representations, and they are fully equivariant to translation and rotation even at subpixel scales. Our results pave the way for generative models better suited for video and animation.*\n\nFor business inquiries, please visit our website and submit the form: [NVIDIA Research Licensing](https:\u002F\u002Fwww.nvidia.com\u002Fen-us\u002Fresearch\u002Finquiries\u002F)\n\n## Release notes\n\nThis repository is an updated version of [stylegan2-ada-pytorch](https:\u002F\u002Fgithub.com\u002FNVlabs\u002Fstylegan2-ada-pytorch), with several new features:\n- Alias-free generator architecture and training configurations (`stylegan3-t`, `stylegan3-r`).\n- Tools for interactive visualization (`visualizer.py`), spectral analysis (`avg_spectra.py`), and video generation (`gen_video.py`).\n- Equivariance metrics (`eqt50k_int`, `eqt50k_frac`, `eqr50k`).\n- General improvements: reduced memory usage, slightly faster training, bug fixes.\n\nCompatibility:\n- Compatible with old network pickles created using [stylegan2-ada](https:\u002F\u002Fgithub.com\u002FNVlabs\u002Fstylegan2-ada) and [stylegan2-ada-pytorch](https:\u002F\u002Fgithub.com\u002FNVlabs\u002Fstylegan2-ada-pytorch).  (Note: running old StyleGAN2 models on StyleGAN3 code will produce the same results as running them on stylegan2-ada\u002Fstylegan2-ada-pytorch.  To benefit from the StyleGAN3 architecture, you need to retrain.)\n- Supports old StyleGAN2 training configurations, including ADA and transfer learning. See [Training configurations](.\u002Fdocs\u002Fconfigs.md) for details.\n- Improved compatibility with Ampere GPUs and newer versions of PyTorch, CuDNN, etc.\n\n## Synthetic image detection\n\nWhile new generator approaches enable new media synthesis capabilities, they may also present a new challenge for AI forensics algorithms for detection and attribution of synthetic media. In collaboration with digital forensic researchers participating in DARPA's SemaFor program, we curated a synthetic image dataset that allowed the researchers to test and validate the performance of their image detectors in advance of the public release. Please see [here](https:\u002F\u002Fgithub.com\u002FNVlabs\u002Fstylegan3-detector) for more details.\n\n## Additional material\n\n- [Result videos](https:\u002F\u002Fnvlabs-fi-cdn.nvidia.com\u002Fstylegan3\u002Fvideos\u002F)\n- [Curated example images](https:\u002F\u002Fnvlabs-fi-cdn.nvidia.com\u002Fstylegan3\u002Fimages\u002F)\n- [StyleGAN3 pre-trained models](https:\u002F\u002Fngc.nvidia.com\u002Fcatalog\u002Fmodels\u002Fnvidia:research:stylegan3) for config T (translation equiv.) and config R (translation and rotation equiv.)\n  > \u003Csub>Access individual networks via `https:\u002F\u002Fapi.ngc.nvidia.com\u002Fv2\u002Fmodels\u002Fnvidia\u002Fresearch\u002Fstylegan3\u002Fversions\u002F1\u002Ffiles\u002F\u003CMODEL>`, where `\u003CMODEL>` is one of:\u003C\u002Fsub>\u003Cbr>\n  > \u003Csub>`stylegan3-t-ffhq-1024x1024.pkl`, `stylegan3-t-ffhqu-1024x1024.pkl`, `stylegan3-t-ffhqu-256x256.pkl`\u003C\u002Fsub>\u003Cbr>\n  > \u003Csub>`stylegan3-r-ffhq-1024x1024.pkl`, `stylegan3-r-ffhqu-1024x1024.pkl`, `stylegan3-r-ffhqu-256x256.pkl`\u003C\u002Fsub>\u003Cbr>\n  > \u003Csub>`stylegan3-t-metfaces-1024x1024.pkl`, `stylegan3-t-metfacesu-1024x1024.pkl`\u003C\u002Fsub>\u003Cbr>\n  > \u003Csub>`stylegan3-r-metfaces-1024x1024.pkl`, `stylegan3-r-metfacesu-1024x1024.pkl`\u003C\u002Fsub>\u003Cbr>\n  > \u003Csub>`stylegan3-t-afhqv2-512x512.pkl`\u003C\u002Fsub>\u003Cbr>\n  > \u003Csub>`stylegan3-r-afhqv2-512x512.pkl`\u003C\u002Fsub>\u003Cbr>\n- [StyleGAN2 pre-trained models](https:\u002F\u002Fngc.nvidia.com\u002Fcatalog\u002Fmodels\u002Fnvidia:research:stylegan2) compatible with this codebase\n  > \u003Csub>Access individual networks via `https:\u002F\u002Fapi.ngc.nvidia.com\u002Fv2\u002Fmodels\u002Fnvidia\u002Fresearch\u002Fstylegan2\u002Fversions\u002F1\u002Ffiles\u002F\u003CMODEL>`, where `\u003CMODEL>` is one of:\u003C\u002Fsub>\u003Cbr>\n  > \u003Csub>`stylegan2-ffhq-1024x1024.pkl`, `stylegan2-ffhq-512x512.pkl`, `stylegan2-ffhq-256x256.pkl`\u003C\u002Fsub>\u003Cbr>\n  > \u003Csub>`stylegan2-ffhqu-1024x1024.pkl`, `stylegan2-ffhqu-256x256.pkl`\u003C\u002Fsub>\u003Cbr>\n  > \u003Csub>`stylegan2-metfaces-1024x1024.pkl`, `stylegan2-metfacesu-1024x1024.pkl`\u003C\u002Fsub>\u003Cbr>\n  > \u003Csub>`stylegan2-afhqv2-512x512.pkl`\u003C\u002Fsub>\u003Cbr>\n  > \u003Csub>`stylegan2-afhqcat-512x512.pkl`, `stylegan2-afhqdog-512x512.pkl`, `stylegan2-afhqwild-512x512.pkl`\u003C\u002Fsub>\u003Cbr>\n  > \u003Csub>`stylegan2-brecahad-512x512.pkl`, `stylegan2-cifar10-32x32.pkl`\u003C\u002Fsub>\u003Cbr>\n  > \u003Csub>`stylegan2-celebahq-256x256.pkl`, `stylegan2-lsundog-256x256.pkl`\u003C\u002Fsub>\u003Cbr>\n\n## Requirements\n\n* Linux and Windows are supported, but we recommend Linux for performance and compatibility reasons.\n* 1&ndash;8 high-end NVIDIA GPUs with at least 12 GB of memory. We have done all testing and development using Tesla V100 and A100 GPUs.\n* 64-bit Python 3.8 and PyTorch 1.9.0 (or later). See https:\u002F\u002Fpytorch.org for PyTorch install instructions.\n* CUDA toolkit 11.1 or later.  (Why is a separate CUDA toolkit installation required?  See [Troubleshooting](.\u002Fdocs\u002Ftroubleshooting.md#why-is-cuda-toolkit-installation-necessary)).\n* GCC 7 or later (Linux) or Visual Studio (Windows) compilers.  Recommended GCC version depends on CUDA version, see for example [CUDA 11.4 system requirements](https:\u002F\u002Fdocs.nvidia.com\u002Fcuda\u002Farchive\u002F11.4.1\u002Fcuda-installation-guide-linux\u002Findex.html#system-requirements).\n* Python libraries: see [environment.yml](.\u002Fenvironment.yml) for exact library dependencies.  You can use the following commands with Miniconda3 to create and activate your StyleGAN3 Python environment:\n  - `conda env create -f environment.yml`\n  - `conda activate stylegan3`\n* Docker users:\n  - Ensure you have correctly installed the [NVIDIA container runtime](https:\u002F\u002Fdocs.docker.com\u002Fconfig\u002Fcontainers\u002Fresource_constraints\u002F#gpu).\n  - Use the [provided Dockerfile](.\u002FDockerfile) to build an image with the required library dependencies.\n\nThe code relies heavily on custom PyTorch extensions that are compiled on the fly using NVCC. On Windows, the compilation requires Microsoft Visual Studio. We recommend installing [Visual Studio Community Edition](https:\u002F\u002Fvisualstudio.microsoft.com\u002Fvs\u002F) and adding it into `PATH` using `\"C:\\Program Files (x86)\\Microsoft Visual Studio\\\u003CVERSION>\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\"`.\n\nSee [Troubleshooting](.\u002Fdocs\u002Ftroubleshooting.md) for help on common installation and run-time problems.\n\n## Getting started\n\nPre-trained networks are stored as `*.pkl` files that can be referenced using local filenames or URLs:\n\n```.bash\n# Generate an image using pre-trained AFHQv2 model (\"Ours\" in Figure 1, left).\npython gen_images.py --outdir=out --trunc=1 --seeds=2 \\\n    --network=https:\u002F\u002Fapi.ngc.nvidia.com\u002Fv2\u002Fmodels\u002Fnvidia\u002Fresearch\u002Fstylegan3\u002Fversions\u002F1\u002Ffiles\u002Fstylegan3-r-afhqv2-512x512.pkl\n\n# Render a 4x2 grid of interpolations for seeds 0 through 31.\npython gen_video.py --output=lerp.mp4 --trunc=1 --seeds=0-31 --grid=4x2 \\\n    --network=https:\u002F\u002Fapi.ngc.nvidia.com\u002Fv2\u002Fmodels\u002Fnvidia\u002Fresearch\u002Fstylegan3\u002Fversions\u002F1\u002Ffiles\u002Fstylegan3-r-afhqv2-512x512.pkl\n```\n\nOutputs from the above commands are placed under `out\u002F*.png`, controlled by `--outdir`. Downloaded network pickles are cached under `$HOME\u002F.cache\u002Fdnnlib`, which can be overridden by setting the `DNNLIB_CACHE_DIR` environment variable. The default PyTorch extension build directory is `$HOME\u002F.cache\u002Ftorch_extensions`, which can be overridden by setting `TORCH_EXTENSIONS_DIR`.\n\n**Docker**: You can run the above curated image example using Docker as follows:\n\n```.bash\n# Build the stylegan3:latest image\ndocker build --tag stylegan3 .\n\n# Run the gen_images.py script using Docker:\ndocker run --gpus all -it --rm --user $(id -u):$(id -g) \\\n    -v `pwd`:\u002Fscratch --workdir \u002Fscratch -e HOME=\u002Fscratch \\\n    stylegan3 \\\n    python gen_images.py --outdir=out --trunc=1 --seeds=2 \\\n         --network=https:\u002F\u002Fapi.ngc.nvidia.com\u002Fv2\u002Fmodels\u002Fnvidia\u002Fresearch\u002Fstylegan3\u002Fversions\u002F1\u002Ffiles\u002Fstylegan3-r-afhqv2-512x512.pkl\n```\n\nNote: The Docker image requires NVIDIA driver release `r470` or later.\n\nThe `docker run` invocation may look daunting, so let's unpack its contents here:\n\n- `--gpus all -it --rm --user $(id -u):$(id -g)`: with all GPUs enabled, run an interactive session with current user's UID\u002FGID to avoid Docker writing files as root.\n- ``-v `pwd`:\u002Fscratch --workdir \u002Fscratch``: mount current running dir (e.g., the top of this git repo on your host machine) to `\u002Fscratch` in the container and use that as the current working dir.\n- `-e HOME=\u002Fscratch`: let PyTorch and StyleGAN3 code know where to cache temporary files such as pre-trained models and custom PyTorch extension build results. Note: if you want more fine-grained control, you can instead set `TORCH_EXTENSIONS_DIR` (for custom extensions build dir) and `DNNLIB_CACHE_DIR` (for pre-trained model download cache). You want these cache dirs to reside on persistent volumes so that their contents are retained across multiple `docker run` invocations.\n\n## Interactive visualization\n\nThis release contains an interactive model visualization tool that can be used to explore various characteristics of a trained model.  To start it, run:\n\n```.bash\npython visualizer.py\n```\n\n\u003Ca href=\".\u002Fdocs\u002Fvisualizer_screen0.png\">\u003Cimg alt=\"Visualizer screenshot\" src=\".\u002Fdocs\u002Fvisualizer_screen0_half.png\">\u003C\u002Fimg>\u003C\u002Fa>\n\n## Using networks from Python\n\nYou can use pre-trained networks in your own Python code as follows:\n\n```.python\nwith open('ffhq.pkl', 'rb') as f:\n    G = pickle.load(f)['G_ema'].cuda()  # torch.nn.Module\nz = torch.randn([1, G.z_dim]).cuda()    # latent codes\nc = None                                # class labels (not used in this example)\nimg = G(z, c)                           # NCHW, float32, dynamic range [-1, +1], no truncation\n```\n\nThe above code requires `torch_utils` and `dnnlib` to be accessible via `PYTHONPATH`. It does not need source code for the networks themselves &mdash; their class definitions are loaded from the pickle via `torch_utils.persistence`.\n\nThe pickle contains three networks. `'G'` and `'D'` are instantaneous snapshots taken during training, and `'G_ema'` represents a moving average of the generator weights over several training steps. The networks are regular instances of `torch.nn.Module`, with all of their parameters and buffers placed on the CPU at import and gradient computation disabled by default.\n\nThe generator consists of two submodules, `G.mapping` and `G.synthesis`, that can be executed separately. They also support various additional options:\n\n```.python\nw = G.mapping(z, c, truncation_psi=0.5, truncation_cutoff=8)\nimg = G.synthesis(w, noise_mode='const', force_fp32=True)\n```\n\nPlease refer to [`gen_images.py`](.\u002Fgen_images.py) for complete code example.\n\n## Preparing datasets\n\nDatasets are stored as uncompressed ZIP archives containing uncompressed PNG files and a metadata file `dataset.json` for labels. Custom datasets can be created from a folder containing images; see [`python dataset_tool.py --help`](.\u002Fdocs\u002Fdataset-tool-help.txt) for more information. Alternatively, the folder can also be used directly as a dataset, without running it through `dataset_tool.py` first, but doing so may lead to suboptimal performance.\n\n**FFHQ**: Download the [Flickr-Faces-HQ dataset](https:\u002F\u002Fgithub.com\u002FNVlabs\u002Fffhq-dataset) as 1024x1024 images and create a zip archive using `dataset_tool.py`:\n\n```.bash\n# Original 1024x1024 resolution.\npython dataset_tool.py --source=\u002Ftmp\u002Fimages1024x1024 --dest=~\u002Fdatasets\u002Fffhq-1024x1024.zip\n\n# Scaled down 256x256 resolution.\npython dataset_tool.py --source=\u002Ftmp\u002Fimages1024x1024 --dest=~\u002Fdatasets\u002Fffhq-256x256.zip \\\n    --resolution=256x256\n```\n\nSee the [FFHQ README](https:\u002F\u002Fgithub.com\u002FNVlabs\u002Fffhq-dataset) for information on how to obtain the unaligned FFHQ dataset images. Use the same steps as above to create a ZIP archive for training and validation.\n\n**MetFaces**: Download the [MetFaces dataset](https:\u002F\u002Fgithub.com\u002FNVlabs\u002Fmetfaces-dataset) and create a ZIP archive:\n\n```.bash\npython dataset_tool.py --source=~\u002Fdownloads\u002Fmetfaces\u002Fimages --dest=~\u002Fdatasets\u002Fmetfaces-1024x1024.zip\n```\n\nSee the [MetFaces README](https:\u002F\u002Fgithub.com\u002FNVlabs\u002Fmetfaces-dataset) for information on how to obtain the unaligned MetFaces dataset images. Use the same steps as above to create a ZIP archive for training and validation.\n\n**AFHQv2**: Download the [AFHQv2 dataset](https:\u002F\u002Fgithub.com\u002Fclovaai\u002Fstargan-v2\u002Fblob\u002Fmaster\u002FREADME.md#animal-faces-hq-dataset-afhq) and create a ZIP archive:\n\n```.bash\npython dataset_tool.py --source=~\u002Fdownloads\u002Fafhqv2 --dest=~\u002Fdatasets\u002Fafhqv2-512x512.zip\n```\n\nNote that the above command creates a single combined dataset using all images of all three classes (cats, dogs, and wild animals), matching the setup used in the StyleGAN3 paper. Alternatively, you can also create a separate dataset for each class:\n\n```.bash\npython dataset_tool.py --source=~\u002Fdownloads\u002Fafhqv2\u002Ftrain\u002Fcat --dest=~\u002Fdatasets\u002Fafhqv2cat-512x512.zip\npython dataset_tool.py --source=~\u002Fdownloads\u002Fafhqv2\u002Ftrain\u002Fdog --dest=~\u002Fdatasets\u002Fafhqv2dog-512x512.zip\npython dataset_tool.py --source=~\u002Fdownloads\u002Fafhqv2\u002Ftrain\u002Fwild --dest=~\u002Fdatasets\u002Fafhqv2wild-512x512.zip\n```\n\n## Training\n\nYou can train new networks using `train.py`. For example:\n\n```.bash\n# Train StyleGAN3-T for AFHQv2 using 8 GPUs.\npython train.py --outdir=~\u002Ftraining-runs --cfg=stylegan3-t --data=~\u002Fdatasets\u002Fafhqv2-512x512.zip \\\n    --gpus=8 --batch=32 --gamma=8.2 --mirror=1\n\n# Fine-tune StyleGAN3-R for MetFaces-U using 1 GPU, starting from the pre-trained FFHQ-U pickle.\npython train.py --outdir=~\u002Ftraining-runs --cfg=stylegan3-r --data=~\u002Fdatasets\u002Fmetfacesu-1024x1024.zip \\\n    --gpus=8 --batch=32 --gamma=6.6 --mirror=1 --kimg=5000 --snap=5 \\\n    --resume=https:\u002F\u002Fapi.ngc.nvidia.com\u002Fv2\u002Fmodels\u002Fnvidia\u002Fresearch\u002Fstylegan3\u002Fversions\u002F1\u002Ffiles\u002Fstylegan3-r-ffhqu-1024x1024.pkl\n\n# Train StyleGAN2 for FFHQ at 1024x1024 resolution using 8 GPUs.\npython train.py --outdir=~\u002Ftraining-runs --cfg=stylegan2 --data=~\u002Fdatasets\u002Fffhq-1024x1024.zip \\\n    --gpus=8 --batch=32 --gamma=10 --mirror=1 --aug=noaug\n```\n\nNote that the result quality and training time depend heavily on the exact set of options. The most important ones (`--gpus`, `--batch`, and `--gamma`) must be specified explicitly, and they should be selected with care. See [`python train.py --help`](.\u002Fdocs\u002Ftrain-help.txt) for the full list of options and [Training configurations](.\u002Fdocs\u002Fconfigs.md) for general guidelines &amp; recommendations, along with the expected training speed &amp; memory usage in different scenarios.\n\nThe results of each training run are saved to a newly created directory, for example `~\u002Ftraining-runs\u002F00000-stylegan3-t-afhqv2-512x512-gpus8-batch32-gamma8.2`. The training loop exports network pickles (`network-snapshot-\u003CKIMG>.pkl`) and random image grids (`fakes\u003CKIMG>.png`) at regular intervals (controlled by `--snap`). For each exported pickle, it evaluates FID (controlled by `--metrics`) and logs the result in `metric-fid50k_full.jsonl`. It also records various statistics in `training_stats.jsonl`, as well as `*.tfevents` if TensorBoard is installed.\n\n## Quality metrics\n\nBy default, `train.py` automatically computes FID for each network pickle exported during training. We recommend inspecting `metric-fid50k_full.jsonl` (or TensorBoard) at regular intervals to monitor the training progress. When desired, the automatic computation can be disabled with `--metrics=none` to speed up the training slightly.\n\nAdditional quality metrics can also be computed after the training:\n\n```.bash\n# Previous training run: look up options automatically, save result to JSONL file.\npython calc_metrics.py --metrics=eqt50k_int,eqr50k \\\n    --network=~\u002Ftraining-runs\u002F00000-stylegan3-r-mydataset\u002Fnetwork-snapshot-000000.pkl\n\n# Pre-trained network pickle: specify dataset explicitly, print result to stdout.\npython calc_metrics.py --metrics=fid50k_full --data=~\u002Fdatasets\u002Fffhq-1024x1024.zip --mirror=1 \\\n    --network=https:\u002F\u002Fapi.ngc.nvidia.com\u002Fv2\u002Fmodels\u002Fnvidia\u002Fresearch\u002Fstylegan3\u002Fversions\u002F1\u002Ffiles\u002Fstylegan3-t-ffhq-1024x1024.pkl\n```\n\nThe first example looks up the training configuration and performs the same operation as if `--metrics=eqt50k_int,eqr50k` had been specified during training. The second example downloads a pre-trained network pickle, in which case the values of `--data` and `--mirror` must be specified explicitly.\n\nNote that the metrics can be quite expensive to compute (up to 1h), and many of them have an additional one-off cost for each new dataset (up to 30min). Also note that the evaluation is done using a different random seed each time, so the results will vary if the same metric is computed multiple times.\n\nRecommended metrics:\n* `fid50k_full`: Fr&eacute;chet inception distance\u003Csup>[1]\u003C\u002Fsup> against the full dataset.\n* `kid50k_full`: Kernel inception distance\u003Csup>[2]\u003C\u002Fsup> against the full dataset.\n* `pr50k3_full`: Precision and recall\u003Csup>[3]\u003C\u002Fsup> againt the full dataset.\n* `ppl2_wend`: Perceptual path length\u003Csup>[4]\u003C\u002Fsup> in W, endpoints, full image.\n* `eqt50k_int`: Equivariance\u003Csup>[5]\u003C\u002Fsup> w.r.t. integer translation (EQ-T).\n* `eqt50k_frac`: Equivariance w.r.t. fractional translation (EQ-T\u003Csub>frac\u003C\u002Fsub>).\n* `eqr50k`: Equivariance w.r.t. rotation (EQ-R).\n\nLegacy metrics:\n* `fid50k`: Fr&eacute;chet inception distance against 50k real images.\n* `kid50k`: Kernel inception distance against 50k real images.\n* `pr50k3`: Precision and recall against 50k real images.\n* `is50k`: Inception score\u003Csup>[6]\u003C\u002Fsup> for CIFAR-10.\n\nReferences:\n1. [GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium](https:\u002F\u002Farxiv.org\u002Fabs\u002F1706.08500), Heusel et al. 2017\n2. [Demystifying MMD GANs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1801.01401), Bi&nacute;kowski et al. 2018\n3. [Improved Precision and Recall Metric for Assessing Generative Models](https:\u002F\u002Farxiv.org\u002Fabs\u002F1904.06991), Kynk&auml;&auml;nniemi et al. 2019\n4. [A Style-Based Generator Architecture for Generative Adversarial Networks](https:\u002F\u002Farxiv.org\u002Fabs\u002F1812.04948), Karras et al. 2018\n5. [Alias-Free Generative Adversarial Networks](https:\u002F\u002Fnvlabs.github.io\u002Fstylegan3), Karras et al. 2021\n6. [Improved Techniques for Training GANs](https:\u002F\u002Farxiv.org\u002Fabs\u002F1606.03498), Salimans et al. 2016\n\n## Spectral analysis\n\nThe easiest way to inspect the spectral properties of a given generator is to use the built-in FFT mode in `visualizer.py`. In addition, you can visualize average 2D power spectra (Appendix A, Figure 15) as follows:\n\n```.bash\n# Calculate dataset mean and std, needed in subsequent steps.\npython avg_spectra.py stats --source=~\u002Fdatasets\u002Fffhq-1024x1024.zip\n\n# Calculate average spectrum for the training data.\npython avg_spectra.py calc --source=~\u002Fdatasets\u002Fffhq-1024x1024.zip \\\n    --dest=tmp\u002Ftraining-data.npz --mean=112.684 --std=69.509\n\n# Calculate average spectrum for a pre-trained generator.\npython avg_spectra.py calc \\\n    --source=https:\u002F\u002Fapi.ngc.nvidia.com\u002Fv2\u002Fmodels\u002Fnvidia\u002Fresearch\u002Fstylegan3\u002Fversions\u002F1\u002Ffiles\u002Fstylegan3-r-ffhq-1024x1024.pkl \\\n    --dest=tmp\u002Fstylegan3-r.npz --mean=112.684 --std=69.509 --num=70000\n\n# Display results.\npython avg_spectra.py heatmap tmp\u002Ftraining-data.npz\npython avg_spectra.py heatmap tmp\u002Fstylegan3-r.npz\npython avg_spectra.py slices tmp\u002Ftraining-data.npz tmp\u002Fstylegan3-r.npz\n```\n\n\u003Ca href=\".\u002Fdocs\u002Favg_spectra_screen0.png\">\u003Cimg alt=\"Average spectra screenshot\" src=\".\u002Fdocs\u002Favg_spectra_screen0_half.png\">\u003C\u002Fimg>\u003C\u002Fa>\n\n## License\n\nCopyright &copy; 2021, NVIDIA Corporation & affiliates. All rights reserved.\n\nThis work is made available under the [Nvidia Source Code License](https:\u002F\u002Fgithub.com\u002FNVlabs\u002Fstylegan3\u002Fblob\u002Fmain\u002FLICENSE.txt).\n\n## Citation\n\n```\n@inproceedings{Karras2021,\n  author = {Tero Karras and Miika Aittala and Samuli Laine and Erik H\\\"ark\\\"onen and Janne Hellsten and Jaakko Lehtinen and Timo Aila},\n  title = {Alias-Free Generative Adversarial Networks},\n  booktitle = {Proc. NeurIPS},\n  year = {2021}\n}\n```\n\n## Development\n\nThis is a research reference implementation and is treated as a one-time code drop. As such, we do not accept outside code contributions in the form of pull requests.\n\n## Acknowledgements\n\nWe thank David Luebke, Ming-Yu Liu, Koki Nagano, Tuomas Kynk&auml;&auml;nniemi, and Timo Viitanen for reviewing early drafts and helpful suggestions. Fr&eacute;do Durand for early discussions. Tero Kuosmanen for maintaining our compute infrastructure. AFHQ authors for an updated version of their dataset. Getty Images for the training images in the Beaches dataset. We did not receive external funding or additional revenues for this project.\n","StyleGAN3是官方的PyTorch实现，旨在生成高质量的图像。该项目通过引入无混叠生成器架构解决了传统生成对抗网络中存在的信号处理问题，从而确保生成的细节更加自然地附着于物体表面而非像素坐标上。此外，它还提供了交互式可视化工具、频谱分析以及视频生成等功能，并支持等变性度量，使得模型在亚像素尺度上也能保持平移和旋转的不变性。适用于需要高保真度图像合成的应用场景，如艺术创作、视觉特效制作及科学研究等领域。",2,"2026-06-11 03:35:49","high_star"]