title | colorFrom | colorTo | sdk | app_port | emoji | pinned | license | app_file |
---|---|---|---|---|---|---|---|---|
livermask: Automatic Liver Parenchyma and vessel segmentation in CT |
indigo |
indigo |
docker |
7860 |
🔎 |
false |
mit |
demo/app.py |
livermask was developed by SINTEF Medical Technology to provide an open tool to accelerate research.
An online version of the tool has been made openly available at Hugging Face spaces, to enable researchers to easily test the software on their own data without downloading it. To access it, click on the badge above.
A stable release is available on PyPI:
pip install livermask
Alternatively, to install from source do:
pip install git+https://github.com/andreped/livermask.git
As TensorFlow 2.4 only supports Python 3.6-3.8, so does livermask. Software
is also compatible with Anaconda. However, best way of installing livermask is using pip
, which
also works for conda environments.
(Optional) To add GPU inference support for liver vessel segmentation (which uses Chainer and CuPy), you need to install CuPy. This can be easily done by adding cupy-cudaX
, where X
is the CUDA version you have installed, for instance cupy-cuda110
for CUDA-11.0:
pip install cupy-cuda110
Program has been tested using Python 3.7 on Windows, macOS, and Ubuntu Linux 20.04.
livermask --input path-to-input --output path-to-output
If you wish to use the code directly (not as a CLI and without installing), you can run this command:
python -m livermask.livermask --input path-to-input --output path-to-output
Pipeline assumes input is in the NIfTI format, and output a binary volume in the same format (.nii or .nii.gz). DICOM can be converted to NIfTI using the CLI dcm2niix, as such:
dcm2niix -s y -m y -d 1 "path_to_CT_folder" "output_name"
Note that "-d 1" assumed that "path_to_CT_folder" is the folder just before the set of DICOM scans you want to import and convert. This can be removed if you want to convert multiple ones at the same time. It is possible to set "." for "output_name", which in theory should output a file with the same name as the DICOM folder, but that doesn't seem to happen...
You might have issues downloading the model when using VPN. If any issues are observed, try to disable VPN and try again.
If the program struggles to install, attempt to install using:
pip install --force-reinstall --no-deps git+https://github.com/andreped/livermask.git
If you experience issues with numpy after installing CuPy, try reinstalling CuPy with this extension:
pip install 'cupy-cuda110>=7.7.0,<8.0.0'
- Wang et al., Machine learning-based radiomic models for predicting metachronous liver metastases in colorectal cancer patients: a multimodal study, Research Square (preprint), 2024, https://doi.org/10.21203/rs.3.rs-3320033/v1
- Yevdokimov et al., Recognition of Diffuse Hepatic Steatosis, 33rd Conference of Open Innovations Association, FRUCT, 2023, https://doi.org/10.23919/FRUCT58615.2023.10143062
- Pérez de Frutos et al., Learning deep abdominal CT registration through adaptive loss weighting and synthetic data generation, PLOS ONE, 2023, https://doi.org/10.1371/journal.pone.0282110
- Lee et al., Robust End-to-End Focal Liver Lesion Detection Using Unregistered Multiphase Computed Tomography Images, IEEE Transactions on Emerging Topics in Computational Intelligence, 2021, https://doi.org/10.1109/TETCI.2021.3132382
- Survarachakan et al., Effects of Enhancement on Deep Learning Based Hepatic Vessel Segmentation, Electronics, 2021, https://doi.org/10.3390/electronics10101165
The segmentation models were evaluated on an internal dataset against manual annotations. See Table E in S4 Appendix in the Supporting Information of this paper for more information. The table presented there can also be seen below:
Class | DSC | HD95 |
---|---|---|
Parenchyma | 0.946±0.046 | 10.122±11.032 |
Vessels | 0.355±0.090 | 24.872±5.161 |
The parenchyma segmentation model was trained on the LITS dataset, whereas the vessel model was trained on a local dataset (Oslo-CoMet). The LITS dataset is openly accessible and can be downloaded from here.
The Oslo-CoMet included 60 patients, of which 11 representative patients were used as hold out sample for the performance metrics assessment.
If you found this tool helpful in your research, please, consider citing it (see here for more information on how to cite):
@software{andre_pedersen_2023_7574587, author = {André Pedersen and Javier Pérez de Frutos}, title = {andreped/livermask: v1.4.1}, month = jan, year = 2023, publisher = {Zenodo}, version = {v1.4.1}, doi = {10.5281/zenodo.7574587}, url = {https://doi.org/10.5281/zenodo.7574587} }
In addition, the segmentation performance of the tool was presented in this paper, thus, cite this tool as well if that is of relevance for you study:
@article{perezdefrutos2022ddmr, title = {Learning deep abdominal CT registration through adaptive loss weighting and synthetic data generation}, author = {Pérez de Frutos, Javier AND Pedersen, André AND Pelanis, Egidijus AND Bouget, David AND Survarachakan, Shanmugapriya AND Langø, Thomas AND Elle, Ole-Jakob AND Lindseth, Frank}, journal = {PLOS ONE}, publisher = {Public Library of Science}, year = {2023}, month = {02}, volume = {18}, doi = {10.1371/journal.pone.0282110}, url = {https://doi.org/10.1371/journal.pone.0282110}, pages = {1-14}, number = {2} }