Lab book · Parallax Metrology · built from results/ by scripts/04_labbook.py

Same tissue, two scanners: TRIDENT tissue segmentation on paired PLISM scans

13 PLISM tissue-array sections, each scanned on Aperio AT2 and Aperio GT450, were run through TRIDENT's three tissue segmenters at their defaults. The tissue is fixed; only the scanner changes. This records how much each segmenter's tissue region changes, using the same 156 registered fields and admission rule as the earlier HistoQC study.

1. Status and record

2. Material and software

3. Technical gate

Every run's pyramid level, as chosen by TRIDENT's own rule (get_best_level_and_custom_downsample, tolerance 0.1), was recorded before segmenting. The runner stops if a range-acquired AT2 copy would be read at level 0; no run stopped.

Source integrity (second pass, scripts/05_checks.py): in all 13 AT2 copies, every tile of every reduced-resolution page (124877 tiles) lies inside the byte ranges actually fetched (0 outside), and all 1145 fetched ranges match the SHA-256 in their receipts (0 mismatches). No pixel TRIDENT read from these copies can be missing data. This replaces the planned all-zero pixel check with a stronger byte-level one.

runsegmenterdevicescansscannersecondslevel readartifact-model level
grandqcgrandqcmps13AT244AT2: level 3, extra downsample 1.234
grandqcgrandqcmps13GT450280GT450: level 2, extra downsample 2.384; GT450: level 2, extra downsample 2.385
hesthestmps13AT210752AT2: level 1, extra downsample 1.0
hesthestmps13GT4507414GT450: level 0, extra downsample 3.815
hest_artifactshestmps13AT26278AT2: level 1, extra downsample 1.0AT2: level 1
hest_artifactshestmps13GT45010453GT450: level 0, extra downsample 3.815GT450: level 0
hest_artifacts_repeathestmps4AT2+GT4501923AT2: level 1, extra downsample 1.0; GT450: level 0, extra downsample 3.815AT2: level 1; GT450: level 0
hest_repeathestmps2AT2+GT450709AT2: level 1, extra downsample 1.0; GT450: level 0, extra downsample 3.815
otsuotsucpu13AT260AT2: level 2, extra downsample 1.974; AT2: level 2, extra downsample 1.975
otsuotsucpu13GT45064GT450: level 2, extra downsample 1.907; GT450: level 2, extra downsample 1.908

Repeatability: KR_AT2 and KR_GT450 segmented a second time with HEST give regions with zero symmetric difference from the first run (criterion: areas within 0.1%). Pass.

Level path: for HEST at 10x, AT2 (level downsamples 1, 4, 16, 32) is read from level 1 directly. GT450 (1, 4, 16, 64) has its level 1 at a downsample of 4.0, outside the 0.1 tolerance of the wanted 3.815, so TRIDENT reads level 0 and downsamples by 3.815. GrandQC reads AT2 at level 3 and GT450 at level 2. The two scanners therefore reach the same model through different reading paths.

4. Readings 1 to 3: summary

