Skip to content

Add flexible unet for encoder-decoder structure#4801

Merged
wyli merged 21 commits into
Project-MONAI:devfrom
binliunls:4533-flexible-unet
Aug 12, 2022
Merged

Add flexible unet for encoder-decoder structure#4801
wyli merged 21 commits into
Project-MONAI:devfrom
binliunls:4533-flexible-unet

Conversation

@binliunls

@binliunls binliunls commented Aug 1, 2022

Copy link
Copy Markdown
Contributor

A flexible U-Net implements an encoder-decoder network. This network uses U-Net
as decoder and efficientnet-V1 family as encoder. The encoder type can be set
by passing parameters 'efficientnet-b0, ..., efficientnet-b7, efficientnet-l2'
to the initialize function.

Signed-off-by: binliu binliu@nvidia.com

Fixes #4533 .

Description

Add a new encoder-decoder defined network structure to monai. Currently the script is
the very beginning version of it and can only support U-Net as decoder and efficientnet-
V1 family as encoder.
Aim to make this more flexible and add more networks to it.

Status

Ready

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 --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

binliunls and others added 2 commits August 1, 2022 04:40
A flexible U-Net implements an encoder-decoder network. This network uses U-Net
as decoder and efficientnet-V1 family as encoder. The encoder type can be set
by passing parameters 'efficientnet-b0, ..., efficientnet-b7, efficientnet-l2'
to the initialize function.

Signed-off-by: binliu <binliu@nvidia.com>
@Nic-Ma Nic-Ma changed the title Add flexible unet. [WIP] Add flexible unet for encoder-decoder structure Aug 1, 2022
Comment thread monai/networks/nets/flexible_unet.py Outdated
Comment thread monai/networks/nets/flexible_unet.py Outdated
Comment thread monai/networks/nets/flexible_unet.py Outdated
@Nic-Ma

Nic-Ma commented Aug 9, 2022

Copy link
Copy Markdown
Contributor

/black

@Nic-Ma

Nic-Ma commented Aug 9, 2022

Copy link
Copy Markdown
Contributor

/build

@Nic-Ma

Nic-Ma commented Aug 9, 2022

Copy link
Copy Markdown
Contributor

Hi @binliunls ,

I think the error of CI is due to the image size in the tests.
Please use smaller input size < 100, like 32, 16. Don't use 128, 256 or 224, etc.

Thanks.

@Nic-Ma

Nic-Ma commented Aug 9, 2022

Copy link
Copy Markdown
Contributor

/build

@Nic-Ma Nic-Ma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me as the first version implementation.
We can add more backbone support in the following PRs.

Thanks.

Signed-off-by: binliunls <binliu@nvidia.com>
… into 4533-flexible-unet

update the repo to remote repo
@Nic-Ma

Nic-Ma commented Aug 10, 2022

Copy link
Copy Markdown
Contributor

/black

@Nic-Ma

Nic-Ma commented Aug 10, 2022

Copy link
Copy Markdown
Contributor

/build

1 similar comment
@Nic-Ma

Nic-Ma commented Aug 10, 2022

Copy link
Copy Markdown
Contributor

/build

Comment thread tests/test_flexible_unet.py
Signed-off-by: binliunls <binliu@nvidia.com>
@Nic-Ma

Nic-Ma commented Aug 10, 2022

Copy link
Copy Markdown
Contributor

/build

@Nic-Ma Nic-Ma marked this pull request as ready for review August 10, 2022 09:40
@Nic-Ma Nic-Ma changed the title [WIP] Add flexible unet for encoder-decoder structure Add flexible unet for encoder-decoder structure Aug 10, 2022
@Nic-Ma Nic-Ma requested review from ericspod and wyli August 10, 2022 09:41
@Nic-Ma Nic-Ma requested a review from rijobro August 10, 2022 09:41
@Nic-Ma

Nic-Ma commented Aug 10, 2022

Copy link
Copy Markdown
Contributor

Looks good to me now.
@wyli @ericspod , if you don't have other comments, I will merge this PR soon as it's P0 task for us.

Thanks in advance.

Comment thread tests/test_flexible_unet.py
Comment thread monai/networks/nets/flexible_unet.py Outdated
Comment thread monai/networks/nets/flexible_unet.py
Comment thread monai/networks/nets/flexible_unet.py Outdated
Comment thread monai/networks/nets/flexible_unet.py
binliunls and others added 4 commits August 11, 2022 07:28
Comment thread monai/networks/nets/flexible_unet.py Outdated
Comment thread monai/networks/nets/flexible_unet.py Outdated
binliunls and others added 6 commits August 12, 2022 14:41
Signed-off-by: binliu <binliu@nvidia.com>
…e the dim parameter of segmentation head to spatial_dims.

Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
… to fit encoder features

Signed-off-by: binliu <binliu@nvidia.com>
Signed-off-by: binliu <binliu@nvidia.com>
@wyli

wyli commented Aug 12, 2022

Copy link
Copy Markdown
Contributor

/build

@wyli wyli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, it looks good to me. I'll merge this pr if all tests work fine.

@wyli wyli enabled auto-merge (squash) August 12, 2022 09:00
@wyli wyli merged commit e462467 into Project-MONAI:dev Aug 12, 2022
@binliunls binliunls deleted the 4533-flexible-unet branch October 21, 2022 13:31
@ibro45

ibro45 commented May 30, 2023

Copy link
Copy Markdown
Contributor

#6562

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.

Flexible UNet implementation with backbones

5 participants