This repository provides a framework to train CycleGAN- and U-GAT-IT-based translators for unsupervised stain-to-stain translation in histology. It builds upon this [CycleGAN repository](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix). <br>
STAIN TRANSLATION: This repository provides a framework to train CycleGAN- and U-GAT-IT-based translators for unsupervised stain-to-stain translation in histology. It builds upon this [CycleGAN repository](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix). <br>
An exemplary translation from the aSMA to PAS stain in kidney tissue is provided below and its applicability by a prior segmentation model is shown by comparison with the ground-truth. The employed segmentation model is from this [paper](https://jasn.asnjournals.org/content/32/1/52.abstract) and its code repo can be found [here](https://github.com/NBouteldja/KidneySegmentation_Histology). In summary, its based on the [U-net architecture](https://arxiv.org/pdf/1505.04597.pdf) and was trained to segment several renal structures including tubulus (colorful), glomerulus , glomerular tuft , vein (including renal pelvis) , artery , and arterial lumen  from kidney histopathology data.
An exemplary translation from the aSMA to PAS stain in kidney tissue is provided below and its applicability by a prior segmentation model is shown by comparison with the ground-truth. The employed segmentation model is from this [paper](https://jasn.asnjournals.org/content/32/1/52.abstract) and its code repo can be found [here](https://github.com/NBouteldja/KidneySegmentation_Histology). In summary, its based on the [U-net architecture](https://arxiv.org/pdf/1505.04597.pdf) and was trained to segment several renal structures including tubulus (colorful), glomerulus , glomerular tuft , vein (including renal pelvis) , artery , and arterial lumen  from kidney histopathology data.<br>
Note:<br>
STAIN AUGMENTATION: You can use your trained translators to augment an annotated data set and retrain the supervised model. We applied this to our previously published CNN ([source code](https://github.com/NBouteldja/KidneyStainTranslation)) for kidney structure segmentation on PAS-stained tissue to make it stain independent. <br>
IMAGE REGISTRATION: You can also perform image registration between consecutive WSIs of different stains for stain-independent segmentation. We used the [ANHIR challenge winning registration method](https://arxiv.org/abs/2106.13150) from Fraunhofer Mevis. Please request access [there](https://www.mevis.fraunhofer.de/en/employees/johannes-lotz.html).