toolfields switchedAT2-only / GT450-onlymean section switch fractionmedian GT450/AT2 arearangeGT450 smallerregion below 10% of its pair
HEST (default)6 of 1563 / 30.0380.9780.941 to 1.14411 of 13none
GrandQC1 of 1560 / 10.0060.9920.975 to 1.04811 of 13none
Otsu28 of 15618 / 100.1790.9330.596 to 8.40512 of 13none
HEST + remove_artifacts26 of 15610 / 160.1670.9980.802 to 1.9907 of 13none
HistoQC default (context, different rule)52 of 15647 / 5n/a0.065 (usable tissue)n/an/an/a
03978117156HEST (default): 6 of 156 fields switchedHEST (default)6GrandQC: 1 of 156 fields switchedGrandQC1Otsu: 28 of 156 fields switchedOtsu28HistoQC default (earlier study): 52 of 156 fields switchedHistoQC default (earlier study)52
Fields whose admission differs between the two scans of the same section, out of 156. The HistoQC row is context from the earlier study, which uses HistoQC's usable-tissue mask, not a TRIDENT segmenter.
HEST (default)GrandQCOtsu
0.50.7511.52510GIVGIV, HEST (default): GT450/AT2 = 0.9987 (AT2 165.5162 mm², GT450 165.3084 mm²)GIV, GrandQC: GT450/AT2 = 0.9796 (AT2 191.8691 mm², GT450 187.954 mm²)GIV, Otsu: GT450/AT2 = 0.9328 (AT2 161.9701 mm², GT450 151.0884 mm²)GIVHGIVH, HEST (default): GT450/AT2 = 0.9612 (AT2 170.3493 mm², GT450 163.7437 mm²)GIVH, GrandQC: GT450/AT2 = 0.975 (AT2 192.5337 mm², GT450 187.7254 mm²)GIVH, Otsu: GT450/AT2 = 0.9159 (AT2 165.6137 mm², GT450 151.6921 mm²)GMGM, HEST (default): GT450/AT2 = 1.0068 (AT2 164.7909 mm², GT450 165.9091 mm²)GM, GrandQC: GT450/AT2 = 1.0048 (AT2 188.0509 mm², GT450 188.9569 mm²)GM, Otsu: GT450/AT2 = 0.5961 (AT2 155.2782 mm², GT450 92.5611 mm²)GMHGMH, HEST (default): GT450/AT2 = 0.9411 (AT2 171.0313 mm², GT450 160.9579 mm²)GMH, GrandQC: GT450/AT2 = 0.9753 (AT2 194.1426 mm², GT450 189.3417 mm²)GMH, Otsu: GT450/AT2 = 0.95 (AT2 162.5595 mm², GT450 154.424 mm²)GVGV, HEST (default): GT450/AT2 = 0.9775 (AT2 168.9472 mm², GT450 165.1498 mm²)GV, GrandQC: GT450/AT2 = 0.9756 (AT2 195.2028 mm², GT450 190.436 mm²)GV, Otsu: GT450/AT2 = 0.9507 (AT2 166.9655 mm², GT450 158.7308 mm²)GVHGVH, HEST (default): GT450/AT2 = 0.968 (AT2 172.0887 mm², GT450 166.5813 mm²)GVH, GrandQC: GT450/AT2 = 0.9919 (AT2 194.8494 mm², GT450 193.2787 mm²)GVH, Otsu: GT450/AT2 = 0.9822 (AT2 167.6989 mm², GT450 164.7138 mm²)HRHR, HEST (default): GT450/AT2 = 1.1441 (AT2 146.8906 mm², GT450 168.0541 mm²)HR, GrandQC: GT450/AT2 = 1.048 (AT2 184.4729 mm², GT450 193.3326 mm²)HR, Otsu: GT450/AT2 = 8.4047 (AT2 19.7537 mm², GT450 166.0226 mm²)HRHHRH, HEST (default): GT450/AT2 = 0.965 (AT2 172.6834 mm², GT450 166.6464 mm²)HRH, GrandQC: GT450/AT2 = 0.9811 (AT2 194.6583 mm², GT450 190.9841 mm²)HRH, Otsu: GT450/AT2 = 0.9826 (AT2 167.1934 mm², GT450 164.2787 mm²)KRKR, HEST (default): GT450/AT2 = 0.9776 (AT2 165.0013 mm², GT450 161.2973 mm²)KR, GrandQC: GT450/AT2 = 0.9961 (AT2 191.8156 mm², GT450 191.0651 mm²)KR, Otsu: GT450/AT2 = 0.5969 (AT2 148.5782 mm², GT450 88.6843 mm²)KRHKRH, HEST (default): GT450/AT2 = 0.9582 (AT2 167.3476 mm², GT450 160.3509 mm²)KRH, GrandQC: GT450/AT2 = 0.9936 (AT2 191.6839 mm², GT450 190.4477 mm²)KRH, Otsu: GT450/AT2 = 0.7561 (AT2 149.6383 mm², GT450 113.1351 mm²)LMLM, HEST (default): GT450/AT2 = 0.9825 (AT2 169.9148 mm², GT450 166.9438 mm²)LM, GrandQC: GT450/AT2 = 0.9941 (AT2 189.843 mm², GT450 188.7178 mm²)LM, Otsu: GT450/AT2 = 0.8814 (AT2 166.2836 mm², GT450 146.5676 mm²)LMHLMH, HEST (default): GT450/AT2 = 0.9752 (AT2 173.3442 mm², GT450 169.045 mm²)LMH, GrandQC: GT450/AT2 = 0.9778 (AT2 195.2844 mm², GT450 190.9587 mm²)LMH, Otsu: GT450/AT2 = 0.9832 (AT2 167.6217 mm², GT450 164.8063 mm²)MYMY, HEST (default): GT450/AT2 = 0.9913 (AT2 167.5582 mm², GT450 166.1075 mm²)MY, GrandQC: GT450/AT2 = 0.9954 (AT2 190.6377 mm², GT450 189.7528 mm²)MY, Otsu: GT450/AT2 = 0.5981 (AT2 147.9418 mm², GT450 88.4867 mm²)GT450 tissue area / AT2 tissue area (log scale; 1 = same)
GT450 tissue area divided by AT2 tissue area, per section and segmenter. Hover a dot for the areas. Otsu's HR point sits at 8.4047.

