Skip to content

A Diffusion generative adversial network for detecting and classify the eye diseases Like PCV,DRUSEN,CNV

Notifications You must be signed in to change notification settings

KianAnbarestani/Diffusion-Gan-for-eye-disease-classifciation-

Repository files navigation

Diffusion Generative Adversial network

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

Requirement

conda env create -f environment.yml or you can simply create your own env and either use your own env if the libraries are added

Datasets

  1. Download HAM10000 or APTOS2019 dataset or any dataset you want but you should create a pkl file and customize the database based on the infos .we added a custome loader dataset on the root for this situation. Your dataset folder under "your_data_path" should be like:

dataset/isic2018/

 images/...
 
 ISIC2018_Task3_Training_GroundTruth.csv
 
 isic2018_train.pkl

 isic2018_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

Thanks

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

About

A Diffusion generative adversial network for detecting and classify the eye diseases Like PCV,DRUSEN,CNV

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published