-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
CutMix transform breaking change in v1.4.0 #8137
Comments
Hi @maxime915, Thank you for reporting this issue! You're right—there is indeed a behavior change here. As I mentioned in the PR: #7813 (comment) In MONAI, we expect the same seed to be used across all keys in the dictionary-based version of the transforms. We didn’t include a specific note regarding this because the change aligns with the behavior of other transforms in MONAI, and we considered it an expected improvement. Apologies if this caused any confusion. Your report will help bring more attention to this change, and I’ll make sure to enhance the docstring in the class to better explain this behavior. Thanks again! |
Thank you for the prompt reply. There is one more thing I do not understand about this PR, can you help me ? I see that there were modification regarding the For clarity, here is a link to the implementation in v1.3.2 :
And here is a link to the implementation in v1.4.0 : MONAI/monai/transforms/regularization/array.py Lines 161 to 163 in 76ef9f4
|
Yes, that's what I mentioned here: #7813 (comment) |
Signed-off-by: YunLiu <[email protected]>
The behavior of the CutMix transform on labels was changed significantly from v1.3.2 to v1.4.0rc1. This change originates from #7813, in which I have left a comment, but I'm creating an issue to increase visibility.
Here is a script using the GlaS dataset.
Before, the label produced was a linear combination of the two labels.
In v1.4.0.rc1 (bottom) it is created similarly to the images.
The paper (https://arxiv.org/abs/1905.04899) mentioned in #2872 only describe how to transform a classification. While I have no authority on this subject, I believe the new implementation makes a lot more sense than the previous implementation.
However, warning users in a release note for this fixed bug / breaking change may be a good idea, if this change is to be kept.
Thank you for your consideration.
Environment
Ensuring you use the relevant python executable, please paste the output of:
For v1.4.0rc1
for v1.3.2
The text was updated successfully, but these errors were encountered: