Giter Club home page Giter Club logo

master_masterthesis's Introduction

diffusion_msc

Deep Learning in Medical Image Synthesis

Utrecht University & Technical University of Eindhoven

Dec 2022 -- Sep 2023

This project contains the work done for my master's thesis "Deep Learning in Medical Image Synthesis", at Utrecht University & Technical University of Eindhoven. This project mainly includes using different generation networks for the X-ray images.

For different classification models:

CheXNet: Use the train.py file in the Classification_Model/ChexPert/bin for training, main hyper-parameters are shown in the file.
DenseNet: Use the densenet.py file in the Classification_Model/DenseNet for training. Remember to set the path for every input and output file.
Inception-ResNet: Read the readme.md in the Classification_Model/Inception-ResNet-v2 and follow the instruction to train.

For different label imputation methods:

Change .fillna(0) and .replace(-1,1) in data preprocessing to .fillna(x) and .replace(-1,x).

For different image masking methods:

Use the mask.py file in the folder to perform masking operations on the dataset. 
mask_1 function is the joint mask method.
mask_2 function is the inverted joint mask method.
mask_3 function is the square mask method.
mask_4 function is the separate mask method.

For different augmentation methods:

Traditional augmentation: According to the flag parameter in the create function, use the augmentation.py file in the Gereration_Model to generate image data sets of different traditional augmentation methods. If you want to generate a combined method, you can directly use multiple methods at the same time 
DDPM model:use the training_DDPM.py file in the Generation_Model.
DDIM model:use the main.py file in the Generation_Model/ddim-main.
Stable Diffusion: use the huggingface.py file in the Generation_Model, the prompt can be changed in the file. Or can use the img2img_old.py file in the stable-diffusion-main/scripts to generate.
Stable Diffusion Finetune: I use the project from https://github.com/AUTOMATIC1111/stable-diffusion-webui

For different augmentation strategies:

For the unbalanced augmentation strategy, use the create function in the augmentation.py file in xxxx folder.
For the balanced augmentation strategy, use the create_2 function in the augmentation.py file in xxxx folder.
For other augmentation strategy, use the PCA.py file to visualise. The augmentation file is not uploaded yet.

For evaluation metrics:

All classification metrics such as accuracy, precision are in the eval_classification.py file.
All generation metrics such as SSIM, PSNR are in the eval_generation.py file.
Code for the mcnemar's test is in the mcnemar.py file.
Code for the heatmap is in the heatmap.py file.

master_masterthesis's People

Contributors

lxhautomatic avatar

Stargazers

 avatar Kewei Wang avatar

Watchers

Kostas Georgiou avatar  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.