lazyslide_models.base.VirtualStainModel#
- class VirtualStainModel#
Bases:
DensePredictionModel,ABCA dense map of one or more synthesised RGB stains.
predictreturns[B, C, H, W]withC == 3 * len(stains), ordered RGB-major: channels3ito3i + 2are the RGB planes ofstains[i]. Staying 4-D rather than[B, N, 3, H, W]keeps one tensor contract across both dense classes, so a runner needs only one stitching implementation and splits the result afterwards.- Attributes:
- stainstuple of str
The stains synthesised, e.g.
("PAS",)or("HER2 IHC",). There is no default: a virtual stain that does not say which stain it produces carries no usable metadata, since its channels are onlyR,G,B.