Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/benediktalkin/pytorch-ada
Adaptive Discriminator Augmentation
https://github.com/benediktalkin/pytorch-ada
adaptive-discriminator-augmentation computer-vision gan stylegan stylegan2 stylegan2-ada
Last synced: about 1 month ago
JSON representation
Adaptive Discriminator Augmentation
- Host: GitHub
- URL: https://github.com/benediktalkin/pytorch-ada
- Owner: BenediktAlkin
- Created: 2023-10-27T23:19:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-28T01:11:36.000Z (about 1 year ago)
- Last Synced: 2023-10-29T02:28:37.033Z (about 1 year ago)
- Topics: adaptive-discriminator-augmentation, computer-vision, gan, stylegan, stylegan2, stylegan2-ada
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Adaptive Discriminator Augmentation for pytorch
Standalone implementation of [Adaptive Discriminator Augmentation](https://arxiv.org/abs/2006.06676).
Based on the [stylegan2-ada-pytorch](https://github.com/NVlabs/stylegan2-ada-pytorch) repository.# Setup
`pip install git+https://github.com/BenediktAlkin/pytorch-ada`# Usage
```python
import torch
from ada import AdaptiveDiscriminatorAugmentation# create augmentation pipeline
aug = AdaptiveDiscriminatorAugmentation(
xflip=1,
rotate90=1,
xint=1,
scale=1,
rotate=1,
aniso=1,
xfrac=1,
brightness=1,
contrast=1,
lumaflip=1,
hue=1,
saturation=1,
)
# create 4 RGB images with 32x32 resolution
x = torch.randn(4, 3, 32, 32)
# augment images
augmented = aug(x)
# adjust strength
aug.set_p(0.5)
```