5. Which fields switch

For HEST, GrandQC and the artifact arm every switched field is listed. A fraction near 0 on one scan and near 1 on the other means a whole tissue core (or the part holding that field) is in one region and absent from the other; this is the case for 3 of HEST's 6 and 1 of GrandQC's 1, and 12 of the 26 with artifact removal (section 7). Otsu's 28 switched fields are in results/fields.csv; 19 of them are of the whole-core kind, and 10 are in section HR.

toolsectionfieldfraction inside, AT2fraction inside, GT450admitted on
HEST (default)HR10.01.0GT450 only
HEST (default)HR40.01.0GT450 only
HEST (default)HR90.4249011.0GT450 only
HEST (default)HRH61.00.046522AT2 only
HEST (default)KR50.7294510.179376AT2 only
HEST (default)KRH70.8085430.0AT2 only
GrandQCHR10.01.0GT450 only
HEST + remove_artifactsGIV00.4132410.865835GT450 only
HEST + remove_artifactsGIV80.2194551.0GT450 only
HEST + remove_artifactsGIVH50.7849860.0AT2 only
HEST + remove_artifactsGM01.00.0AT2 only
HEST + remove_artifactsGM111.00.498913AT2 only
HEST + remove_artifactsGV60.2907111.0GT450 only
HEST + remove_artifactsGV90.01.0GT450 only
HEST + remove_artifactsGVH70.30830.819335GT450 only
HEST + remove_artifactsGVH90.9939420.450224AT2 only
HEST + remove_artifactsHR10.00.913255GT450 only
HEST + remove_artifactsHR80.01.0GT450 only
HEST + remove_artifactsHR100.00.98267GT450 only
HEST + remove_artifactsHR111.00.0AT2 only
HEST + remove_artifactsHRH00.3322131.0GT450 only
HEST + remove_artifactsKR30.01.0GT450 only
HEST + remove_artifactsKR40.0851781.0GT450 only
HEST + remove_artifactsKRH51.00.0AT2 only
HEST + remove_artifactsKRH71.00.0AT2 only
HEST + remove_artifactsLM50.01.0GT450 only
HEST + remove_artifactsLM71.00.0AT2 only
HEST + remove_artifactsLM80.6523720.0AT2 only
HEST + remove_artifactsLM110.01.0GT450 only
HEST + remove_artifactsLMH00.1660080.885354GT450 only
HEST + remove_artifactsMY61.00.285743AT2 only
HEST + remove_artifactsMY80.01.0GT450 only
HEST + remove_artifactsMY110.2490121.0GT450 only

6. What the regions look like

Section HR is the darkest-stained section on both scanners, and AT2 renders every section darker than GT450. Median tissue brightness (luma 0 to 255, 2000-pixel thumbnail, results/brightness.csv): HR 47.4 on AT2 and 112.1 on GT450; the other 12 sections 145.0 to 191.8 on AT2 and 196.3 to 215.2 on GT450. HEST's AT2 region for HR is 146.8906 mm² against 168.0541 mm² on GT450; Otsu's is 19.7537 against 166.0226; GrandQC's is 184.4729 against 193.3326. On the HEST contour overlay, the dark AT2 scan has straight-edged gaps cut into many cores; the GT450 scan of the same section has few.

