Efficient image analysis for large-scale next generation histopathology using pAPRica

Jules Scholler, Joel Jonsson, Tomás Jordá-Siquier, Ivana Gantar, Laura Batti, Bevan L. Cheeseman, Stéphane Pagès, Ivo F. Sbalzarini, Christophe M. LamybioRxiv 2023 · DOI

TL;DR

Next-generation histology generates massive datasets that are computationally prohibitive to analyze. This paper introduces pAPRica, a novel pipeline leveraging Adaptive Particle Representation (APR) to dramatically reduce data size and accelerate processing, enabling efficient analysis of petascale histology images on standard hardware.

What Problem Does This Paper Address?

Modern histopathology techniques, like large-scale volumetric microscopy, generate terabytes to petabytes of imaging data. This sheer volume poses a significant bottleneck for researchers and clinicians, making it difficult to process, analyze, and gain insights from these rich datasets in a timely manner. Traditional image analysis workflows are simply not equipped to handle this scale, requiring weeks of computation even on high-performance computing clusters. This limits the ability to conduct large cohort studies, repeat experiments, or achieve practical turnaround times for clinical diagnostics. The core problem is the mismatch between the data generation capabilities of advanced imaging and the computational capacity of existing analysis tools.

Methods

The heart of pAPRica is the Adaptive Particle Representation (APR). Unlike traditional voxel-based representations, APR adapts its sampling density based on the information content of the image. This means it uses lower resolution for uniform or "flat" regions (which often constitute the majority of voxels in fluorescence microscopy) and higher resolution only where there's significant detail. This content-adaptive approach leads to substantial data size reduction (orders of magnitude) and, crucially, accelerates downstream processing.

pAPRica integrates several key modules built around APR:

  • Conversion: Tiles are converted to their APR representation upon acquisition, with parameters automatically determined.
  • Stitching: A volume stitching module aligns and merges individual tiles. This is performed on APR data, with a 2D phase cross-correlation step on reconstructed projections for alignment.
  • Segmentation: A particle classification strategy using 3D filters and a random forest classifier is applied directly to the APR data. A novel merging strategy is employed to handle objects that span across tile boundaries without merging the APR data itself.
  • Registration and Mapping: The pipeline supports registration to atlases (e.g., the Allen Mouse Brain Atlas) by lazily reconstructing APRs at the required resolution.
  • Visualization: A Napari plugin is provided for displaying APR volume images, with a lazy loader that allows reconstructing sub-volumes without loading the entire dataset into memory.

Datasets

The paper evaluates pAPRica on two primary datasets:

  1. Mouse Brain Dataset: A full mouse brain dataset (2 channels, 9x8 tiles) acquired using a clarity-optimized light sheet microscope. This dataset was used to demonstrate stitching, segmentation, and registration to the Allen Mouse Brain Atlas.
  2. Human AD Brain Sample: A large human brain block (1.7x2.7x0.3 cm) from an Alzheimer's disease patient, stained for microglia and amyloid-beta (Aβ) plaques. This dataset was used to showcase the pipeline's applicability to human pathology and its scalability.
  3. Petascale Synthetic Dataset: A synthetic dataset of 1126 TB was created to specifically test the scalability of pAPRica to petabyte-scale data. This dataset was generated by creating a large tile with periodic conditions and then copying it to simulate a tiled acquisition.

Key Insights and Ideas

  • APR as a Game-Changer for Histopathology: The core insight is that APR is not just a compression technique but a fundamental shift in how large-scale imaging data can be represented and processed. Its content-adaptive nature directly addresses the "curse of dimensionality" in modern microscopy.
  • "Real-time" Analysis is Now Achievable: By drastically reducing data size and accelerating computations, pAPRica enables researchers to visualize and gain insights into their data during acquisition, a significant departure from the weeks-long delays previously experienced.
  • Scalability to Petabytes on Standard Hardware: The demonstration with the synthetic dataset is crucial. It shows that petascale analysis is no longer confined to supercomputing clusters but can be tackled on a regular workstation, democratizing access to advanced image analysis.
  • APR-Native Processing is Efficient and Accurate: The paper strongly suggests that processing directly on APR data, rather than reconstructing to voxels first, leads to significant speedups without compromising accuracy, as validated by segmentation comparisons.
  • Modular Pipeline for Comprehensive Analysis: pAPRica isn't just one algorithm; it's a suite of tools that cover the entire analysis workflow from raw data to atlas mapping and visualization, making it a practical solution.

Key Results

  • Data Size Reduction: The APR representation required 115 times less storage for the mouse brain dataset and 117 times less for the human AD brain sample compared to raw voxel data.
  • Processing Speedup:
    • Stitching the mouse brain dataset took 55 seconds with pAPRica, compared to potentially weeks for traditional methods.
  • Segmentation saw a >60-fold increase in processing speed compared to voxel-based analysis.
  • Registration to the Allen Mouse Brain Atlas took seconds instead of hours.
  • The petascale synthetic dataset showed comparable speedups, demonstrating scalability.
  • Accuracy: Segmentation performance using APR was comparable to voxel-based methods, with 99.92% matching objects and a low center-of-mass deviation.
  • Computational Ratio (CR): The paper highlights the CR as a measure of processing speedup, with values often exceeding 100x.

Limitations and Future Work

  • Parameter Tuning: While automatic parameter determination is provided, the paper acknowledges that optimal threshold values can be image-dependent and somewhat subjective. Manual tuning might still be necessary in some cases.
  • Information Loss at High Compression: The study notes that at very high compression ratios (loss of native resolution particles), a drop in Dice index was observed, indicating that full spatial resolution information is crucial for certain analyses. APR conversion parameters are automatically chosen to retain this information.
  • Future Work: The authors envision pAPRica enabling whole-organ cell atlasing projects and the use of volumetric imaging in clinical pathology, suggesting a future where such large-scale analyses are routine. The code is planned to be made publicly available, which will facilitate further development and adoption.

Summary updated

Abstract

Abstract The large size of imaging datasets generated by next-generation histology methods limits the adoption of those approaches in research and the clinic. We propose pAPRica (pipelines for Adaptive Particle Representation image compositing and analysis), a framework based on the Adaptive Particle Representation (APR) to enable efficient analysis of large microscopy datasets, scalable up to petascale on a regular workstation. pAPRica includes stitching, merging, segmentation, registration, and mapping to an atlas as well as visualization of the large 3D image data, achieving 100+ fold speedup in computation and commensurate data-size reduction.
BibTeX
@misc{scholler2023efficient,
  author = {Jules Scholler and Joel Jonsson and Tomás Jordá-Siquier and Ivana Gantar and Laura Batti and Bevan L. Cheeseman and Stéphane Pagès and Ivo F. Sbalzarini and Christophe M. Lamy},
  title = {{Efficient image analysis for large-scale next generation histopathology using pAPRica}},
  year = {2023},
  doi = {10.1101/2023.01.27.525687},
  howpublished = {bioRxiv},
}
Figure