Skip to content

ResNet#2253

Merged
wyli merged 10 commits intoProject-MONAI:devfrom
Douwe-Spaanderman:add-resnet
Jun 1, 2021
Merged

ResNet#2253
wyli merged 10 commits intoProject-MONAI:devfrom
Douwe-Spaanderman:add-resnet

Conversation

@Douwe-Spaanderman
Copy link
Copy Markdown
Contributor

Description

ResNet implementation with 1D, 2D or 3D convolutions for classification. based on https://github.com/kenshohara/3D-ResNets-PyTorch/blob/master/models/resnet.py . Implementation contains resnet10, 18, 34, 50, 101, 152, 200. Current endpoint is fully connected for classification however backbone can also be used for other purposes (i.e. opt not to use fc layer).

Backbone pre-trained by 23 medical datasets based on this paper: "Med3D: Transfer Learning for 3D Medical Image Analysis" (https://arxiv.org/pdf/1904.00625.pdf). Only available for 3D convolutions.

Possible option to add 2+1D (pseudo-3D) convolution setting.

There are no breaking changes as this is a new feature.

Status

Ready/Work in progress/Hold

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@wyli wyli requested a review from yiheng-wang-nv May 26, 2021 18:52
@wyli
Copy link
Copy Markdown
Contributor

wyli commented May 26, 2021

@Douwe-Spaanderman Douwe-Spaanderman force-pushed the add-resnet branch 4 times, most recently from 323b865 to f65c7f1 Compare May 27, 2021 08:01
Signed-off-by: Douwe Spaanderman <[email protected]>
Signed-off-by: Douwe Spaanderman <[email protected]>
Signed-off-by: Douwe Spaanderman <[email protected]>
Signed-off-by: Douwe Spaanderman <[email protected]>
Signed-off-by: Douwe Spaanderman <[email protected]>
Signed-off-by: Douwe Spaanderman <[email protected]>
@Douwe-Spaanderman
Copy link
Copy Markdown
Contributor Author

Sorry it took a little while longer to address the coding style issues.

I was also wondering if I could address some issues I am currently facing with pretraining the network. Personally I would like to implement loading the state dict from the paper "Med3D: Transfer Learning for 3D Medical Image Analysis" (https://github.com/Tencent/MedicalNet), I think this closer resamples the issues monai tries to solve, and I receive better performances for my datasets with this pretrained network vs others (i.e. https://github.com/kenshohara/3D-ResNets-PyTorch).
Problem however is that medicalnet doesn't provide a url download for the state dict only, it only provides a downloadable, 2.7 Gb, zip file which include all pretrained networks and testing data. As I don't want to download the whole zip if someone wants to use a pretrained model, does monai have a zoo storage somewhere for pretrained weights for me to store individual state dicts? Or would you prefer if I would implement the pretrained weights on non medical images? Or no pretraining option at all?

Thank you in advance for your response!

Signed-off-by: Douwe Spaanderman <[email protected]>
@wyli
Copy link
Copy Markdown
Contributor

wyli commented Jun 1, 2021

thanks, this PR is ready to go now. for the pretrained flag, could you please make it raise NotImplementedError("Currently not implemented, see comments in source code") for now? let me create a separate ticket for it and discuss with the monai team soon

Signed-off-by: Douwe Spaanderman <[email protected]>
Copy link
Copy Markdown
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@wyli wyli enabled auto-merge (squash) June 1, 2021 11:34
@wyli wyli changed the title [WIP] ResNet ResNet Jun 1, 2021
@wyli wyli merged commit 2f60799 into Project-MONAI:dev Jun 1, 2021
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

Successfully merging this pull request may close these issues.

2 participants