A tiling cause was checked: long axis-aligned contour edges on HEST HR_AT2 (116 edges) were compared with the 512-pixel model input grid (2048 level-0 pixels, starting at the slide origin). One lies within 16 pixels of a grid line, and their positions modulo 2048 are spread across the range. The straight edges are not explained by the model tiles. They may come from the contour step, which resizes the mask to 2000 rows; this was not tested.

HEST contours on HR and KRH, both scanners
TRIDENT's own contour overlays, HEST. Top: HR on AT2 (left) and GT450 (right). Bottom: KRH on AT2 (left) and GT450 (right).
GrandQC and Otsu contours
Earlier check image: GrandQC on KR_AT2, and Otsu on KR and HR for both scanners.

7. Secondary readings

Minimum piece size. mask_to_gdf resizes the mask to 2000 rows and drops pieces below min_contour_area=1000 scaled by mpp². In physical terms the threshold is 1000 × (slide height in µm / 2000)² and so depends on the slide's height, not only its resolution. Median across the 13 sections: 0.0939 mm² on AT2, 0.1194 mm² on GT450 (range 0.0838 to 0.1050 and 0.1144 to 0.1235). The smallest piece kept differs between the two scans of the same glass.

Artifact-removal device. Processor.run_segmentation_job passes device and batch_size to the tissue segmenter but not to the artifact model, whose segment_tissue call then uses the defaults device='cuda:0', batch_size=16. On this machine the first run stopped with "Torch not compiled with CUDA enabled". On a multi-GPU machine, the same line would send the artifact model to cuda:0 whatever --gpu was given (inferred from the code, not run). An open pull request, mahmoodlab/TRIDENT#237 (7 September 2026, another contributor), already passes device to this call, together with MPS routing and macOS data loading; it does not pass batch_size.

