DAIR is an image autoencoder framework designed for dynamic architectural experimentation. Unlike static models, the DAIR decoder can adapt its structure—switching between different upsampling methods, activation functions, and normalization layers either randomly or via a JSON specification.
- Dynamic Decoder Architecture: The decoder utilizes
SubBlocksthat can shuffle and select operations (Conv, Act, Norm) on the fly. - Weighted Convolutional Pooling: Features a custom
WeightedConvPool3layer that dynamically weights multiple convolution outputs based on the input features. - Flexible Upsampling: Supports multiple upsampling modes: Bilinear, Nearest, Bicubic, and PixelShuffle.
- Architecture Export: Capability to save and load specific architecture configurations via JSON.
python train.py --train_dir /path/to/your/dataset --batch_size 4 --img_loss both
Before running inference, you can download the pre-trained model checkpoint from Google Drive and place it directly into the root directory of this project.
We provide a test_inference.py script:
# Ensure you have a 'test.jpg' in the root directory
python test_inference.py