Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PyPI version PDF Documentation HTML 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.

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 - GPLv3 license

This software includes the Segment Anything Model (SAM) - Apache 2.0 license

Other packages required for this project are listed in requirements.txt

Metadata

Release files for dafne 2.1.1a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dafne 2.1.1a2
File Size Uploaded
dafne-2.1.1a2.tar.gz 619.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dafne 2.1.1a2
File Interpreter ABI Platform
dafne-2.1.1a2-py3-none-any.whl Python 3 none any Details

Total release size: 1.3 MB

Release files / dafne-2.1.1a2.tar.gz

Download URL dafne-2.1.1a2.tar.gz
Size 619.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f1e6141dd544f52e5a3ac3826593cb350e7b7a139fa1976733ae0c3812622a81
BLAKE2b-256 checksum
How to use checksums
4e23bb535539443b0a4a09a38c9d6438c292e0136c114f7401652988c40af906
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / dafne-2.1.1a2-py3-none-any.whl

Download URL dafne-2.1.1a2-py3-none-any.whl
Size 642.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81607584c85b50a8c04d8f4af6da65fead9e9c4856a5c66415afa308f3ff4f43
BLAKE2b-256 checksum
How to use checksums
2dc1ebae695d2928fc80b43daaec0cd068bda3edb85fb8fe37e420d77a90f69e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page