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

Hello, may I ask how to disable left and right image enhancement in the V2 ? #2654

Open
goodsave opened this issue Dec 23, 2024 · 6 comments
Assignees

Comments

@goodsave
Copy link

goodsave commented Dec 23, 2024

Hello, may I ask how to disable the left and right mirror flipping enhancement in the V2 ?

@goodsave
Copy link
Author

When training on data that only labels the left breast and not the right breast, if left and right mirror flipping enhancement is enabled, the prediction will lead to the problem of left and right crosstalk. How can I close it in the new version?

@oonatmai
Copy link

I think you can use nnUNetTrainer_onlyMirror01 in the nnunetv2/training/nnUNetTrainer/variants/data_augmentation/nnUNetTrainerNoMirroring.py
I also had the same problem with left/right mirroring in my task, and using this solved my problem.

@goodsave
Copy link
Author

goodsave commented Dec 25, 2024

I think you can use nnUNetTrainer_onlyMirror01 in the nnunetv2/training/nnUNetTrainer/variants/data_augmentation/nnUNetTrainerNoMirroring.py I also had the same problem with left/right mirroring in my task, and using this solved my problem.

Thank you for your help. May I ask if nnUNetTrainer_onlyMirror01 is used for: not enabling left and right mirroring, but enabling up and down, as well as Z-axis mirroring?

@oonatmai
Copy link

Thank you for your help. May I ask if nnUNetTrainer_onlyMirror01 is used for: not enabling left and right mirroring, but enabling up and down, as well as Z-axis mirroring?

Based on their source code, I think it is. By default nnUNetTrainer_onlyMirror01 flips along axes (0, 1) in 3D (and (0,) in 2D). In many medical image formats where the axes convention is z,y,x, flipping (0, 1) would mean flipping z and y but not x, which often corresponds to “no left-right flip, but allowing up-down and slice-axis flips.
If you don't want mirroring at all, I think you can use the nnUNetTrainerNoMirroring class, it sets mirror_axes = None.

@zhengxiaolin555
Copy link

感谢您的帮助。请问nnUNetTrainer_onlyMirror01是否用于:不启用左右镜像,但启用上下以及 Z 轴镜像?

根据他们的源代码,我认为是的。默认情况下,在 3D 中沿轴 (0, 1) 翻转(在 2D 中沿轴 (0,)翻转)。在许多轴约定为 z,y,x 的医学图像格式中,翻转 (0, 1) 意味着翻转 z 和 y,而不是 x,这通常对应于“没有左右翻转,但允许上下和切片轴翻转。如果你根本不想要镜像,我想你可以使用 class 来设置它nnUNetTrainer_onlyMirror01``nnUNetTrainerNoMirroring``mirror_axes = None.

How do I use nnUNetTrainer_onlyMirror01? I am a beginner and relatively inexperienced.

@zhengxiaolin555
Copy link

当对只标注左乳房而不标注右乳房的数据进行训练时,如果开启了左右镜像翻转增强,预测会导致左右串扰问题。如何在新版本中关闭它?
How did you solve this problem and what code needs to be changed to use nnUNetTrainer_onlyMirror01?

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

4 participants