[![PyPI version](https://badge.fury.io/py/dafne.svg)](https://badge.fury.io/py/dafne)
[![PDF Documentation](https://img.shields.io/badge/Docs-pdf-brightgreen)](https://www.dafne.network/files/documentation.pdf)
[![HTML Documentation](https://img.shields.io/badge/Docs-html-brightgreen)](https://www.dafne.network/documentation/)
# Dafne
Deep Anatomical Federated Network is a program for the segmentation of medical images. It relies on a server to provide deep learning models to aid the segmentation, and incremental learning is used to improve the performance. See https://www.dafne.network/ for documentation and user information.
## Windows binary installation
Please install the Visual Studio Redistributable Package under windows: https://aka.ms/vs/16/release/vc_redist.x64.exe
Then, run the provided installer
## Mac binary installation
Install the Dafne App from the downloaded .dmg file as usual. Make sure to download the archive appropriate for your architecture (x86 or arm).
## Linux binary installation
The Linux distribution is a self-contained executable file. Simply download it, make it executable, and run it.
## pip installation
Dafne can also be installed with pip
`pip install dafne`
# Citing
If you are writing a scientific paper, and you used Dafne for your data evaluation, please cite the following paper:
> Santini F, Wasserthal J, Agosti A, et al. *Deep Anatomical Federated Network (Dafne): an open client/server framework for the continuous collaborative improvement of deep-learning-based medical image segmentation*. 2023 doi: [10.48550/arXiv.2302.06352](https://doi.org/10.48550/arXiv.2302.06352).
# Notes for developers
## dafne
Run:
`python dafne.py <path_to_dicom_img>`
## Notes for the DL models
### Apply functions
The input of the apply function is:
```
dict({
'image': np.array (2D image)
'resolution': sequence with two elements (image resolution in mm)
'split_laterality': True/False (indicates whether the ROIs should be split in L/R if applicable)
'classification': str - The classification tag of the image (optional, to identify model variants)
})
```
The output of the classifier is a string.
The output of the segmenters is:
```
dict({
roi_name_1: np.array (2D mask),
roi_name_2: ...
})
```
### Incremental learn functions
The input of the incremental learn functions are:
```
training data: dict({
'resolution': sequence (see above)
'classification': str (see above)
'image_list': list([
- np.array (2D image)
- np.array (2D image)
- ...
])
})
training outputs: list([
- dict({
roi_name_1: np.array (2D mask)
roi_name_2: ...
})
- dict...
```
Every entry in the training outputs list corresponds to an entry in the image_list inside the training data.
So `len(training_data['image_list']) == len(training_outputs)`.
# Acknowledgments
Input/Output is based on [DOSMA](https://github.com/ad12/DOSMA) - GPLv3 license
This software includes the [Segment Anything Model (SAM)](https://github.com/facebookresearch/segment-anything) - Apache 2.0 license
Other packages required for this project are listed in requirements.txt
Raw data
{
"_id": null,
"home_page": "https://github.com/dafne-imaging/dafne",
"name": "dafne",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Francesco Santini",
"author_email": "francesco.santini@unibas.ch",
"download_url": "https://files.pythonhosted.org/packages/49/2a/c1ff91863055c081cd5235272b39cff2d7a78a2c6d0133385bd3e5bed3f2/dafne-1.9a2.tar.gz",
"platform": null,
"description": "[![PyPI version](https://badge.fury.io/py/dafne.svg)](https://badge.fury.io/py/dafne)\n[![PDF Documentation](https://img.shields.io/badge/Docs-pdf-brightgreen)](https://www.dafne.network/files/documentation.pdf)\n[![HTML Documentation](https://img.shields.io/badge/Docs-html-brightgreen)](https://www.dafne.network/documentation/)\n\n# Dafne\nDeep Anatomical Federated Network is a program for the segmentation of medical images. It relies on a server to provide deep learning models to aid the segmentation, and incremental learning is used to improve the performance. See https://www.dafne.network/ for documentation and user information.\n\n## Windows binary installation\nPlease install the Visual Studio Redistributable Package under windows: https://aka.ms/vs/16/release/vc_redist.x64.exe\nThen, run the provided installer\n\n## Mac binary installation\nInstall the Dafne App from the downloaded .dmg file as usual. Make sure to download the archive appropriate for your architecture (x86 or arm).\n\n## Linux binary installation\nThe Linux distribution is a self-contained executable file. Simply download it, make it executable, and run it.\n\n## pip installation\nDafne can also be installed with pip\n`pip install dafne`\n\n# Citing\nIf you are writing a scientific paper, and you used Dafne for your data evaluation, please cite the following paper:\n\n> Santini F, Wasserthal J, Agosti A, et al. *Deep Anatomical Federated Network (Dafne): an open client/server framework for the continuous collaborative improvement of deep-learning-based medical image segmentation*. 2023 doi: [10.48550/arXiv.2302.06352](https://doi.org/10.48550/arXiv.2302.06352).\n\n\n# Notes for developers\n\n## dafne\n\nRun: \n`python dafne.py <path_to_dicom_img>`\n\n\n## Notes for the DL models\n\n### Apply functions\nThe input of the apply function is:\n```\ndict({\n 'image': np.array (2D image)\n 'resolution': sequence with two elements (image resolution in mm)\n 'split_laterality': True/False (indicates whether the ROIs should be split in L/R if applicable)\n 'classification': str - The classification tag of the image (optional, to identify model variants)\n})\n```\n\nThe output of the classifier is a string.\nThe output of the segmenters is:\n```\ndict({\n roi_name_1: np.array (2D mask),\n roi_name_2: ...\n})\n``` \n\n### Incremental learn functions\nThe input of the incremental learn functions are:\n```\ntraining data: dict({\n 'resolution': sequence (see above)\n 'classification': str (see above)\n 'image_list': list([\n - np.array (2D image)\n - np.array (2D image)\n - ...\n ])\n})\n\ntraining outputs: list([\n - dict({\n roi_name_1: np.array (2D mask)\n roi_name_2: ...\n })\n - dict...\n```\n\nEvery entry in the training outputs list corresponds to an entry in the image_list inside the training data.\nSo `len(training_data['image_list']) == len(training_outputs)`.\n\n# Acknowledgments\nInput/Output is based on [DOSMA](https://github.com/ad12/DOSMA) - GPLv3 license\n\nThis software includes the [Segment Anything Model (SAM)](https://github.com/facebookresearch/segment-anything) - Apache 2.0 license\n\nOther packages required for this project are listed in requirements.txt\n",
"bugtrack_url": null,
"license": null,
"summary": "Dafne - Deep Anatomical Federated Network",
"version": "1.9a2",
"project_urls": {
"Bug Tracker": "https://github.com/dafne-imaging/dafne/issues",
"Homepage": "https://github.com/dafne-imaging/dafne"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ddf577a316dff2fcfdaca079bf511ddba87735c87b5e6ba327201f7812cb708a",
"md5": "6795b9572210d09a00e384fac3fb3043",
"sha256": "d03199d6778f745753b3c33c2e032d4d427f5a0a1ba91ecc9ff02447f98187d3"
},
"downloads": -1,
"filename": "dafne-1.9a2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6795b9572210d09a00e384fac3fb3043",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 618596,
"upload_time": "2024-12-16T14:28:43",
"upload_time_iso_8601": "2024-12-16T14:28:43.926810Z",
"url": "https://files.pythonhosted.org/packages/dd/f5/77a316dff2fcfdaca079bf511ddba87735c87b5e6ba327201f7812cb708a/dafne-1.9a2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "492ac1ff91863055c081cd5235272b39cff2d7a78a2c6d0133385bd3e5bed3f2",
"md5": "8492a9761de450a414e30faea66d0d92",
"sha256": "269cb6b38d6b444d01275b7ab0d7250744ed8d32aa089cdc12fb1b8614733cd2"
},
"downloads": -1,
"filename": "dafne-1.9a2.tar.gz",
"has_sig": false,
"md5_digest": "8492a9761de450a414e30faea66d0d92",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 593241,
"upload_time": "2024-12-16T14:28:47",
"upload_time_iso_8601": "2024-12-16T14:28:47.092089Z",
"url": "https://files.pythonhosted.org/packages/49/2a/c1ff91863055c081cd5235272b39cff2d7a78a2c6d0133385bd3e5bed3f2/dafne-1.9a2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-16 14:28:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dafne-imaging",
"github_project": "dafne",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "h5py",
"specs": []
},
{
"name": "numpy",
"specs": []
},
{
"name": "scipy",
"specs": []
},
{
"name": "matplotlib",
"specs": []
},
{
"name": "pyqt5",
"specs": []
},
{
"name": "nibabel",
"specs": []
},
{
"name": "pydicom",
"specs": []
},
{
"name": "dill",
"specs": []
},
{
"name": "progress",
"specs": []
},
{
"name": "appdirs",
"specs": []
},
{
"name": "requests",
"specs": []
},
{
"name": "scikit-image",
"specs": []
},
{
"name": "ormir-pyvoxel",
"specs": []
},
{
"name": "importlib_resources",
"specs": []
},
{
"name": "dafne-dl",
"specs": [
[
">=",
"1.4a2"
]
]
},
{
"name": "flexidep",
"specs": [
[
">=",
"0.0.6"
]
]
},
{
"name": "pyvistaqt",
"specs": []
},
{
"name": "torch",
"specs": []
},
{
"name": "torchvision",
"specs": []
},
{
"name": "dafne-dicomUtils",
"specs": []
}
],
"lcname": "dafne"
}