Comments (9)
@WangPing521 If I understand correctly, the first step in "run_step" concatenates the image and mask together, and leave "cond" as an empty dictionary. For ISIC dataset, I think the image size is [B, 3, H, W] and the mask is [B, 1, H, W].
from medsegdiff.
is this the ensemble result saved in your result file? Some others met the similar problem before #6.
from medsegdiff.
Yes, using the savedmodel030000.pt and these images are named ''{slice_id}_output_ens.jpg'
from medsegdiff.
This is one of the predicted masks after I trained the model on ISIC dataset
from medsegdiff.
it's close. Note that MedSegDiff will outcome uncertianty-aware segmentation, because of the uncertianty nature of medical image segmentation(check: Learning calibrated medical image segmentation via multi-rater agreement modeling(CVPR 2021), Learning self-calibrated optic disc and cup segmentation from multi-rater annotations(MICCAI 2022)). but your prediction seems a little too much, you may want to generate more confident results by more training or ensemble.
if you want to obtain the binary results, you can threshold and postprocess this prediction. I used the postprocess config in nnUNet for example.
from medsegdiff.
Thanks for confirming,
Does the number of channels (RGB vs Grayscale) in the input images matter? Or should all grayscale input images be converted into RGB first?
The custom dataset that i have are grayscale images. I am converting it to RGB first, and using args.in_ch = 4 for training.
from medsegdiff.
it's close. Note that MedSegDiff will outcome uncertianty-aware segmentation, because of the uncertianty nature of medical image segmentation(check: Learning calibrated medical image segmentation via multi-rater agreement modeling(CVPR 2021), Learning self-calibrated optic disc and cup segmentation from multi-rater annotations(MICCAI 2022)). but your prediction seems a little too much, you may want to generate more confident results by more training or ensemble.
if you want to obtain the binary results, you can threshold and postprocess this prediction. I used the postprocess config in nnUNet for example.
I want to know what is the input of diffusion model, in order to get a segmentation? For example, we have a 5-class within an image. Then we have two choice, one is to use the one-hot (1, 5, h, w) where the values are 0 and 1, suppose batch_size is 1, as the input of diffusion model; another is to use the mask(1,1,h,w) where the values are 0, 1, 2, 3, 4, as the input of diffusion model. Which one is you choice? In this diffusion on segmentation rather than image case, what are the output during the reverse stage? How to map the sampled output to the labels(0 and1, or 0,1,2,3,4)?
If i am wrong above, as you said "MedSegDiff will outcome uncertianty-aware segmentation", the output is probability map like the output of normal segmentation network? Can you give me some hints about this? I am very confusing about the diffusion on segmentation rather than image.
I would very appreciate if you can help.
from medsegdiff.
@WangPing521 It depends on your dataset, both of them can work. if it was me, i will use (1, 5, h, w). diffusion model outputs a residual noise. Then substract it from the last noisy result(segmentation) to get a clearer one. The iteration enables it to generate a segmentation from a gaussian noise conditioned by the raw image. you can refer to our paper for more details.
from medsegdiff.
Thanks for your reply!
I have a naive question for your input of code, "self.run_step(batch, cond) ", here, Does the batch mean the label, the cond mean the original image? Can you show the dimensionality of these two tensors in a (N, C, H, W) way?
from medsegdiff.
Related Issues (20)
- How to integrate the official version of DPM-Solver into Medsegdiff? HOT 1
- how to deal with StopIteration HOT 1
- three model.pt HOT 1
- Sample result is not a binary mask HOT 1
- pretraining model
- 这个程序的训练模块要运行多少时间? HOT 1
- Why is the effect of using dpm-solver not good?
- DDIT dataloaders / config
- What are these losses calculated separately
- some question about V1 version HOT 2
- Question about the wrong output when trying BraTS20 in MedSegDiff V2 code HOT 2
- Where is the code of SS-former HOT 2
- which .pt should I use to sample? HOT 2
- How long will you use to train the model? HOT 3
- Do you have any trained model weights that you can share? HOT 1
- I want to know which part of the code the image size is in
- help! run the model on my own dataset, visdom show nothing. and have this erro: WARNING:root:Setting up a new session... [W socket.cpp:697] [c10d] The client socket has failed to connect to [DESKTOP-BP72V]:55472 (system error: 10049 - �����������У�������ĵ�ַ��Ч��).
- Meaning of the high_way parameter
- 這個github是MedSegDiff-V2還是v1? HOT 1
- How long will you use to train the model? can i change the epoch?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from medsegdiff.