During my internship at A*STAR’s Bioinformatics Institute, I worked on IHC pathology slide analysis. The pipeline extracts tissue, separates stains, segments nuclei, then extracts features and classifies them. It produces a position and expression class for each nucleus, along with slide-level statistics.
I focused on staining around the nuclei: 12 outward layers, sampled in 72 directions, give 864 optical-density features. I then compared Random Forest, SVM and ResNet-18 using a separate slide that had not been used for training.
The images and results below are from my May 2025 NTU practicum report. Sample sizes and report page references are included alongside the data.
Held-out Slide B · accuracy
97.9%
Random Forest · 2,000 labeled nuclei
Features per nucleus
864
12 layers × 72 directions
Whole-slide predictions
2.46M
2,455,325 nuclei across two slides
01 / METHOD
From whole slides to individual nuclei
The study used two H-DAB-stained pancreatic ductal adenocarcinoma slides containing three tissue regions. I connected the separate processing steps into a single run.
01
Find tissue
Locate tissue at low resolution, exclude background, then read the detailed region.
02
Separate stains
Estimate a stain matrix and separate hematoxylin from the DAB signal.
03
Segment nuclei
Process 2048 × 2048 tiles with 256-pixel overlap, then stitch watershed masks.
04
Describe each nucleus
Sample DAB optical density in 72 directions across 12 outward layers.
05
Compare classifiers
Evaluate RF, SVM and ResNet-18 on manually checked samples; integrate RF.
06
Export results
Save per-nucleus features and predictions, then summarize each slide.
Report pp. 10–30. The cover is original Figure 6 (p. 21): RGB, QuPath masks, pipeline masks and overlays. Agreement with QuPath is Dice 0.7311 and IoU 0.5761; the reference is software-generated.
02 / REAL EXAMPLES
What the model receives
Each pair shows a cell crop on the left and its surrounding DAB optical-density profile on the right. The surrounding region is approximated by dilating the nucleus, rather than tracing a measured cell membrane. Open a figure to zoom in.
Low and membrane expression
Low-expression examples have little DAB signal; membrane examples show stronger signal toward the outer layers.
Original report, p. 25Cytoplasm and half expression
Cytoplasm examples show broadly distributed signal; Half examples concentrate it in part of the surrounding area.
Original report, p. 26
03 / RESULTS
How do the models perform on another slide?
ResNet-18 has the highest cross-validation mean. Random Forest reaches 97.90% on the 2,000 labeled nuclei from Slide B, slightly above ResNet-18 at 97.70%. I chose RF considering interpretability and deployment cost as well.
Redrawn from report data · Table 4 · p. 30Download chartView chart data
Accuracy (%); cross-validation ± values are retained as reported in Table 4.
Model
Slide A · 8-fold CV
Held-out Slide B
Random Forest
98.70 ± 0.71
97.90%
SVM
97.85 ± 0.94
95.40%
ResNet-18
99.15 ± 0.47
97.70%
The 2,000 Slide A samples were used for development and cross-validation. Another 2,000 from Slide B were reserved for generalization evaluation. Samples were model-assisted and manually checked by me; see pp. 27–30.
04 / RESULTS
Two slides, four expression patterns
The model was applied to 2,455,325 segmented nuclei. Slide B has a larger predicted Low-expression fraction. These are whole-slide prediction distributions, not 2.46 million manual labels or accuracy measurements.
Redrawn from report data · Tables 6–7 · p. 37Download chartView chart data
Each cell shows a predicted count and its share, calculated from the original counts.
Pattern
Slide A
Slide B
Low
422,654 · 45.9%
952,251 · 62.0%
Membrane
188,659 · 20.5%
313,020 · 20.4%
Cytoplasm
103,009 · 11.2%
116,984 · 7.6%
Half
205,762 · 22.4%
152,986 · 10.0%
Total
920,084
1,535,241
05 / RESULTS
Where does the processing time go?
The runtime table sums to 11,996 seconds for Slide A, about 3 hours 20 minutes. Segmentation and stitching account for roughly 65%, far more than classification itself.
Redrawn from report data · Table 5 · pp. 34–35Download chartView chart data
Slide A, one complete run recorded in Table 5.
Stage
Time (seconds)
Tissue extraction
1,151.5
Stain / threshold
9.7
Color unmixing
1,936.9
Segment / stitch
7,794.8
Features / CSV
875.4
Prediction
227.7
Total
11,996
Measured on the report’s Xeon Gold 6242 / Tesla V100 / 1 TiB RAM workstation. Speedup descriptions differ between the abstract and body; this page uses the verifiable values in Table 5.
What this study has not established
Validation covers only two slides, with labels mainly assigned by me and without systematic pathologist review. The results describe this dataset; robustness across patients and staining batches, and links to clinical outcomes, require further study.
Source: my May 2025 NTU BS6211 practicum report, pp. 39–41. Immunohistochemistry Biomarker Expression Pattern Recognition: For Enhanced Disease Prognosis