Firewood
Implementation of custom torch layers and models.
All layers are compatible with official pytorch nn.Module
and support ddp
strategy.
Installation
Models & Trainers
(nn.Module model & pytorch-lightning trainer)
GAN
-
GAN
🌲 Model🔥 Trainer -
DCGAN
🌲 Model🔥 Trainer -
LSGAN
🌲 Model🔥 Trainer -
Pix2Pix
🌲 Model🔥 Trainer -
Pix2PixHD
🌲 Model🔥 Trainer - ProGAN
- StyleGAN
Semantic Segmentation
- BiSeNetV1
- BiSeNetV2
Layers
Separable Convolution
-
Depthwise - Pointwise Convolution
- weight shape:
Conv(in, out, K, K)
→Conv(in, 1, K, K) X Conv(1, out, 1, 1)
- weight shape:
-
Spatialwise Convolution
- weight shape:
Conv(in, out, K, K)
→Conv(in, smaller, K, 1) X Conv(smaller, out, 1, K)
- weight shape:
Denormalizations
- AdaIN
- SPADE
Introduced from ProGAN
- Learning rate Equalizer hooks
Introduced from StyleGAN
-
Weight Gradient Fixable Convolution
- All options are compatible with tensorflow convolution. (e.g. "same" padding)
- Can implement exactly same with tensorflow.
- Fused Activation (biased activation, cuda extension)
- Up Fir Down filter 1D, 2D, 3D (only 2D support cuda extension)
-
Weight Demodulation hooks
- Support Conv and Linear
PyTorchLightning
Callbacks
- Latent Interpolator
- Latent Sampler
- Condition Interpolator (Multi-Condition)
- Image to Image Translation Sampler
- Save Last K ModelCheckpoint
Metrics
-
FID
- selectable resizing method
- default: antialiased torchvision
- original: tf1
- On CPU computable to avoid GPU VRAM overflow error
- selectable resizing method
Dataset
- NoClassImageFolder for single class model
- PairedImageFolder for I2I model
- ConditionImageFolder for multi-condition(multi-class) model