magms
Modality-Agnostic Learning for Medical Image Segmentation Using Multi-modality Self-distillation
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
Repository
Modality-Agnostic Learning for Medical Image Segmentation Using Multi-modality Self-distillation
Basic Info
Statistics
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 19
Topics
Metadata Files
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
- Python >= 3.9
- PyTorch >= 1.12.1
- torchmanager >= 1.1
- Monai >= 1.1
Installation
Use the package manager pip to install MAG-MS.
bash
pip install magms
Get Started
Load datasets
python training_dataset = ... validation_dataset = ...Simpy build the MAGNET (UNETR backbone) with
magnet.buildfunction, or use themagnet.build_v2(UNETR backbone)/magnet.build_v2_unet(3D UNet backbone) function for the new MAGNET used in MAG-MSpython 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)Or use the deeper
magnet.nnframework to customize MAGNET backbonepython 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)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_fnCompile 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.MonaigManagerinstead ofManager - Post processing support with
post_labelsandpost_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
- Repositories: 1
- Profile: https://github.com/kisonho
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)
- Homepage: https://github.com/kisonho/magnet.git
- Documentation: https://magms.readthedocs.io/
- License: apache-2.0
-
Latest release: 2.1.1
published almost 2 years ago