Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarartur authored Oct 27, 2024
1 parent cab1e4a commit 60664ae
Showing 1 changed file with 59 additions and 20 deletions.
79 changes: 59 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
Contained is the base library for augmentation as of publication.

Additionally code for the classification module and segmentation is included.
This repository contains the code used in the studies listed in the [Citing](#citing) section.

# Instalation
It is recommended to install this repository inside a conda virtual environment. To do so, run the following commands:
Expand All @@ -19,42 +17,50 @@ conda install openslide-python pyvips -c conda-forge
```


Finally, libhaa library is installable by running the following command:
Finally, the `libhaa` library is installable by running the following command:

```bash
pip install -e .
```

Additional options are available for installation, such as installing the library with the `classification` or `segmentation` modules. To do so, first install [PyTorch](https://pytorch.org/get-started/locally/) and then run the following command. You can choose to install both modules by running the command with the `all` options, or only one of them with `histo-seg` or `histo-class`.
Additional options are available for installation, such as installing the library with the `classification` or `segmentation` modules. To do so, first install [PyTorch](https://pytorch.org/get-started/locally/) and then run the following command. You can choose to instal one of the following options:

- both modules by running the command with the `all` options.
- only one module with either `histo-seg` or `histo-class` option.

```bash
# (e.g.) conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
pip install -e .[all] # [histo-seg] or [histo-class]
pip install -e .[all] # or [histo-seg] or [histo-class]
```


For segmentation inference we provide the weights in the `Releases` github panel.
Classification weights will be made available soon.
We provide the segmentation and classification model weights in the [releases page](https://github.com/Jarartur/HistopathologyAugmentationResearch/releases).

# Repository information

`libhaa` folder contains this library's code, including segmentation and classification (wip) inference scripts.
The `libhaa` folder contains code from this library, including segmentation and classification (wip) inference scripts.

`model_training` folder contains the original code used during the segmentation and classification study.
The `model_training` folder contains the original code used during the segmentation and classification study.

# Usage guide

For now a few scripts are available as cli commands after instalation:

- `build-collection`
- `generate-dataset`
- `segment`
- `cut-patches-training `
- `cut-patches-inference`
- `build-collection`:
allows for building a custom artifact library from a set of WSIs with their annotations done in [ASAP](https://computationalpathologygroup.github.io/ASAP/).

- `segment`:
allows for segmenting histopathology images with the segmentation model available in the [releases page](https://github.com/Jarartur/HistopathologyAugmentationResearch/releases/tag/segmentation).

Run `command -h` to lear about their available arguments.
- `generate-dataset`:
allows for augmenting a chosen dataset with the previously generated artifact library and segmentations.

More detailed step-by-step guide will come in the near future.
- `cut-patches-training`:
generates patches of training data from the chosen pyramid level of images from the augmented (or not) dataset.

- `cut-patches-inference`:
generates patches from a single WSI for inference of the classification model available in the [releases page](https://github.com/Jarartur/HistopathologyAugmentationResearch/releases/tag/classification).

Run `command -h` to learn about their available arguments. More detailed step-by-step guide will come in the near future. A simplified classification inference script is currently being worked on.

# Citing

Expand All @@ -74,9 +80,42 @@ If you find our work usefull, please cite:
issn = {2045-2322},
doi = {10.1038/s41598-024-68667-2},
urldate = {2024-08-27},
abstract = {The problem of artifacts in whole slide image acquisition, prevalent in both clinical workflows and research-oriented settings, necessitates human intervention and re-scanning. Overcoming this challenge requires developing quality control algorithms, that are hindered by the limited availability of relevant annotated data in histopathology. The manual annotation of ground-truth for artifact detection methods is expensive and time-consuming. This work addresses the issue by proposing a method dedicated to augmenting whole slide images with artifacts. The tool seamlessly generates and blends artifacts from an external library to a given histopathology dataset. The augmented datasets are then utilized to train artifact classification methods. The evaluation shows their usefulness in classification of the artifacts, where they show an improvement from 0.10 to 0.01 AUROC depending on the artifact type. The framework, model, weights, and ground-truth annotations are freely released to facilitate open science and reproducible research.},
copyright = {2024 The Author(s)},
langid = {english},
keywords = {Data processing,Machine learning,Quality control},
}
```
@article{jurgasArtifactAugmentationLearningbased2023,
title = {Artifact {{Augmentation}} for {{Learning-based Quality Control}} of {{Whole Slide Images}}},
author = {Jurgas, Artur and Wodzinski, Marek and Celniak, Weronika and Atzori, Manfredo and Muller, Henning},
year = {2023},
month = jul,
journal = {Annual International Conference of the IEEE Engineering in Medicine and Biology Society. IEEE Engineering in Medicine and Biology Society. Annual International Conference},
volume = {2023},
pages = {1--4},
issn = {2694-0604},
doi = {10.1109/EMBC40787.2023.10340997},
langid = {english},
pmid = {38082977},
keywords = {Algorithms,Artifacts,Humans,Image Processing Computer-Assisted,Neoplasms},
}
```

For segmentation:
```
@inproceedings{jurgasRobustMultiresolutionMultistain2024,
title = {Robust {{Multiresolution}} and {{Multistain Background Segmentation}} in {{Whole Slide Images}}},
booktitle = {The {{Latest Developments}} and {{Challenges}} in {{Biomedical Engineering}}},
author = {Jurgas, Artur and Wodzinski, Marek and Atzori, Manfredo and M{\"u}ller, Henning},
editor = {Strumi{\l}{\l}o, Pawe{\l} and Klepaczko, Artur and Strzelecki, Micha{\l} and Boci{\k a}ga, Dorota},
year = {2024},
series = {Lecture {{Notes}} in {{Networks}} and {{Systems}}},
pages = {29--40},
publisher = {Springer Nature Switzerland},
address = {Cham},
doi = {10.1007/978-3-031-38430-1_3},
isbn = {978-3-031-38430-1},
langid = {english},
keywords = {Computational pathology,Deep learning,Digital pathology Segmentation,Whole-slide images,WSI},
}
```

0 comments on commit 60664ae

Please sign in to comment.