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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dafne-2.0.2a0.tar.gz (606.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dafne-2.0.2a0-py3-none-any.whl (633.1 kB view details)

Uploaded Python 3

File details

Details for the file dafne-2.0.2a0.tar.gz.

File metadata

  • Download URL: dafne-2.0.2a0.tar.gz
  • Upload date:
  • Size: 606.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for dafne-2.0.2a0.tar.gz
Algorithm Hash digest
SHA256 534786c638a9ce58bc00cc3924facc3a78e5152aa1b48b7724049fac5bdedfc2
MD5 58bd4f8790cec49cee60460b127c8da3
BLAKE2b-256 f18b2b43a30429b3c4958133f1b33f5731ab64a4d932648f7468ddd2792069d7

See more details on using hashes here.

File details

Details for the file dafne-2.0.2a0-py3-none-any.whl.

File metadata

  • Download URL: dafne-2.0.2a0-py3-none-any.whl
  • Upload date:
  • Size: 633.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for dafne-2.0.2a0-py3-none-any.whl
Algorithm Hash digest
SHA256 083f6ba7de7a2fd765e8f84f508b6ad323d30cd76b135c9fdcbf07b231b10acc
MD5 8b30045106aed92d5933412f81b649ec
BLAKE2b-256 27fbd9a24e2eedc13033cde3ea35714f2efad83496380a53b15275ed82ca15d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page