Skip to content

PyTorch Implementation of Fully Convolutional Networks. (Training code to reproduce the original result is available.)

License

Notifications You must be signed in to change notification settings

Quinnan-Gill/pytorch-fcn

 
 

Repository files navigation

Requirements

Installation

git clone https://github.com/Quinnan-Gill/pytorch-fcn
cd pytorch-fcn
pip install .

If there are issues installing with setup tools run:

pip install setuptools==64
pip install .

Training

Download Dataset

cd train/
./download_dataset.sh

Train Siren FCN model

In pytorch-fcn/train/ is the file train_sire.py the usage is:

usage: train_siren.py [-h] -g GPU [--resume RESUME] [--fcn {fcn32s,fcn16s,fcn8s}] [--height HEIGHT] [--width WIDTH]
                      [--siren_plus] [--filters FILTERS] [--epochs EPOCHS] [--lr LR] [--weight-decay WEIGHT_DECAY]
                      [--momentum MOMENTUM] [-o OUT]

options:
  -h, --help            show this help message and exit
  -g GPU, --gpu GPU     gpu id (default: None)
  --resume RESUME       checkpoint path (default: None)
  --fcn {fcn32s,fcn16s,fcn8s}
  --height HEIGHT
  --width WIDTH
  --siren_plus
  --filters FILTERS     comma seperated list of all the ReLUs to convert to SIRENs (default: None)
  --epochs EPOCHS       # of epochs to train (default: 5)
  --lr LR               learning rate (default: 1e-12)
  --weight-decay WEIGHT_DECAY
                        weight decay (default: 0.0005)
  --momentum MOMENTUM   momentum (default: 0.99)
  -o OUT, --out OUT

Train for:

  • FCN32s
cd train/
python train_sire.py -g 0 --fcn fcn32s
  • FCN16s
cd train/
python train_sire.py -g 0 --fcn fcn16s
  • FCN8s
cd train/
python train_sire.py -g 0 --fcn fcn8s
  • For replacing the first ReLUs with SIREN
cd train/
python train_sire.py -g 0 --filters "relu1_1,relu1_2"
  • For replaceing the last two ReLUs with SIREN
cd train/
python train_sire.py -g 0 --filters "relu6,relu7"

Citation

This project was extended from:

@misc{pytorch-fcn2017,
  author =       {Ketaro Wada},
  title =        {{pytorch-fcn: PyTorch Implementation of Fully Convolutional Networks}},
  howpublished = {\url{https://github.com/wkentaro/pytorch-fcn}},
  year =         {2017}
}
@misc{sitzmann2020implicit,
    title   = {Implicit Neural Representations with Periodic Activation Functions},
    author  = {Vincent Sitzmann and Julien N. P. Martel and Alexander W. Bergman and David B. Lindell and Gordon Wetzstein},
    year    = {2020},
    eprint  = {2006.09661},
    archivePrefix = {arXiv},
    primaryClass = {cs.CV}
}
@misc{mehta2021modulated,
    title   = {Modulated Periodic Activations for Generalizable Local Functional Representations}, 
    author  = {Ishit Mehta and Michaël Gharbi and Connelly Barnes and Eli Shechtman and Ravi Ramamoorthi and Manmohan Chandraker},
    year    = {2021},
    eprint  = {2104.03960},
    archivePrefix = {arXiv},
    primaryClass = {cs.CV}
}

About

PyTorch Implementation of Fully Convolutional Networks. (Training code to reproduce the original result is available.)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Shell 0.2%