facebookresearch / fastMRI

A large-scale dataset of both raw MRI measurements and clinical MRI images.
https://fastmri.org
MIT License
1.3k stars 372 forks source link

Fixed normalisation in NormUnet to work when c != 2. Added optional `norm_per_coil` option. #161

Closed Timsey closed 3 years ago

Timsey commented 3 years ago

Could you clarify the use case a little bit more? We discussed earlier that the input to norm will always have a channel dimension of 2 due to the call of complex_to_chan_dim. Are you intending to call norm without this function?

A secondary item is that with the new parameter we should have a new unit test.

Originally yes, we discussed some use cases where the input to NormUnet itself is multi-coil, which requires this change.

complex_to_chan_dim only guarantees c is a multiple of 2, which is fine with the current example, because the input to NormUnet is always functionally single-coil (both in the sensitivity module and the refinement module).

Even if we only want to use functionally single-coil input though, the old version of the code was a bit confusing, because it didn't explicitly require that c == 2, but in fact would fail to broadcast correctly for c != 2.

mmuckley commented 3 years ago

@Timsey and I are closing this in favor of #163. For these features we may release a different model at some point.