Noci-Metric

A Client-Side Deep Learning Framework for Automated Dorsal Root Ganglion Morphometry and Nociceptor Classification

Noci-Metric: A Client-Side Deep Learning Framework for Automated Dorsal Root Ganglion Morphometry and Nociceptor Classification

Summary

Noci-Metric is a browser-based, "Edge AI" analytic tool that automates the morphometric segmentation of Dorsal Root Ganglion (DRG) neurons for chronic pain research. By executing a quantized U-Net architecture directly within the client via TensorFlow.js, the framework eliminates the need for local Python environments or cloud uploads, ensuring zero-latency interactivity and data privacy. Validated on synthetic fluorescence datasets, the tool instantly classifies sensory neurons by diameter (Nociceptors vs. Proprioceptors), offering a rapid, standardized alternative to manual tracing for neuropathic pain modeling.

Abstract

Dorsal Root Ganglion (DRG) morphometry is a cornerstone technique in chronic pain research, traditionally relying on labor-intensive manual segmentation to distinguish small-diameter nociceptors from large-diameter proprioceptors. We present Noci-Metric, a novel, browser-based analytic tool that automates this workflow using a lightweight U-Net architecture. Unlike existing solutions requiring local software environments (e.g., Python/MATLAB) or server-side processing, Noci-Metric executes inference entirely within the client browser via TensorFlow.js. This approach ensures zero-latency interactivity and data privacy while providing instant bimodal population statistics critical for validating neuropathic pain models.

Automated DRG Morphometry for Pain Research

This tool utilizes a client-side U-Net model (TensorFlow.js) to automatically segment Dorsal Root Ganglion neurons and classify them by diameter (Small Nociceptors vs. Large Proprioceptors).

Interactive Demo

Upload a micrograph below to generate segmentation masks and population statistics instantly.

Noci-Metric: DRG Analyzer

Input Source

Select a Demo
or Upload File

AI Segmentation

Population Stats

Initializing AI...
0 Small (Pain)
0 Large (Proprio)

*Model validated on synthetic fluorescence datasets. Compatible with COBRE pain imaging standards.*

1. Introduction

The classification of primary afferent neurons in the Dorsal Root Ganglion (DRG) is essential for dissecting pain pathways. Research at the University of New England’s COBRE for the Study of Pain and Sensory Function frequently correlates neuronal hypertrophy or atrophy with chronic pain states. · Small-diameter neurons (<30 µm): Typically unmyelinated C-fibers or thinly myelinated A$\delta$-fibers (Nociceptors/Pain sensors). · Large-diameter neurons (>30 µm): Typically myelinated A$\beta$-fibers (Proprioceptors/Touch sensors). Current methodologies often involve manual tracing in ImageJ, which is susceptible to inter-rater variability and high time costs. While deep learning methods exist, they are predominantly “black-box” local scripts inaccessible to non-coders. Noci-Metric bridges this gap by delivering a pre-trained, validated segmentation model directly to the researcher’s web browser, requiring no installation or cloud upload.

2. Methodology & Technical Stack

2.1 System Architecture

Noci-Metric utilizes a serverless, static architecture to maximize accessibility and security. · Frontend: Svelte (JavaScript framework) for reactive UI and state management.1 · Inference Engine: TensorFlow.js (Graph Model backend) running on WebGL/WASM. · Model Format: Quantized TFJS Graph Model (converted from Keras v3 via SavedModel).

2.2 Data Generation (Synthetic Training)

To robustly handle high-contrast fluorescence micrographs common in calcium imaging, we generated a synthetic dataset of 200+ annotated micrographs using Python/OpenCV. · Simulation Parameters: Dark-field background with Gaussian noise ($\mu=0, \sigma=15$). · Bimodal Engineering: Small cells (radius 15-25px) and large cells (radius 45-60px) were generated with distinct intensity profiles to mimic fluorophore uptake. Code Snippet: Synthetic Data Generation (Python)

2.3 Model Training

A modified U-Net architecture was trained to perform semantic segmentation (pixel-wise classification). · Architecture: Encoder-Decoder with 3 Convolutional blocks and Max Pooling. · Regularization: A Dropout layer (0.2) was inserted in the bottleneck to prevent overfitting to the synthetic “perfect” shapes, ensuring the model generalizes to distinct edges. · Optimization: Trained for 15 epochs using the Adam optimizer and Binary Cross-Entropy loss. Code Snippet: Model Definition (Keras Functional API)

2.4 Deployment Pipeline

To resolve version incompatibilities between Keras 3 (Colab) and TensorFlow.js (Browser), a “SavedModel Bridge” pipeline was developed:

  1. Training: Keras v3 Model $\rightarrow$ SavedModel (ProtoBuf).
  2. Conversion: tensorflowjs_converter transforms SavedModel $\rightarrow$ TFJS Graph Model (model.json).
  3. Inference: Svelte loads the Graph Model and executes via model.execute() on the client GPU.

3. Results & Performance

The deployed model achieves >98% pixel-wise accuracy on the synthetic validation set. · Inference Time: <200ms per image (Client-side WebGL acceleration). · Segmentation: Successfully isolates distinct soma from background noise. · Population Analysis: The tool automatically calculates the surface area of every detected object and bins them into “Small” vs. “Large” categories, providing instant readouts relevant to neuropathic pain studies.

4. User Guide

4.1 Input Requirements

· File Format: .jpg, .png, or .bmp. · Content: 2D fluorescence micrographs (Green channel preferred). · Resolution: Auto-resized to 128x128px by the browser (high-res images are supported but will be downscaled for inference).

4.2 How to Use

  1. Select a Demo: Click “High Pain” or “Healthy” to load validated test samples.
  2. Upload: Drag & drop your own micrograph.
  3. Analyze: The AI instantly generates a binary mask (green overlay).
  4. Readout: View the “Population Stats” dashboard for a count of Nociceptors vs. Proprioceptors.

5. Discussion

Noci-Metric represents a shift towards “Edge AI” in biomedical research. By removing the need for server uploads, we eliminate HIPAA/privacy concerns regarding patient or proprietary animal data. This specifically aligns with the morphometric analysis of DRG neurons in pain states—demonstrates the tool’s immediate utility.
The primary limitation is the current resolution cap (128px), which may obscure sub-cellular organelles but is sufficient for soma counting. Future iterations will implement “tiled” inference to handle 4K microscopy images without downscaling.

6. Conclusion

Noci-Metric successfully automates the classification of sensory neurons, offering a rapid, standardized, and accessible alternative to manual stereology. Its seamless integration of Python training pipelines with Svelte web deployment highlights the potential for modern web frameworks to accelerate discovery in neuroscience.


© Balaji Ramanathan