Open araikes opened 2 weeks ago
@mattcieslak,
I can probably get this fixed if you let me know what the preferred approach for setting the window to go patch2self
is.
@ShreyasFadnavis Do you have an algorithm for picking a window size for patch2self?
Hi @mattcieslak - yes! I do have it in my new paper: https://openaccess.thecvf.com/content/CVPR2024/papers/Fadnavis_Patch2Self2_Self-supervised_Denoising_on_Coresets_via_Matrix_Sketching_CVPR_2024_paper.pdf
The new version of P2S will be available in DIPY soon, but till then a patch size of 0 should be good for all human brain data. If it's non-human brain data, going to a patch of [1, 1, 1] or higher is recommended. I'd just default to 0 in general.
May be worth it then to just hard-code that for now and restrict the dwi_denoise_window
parameter for use only with dwidenoise
(to avoid people incidentally setting the window to 5 and getting rather poor patch2self
results).
Using
v 0.22.1
, I went to use patch2self as the denoising method (which I've done for every QSIPrep version since 0.11) and got this:Looks like the issue is here, where
dwi_denoise_window
gets defined whenconfig.workflow.dwi_denoise_window == "auto") for
dwidenoisebut not for
patch2self`. Based on : https://github.com/PennLINC/qsiprep/blob/2967323a2e9634c18afa7a2b7e76048bed13a025/qsiprep/workflows/dwi/merge.py#L414-L418May need to either define
dwi_denoise_window
for thepatch2self
or passconfig.workflow.dwi_denoise_window
to the `Patch2Self`` node on L499