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

Add batching capability for VarNet mask #152

Closed mmuckley closed 3 years ago

mmuckley commented 3 years ago

This adds batching capability for the VarNet mask. There is a bit of a question of how to handle cases where a sample is selected right next to the densely sampled region. To give an example, you may have R=4 and a densely-sampled region of 8. It's possible for one line of your R=4 to be next to the R=8 group. In that case, this code will select 9 lines for a batch size of 1. Using a batch size of greater than 1 introduces some randomness. The code is conservative and will generally pick 8 lines in that case.

One way to solve this might be to only allow even numbers of central k-space lines, which might give a bit more simplicity for this phenomenon. The effects are probably measurable, but small, considering this is just input to a neural network.

Note: we still expect this to only work in the magical scenario where all the k-space sizes are the same.