Methods for neural-network-based segmentation of magnetic resonance images