From 1c8ee184f8ba15f762e914461ada9cbae6727bd2 Mon Sep 17 00:00:00 2001 From: Utkarsh Yashwant Tambe <89902664+utkarshtambe10@users.noreply.github.com> Date: Fri, 24 May 2024 17:10:04 +0530 Subject: [PATCH] updating README.md with tree file structure and command I am adding the appropriate file structure which worked for me according the previous README.md instructions but the ISIC file structure represented is slightly mis-leading and also the commands contain some paths to be supplied so updating the same with *path* so that it becomes readable for fellow learners/coders. --- README.md | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 53e5640..e38055a 100644 --- a/README.md +++ b/README.md @@ -33,21 +33,38 @@ MedSegDiff a Diffusion Probabilistic Model (DPM) based framework for Medical Ima ## Example Cases ### Melanoma Segmentation from Skin Images -1. Download ISIC dataset from https://challenge.isic-archive.com/data/. Your dataset folder under "data_dir" should be like: +1. Download ISIC dataset from https://challenge.isic-archive.com/data/. Your dataset folder under "data" should be like: -ISIC/ +~~~ +data +| ----ISIC +| ----Test +| | | ISBI2016_ISIC_Part1_Test_GroundTruth.csv +| | | +| | ----ISBI2016_ISIC_Part1_Test_Data +| | | ISIC_0000003.jpg +| | | ..... +| | | +| | ----ISBI2016_ISIC_Part1_Test_GroundTruth +| | ISIC_0000003_Segmentation.png +| | | ..... +| | +| ----Train +| | ISBI2016_ISIC_Part1_Training_GroundTruth.csv +| | +| ----ISBI2016_ISIC_Part1_Training_Data +| | ISIC_0000000.jpg +| | ..... +| | +| ----ISBI2016_ISIC_Part1_Training_GroundTruth +| | ISIC_0000000_Segmentation.png +| | ..... +~~~ - ISBI2016_ISIC_Part3B_Test_Data/... - - ISBI2016_ISIC_Part3B_Training_Data/... - - ISBI2016_ISIC_Part3B_Test_GroundTruth.csv - - ISBI2016_ISIC_Part3B_Training_GroundTruth.csv -2. For training, run: ``python scripts/segmentation_train.py --data_name ISIC --data_dir input data direction --out_dir output data direction --image_size 256 --num_channels 128 --class_cond False --num_res_blocks 2 --num_heads 1 --learn_sigma True --use_scale_shift_norm False --attention_resolutions 16 --diffusion_steps 1000 --noise_schedule linear --rescale_learned_sigmas False --rescale_timesteps False --lr 1e-4 --batch_size 8`` - -3. For sampling, run: ``python scripts/segmentation_sample.py --data_name ISIC --data_dir input data direction --out_dir output data direction --model_path saved model --image_size 256 --num_channels 128 --class_cond False --num_res_blocks 2 --num_heads 1 --learn_sigma True --use_scale_shift_norm False --attention_resolutions 16 --diffusion_steps 1000 --noise_schedule linear --rescale_learned_sigmas False --rescale_timesteps False --num_ensemble 5`` +2. For training, run: ``python scripts/segmentation_train.py --data_name ISIC --data_dir *input data direction* --out_dir *output data direction* --image_size 256 --num_channels 128 --class_cond False --num_res_blocks 2 --num_heads 1 --learn_sigma True --use_scale_shift_norm False --attention_resolutions 16 --diffusion_steps 1000 --noise_schedule linear --rescale_learned_sigmas False --rescale_timesteps False --lr 1e-4 --batch_size 8`` + +3. For sampling, run: ``python scripts/segmentation_sample.py --data_name ISIC --data_dir *input data direction* --out_dir *output data direction* --model_path *saved model* --image_size 256 --num_channels 128 --class_cond False --num_res_blocks 2 --num_heads 1 --learn_sigma True --use_scale_shift_norm False --attention_resolutions 16 --diffusion_steps 1000 --noise_schedule linear --rescale_learned_sigmas False --rescale_timesteps False --num_ensemble 5`` 4. For evaluation, run ``python scripts/segmentation_env.py --inp_pth *folder you save prediction images* --out_pth *folder you save ground truth images*``