Anatomy-constrained self-supervised learning: We used a 2D U-Net [1]} to build a multi-tasking model as shown in Fig. REF , since U-Net is one of the most successful architectures for medical image segmentation tasks [2]}. The multi-tasking model consists of a U-Net backbone (\(F_{Seg}\) ) for segmenting the fiber regions/bundles and an auxiliary classification arm (\(F_{Class}\) ) for discriminating fiber patches from background patches. We provided randomly sampled RGB patches of size 256 \(\times \)  256 \(\times \)  3 as input. \(F_{Class}\)  is connected to the bottleneck of the encoder of \(F_{Seg}\) , where the feature maps are passed through a downsampling module followed by two fully connected layers (fc1024, fc256) and an output layer with 2 nodes (fiber bundle vs background). The downsampling module consists of 2 max-pooling layers, each followed by two 3 \(\times \)  3 convolution layers to extract high-level global features in the patches. We used focal loss (eqn. REF ) for training \(F_{Seg}\) , since it handles class imbalance well [3]}. The focal loss is given by:
