Comments (7)
Why is it that the result of my last training in BraTS is a MRI diagram?
from medsegdiff.
I run the segmentation_sample.py, and meet the problem:
Logging to /root/autodl-tmp/MedSegDif/med_results/img_out/ creating model and diffusion... sampling... no dpm-solver /root/miniconda3/lib/python3.8/site-packages/torch/nn/functional.py:1709: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead. warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.") Traceback (most recent call last): File "MedSegDif/med_scripts/segmentation_sample.py", line 163, in main() File "MedSegDif/med_scripts/segmentation_sample.py", line 109, in main sample, x_noisy, org, cal, cal_out = sample_fn( File "/root/autodl-tmp/./MedSegDif/med_guided_diffusion/gaussian_diffusion.py", line 553, in p_sample_loop_known for sample in self.p_sample_loop_progressive( File "/root/autodl-tmp/./MedSegDif/med_guided_diffusion/gaussian_diffusion.py", line 624, in p_sample_loop_progressive out = self.p_sample( File "/root/autodl-tmp/./MedSegDif/med_guided_diffusion/gaussian_diffusion.py", line 435, in p_sample out = self.p_mean_variance( File "/root/autodl-tmp/./MedSegDif/med_guided_diffusion/respace.py", line 90, in p_mean_variance return super().p_mean_variance(self._wrap_model(model), *args, **kwargs) File "/root/autodl-tmp/./MedSegDif/med_guided_diffusion/gaussian_diffusion.py", line 319, in p_mean_variance model_mean, _, _ = self.q_posterior_mean_variance( File "/root/autodl-tmp/./MedSegDif/med_guided_diffusion/gaussian_diffusion.py", line 219, in q_posterior_mean_variance assert x_start.shape == x_t.shape AssertionError
I know that it is because x_start.shape is not equal to x_t.shape. However, My dataset is similar to ISICDataset, so I feel very strange. Thanks a lot if you can reply.
Have you solved it? I have the same doubt, thanks!
from medsegdiff.
Have you figure it out? I have the same question...
from medsegdiff.
could you print x_start.shape and x_t.shape?
from medsegdiff.
I try to print x_start.shape and x_t.shape however there is an error occurred before I can get x_start.
Traceback (most recent call last):
File "F:\dpm\MedSegDiff-master-v2\v2\scripts\segmentation_sample.py", line 194, in
main()
File "F:\dpm\MedSegDiff-master-v2\v2\scripts\segmentation_sample.py", line 116, in main
sample, x_noisy, org, cal, cal_out = sample_fn(
File "F:\dpm\MedSegDiff-master-v2\v2\scripts..\guided_diffusion\gaussian_diffusion.py", line 566, in p_sample_loop_known
for sample in self.p_sample_loop_progressive(
File "F:\dpm\MedSegDiff-master-v2\v2\scripts..\guided_diffusion\gaussian_diffusion.py", line 651, in p_sample_loop_progressive
out = self.p_sample(
File "F:\dpm\MedSegDiff-master-v2\v2\scripts..\guided_diffusion\gaussian_diffusion.py", line 446, in p_sample
out = self.p_mean_variance(
File "F:\dpm\MedSegDiff-master-v2\v2\scripts..\guided_diffusion\respace.py", line 90, in p_mean_variance
return super().p_mean_variance(self._wrap_model(model), *args, **kwargs)
File "F:\dpm\MedSegDiff-master-v2\v2\scripts..\guided_diffusion\gaussian_diffusion.py", line 325, in p_mean_variance
self._predict_xstart_from_eps(x_t=x, t=t, eps=model_output)
File "F:\dpm\MedSegDiff-master-v2\v2\scripts..\guided_diffusion\gaussian_diffusion.py", line 350, in _predict_xstart_from_eps
assert x_t.shape == eps.shape
AssertionError
I print x_t.shape and eps.shape, and result is like this:
x_t.shape= torch.Size([1, 1, 64, 64])
eps.shape= torch.Size([1, 2, 64, 64])
I suppose to use the right dataset step by step in Readme.md. The eps[:, 0, :, :]
is totally the same as eps[:, 1; :, :]
. After clipping eps to [1,1,64,64]
by deleting either of them, program can work. I can't understand why their shapes are not consistant. Therefore, I can't figure out whether I can get the right answer by simple clipping conducted by myself without theory support.
from medsegdiff.
I try to print x_start.shape and x_t.shape however there is an error occurred before I can get x_start.
Traceback (most recent call last):
File "F:\dpm\MedSegDiff-master-v2\v2\scripts\segmentation_sample.py", line 194, in
main()
File "F:\dpm\MedSegDiff-master-v2\v2\scripts\segmentation_sample.py", line 116, in main
sample, x_noisy, org, cal, cal_out = sample_fn(
File "F:\dpm\MedSegDiff-master-v2\v2\scripts..\guided_diffusion\gaussian_diffusion.py", line 566, in p_sample_loop_known
for sample in self.p_sample_loop_progressive(
File "F:\dpm\MedSegDiff-master-v2\v2\scripts..\guided_diffusion\gaussian_diffusion.py", line 651, in p_sample_loop_progressive
out = self.p_sample(
File "F:\dpm\MedSegDiff-master-v2\v2\scripts..\guided_diffusion\gaussian_diffusion.py", line 446, in p_sample
out = self.p_mean_variance(
File "F:\dpm\MedSegDiff-master-v2\v2\scripts..\guided_diffusion\respace.py", line 90, in p_mean_variance
return super().p_mean_variance(self._wrap_model(model), *args, **kwargs)
File "F:\dpm\MedSegDiff-master-v2\v2\scripts..\guided_diffusion\gaussian_diffusion.py", line 325, in p_mean_variance
self._predict_xstart_from_eps(x_t=x, t=t, eps=model_output)
File "F:\dpm\MedSegDiff-master-v2\v2\scripts..\guided_diffusion\gaussian_diffusion.py", line 350, in _predict_xstart_from_eps
assert x_t.shape == eps.shape
AssertionErrorI print x_t.shape and eps.shape, and result is like this: x_t.shape= torch.Size([1, 1, 64, 64]) eps.shape= torch.Size([1, 2, 64, 64])
I suppose to use the right dataset step by step in Readme.md. The is totally the same as . After clipping eps to by deleting either of them, program can work. I can't understand why their shapes are not consistant. Therefore, I can't figure out whether I can get the right answer by simple clipping conducted by myself without theory support.
eps[:, 0, :, :]``eps[:, 1; :, :]``[1,1,64,64]
Hello! I have encountered a type-related issue with the ISIC dataset. Specifically, I'm getting the following error:
"assert x_t.shape == eps.shape
AssertionError"
Could you please help me identify which line of code needs to be modified to make the project run successfully?
from medsegdiff.
Has it been resolved? I encountered the same problem
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.