NUTSHELL
A deep learning model for the multiclass segmentation of nuclei to differentiate follicular thyroid lesions and streamline digital pathology workflows.
NUTSHELL (NUclei from Thyroid tumors Segmentation to Highlight Encapsulated Low-malignant Lesions) is an AI-powered digital pathology tool designed to unmask key nuclear characteristics and reduce diagnostic variability in borderline thyroid cases.
The diagnostic assessment of thyroid nodules is frequently complicated by the morphological overlap between noninvasive follicular tumors with papillary-like nuclear features (NIFTP), aggressive papillary thyroid carcinomas (PTC), and benign hyperplastic nodules (HP). NUTSHELL leverages a Convolutional Neural Network (CNN) to perform pixel-based multiclass segmentation of whole-slide images (WSIs), readily highlighting microfoci of carcinoma or distinct NIFTP areas within extensive glandular samples.
Uncovering Human-Interpretable Features
Before training the deep learning model, we wanted to ensure the morphometric differences driving the classification could be understood by pathologists. By analyzing over 1 million extracted nuclei using machine learning (Random Forest and Decision Trees), we identified 15 distinct morphometric features related to nuclear shape, clarification, and texture.
These features translated into clinically understandable alterations:
- Hyperplastic Nodules (HP): Displayed remarkable internuclear homogeneity and regular, finely granular chromatin.
- NIFTP: Nuclei were generally larger, rounder, and less elongated than PTC, showing higher chromatin texture complexity and significant brightness variation.
- PTC: Exhibited distinct internuclear texture variability, setting it apart from the more homogeneous benign lesions.
The CNN Model & Clinical Integration
The NUTSHELL model was trained on tiled Whole-Slide Images to perform precise, pixel-level multiclass segmentation.
- High Performance: The CNN successfully detected and classified the majority of nuclei across all WSI tiles.
- Pathologist Agreement: When WSI-level predictions were compared with established nuclear scores assigned by expert thyroid pathologists, NUTSHELL demonstrated strong agreement.
- Democratizing AI: To ensure the tool can actually be used in routine practice, NUTSHELL was packaged to run inside WSInfer, allowing for easy, click-and-play rendering and attention-map generation directly within the open-source QuPath software.
Project Highlights
Morphometric Analysis
Extracted and validated 15 human-interpretable nuclear features distinguishing NIFTP, PTC, and HP.
Multiclass Segmentation
A highly accurate CNN pipeline utilizing data augmentation, tiling, and pixel-based prediction.
Clinical Accessibility
Fully integrated with QuPath via WSInfer to provide an immediate visual overview of NIFTP and PTC microfoci.
Core Publication
2024
- Machine Learning streamlines the morphometric characterization and multiclass segmentation of nuclei in different follicular thyroid lesions: Everything in a NUTSHELLModern Pathology, 2024