/Continual-Learning

Continual Learning with UNET | Semantic Segmentation

Primary LanguagePython

Continual Learning without Forgetting - Semantic Segmentation

pytorch implementation of Semantic segmentation using Unet as the network.

Some results

Pascal VOC 2012 / U-Net

  • Input -> Ground Truth -> Generated

Currnet

  • U-Net

Some details

  • I applied different metric algorithms .
  • I used augmented dataset. (Currently, I only applied flip operation for augmentation.)

Getting Started

Installation

  • Install PyTorch and dependencies from http://pytorch.org
  • Install torch torchvision and visdom
pip3 install torch torchvision
pip3 install visdom
  • Clone this repo:
git clone https://github.com/LorenzoFramba/Continual-Learning.git
cd Continual-Learning
  • Import torch and install cuda
import torch 
torch.cuda.is_available()

To train models

python main.py --mode train \
-- n_iters 10000 --train_batch_size 16 val_batch_size 16 \
--h_image_size 256 --w_image_size 256 \
--model_save_path './models' --sample_save_path './samples'

To load the model

--path ../path
--which_epoch 'latest' \
--continue_train \

Dependencies

  • python 3.5+

  • PyTorch 0.4.1

  • Fully Convolutional Networks for Semantic Segmentation[paper]
    Jonathan Long, Evan Shelhamer, Trevor Darrell

  • U-Net: Convolutional Networks for Biomedical Image Segmentation [paper]
    Olaf Ronneberger, Philipp Fischer, Thomas Brox

  • Continual Learning for Dense Labeling of Satellite Images [paper]
    Onur Tasar, Yuliya Tarabalka, Pierre Alliez

  • Learning a Discriminative Feature Network for Semantic Segmentation [paper]
    Changqian Yu, Jingbo Wang, Chao Peng, Changxin Gao, Gang Yu, Nong Sang

Contact

If you have any questions about codes, let me know! .