model card: simplify, single author
Browse files14 unmodified lines1516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777814 unmodified lines# RootScope: Cross-species Root Cell-Type Classification from Confocal Microscopy ImagesTrained weights for **[RootScope](https://github.com/ct-tranchau/Rootscope)**.The manuscript model (v4) lives in `v4/`: 915 features, LightGBM perrefinement round, 3 seeds, radial-order prior. The package downloads it onfirst use.## v4 files| File | Size | Role ||---|---|---|| `v4/backbone.pt` | 346 MB | DINOv2 ViT-B/14, all 12 blocks fine-tuned on cell crops (`meta.json` beside it records the architecture; keep them together) || `v4/lgbm_s42.joblib` | ~170 MB | LightGBM bundle, seed 42: six per-round models, scaler, 915 feature names, class order || `v4/lgbm_s1.joblib`, `v4/lgbm_s7.joblib` | ~170 MB each | the other two seeds. Optional: seed 42 alone predicts; all three reproduce the 3-seed average in the manuscript |## v4 performanceClean held-out split: 26 sections, 11,043 labelled cells, 17 species (allpresent in training), pooled over 3 seeds, 6 refinement rounds.| | accuracy | macro-F1 ||---|---|---|| round 1 (no neighbor context yet) | 0.845 | — || final (after refinement + prior) | **0.881** (95% CI 0.858–0.905) | **0.852** |Per class, final model — precision / F1: root cap 96.0 / 97.7 · epidermis85.8 / 89.8 · exodermis 83.5 / 85.6 · cortex 97.2 / 93.4 · endodermis91.0 / 88.8 · pericycle 91.4 / 86.5 · stele 78.3 / 84.0 · xylem 81.6 / 71.4 ·phloem 69.9 / 69.5. Stele, xylem and phloem remain the hard classes; most oftheir confusion is among themselves.On species absent from training, expect roughly 0.70.## How v4 predicts1. Cellpose-SAM segments the TIFF (zero-shot).2. 96 morpho-topological features per cell + 768-d embedding from thefine-tuned backbone.3. Round 1: classify with the neighbor / layer context set to "unknown".4. Rounds 2–6: from the previous round's predictions, rebuild 51 contextcolumns — each neighbor direction's class probabilities (36) and agreementflags (6), and the cell's distance to each cell-type layer the model haspredicted (9) — and classify again with that round's own model.5. Average the three seeds' probabilities, apply the radial-order prior, takethe argmax.The loop is capped at 6 rounds and does not converge (about 1% of labels arestill changing at the cap); extending it to 10 rounds moves accuracy by lessthan 0.1 pp.## Notes- Pixel size is read from the TIFF's OME metadata. A wrong scale distortsevery size feature; the package refuses to default to 1.0.- Input must be a raw confocal image, not a mask.- `scikit-learn` is pinned to 1.7.2, the version the bundles were saved with.- All evaluation numbers are on cells whose annotator confidence was ≥ 0.6(4.1% of labelled test cells were excluded by this filter, concentrated incortex, stele and pericycle).## Contacttnchau@vt.edu14 unmodified lines15161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646514 unmodified lines# RootScope: Cross-species Root Cell-Type Classification from Confocal Microscopy ImagesTrained weights for [RootScope](https://github.com/ct-tranchau/Rootscope).Give RootScope a confocal cross-section TIFF of a root. It segments every cellwith Cellpose-SAM and labels each one as one of nine cell types: root cap,epidermis, exodermis, cortex, endodermis, pericycle, stele, xylem, phloem.The package downloads these weights on first use.## Files| File | Size | What it is ||---|---|---|| `v4/backbone.pt` | 346 MB | DINOv2 ViT-B/14, fine-tuned on cell crops (`meta.json` next to it records the architecture; keep them together) || `v4/lgbm_s42.joblib` | 170 MB | LightGBM, seed 42: one model per refinement round, scaler, feature names, class order || `v4/lgbm_s1.joblib`, `v4/lgbm_s7.joblib` | 170 MB each | the other two seeds; seed 42 alone works, all three reproduce the published result |## PerformanceHeld-out test set: 26 sections, 11,043 labelled cells, 17 species.| | accuracy | macro-F1 ||---|---|---|| round 1 (no neighbor context) | 0.845 | || final | 0.881 (95% CI 0.858 to 0.905) | 0.852 |Per class F1: root cap 97.7, epidermis 89.8, exodermis 85.6, cortex 93.4,endodermis 88.8, pericycle 86.5, stele 84.0, xylem 71.4, phloem 69.5.Stele, xylem and phloem are the hard classes; most of their confusion isamong themselves. On species not in the training set, expect about 0.70.## How it works1. Cellpose-SAM segments the TIFF.2. Each cell gets 96 morpho-topological features and a 768-d embedding fromthe fine-tuned DINOv2 backbone.3. Round 1 classifies each cell with the neighbor and layer context set tounknown.4. Rounds 2 to 6 rebuild 51 context columns from the previous round'spredictions (the neighbors' class probabilities, agreement flags, and thedistance to each predicted cell-type layer) and classify again with thatround's own LightGBM model.5. The three seeds are averaged, a radial-order prior is applied, and the mostlikely class is taken.Pixel size is read from the TIFF's OME metadata. The input must be a rawconfocal image, not a mask.## Authorct-tranchau (tnchau@vt.edu)
README.md+40-53