Source-linked AI summary
AxonDeepSeg: automatic axon and myelin segmentation from microscopy data using convolutional neural networks
Aldo Zaimi, Maxime Wabartha, Victor Herman, Pierre-Louis Antonsanti, Christian Samuel Perone, Julien Cohen-Adad
TL;DR
High-resolution imaging of axons and myelin could help researchers study demyelination and test therapies. AxonDeepSeg uses deep learning to segment these structures, and its models generalized across species and contrast changes with a lowest pixel-wise accuracy of 81%.
Problem
High-resolution imaging of axons and myelin could help researchers understand demyelination and test therapeutic drugs.
Source: Introduction · p. 1Method
AxonDeepSeg is an open-source deep-learning framework for automatic axon and myelin segmentation, with ready-to-use SEM and TEM models and a training pipeline for new modalities.
Source: Introduction · p. 2Results
81% was the lowest pixel-wise accuracy observed, and the trained SEM and TEM models were robust across species and contrast changes.
Source: Performance metrics · p. 12Takeaways & Limitations
Morphological metrics extracted from a full rat spinal cord slice were overall consistent with known anatomy.
Source: Performance metrics · p. 12AxonDeepSeg was trained and tested on healthy tissue, so its performance on demyelinated microscopy samples remains to be assessed.
Source: Future perspectives · p. 13
Abstract
from arXiv · showhide
Segmentation of axon and myelin from microscopy images of the nervous system provides useful quantitative information about the tissue microstructure, such as axon density and myelin thickness. This could be used for instance to document cell morphometry across species, or to validate novel non-invasive quantitative magnetic resonance imaging techniques. Most currently-available segmentation algorithms are based on standard image processing and usually require multiple processing steps and/or parameter tuning by the user to adapt to different modalities. Moreover, only few methods are publicly available. We introduce AxonDeepSeg, an open-source software that performs axon and myelin segmentation of microscopic images using deep learning. AxonDeepSeg features: (i) a convolutional neural network architecture; (ii) an easy training procedure to generate new models based on manually-labelled data and (iii) two ready-to-use models trained from scanning electron microscopy (SEM) and transmission electron microscopy (TEM). Results show high pixel-wise accuracy across various species: 85% on rat SEM, 81% on human SEM, 95% on mice TEM and 84% on macaque TEM. Segmentation of a full rat spinal cord slice is computed and morphological metrics are extracted and compared against the literature. AxonDeepSeg is freely available at https://github.com/neuropoly/axondeepseg
Introduction
AxonDeepSeg is an open-source deep-learning framework for automatic segmentation of axons and myelin sheaths, with ready-to-use SEM and TEM models and a documented pipeline for training models for new modalities. It targets reliable analysis of densely packed axons, which can yield metrics such as axon density and myelin thickness.
Introduction
- Because 1 mm^2 of white matter can contain over 100,000 axons, reliable automatic segmentation is important for extracting measures such as axon density and myelin thickness.High-resolution histology could help investigate demyelination and test therapies, as well as validate MRI biomarkers of myelin.Source: Introduction · p. 1
- Traditional methods—including thresholding and morphological operations [8,9], shape-based discrimination [10], watershed [11,12], region growing [13], and active contours [14,15]—can be modality-specific, require manual steps, underuse image context, and are often unavailable publicly.Source: Introduction · p. 2
- CNNs can learn image features, segment axons and myelin as separate labels in one network without explicit pre- or postprocessing, adapt across modalities, and predict in seconds once trained.The introduction presents U-Net as an architecture combining context and localization for medical segmentation.Source: Introduction · p. 2
- Prior deep-learning work either used a CNN only to classify candidates after optical-image clustering [24] or reported up to 82% pixel-wise accuracy with a light-microscopy-specific, unavailable model using minimal regularization [25].Source: Introduction · p. 2
- AxonDeepSeg combines a CNN for semantic segmentation of axons and myelin with ready-to-use SEM and TEM models, a training pipeline for new modalities, and free, open-source code.The ready-to-use models are intended to accommodate varied species and acquisition parameters.Source: Introduction · p. 2
Methods · Dataset
The dataset spans SEM and TEM microscopy at multiple acquisition resolutions, with modality-specific training and test samples covering rat and human spinal cord and mouse and macaque brain.
Dataset
- Acquisition resolutions varied to increase dataset variability and improve model generalization: 0.05–0.18 µm for SEM and 0.002–0.009 µm for TEM.Source: Dataset · p. 2
- SEM samples were stained with 2% osmium, embedded in epoxy, polished, and imaged using the same Jeol 7600F SEM system.Source: Dataset · p. 2
- TEM images came from mice brain splenium samples as described in 26, and a macaque corpus callosum sample was added to the test set.Preparation and imaging procedures are described in 7.Source: Dataset · p. 2
- Rat experimental protocols were approved by the Montreal Heart Institute committee; human spinal cord procedures were conducted at the University of Quebec at Trois-Rivieres anatomy laboratory.The spinal cord donor gave informed consent, and procedures were approved by local ethics committee SCELERA-15-03-pr01.Source: Dataset · p. 2
- Collaborator-shared TEM images were obtained under ethics approvals from the New York University School of Medicine animal care committee for mice and the Montreal Neurological Institute animal care committee for macaque.Source: Dataset · p. 3
- SEM training used rat spinal cord samples, with testing on rat and human spinal cord; TEM training used mice brain samples, with testing on mice and macaque brain.Table 1 also reports image counts, species, tissue type, pixel size, field of view, and tissue preparation for each sample.Source: Table 1 · p. 3
Gold standard labelling
Gold-standard axon and myelin masks were created using modality-specific workflows and cross-checked by at least two researchers.
- For SEM, myelin inner and outer contours were manually segmented, enclosed regions filled as axons, and masks manually corrected when necessary.Source: Gold standard labelling · p. 3
- For TEM, myelin was segmented by intensity thresholding and manual correction, then the inner region was filled to create axon labels.Source: Gold standard labelling · p. 3
- All labels were cross-checked by at least two researchers and encoded as background=0, myelin=127, and axon=255.Figure 1 shows 512×512-pixel samples, with SEM pixel size 0.1 µm and TEM pixel size 0.01 µm; SEM images vary in contrast, noise, and sample preservation.Source: Gold standard labelling · p. 3, Figure 1 · p. 4
Pipeline overview
AxonDeepSeg uses a four-step pipeline—data preparation, learning, evaluation, and prediction—to prepare microscopy data, train and test a model, and segment new images.
Data preparation
- The four-step pipeline resamples images and labels to 0.1 µm/pixel for SEM or 0.01 µm/pixel for TEM, then divides them into 512×512 patches.Patch size was chosen to include around 15–75 axons; standardization and histogram equalization were applied patch-wise.Source: Pipeline overview · p. 4, Figure 2 · p. 5
- Patches are randomly split about 70/30% into training and validation sets, while full test images are randomly selected for evaluation.Source: Pipeline overview · p. 5, Figure 2 · p. 5
Learning and evaluation
- The training/validation data train the network, and the trained model’s performance is evaluated on the test dataset.Source: Pipeline overview · p. 5, Figure 2 · p. 5
Prediction
- For prediction, images are resampled to the model’s pixel size, patched, segmented, stitched to native size, and resampled to native resolution using bilinear interpolation.Source: Pipeline overview · p. 5, Figure 2 · p. 5
Architecture of the network · Data augmentation strategy
The SEM and TEM models use U-Net-inspired encoder–decoder CNNs with three-class pixel-wise prediction, while input-patch augmentation is used to reduce overfitting and improve generalization. The models differ in convolutional depth and parameter count.
Architecture of the network
- The U-Net-inspired architecture combines a contracting path with an expanding path, concatenating features to combine context and localization for three-class pixel-wise classification.Downsampling uses stride-2 convolutions; up-convolutions use bilinear interpolation followed by convolution.Source: Architecture of the network · p. 5, Figure 3 · p. 6
- The SEM network uses 3 convolutional layers per block, whereas the TEM network uses 2; their first-block kernels are 5×5 and remaining-block kernels are 3×3.The passage says these architectural choices were based on preliminary optimizations.Source: Architecture of the network · p. 5, Figure 3 · p. 6
- The networks start with 16 feature channels, double channels after each contracting block, and decrease them at the same rate during expansion; convolutional activations are ReLU.The final layer before prediction uses a 3-class softmax for axon, myelin, and background.Source: Architecture of the network · p. 5, Figure 3 · p. 6
- The SEM and TEM networks have 1,953,219 and 1,552,387 trainable parameters, respectively.Source: Architecture of the network · p. 5
Data augmentation strategy
- Input patches are augmented to reduce overfitting and improve generalization.The strategy applies random shifting, rotation, rescaling, flipping, blurring, and elastic deformation.Source: Data augmentation strategy · p. 5
- The augmentation strategy includes random shifting, rotation, rescaling, flipping, blurring, and elastic deformation.Table 2 summarizes the strategy and its corresponding parameters.Source: Data augmentation strategy · p. 5
Training procedure · Inference procedure
AxonDeepSeg uses overlapping 512×512-pixel patches at inference to reduce border errors, while training combines augmentation with a decayed learning rate, regularization, and spatially weighted loss.
Training procedure
- Training minimized spatially weighted multi-class crossentropy with Adam, using spatial weights to correct class imbalance.Training used a batch size of 8 patches, each 512×512 pixels.Source: Training procedure · p. 6
- The learning rate started at 0.001 and decayed polynomially with power 0.9 over 200 epochs, when training stopped.Samples were shuffled at the start of each epoch.Source: Training procedure · p. 6
- Batch normalization preceded each activation, with momentum exponentially decayed from 0.7 to 0.9 for quicker early convergence and stable later training.The early momentum setting kept few samples for batch normalization.Source: Training procedure · p. 6
- A 0.25 dropout rate in convolutional layers and shifting, rotation, rescaling, flipping, blurring, and elastic deformation were used to reduce overfitting and increase variability.The listed transformations were applied to training patches.Source: Training procedure · p. 6, Table 2 · p. 7
- Training took 86 minutes on an NVIDIA P100 GPU.The network was trained using the Adam optimizer.Source: Training procedure · p. 6
Inference procedure
- At inference, 512×512-pixel patches overlap by d = 25 pixels, and only a smaller central region is output to avoid border-related errors.The inference window shifts by the size of the output region to cover the full image.Source: Inference procedure · p. 7, Figure 4 · p. 7
Hyperparameter optimization
The authors used grid searches to tune model architecture and training hyperparameters against validation accuracy and error. They also jointly optimized batch-normalization momentum with its decay period.
- Architecture searches jointly optimized layer count, filter count, and convolutional kernel size against validation accuracy and error.Source: Hyperparameter optimization · p. 7
- Starting learning rate and batch-normalization momentum were jointly tuned because they affect convergence time and validation-metric stability.Source: Hyperparameter optimization · pp. 7–8
- Batch-normalization momentum and its decay period were jointly optimized.Source: Hyperparameter optimization · p. 8
Evaluation method
Evaluation assessed segmentation quality with Dice and pixel-wise accuracy, and myelinated-fiber detection with centroid-based sensitivity and precision. Dice was computed separately for axon and myelin masks, while pixel-wise accuracy combined axon, myelin, and background classification.
Evaluation method
- Testing used Dice for axon and myelin, pixel-wise accuracy, and sensitivity and precision to assess detection of true and false axonal fibers.The metrics assess segmentation quality and the capability to detect true axonal fibers and avoid false ones.Source: Evaluation method · p. 8
Segmentation metrics
- Segmentation quality was measured with Dice separately for axon and myelin predictions against gold-standard masks, plus pixel-wise accuracy over correctly classified axon, myelin, and background pixels.Pixel-wise accuracy is the ratio of correctly classified pixels to all pixels in the test sample.Source: Segmentation metrics · p. 8
Detection metrics
- Myelinated-fiber detection sensitivity and precision were computed from axon-object centroid positions using true positives, false positives, and false negatives.True positives are axons present in both prediction and gold standard; false positives occur only in prediction, and false negatives only in the gold standard.Source: Detection metrics · p. 8
Data availability
Some study datasets are publicly available through the White Matter Microscopy Database, while the remainder can be requested from the corresponding author.
- Some datasets are available in the White Matter Microscopy Database repository; remaining datasets are available from the corresponding author on reasonable request.Source: Data availability · p. 8
Results
AxonDeepSeg produced segmentation outputs across SEM and TEM samples and was applied to a full rat spinal cord slice. The study also extracted white-matter morphometric maps and compared them with known spinal cord anatomy.
Segmentation
- Segmentation showed good overall agreement with gold-standard masks across rat and human SEM and mouse and macaque TEM samples, with discrepancies linked to atypical myelin structure, uneven myelin thickness, and atypical axon intensity.Table 3 reports axon Dice, myelin Dice, pixel-wise accuracy, sensitivity, and precision, but the supplied passage does not give their values.Source: Figure 5 · p. 9, Segmentation · p. 9, Table 3 · p. 10
- AxonDeepSeg segmented a full rat cervical spinal cord SEM slice, with the zoomed region showing smaller axons around 1.75 µm and larger axons around 2.5 µm.The full-slice segmentation demonstrates application to large-scale microscopy.Source: Segmentation · p. 9, Figure 6 · p. 10
Morphometrics extraction
- Extracted metrics included mean and standard deviation of equivalent axon diameter, axon density, axon and myelin volume fractions, and g-ratio, estimated as √(1/(1+MVF/AVF)) [7].Axon diameter was computed from each axon's area; a binary mask retained white-matter pixels for the reported maps.Source: Morphometrics extraction · pp. 10–11
- Morphometric maps agreed with known anatomy: the corticospinal tract showed axons around 1 µm, density around 200,000 axons/mm2, and g-ratio around 0.6; larger axons occurred near the spinal cord periphery.The maps were generated from segmentation masks downsampled to 50×50 µm2; white-matter metrics were compared with rat spinal cord tract references33–35.Source: Morphometrics extraction · pp. 10–11, Figure 7 · p. 11
Discussion
The discussion presents AxonDeepSeg as a deep-learning framework for axon and myelin segmentation, addressing model resampling, performance, morphological metrics, software, and future directions.
Resampling
- The SEM and TEM models target 0.1 µm/pixel and 0.01 µm/pixel, respectively, with inference images resampled to each model’s resolution.Joint SEM–TEM training performed worse than modality-specific models, amid large resolution differences and distinct tissue textures, including subcellular detail visible in TEM.Source: Resampling · p. 12
Performance metrics
- SEM pixel-wise accuracy was 85%–88% on rat and 81% on human; TEM accuracy exceeded 94% on mice, with sensitivity and precision around 96%.Performance was also good on macaque, although its myelin sheaths were slightly underestimated; myelin Dice was lower than axon Dice in both models and all test samples, reflecting two ambiguous myelin boundaries. The authors attribute lower human-set performance to contrast, quality, and noise differences, and suggest morphology- or conditional-random-field post-processing for ambiguous or atypical structures.Source: Performance metrics · p. 12
- On a full rat cervical spinal cord slice, extracted metrics matched known tract anatomy, and G-ratio ranged from 0.5 to 0.75.The ventral spinothalamic and spinocerebellar tracts contained large axons, corticospinal tract axons were smaller and denser, and cuneate fasciculus axons were larger than gracile fasciculus axons; this concordance supports documenting myelinated-fiber distributions and sizes.Source: Performance metrics · p. 12
Software
- AxonDeepSeg runs on Linux and Mac OS X, supports CPU inference, and is openly available with documentation and getting-started resources.Segmenting the full rat slice took about five hours on a 2.9 GHz Mac laptop; the authors also provide a Binder link and Jupyter notebook.Source: Software · p. 12
Future perspectives
- Future work includes ensemble methods and transfer learning, while assessing performance on demyelinated samples remains an open need.Ensembling may improve metrics but increases inference time; transfer learning may aid generalization to new modalities with small training sets. Current models were trained and tested on healthy tissue, while demyelination may alter sheath thickness and morphology.Source: Future perspectives · p. 13
- The authors aim to improve generalization with more collaborator data and develop models for optical microscopy and CARS.They cite the White Matter Microscopy Database’s open-access images and labeled gold standards, and encourage data sharing to advance segmentation methods.Source: Future perspectives · p. 13
Related papers
This paper cites
- Very Deep Convolutional Networks for Large-Scale Image Recognition2014
- U-Net: Convolutional Networks for Biomedical Image Segmentation2015
- Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift2015
- Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification2015