Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dncnn "3d"? #3

Open
franzpx125 opened this issue Jan 24, 2022 · 4 comments
Open

dncnn "3d"? #3

franzpx125 opened this issue Jan 24, 2022 · 4 comments

Comments

@franzpx125
Copy link

Hi Allard,

it seems to me that the "msd" approach works in a pure 3D fashion (by setting n_dim=3 when instantiating MSDRegressionModel). Could it be possible to have something similar for "dncnn"? I know that processing becomes prohibitively slow but it would be interesting to test the approach.

Thanks!

@ahendriksen
Copy link
Owner

Hi Francesco,

That is certainly possible! The simplest way would be to copy the dncnn file and replace the nn.Conv2d calls with nn.Conv3d. For instance, here and on lines 30, and 38.

Beware though, that it is very likely that the method will run out of memory! Counter-intuitively, UNet is slightly more efficient in 3D because a substantial part of the processing takes place on downsampled images/volumes, which require substantially less memory.

@franzpx125
Copy link
Author

Ok. I'll give it a go. Should I change also line 36 from nn.BatchNorm2d to nn.BatchNorm3d?

@ahendriksen
Copy link
Owner

Ok. I'll give it a go. Should I change also line 36 from nn.BatchNorm2d to nn.BatchNorm3d?

Yes, definitely. Good catch!

@franzpx125
Copy link
Author

Ok. Thanks! I'm gonna try...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants