Code Monkey home page Code Monkey logo

diffmic's Introduction

DiffMIC

DiffMIC is a project to adapt Diffusion Probabilistic Models to general medical image classification by dual-granularity conditional guidance. The method is elaborated in the paper DiffMIC: Dual-Guidance Diffusion Network for Medical Image Classification.

A Quick Overview

News

  • 23-06-05. This paper has been early accepted by MICCAI 2023. Code is coming and welcome to taste it.
  • 23-06-06. This project is still quickly updating 🌝. Check TODO list to see what will be released next.

Requirement

conda env create -f environment.yml

Datasets

  1. Download HAM10000 or APTOS2019 dataset. Your dataset folder under "your_data_path" should be like:

dataset/isic2018/

 images/...
 
 ISIC2018_Task3_Training_GroundTruth.csv
 
 isic2018_train.pkl

 isic2018_test.pkl

dataset/aptos/

 train/...
 
 train.csv
 
 aptos_train.pkl

 aptos_test.pkl

.pkl file contains the list of data whose element is a dictionary with the format as {'img_root':image_path,'label':label}

Run

  1. For Training! run: bash training_scripts/run_isic.sh where the first command line is used python main.py --device ${DEVICE_ID} --thread ${N_THREADS} --loss ${LOSS} --config configs/${TASK}.yml --exp $EXP_DIR/${MODEL_VERSION_DIR} --doc ${TASK} --n_splits ${N_SPLITS}

  2. For Testing! run: bash training_scripts/run_isic.sh where the second command line is used python main.py --device ${DEVICE_ID} --thread ${N_THREADS} --loss ${LOSS} --config $EXP_DIR/${MODEL_VERSION_DIR}/logs/ --exp $EXP_DIR/${MODEL_VERSION_DIR} --doc ${TASK} --n_splits ${N_SPLITS} --test --eval_best

The configuration for each of the above-listed tasks (including data file location, training log and evaluation result directory settings, neural network architecture, optimization hyperparameters, etc.) are provided in the corresponding files in the configs directory

TODO LIST

  • Release PMG2000 dataset and config
  • Release HAM10000, APTOS2019 dataloaders and configs
  • Dataset splits
  • Release training scripts
  • Release evaluation
  • Upload the checkpoints of HAM10000, APTOS2019
  • configuration

Be a part of DiffMIC !

Welcome to contribute to DiffMIC. Any technique that can improve the performance or speed up the algorithm is appreciated🙏. I am writing DiffMIC V2, aiming at top journals. I'm glad to list the contributors as my co-authors🤗.

Thanks

Code is largely based on XzwHan/CARD, CompVis/stable-diffusion, MedSegDiff, nyukat/GMIC

Cite

If you find this code useful, please cite

@article{yang2023diffmic,
  title={DiffMIC: Dual-Guidance Diffusion Network for Medical Image Classification},
  author={Yang, Yijun and Fu, Huazhu and Aviles-Rivero, Angelica and Sch{\"o}nlieb, Carola-Bibiane and Zhu, Lei},
  journal={arXiv preprint arXiv:2303.10610},
  year={2023}
}

diffmic's People

Contributors

scott-yjyang 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.