Code Monkey home page Code Monkey logo

contrastivediffusion's Introduction

Palette: Image-to-Image Diffusion Models

Step for started


Go json file
"test": {
    "which_dataset": {
        "name": ["data.dataset", "PainDataset"], // import Dataset() class / function(not recommend) from default file
        "args":{
            "data_root": "/media/ExtHDD01/Dataset/OAI_pain/full/a/a/*", // ap image
            "eff_root": "/media/ExtHDD01/Dataset/OAI_pain/full/apeff", // eff mask
            "mean_root": "/media/ExtHDD01/Dataset/OAI_pain/full/apmean_102323", //mean mask
            "mode": "test",
            "mask_type": "all", // "all", "mess", "eff"
            "threshold": [0.03, 0.15] // should be [min, max] in training, 0.06 in testing
        }
    },

Run for training

   python run.py -c CONFIG -p train

Run for testing

   python run.py -c CONFIG -p test
  1. First model: vanilla palette
    TRAIN:
        CONFIG: config/online/pain.json
    TEST:
        CONFIG: config/local/pain.json
    
    models-> models.model
  1. Second model: dualE
    TRAIN:
        CONFIG: config/online/pain_prev.json
    TEST:
        CONFIG: config/local/pain_prev.json
    
    models-> models.local_prev_guided_network
  1. Third model: dualE + SPADE (SPADE in encoder and decoder)
    TRAIN:
        CONFIG: config/online/pain_prev_spade_EnD.json
    TEST:
        CONFIG: config/local/pain_prev_spade_EnD.json
    
    models-> models.local_prev_seg_guided_network
  1. Forth model: dualE + SPADE (SPADE in encoder)
    TRAIN:
        CONFIG: config/online/pain_prev_spade.json
    TEST:
        CONFIG: config/local/pain_prev_spade.json
            
    models-> models.local_prev_seg_guided_network_free
  1. Fifth model: concat mask
    TRAIN:
        CONFIG: config/online/pain_concat.json
    TEST:
        CONFIG: config/local/pain_concat.json
    
    models-> models.model
  1. 3D model: instantiate from Med-DDPM
    TRAIN:
        CONFIG: config/online/3D_model.json
    TEST:
        CONFIG: config/local/3D_model.json
    
    models-> models.3D_network

UNet model Architecture

    vanilla palette -> models/guided_diffusion_modules/unet.py 
    dualE -> models/guided_diffusion_modules/guided_unet.py
    dualE + SPADE (SPADE in Encoder + Decoder)-> models/guided_diffusion_modules/guided_spade_EnD_unet.py
    dualE + SPADE + classfier_free -> models/guided_diffusion_modules/guided_spade_EnD_unet_free.py
    concat -> models/guided_diffusion_modules/unet.py
    3D model -> models/guided_diffusion_modules/medddpm_unet.py

contrastivediffusion's People

Contributors

janspiry avatar puanysh avatar bruce-willis avatar

Watchers

9xEzreaL 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.