shaoyanpan / 2D-Medical-Denoising-Diffusion-Probabilistic-Model-

This is the repository for the paper "2D Medical Image Synthesis Using Transformer-based Denoising Diffusion Probabilistic Model".
https://iopscience.iop.org/article/10.1088/1361-6560/acca5c
MIT License
38 stars 11 forks source link

Excuse me, can you share your test .py files #15

Open HIT-wwb opened 7 months ago

HIT-wwb commented 7 months ago

Hello, it seems that there is no test .py file in your project, I don't know if it is convenient for you to provide, I am a beginner, if I am asked to write it myself, it will be very difficult. Thank you.

shaoyanpan commented 7 months ago

Hi, what do you mean a test.py? If you want to run inference, my jupyter notebook example already had it, as long as you comment out the "average_loss = train(model, optimizer, train_loader1, train_loss_history)" in the last block.

HIT-wwb commented 7 months ago

Thank you very much for your reply, test.py refers to the functions mentioned in your paper that can generate evaluation indicators, such as IS, FID, etc., and there is another question I want to trouble you, I trained according to your code and generated a .mat file, which contains the last noise image displayed by your jupyter, how to denoise to generate a clear picture, do I need to train the noise image again? I am new to diffusion models, if you want to answer, I would be grateful.

shaoyanpan commented 7 months ago

Hi, sorry that I could not find the evaluation original script now. But please refer to https://github.com/mseitzer/pytorch-fid for the fid calculation.

On the other hand, what do you mean that you trained the model and generate the last noise image? If you trained the model, you should generate the clean image, there is no noise image.