A unified solution for mammogram image analysis and interpretation
Project description
MamToolKit
A Comprehensive Deep Learning Library for Mammogram Assessment
[Documentation] | [Paper] | [Notebook examples] | [Web applications]
Welcome to MamToolKit
Repository! MamToolKit
is a python-based library designed to facilitate the creation of mammogram image analysis pipelines . The library includes plug-and-play modules to perform:
- Standard mammogram image pre-processing (e.g., normalization, bounding box cropping, and DICOM to jpeg conversion)
- Mammogram assessment pipelines (e.g., breast area segmentation, dense tissue segmentation, and percentage density estimation)
- Modeling deep learning architectures for various downstream tasks (e.g., micro-calcification and mass detection)
- Feature attribution-based interpretability techniques (e.g., GradCAM, GradCAM++, and LRP)
- Visualization
All the functionalities are grouped under a user-friendly API.
If you encounter any issue or have questions regarding the library, feel free to open a GitHub issue. We'll do our best to address it.
Installation
PyPI installer (recommended)
pip install -U mamtoolkit
Development setup
- Clone the repo:
git clone https://github.com/uefcancer/mktoolkit/mamtoolkit.git && cd mamtoolkit
- Create a conda environment:
conda env create -f environment.yml
NOTE: To use GPUs, install GPU compatible Pytorch, Torchvision packages according to your OS, package manager, and CUDA.
- Activate it:
conda activate mamtoolkit
- Add
MamToolKit
to your python path:
export PYTHONPATH="<PATH>/mamtoolkit:$PYTHONPATH"
Using MamToolKit
The MamToolKit
library provides a set of helpers grouped in different modules, namely preprocessing
, assessment
, interpretability
, and visualization
.
For instance, with MamToolKit
library, we can load percentage mammogram density model (described in the [Paper] ) and predict the non-dense area, dense tissue area, and estimate percentage density:
import mamtoolkit as mg
model = mg.load_model("base")
result = mg.percentage_density(model, image_path) #path to mammogram image
print(result)
The percentage_density()
method is a part of assessment
module, which pre-processes the input image and converts it into the appropriate format and dimension accepted by the model. Then the model provides the analysis in forms of a dictionary with keys: non_dense_area, dense_area, and density.
Notice: The non_dense_area and dense_area are calculated in cm^2
result['non_dense_area'] =
result['dense_area'] =
result['density']
License
The MamToolKit library is released under the MIT License. See [LICENSE] (https://github.com/openai/whisper/blob/main/LICENSE) for further details.
If you use this library, please consider citing:
@article{gudhe2022area,
title={Area-based breast percentage density estimation in mammograms using weight-adaptive multitask learning},
author={Gudhe, Naga Raju and Behravan, Hamid and Sudah, Mazen and Okuma, Hidemi and Vanninen, Ritva and Kosma, Veli-Matti and Mannermaa, Arto},
journal={Scientific reports},
volume={12},
number={1},
pages={12060},
year={2022},
publisher={Nature Publishing Group UK London}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mammopy-0.0.1.tar.gz
.
File metadata
- Download URL: mammopy-0.0.1.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.8.16 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8037e8dc4fa4adc4770c46c5b2a10523a53e729d61963f8c0146563c0cf32c4 |
|
MD5 | bdd1d2bd7d1490bbe26008ccdadbd1a3 |
|
BLAKE2b-256 | 2b244b01c3ca1f50523b2528f94267236bf33bc577f33641ef6ad0410db4c818 |
File details
Details for the file mammopy-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: mammopy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.8.16 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd9cde10731d642f0a070e4e927eec8a9a25e5a856cdb51a5011c273ea83f71a |
|
MD5 | 35ecce29b8fa877cd20d2190145db762 |
|
BLAKE2b-256 | 69f44d13e82a9ca4b7e18cc6b0edae73a4d2f767af9be4ba7157f063c54174cb |