Skip to content

2026-09-18 NanoVirDx Histo v2 domain representation inference

Implemented a packaged Histo v2 inference adapter and DiffSim fine28 compatibility bridge.

Work Done

  • Implemented DomainRepresentationPredictor in NanoVirDx using Histo 0.0.127’s public load_models and process_scan boundary.
  • Added a flattened, packaged Histo v2.0 fine28/local configuration because the Histo wheel omits its repository-level Hydra config. Callers can still supply an existing PipelineSettings.
  • Extended DomainRepresentationBatch and vxData downloads with the required nuclei segmentation artifact, and added aligned WSI/mask validation.
  • Inspected origin/cedrik/fk-fix in DiffSim and confirmed that fine28 is the current Histo v2 taxonomy: 28 base classes plus 12 graded classes with sparse IDs 128-139.
  • Ported Cedrik’s nine-compartment mapping and tissue parameters into NanoVirDx. Added a narrow compatibility loader for DiffSim 0.1.100, which does not understand Histo v2 region_ids.
  • Validated the adapter using a mocked Histo boundary. Validated a complete synthetic 40-class Histo v2 domain through T2, high-b DWI, and ADC simulation on Metal with finite outputs.
  • Built the NanoVirDx wheel and confirmed that the vendored YAML is packaged. Ruff, Pyright, compileall, module boundaries, and diff checks passed.
  • Committed and pushed mono commit d78b25e8 to origin/fk/nanovirdx.

Lessons Learned: Pitfalls

  • DiffSim 0.1.100 validates a positional mapping against 40 region names but then indexes it with sparse labels up to 139. A 40-entry mapping therefore passes validation and fails during remapping; a 140-entry mapping fails validation.
  • Histo 0.0.127 contains the domain-representation implementation but does not package its required configuration. A source-relative Hydra path is not a valid installed-package interface.
  • Running Pyright from DiffSim’s environment initially produced false missing-import errors. The NanoVirDx interpreter and Histo source path were needed for the relevant result.

Lessons Learned: Improvements

  • Publish Cedrik’s name/region_ids mapping support in DiffSim, then remove NanoVirDx’s _domain_from_histo_v2 compatibility loader and return to the public domain_from_histo API.
  • Package Histo’s supported v2 settings and expose a default-settings helper, then delete NanoVirDx’s vendored YAML.
  • Add an Nx project and a small platform-independent adapter test target for NanoVirDx so its lazy Linux-only integrations are exercised in CI.
Navigation

Type to search…

↑↓ navigate↵ selectEsc close