Learning precise segmentation of neurofibrillary tangles from rapid manual point annotations

Wait 5 sec.

IntroductionAccurate identification and quantification of neuropathological hallmarks such as neurofibrillary tangles (NFTs) may be crucial for advancing our knowledge of Alzheimer disease progression and developing effective interventions1. Convolutional Neural Networks (CNNs) and their variants have demonstrated remarkable capabilities for image recognition and segmentation2 tasks in the medical domain3. In neuropathology, deep learning on digitized whole slide images (WSIs) of brain tissue can automate detecting and quantifying distinct pathological features such as amyloid beta plaques4,5,6. This includes recognizing and quantifying the NFTs central to AD diagnosis and staging7,8,9,10. However, several challenges persist. Variability in staining techniques, tissue preparation, and imaging conditions across laboratories hinders the generalization of deep learning models11,12. Additionally, limited expert annotator bandwidth creates a scarcity of large, well-annotated datasets for neuropathologies. Previous studies addressing NFT and tau pathology quantification have required substantial annotation investments, employing approaches ranging from semi-automated color segmentation (Wurts et al.7 Dice: 0.611) to extensive manual pixel-level outlining (Signaevsky et al.8, F1: 0.81; Ingrassia et al.16, Dice: 0.77–0.83). While manual outlining produces high-quality ground truth, it demands hours per whole slide image, creating a practical bottleneck that prevents scaling to multi-institutional cohorts, which hampers consistency and reproducibility. This has encouraged research in label-efficient modeling strategies such as self-supervision, weak supervision, and multiple-instance learning13,14,15. The multi-class nature of tau pathology complicates this further. Studies have variably focused on either NFT subtypes — pre-NFTs, mature NFTs, and ghost tangles8—or labeled other lesions such as neuritic plaques16,17,18 or tufted astrocytes19,20. This heterogeneity in task definition makes cross-study comparisons difficult and complicates efforts to build consensus on best practices. Addressing these challenges is essential to deploy deep learning in neuropathology as consistent and reproducible analyses.Building on our deep-learning-based neuropathological image analysis research4,5,11,12,21, we introduce a unique open-source robust algorithm for automated detection, segmentation, and quantification of mature NFTs in the temporal lobe of AD brain tissue WSIs. Crucially, we develop a framework for automatically converting point-annotated NFTs to detailed ground-truth segmentation masks to maximize annotator bandwidth and harness active learning approaches more effectively. We leverage a carefully curated dataset from multiple Alzheimer’s Disease Research Centers (ADRCs) and employ a straightforward and reproducible modeling architecture to segment NFTs. The objective is to provide researchers with a freely accessible, efficient, and reliable tool and framework to enhance NFT burden quantification to ultimately advance our understanding of Alzheimer disease and other neurodegenerative diseases. Quantitative data on NFT burden can aid in more robust correlations to clinical, demographic, and other data collected.The model strongly correlates to expert-assigned WSI semi-quantitative scores on a 24-case hold-out set. These “CERAD-like” scores follow a scale for NFTs similar to that from the original CERAD criteria for neuritic plaques5,22. We present the methodology, including dataset curation, deep learning model architecture, evaluation metrics, and object detection benchmarks. We also discuss the approach’s clinical implications and potential benefits in the broader neuropathology research context of harnessing computational methods for more accurate and consistent analysis. Finally, we are among the first groups to publicly release our complete semantic segmentation and object detection pipelines, including code, datasets, and pre-trained models, enabling independent validation and reducing barriers to entry for other researchers.MethodsDataset curationCohort selectionWe obtained de-identified autopsy brain tissue samples devoid of personal identifiers and compliant with HIPAA regulations consistent with previous practices4,5,11,12,21,23. This study only utilized human post-mortem tissues and is not considered human subject research, as only living subjects are defined as Human Subjects under federal law (45 CFR 46, Protection of Human Subjects). For participants during life, ethical approval for this study was granted by the Columbia Institutional Review Board, the University of California San Diego Institutional Review Board, and the University of California Davis Institutional Review Board and was performed in accordance with the Declaration of Helsinki and other state/federal and institutional guidelines. At death, autopsies were performed after legal consent for autopsy was provided by appropriate family members. As the dataset originates from ADRCs, we consistently collected select data using standardized forms from the National Alzheimer’s Coordinating Center to ensure data integrity and consistency across cases24. The annotated dataset comprises a subset of 22 cases from 295 cases collected from three distinct Alzheimer’s Disease Research Centers (ADRCs): the University of California Davis ADRC, the Columbia ADRC, and the University of California San Diego ADRC, following published case-specific inclusion/exclusion criteria23. Both the training (n = 22 WSIs) and validation batches (n = 24 WSIs) were randomly sampled from the larger dataset of cases across the 3 ADRCs included in the study, whose source details have been published23. In this study, we used batches assigned by permuted block randomization within ADRC, gender, and ethnicity strata23. Table 1 reports this demographic information. These cases came from a diverse pool of research subjects recruited from various sources, including the practices of participating neurologists and community-based recruitment. The source publication delineates additional recruitment strategy information23. All cases met the pathological criteria for Alzheimer disease (AD), meeting NIA Reagan or NIA-AA intermediate/high criteria25,26.Table 1 Demographics grouped by dataset split.Full size tableHistology and slide-level assessmentsThis study used 5–7 μm formalin-fixed paraffin-embedded (FFPE) sections from the temporal cortex. These sections arose from designated anatomical regions available at each ADRC. Each ADRC prepared its FFPE sections, mounted the slides, and shipped unstained slides to the University of California Davis (UCD) for staining to minimize batch effects. As previously published23, we performed all antibody staining procedures under laboratory best practice standards, meeting Federal, State of California, and UC Davis guidelines and regulations. We used appropriate positive and negative controls for each antibody in each run.We stained temporal cortex slides with the AT8 antibody (1:1000, ThermoFisher Scientific Cat# MN1020, RRID: AB_223647). All slide sections were digitized, capturing whole slide images (WSI) using a Zeiss Axio Scan Z.1 microscope at 40x magnification, creating images with a 0.11 μm/pixel resolution saved in the proprietary Carl Zeiss (.CZI) format.An expert (BND) performed semi-quantitative histopathological assessments of NFTs on each WSI, blinded to demographic, clinical, and genetic information. The assessments followed semi-quantitative protocols outlined by the Consortium to Establish a Registry for Alzheimer’s Disease (CERAD)22. This protocol consisted of denoting the densest 1mm2 area of NFTs per WSI as none (no NFTs present), sparse (0–5 NFTs), moderate (6–20 NFTs), or frequent (greater than 20 NFTs).Data annotation (annotations version one)We used Zen Blue 3.2 software for WSI annotation. We visually explored the tissue and identified three regions of interest (ROIs), each measuring 10,680 × 21,236 pixels with a resolution of 0.11 microns per pixel. We designated two gray matter ROIs that spanned the entire cortical region and one ROI along the gray matter-white matter junction (e.g., Fig. 1a). The annotation process referred to the visualizations and descriptors outlined in Moloney et al. 20211 to determine whether a neuron met the criteria for being a neurofibrillary tangle. While Moloney et al. 2021 define criteria for identifying pre-tangles, mature tangles, and ghost tangles, we focused solely on marking mature tangles within a cell with a clearly defined nucleolus. The trained annotator (KN) meticulously scanned the ROI, looking for flame-shaped tangles that conformed to the shape of the respective neuron defined by a visible nucleolus.Fig. 1Full size imageNeurofibrillary tangle model annotation and training pipeline. (A) Representative slide with three regions of interest and their point-annotated NFTs. Processing steps are as follows: (B) Isolate rotated ROIs and transform global NFT coordinates to local coordinates. (C) Zoom to point annotation (right), isolate the DAB channel (middle), and apply morphological operations and Otsu thresholding to segment large “blobs” (left). (D) Apply a center bias to remove off-center NFT candidates, retaining a single blob per tile. (E) Stitch tiles into a single large ground truth mask for each ROI, replacing point annotations. (F) Generate class-balanced batches for training via random NFT and tile sampling from the ROI using an input tile size of 1024 × 1024 pixels. (G) Slice WSIs in a structured format with a stride equal to tile size. (H) Feed tiles into UNet with ResNet50 backbone to generate prediction masks. (I) Stitch tile predictions and overlay them onto the WSI to visualize the heatmap.We annotated neurofibrillary tangles that exhibited defined boundaries with smooth curves, contained a nucleolus, had AT8 staining filling the cell, were located in gray matter, and typically featured 1–2 protrusions. The NFT was marked at the nucleolus (Fig. 1b) if and only if it met all criteria; otherwise, it was left unmarked. Identifying the nucleolus with a cross marking ensured a consistent size and relative location, which was crucial for subsequent training. We used a clear-cut framework following a uniform NFT definition to enhance consistency in the automated detection model (Supp. Figure 1). A total of 1476 NFTs were annotated across the 74 ROIs.Datatype conversionWe converted the Carl Zeiss proprietary format images into the open-source Zarr file format to facilitate data analysis pipelines27. We loaded the highest resolution view of each WSI into an intermediary numpy28 array in memory and then saved it to disk in Zarr. We set the storage chunk size to 5000 pixels in X and Y dimensions. When images had multiple scenes, we separated them into distinct files with the same base name and a suffix indicating the corresponding scene (e.g., 1-343-Temporal_AT8_s1). The Carl Zeiss format’s native compression method (JPEG XR) saves disk space at the cost of read and write speed. We used a lossless compressor (Blosc-zstd, clevel = 5, bit shuffling enabled) that achieves significantly higher read and write speeds during WSI-level segmentation at the cost of disk space usage. Other users can change this compressor to suit their needs. We provide WSIs in the data repository in Zarr using the JPEG XR compression algorithm to reduce disk space and transfer bandwidth. Users will benefit from recompressing the files with the Blosc-zstd compressor for faster processing.Rotated ROI correctionAnnotated region of interest (ROI) orientations within WSIs were not guaranteed to align with slide or image edges. This introduced complexity when loading the ROI, as arrays require slicing along fixed columns and rows parallel to boundaries. Ensuring the isolation of the ROI was crucial to prevent the inadvertent introduction of non-annotated NFTs into the dataset while preserving the total count of manually annotated NFTs. We first sliced the minimum inscribing region around the rotated ROI to address this. Second, we used the skimage library’s transform.warp method to crop the ROI. We stored each corrected ROI as a Zarr file and attached its path to a custom WSIAnnotation Python object, which was saved to disk using the pickle format for easy downstream processing29.Point annotation to segmentation masksWe procedurally converted NFT point annotations to ground truth NFT pixel-boundary masks to train a semantic segmentation model. Bootstrapping point annotations into masks saves expert annotators time and scales to more annotations, facilitating efficient expert pathologist active-learning iterations. Additionally, this approach unlocks retrospective analysis for old datasets, reducing the annotation starting requirement from bounding boxes or masks to simple point annotations. Semantic segmentation enables detailed morphological analyses, WSI counts, and spatial distribution analyses of NFTs10.We began this procedure by cropping 400 × 400px tiles around each NFT in the dataset (Figs. 1c and 2a). We padded NFTs at the ROI boundary to ensure consistent centering of the NFT in the cropped tile. Each tile, centered on an NFT, underwent a custom conventional image-processing segmentation pipeline to generate a 400 × 400px binary mask. This pipeline involved color deconvolution using skimage’s color.rgb2hed method to convert the tile to HED color channels, followed by min-max normalization for enhanced diaminobenzidine (DAB) channel extraction30. The tile was then Otsu thresholded and binarized, followed by post-processing with morphological opening and closing operations31, isolating the AT8 immunohistochemically (IHC) stained tissue (Fig. 2b).Fig. 2Full size imageNFT point-to-mask pipeline detail. (A) We convert ROIs with human NFT point annotations to detailed segmentation masks. We do so by (B) generating 400 × 400 pixel tiles centered on the label, (C) applying color deconvolution, otsu thresholding, and morphological cleaning operations, and (D) performing blob detection with center-biasing and size filtering to obtain a mask. (E) We then stitch each mask into its corresponding location in the ROI via union operations.Certain tiles posed challenges, such as those having closely clustered NFTs or background noise due to the high density of phosphorylated tau protein in the surrounding tissue. To specifically segment the target NFT, we used skimage’s measure.label method to label contiguous regions of the IHC mask. Subsequently, we iteratively removed all labeled regions (blobs) whose center of mass was not within 80px of the tile’s center. This “center bias” segmentation procedure favored the NFT most centrally located within the tile. Finally, we identified the largest blob in this region, and we removed all other blobs