Skip to content

2203 Add SaveClassifcation transform#2204

Merged
wyli merged 13 commits intoProject-MONAI:devfrom
Nic-Ma:2203-add-saveclassifcation
May 18, 2021
Merged

2203 Add SaveClassifcation transform#2204
wyli merged 13 commits intoProject-MONAI:devfrom
Nic-Ma:2203-add-saveclassifcation

Conversation

@Nic-Ma
Copy link
Copy Markdown
Contributor

@Nic-Ma Nic-Ma commented May 17, 2021

Fixes #2203 .

Description

This PR added the SaveClassification transform to decouple with ignite handler, non-breaking change.

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

@Nic-Ma Nic-Ma marked this pull request as ready for review May 17, 2021 10:41
@Nic-Ma Nic-Ma changed the title [WIF] 2203 Add SaveClassifcation transform 2203 Add SaveClassifcation transform May 17, 2021
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented May 17, 2021

Hi @wyli @rijobro ,

To follow the same API patten, I used meta_key_postfix arg in this transform, but actually, the pred data usually doesn't have the corresponding pred_meta_dict. So to use this transform, we must use CopyItemD to copy the meta data from image_meta_dict to pred_meta_dict first (Just what the unit test did).
Maybe it's better to use meta_key as arg in this transform? So users can set meta_key="image_meta_dict".
Actually, the benefit of meta_key_postfix is to execute on several keys together, all the keys have the same meta_key_postfix. This SaveClassificationd transform can only work for 1 key because it will save data into a single file, multiple keys will generate a mass in the file, so no need this benefit.

We have the same problem with SaveImageD transform, but it can save several keys together, I am not sure whether we need to change it.

What do you think?

Thanks.

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented May 17, 2021

/black

@Nic-Ma Nic-Ma requested review from ericspod, rijobro and wyli May 17, 2021 13:53
@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented May 18, 2021

/black

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented May 18, 2021

I added both meta_key and meta_key_postfix args after offline discussion.
@wyli @rijobro , could you please help review it?

Thanks.

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented May 18, 2021

/black

@Nic-Ma
Copy link
Copy Markdown
Contributor Author

Nic-Ma commented May 18, 2021

/black

@wyli wyli merged commit bb08ea4 into Project-MONAI:dev May 18, 2021
@Nic-Ma Nic-Ma deleted the 2203-add-saveclassifcation branch July 2, 2021 23:36
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.

Develop post transform to save classification results

4 participants