magms

Modality-Agnostic Learning for Medical Image Segmentation Using Multi-modality Self-distillation

https://github.com/kisonho/magnet

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org, ieee.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.7%) to scientific vocabulary

Keywords

computer-vision machine-learning medical-imaging segmentation self-distillation
Last synced: 7 months ago · JSON representation ·

Repository

Modality-Agnostic Learning for Medical Image Segmentation Using Multi-modality Self-distillation

Basic Info
  • Host: GitHub
  • Owner: kisonho
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 362 KB
Statistics
  • Stars: 6
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 19
Topics
computer-vision machine-learning medical-imaging segmentation self-distillation
Created over 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

Modality-Agnostic Learning for Medical Image Segmentation Using Multi-modality Self-distillation

This is the official implementation of MAG-MS.

For the official implementation of MAGNET: A Modality-Agnostic Networks for Medical Image Segmentation, please check to branch stable-1.1.

MAG-MS is designed to be compatible with MAGNET (v1). The new MAGNET (v2) used in MAG-MS is designed to support multi-modality self-distillation and multi-modality feature distillation.

Pre-request

Installation

Use the package manager pip to install MAG-MS. bash pip install magms

Get Started

  1. Load datasets python training_dataset = ... validation_dataset = ...

  2. Simpy build the MAGNET (UNETR backbone) with magnet.build function, or use the magnet.build_v2 (UNETR backbone)/magnet.build_v2_unet (3D UNet backbone) function for the new MAGNET used in MAG-MS python num_modalities: int = ... num_classes: int = ... img_size: Union[int, Sequence[int]] = ... model = magnet.build_v2(num_modalities, num_classes, img_size, target_dict=target_dict)

  3. Or use the deeper magnet.nn framework to customize MAGNET backbone python encoder1: torch.nn.Module = ... encoder2: torch.nn.Module = ... fusion: torch.nn.Module = ... decoder: torch.nn.Module = ... model = magnet.nn.MAGNET2(encoder1, encoder2, fusion=fusion, decoder=decoder)

  4. Define MAGMS loss function python main_loss_fn: list[Callable[[Any, Any], torch.Tensor]] = ... kldiv_loss_fn: list[Callable[[Any, Any], torch.Tensor]] = ... mse_loss_fn: list[Callable[[Any, Any], torch.Tensor]] = ... self_distillation_loss_fn = magnet.losses.MAGSelfDistillationLoss(main_loss_fn, kldiv_loss_fn) feature_distillation_loss_fn = magnet.losses.MAGFeatureDistillationLoss(self_distillation_loss_fn, mse_loss_fn) loss_fn = feature_distillation_loss_fn

  5. Compile manager and train/test ```python optimizer = ... metric_fns = ...

epochs = ... callbacks = ...

manager = magnet.Manager(model, optimizer, lossfn=lossfn, metricfns=metricfns) manager.fit(trainingdataset, epochs, valdataset=validationdataset, callbacks=callbacks) summary.test(validationdataset) print(summary) ```

Monai Support

  • Using magnet.MonaigManager instead of Manager
  • Post processing support with post_labels and post_predicts ```python postlabels = [...] postpredicts = [...]

manager = magnet.MonaigManager(model, postlabels=postlabels, postpredicts=postpredicts, optimizer=optimizer, lossfn=lossfn, metricfns=metricfns) ```

Cite this work

bibtex @article{he2023modality, title={Modality-Agnostic Learning for Medical Image Segmentation Using Multi-modality Self-distillation}, author={He, Qisheng and Summerfield, Nicholas and Dong, Ming and Glide-Hurst, Carri}, journal={arXiv preprint arXiv:2306.03730}, year={2023} }

Owner

  • Name: Qisheng Robert He
  • Login: kisonho
  • Kind: user
  • Location: Detroit
  • Company: Wayne State University

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this framework, please cite it as below."
authors:
- family-names: "He"
  given-names: "Qisheng"
- family-names: "Nicholas"
  given-names: "Summerfield"
- family-names: "Dong"
  given-names: "Ming"
- family-names: "Glide-Hurst"
  given-names: "Carri"
title: "Modality-Agnostic Learning for Medical Image Segmentation Using Multi-modality Self-distillation"
date-released: 2023
preferred-citation: 
  type: "article"
  message: "If you use this framework, please cite it as below."
  authors:
  - family-names: "He"
    given-names: "Qisheng"
  - family-names: "Nicholas"
    given-names: "Summerfield"
  - family-names: "Dong"
    given-names: "Ming"
  - family-names: "Glide-Hurst"
    given-names: "Carri"
  title: "Modality-Agnostic Learning for Medical Image Segmentation Using Multi-modality Self-distillation"
  date-released: 2023
  journal: "arXiv preprint arXiv:2306.03730"

GitHub Events

Total
  • Watch event: 2
  • Delete event: 1
  • Push event: 1
Last Year
  • Watch event: 2
  • Delete event: 1
  • Push event: 1

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 57 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 14
  • Total maintainers: 1
pypi.org: magms

Modality-Agnostic Learning for Medical Image Segmentation Using Multi-modality Self-distillation (v2.2)

  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 57 Last month
Rankings
Dependent packages count: 10.7%
Average: 35.6%
Dependent repos count: 60.4%
Maintainers (1)
Last synced: 8 months ago