GithubHelp home page GithubHelp logo

catarinapinheiro / semi-supervised-segmentation-cyclegan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from arnab39/semi-supervised-segmentation-cyclegan

0.0 0.0 0.0 2.57 MB

Pytorch implementation of our paper: Revisting Cycle-GAN for semi-supervised segmentation

License: MIT License

Python 100.00%

semi-supervised-segmentation-cyclegan's Introduction

Revisting Cycle-GAN for semi-supervised segmentation

This repo contains the official Pytorch implementation of the paper: Revisiting CycleGAN for semi-supervised segmentation

Contents

  1. Summary of the Model
  2. Setup instructions and dependancies
  3. Repository Overview
  4. Running the model
  5. Some results of the paper
  6. Contact
  7. License

1. Summary of the Model

The following shows the training procedure for our proposed model

We propose a training procedure for semi-supervised segmentation using the principles of image-to-image translation using GANs. The proposed procedure has been evaluated on three segmentation datasets, namely VOC, Cityscapes, ACDC. We are easily able to achieve 2-4% improvement in the mean IoU for all of our semisupervised model as compared to the supervised model on the same amount of data. For further information regarding the model, training procedure details you may refer to the paper for further details.

2. Setup instructions and dependancies

The code has been written in Python 3.6 and Pytorch v1.0 with Torchvision v0.3. You can install all the dependancies for the model by running the following command in a virtual environment

pip install -r requirements.txt

For training/testing the model, you must first download all the 3 datasets. You can download the processed version of the dataset here. Also for storing the results of the validation/testing datasets, checkpoints and tensorboard logs, the directory structure must in the following way:

.
├── arch
│   ├── ...
├── data                     # Follow the way the dataset has been placed here         
│   ├── ACDC                 # Here the ACDC dataset must be placed
│   └── Cityscape            # Here the Cityscapes dataset must be placed
│   └── VOC2012              # Here the VOC train/val dataset must be placed
│   └── VOC2012test          # Here the VOC test dataset must be placed
├── data_utils
│   ├── ...
├── checkpoints              # Create this directory to store checkpoints   
├── examples                 
├── main.py                  
├── model.py
├── README.md
├── testing.py
├── utils.py
├── validation.py
├── results                  # Create this directory for storing the results
│   ├── supervised           # Directory for storing supervised results  
│   └── unsupervised         # Directory for storing semisupervised results
└── tensorboard_results      # Create this directory to store tensorboard log curves

3. Repository Overview

The following are the information regarding the various important files in the directory and their function:

  • arch : The directory stores the architectures for the generators and discriminators used in our model
  • data_utils : The dataloaders and also helper functions for data processing
  • main.py : Stores the various hyperparameter information and default settings
  • model.py : Stores the training procedure for both supervised and semisupervised model, and also checkpointing and logging details
  • utils.py : Stores the helper functions required for training

4. Running the model

You configure the various defaults that are being specified in the main.py file. And also modify the supervision percentage on the dataset by modifying the dataloader calling function in the model.py file.

For training/validation/testing the our proposed semisupervised model:

python main.py --model 'semisupervised_cycleGAN' --dataset 'voc2012' --gpu_ids '0' --training True    

Similar commands for the validation and testing can be put up by replacing --training with --validation and --testing respectively.

5. Some results of the paper

Some of the results produced by our semisupervised model are as follows. For more such results, consider seeing the main paper and also its supplementary section

The generated labels are the labels obtained from semisupervised model while the generated image are the images obtained by passing labels from label to image network

6. Contact

If you have found our research work helpful, please consider citing the original paper.

If you have any doubt regarding the codebase, you can open up an issue or mail at [email protected] / [email protected]

7. License

This repository is licensed under MIT license

semi-supervised-segmentation-cyclegan's People

Contributors

aniket-agarwal1999 avatar arnab39 avatar gedomech avatar josedolz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.