torchstain
torchstain copied to clipboard
Macenko stain augmentation
Related to issue https://github.com/EIDOSLAB/torchstain/issues/43.
Changes
- I implemented StainTools-like Macenko augmentation for all three backends.
- It also made a sense to implement an augmentation example script, and thus I moved both examples to their own dedicated
apps/. - Due to this, I changed to run tests on
macos-12instead ofmacos-11 - I also fixed a step in the tests CI which failed due to breaking change in artifact download
Ideas from improvement
API-wise I believe there is a lot of overlap between the normalization and augmentation techniques. It would make sense to have a Macenko ABC class, of which the MacenkoNormalizer and MacenkoAugmentor classes inherit from, and then for each we just override the necessary methods.

@carloalbertobarbano I observed that it was not possible to change sigma_1 and sigma_2 through the common MacenkoAugmentor API. I also observed that tests were failing due to some bugs in the CI workflows. I have addressed both now.