HEST with remove_artifacts (secondary arm; HEST at defaults, then TRIDENT's GrandQC artifact model at 10x, which removes regions it classes as artifact): complete; numbers in the summary table and switched-field list.

With artifact removal, 26 fields switch (10 AT2-only, 16 GT450-only), in 12 of 13 sections, against 6 for HEST alone; 12 are of the whole-core kind. The independent point-sampling rescore reproduces all 26 (0 decision mismatches). The table gives the share of HEST's own region that remains after artifact removal, per scan, and the switched fields before and after (AT2-only + GT450-only). In HR the step keeps 20.6 mm² on AT2 and 40.9 mm² on GT450, of HEST's 146.9 and 168.1; 7 of HR's 12 fields are outside the region on both scans. On the overlays the removed areas have straight, stepped edges in all four sections drawn, and their outline differs between the two scans of the same glass. Two GT450 scans (GMH, KRH) end slightly larger than HEST alone (ratio above 1); this was not investigated. Repeatability: HR and MY were run through the artifact arm a second time on both scanners (scripts/07_artifact_repeat.py, results/artifact_repeat.json); HR_AT2 0.0 mm², HR_GT450 0.0 mm², MY_AT2 0.0 mm², MY_GT450 0.0 mm² symmetric difference from the first run, and 0 field decisions change. The differences between scanners are not run-to-run variation on these scans. A maintainer has described this model as removing even slightly out-of-focus regions (mahmoodlab/TRIDENT#202); no focus measurement was made here.

sectionkept after artifact removal, AT2kept, GT450switched: HEST → with artifact removal
GIV0.9130.9510+0 → 0+2
GIVH0.9560.9830+0 → 1+0
GM0.8800.8270+0 → 2+0
GMH0.9751.0060+0 → 0+0
GV0.9050.9860+0 → 0+2
GVH0.9690.9990+0 → 1+1
HR0.1400.2430+3 → 1+3
HRH0.9500.9881+0 → 0+1
KR0.8450.9911+0 → 0+2
KRH0.9661.0021+0 → 2+0
LM0.7910.7730+0 → 2+2
LMH0.9480.9980+0 → 0+1
MY0.8900.7200+0 → 1+2
HEST contours with and without artifact removal
Grey: HEST alone. Orange: HEST followed by artifact removal. Rows: HR, MY, LM, KR; left AT2, right GT450. Drawn by scripts/06_artifact_fig.py from TRIDENT's contours_geojson.

8. Deviations and incidents

9. Scope

One tissue array, two scanners from one vendor, 13 serial and differently stained sections from shared tissue. Descriptive only, with no inference to other patients, scanners or vendors. Neither scanner nor any segmenter is taken as correct: a change between scanners says which tool is sensitive here, not which region is right. The field rule is ours; TRIDENT's own patching uses min_tissue_proportion, default 0. No private Parallax measurements are used.

10. Files

PLAN.md, ADDENDUM_1-3.md with hashes; scripts/01_download_gt450.py, 02_segment.py, 03_score.py, 04_labbook.py, 05_checks.py, 06_artifact_fig.py, 07_artifact_repeat.py; out/<arm>/ TRIDENT job folders with run_meta_*.json; results/fields.csv, sections.csv, scans.csv, summary.json; logs/; figs/.

Per-section table, all segmenters
toolsectionfieldsboth inAT2 onlyGT450 onlyboth outAT2 mm²GT450 mm²GT450/AT2
HEST (default)GIV1212000165.5162165.30840.9987
HEST (default)GIVH1212000170.3493163.74370.9612
HEST (default)GM1212000164.7909165.90911.0068
HEST (default)GMH1212000171.0313160.95790.9411
HEST (default)GV1212000168.9472165.14980.9775
HEST (default)GVH1212000172.0887166.58130.968
HEST (default)HR128031146.8906168.05411.1441
HEST (default)HRH1211100172.6834166.64640.965
HEST (default)KR1211100165.0013161.29730.9776
HEST (default)KRH1211100167.3476160.35090.9582
HEST (default)LM1212000169.9148166.94380.9825
HEST (default)LMH1212000173.3442169.0450.9752
HEST (default)MY1212000167.5582166.10750.9913
GrandQCGIV1212000191.8691187.9540.9796
GrandQCGIVH1212000192.5337187.72540.975
GrandQCGM1212000188.0509188.95691.0048
GrandQCGMH1212000194.1426189.34170.9753
GrandQCGV1212000195.2028190.4360.9756
GrandQCGVH1212000194.8494193.27870.9919
GrandQCHR1211010184.4729193.33261.048
GrandQCHRH1212000194.6583190.98410.9811
GrandQCKR1212000191.8156191.06510.9961
GrandQCKRH1212000191.6839190.44770.9936
GrandQCLM1212000189.843188.71780.9941
GrandQCLMH1212000195.2844190.95870.9778
GrandQCMY1212000190.6377189.75280.9954
OtsuGIV1211100161.9701151.08840.9328
OtsuGIVH1212000165.6137151.69210.9159
OtsuGM128400155.278292.56110.5961
OtsuGMH1211010162.5595154.4240.95
OtsuGV1210101166.9655158.73080.9507
OtsuGVH1212000167.6989164.71380.9822
OtsuHR12119119.7537166.02268.4047
OtsuHRH1211001167.1934164.27870.9826
OtsuKR127401148.578288.68430.5969
OtsuKRH1211100149.6383113.13510.7561
OtsuLM1210200166.2836146.56760.8814
OtsuLMH1212000167.6217164.80630.9832
OtsuMY128400147.941888.48670.5981
HEST + remove_artifactsGIV1210020151.0869157.24191.0407
HEST + remove_artifactsGIVH1211100162.8466160.98160.9885
HEST + remove_artifactsGM128202145.0566137.26170.9463
HEST + remove_artifactsGMH1212000166.7331161.96310.9714
HEST + remove_artifactsGV1210020152.8361162.85811.0656
HEST + remove_artifactsGVH1210110166.674166.36730.9982
HEST + remove_artifactsHR12113720.561640.91361.9898
HEST + remove_artifactsHRH1211010164.1222164.69461.0035
HEST + remove_artifactsKR1210020139.4607159.90461.1466
HEST + remove_artifactsKRH1210200161.6809160.6810.9938
HEST + remove_artifactsLM127221134.4529129.0930.9601
HEST + remove_artifactsLMH1211010164.3696168.77561.0268
HEST + remove_artifactsMY129120149.1725119.65250.8021