Skip to content

Manuelnkegoum-8/cGLOW

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cGLOW: Conditional Generative Flows 🌟

pytorch version torchvision version numpy version PIL version

Description

The paper "Structured Output Learning with Conditional Generative Flows" by You Lu and Bert Huang. proposes a new approach for structured output learning, called conditional Glow (c-Glow), which is a conditional generative flow model that can directly model the conditional distribution p(y|x) without restrictive assumptions. The authors show that c-Glow can be trained efficiently by exploiting the fact that invertible flows allow exact computation of log-likelihood, and that it can generate structured outputs that are comparable in quality to those produced by state-of-the-art deep structured prediction approaches. The paper evaluates c-Glow on five structured prediction tasks: binary segmentation, multi-class segmentation, color image denoising, depth refinement, and image inpainting. The results demonstrate the effectiveness of c-Glow in handling a variety of structured prediction problems.

Getting started 🚀

To dive into the transformative world of cGLOW, begin by setting up your environment with these steps. We recommend using a virtual environment for an isolated setup.

  1. Clone the repository

    git clone https://github.com/Manuelnkegoum-8/cGLOW.git
    cd cGLOW
  2. Set up a virtual environment (optional but recommended)

    • For Unix/Linux or MacOS:
      python3 -m venv env
      source env/bin/activate
    • For Windows:
      python -m venv env
      .\env\Scripts\activate
  3. Install the requirements

    pip install -r requirements.txt
  4. Usage

    • To train the cGLOW model with default settings:

      ./train.sh
    • For generating images using a pre-trained model:

      ./inference.sh

Results 📊

This code is used for the experiments of binary segmentation on the Retina Blood Vessel dataset

Final segmentation masks

Evolution of the generated mask

Acknowledgements 🙏

  • Immense gratitude to the original authors of the Glow model and the vibrant community around generative models, whose work paved the way for advancements like cGLOW.
  • Some parts of the code was inspired from y0ast and ameroyer

Authors 🧑‍💻

References 📄

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published