MIMeta for PyTorch
Medical Imaging Meta Dataset
We release the MIMeta Dataset, a novel meta dataset comprised of 17 publicly available datasets containing a total of 28 tasks. We additionally prepared a private set of tasks derived from different datasets which will be used for validation and final testing of the submissions. All datasets included in the MIMeta dataset have been previously published under a creative commons licence. The dataset bears similarity to, and has partial overlap with, the Medical MNIST dataset. However, we go beyond Medical MNIST in the amount and diversity of tasks included in our dataset. Moreover, all images in MIMeta are standardized to an image size of 224x224 pixels which allows a more clinically meaningful analysis of the images. The MIMeta dataset and this library provide a resource for quickly benchmarking algorithms on a wide range of medical tasks.
You can see details about the MIMeta dataset as well as download the dataset from https://www.l2l-challenge.org/data.html.
PyTorch Library
This library allows easy access to all tasks in the MIMeta dataset as PyTorch datasets. It provides a unified interface to the data and allows for easy usage in PyTorch. The MIMeta library integrates with TorchCross, a PyTorch library for cross-domain learning, few-shot learning and meta-learning. It is therefore easy to use the MIMeta dataset in conjunction with TorchCross to perform cross-domain learning, few-shot learning or meta-learning experiments.
This library is still in alpha. The API is potentially subject to change. Any feedback is welcome.
Installation
The toolbox can be installed via pip:
pip install mimeta-pytorch
Basic Usage
The MIMeta dataset can be accessed via the mimeta.MIMeta class, which extends the
torch.utils.data.Dataset class. See the basic example below:
from mimeta import MIMeta
# Create the dataset for the Disease task of the OCT dataset, assuming
# the data is stored in the "data/MIMeta" directory
dataset = MIMeta("data/MIMeta", "OCT", "Disease")
# Get the first sample
sample = dataset[0]
print(sample[0].shape)
print(sample[1])
This will print the following:
torch.Size([1, 224, 224])
0
Advanced Usage
MIMeta builds on top of TorchCross, a library for cross-domain learning, few-shot learning and meta-learning in PyTorch. MIMeta can be used in conjunction with TorchCross to easily create cross-domain learning or few-shot learning experiments. To this end, MIMeta provides two convenience classes for generating batches from multiple MIMeta tasks and for generating few-shot insttances of multiple MIMeta tasks.
Examples
See the examples directory for examples on how to use MIMeta in conjunction with TorchCross.
imagenet_pretrained.pyshows how you can test pre-trained models on a few-shot instance of a MIMeta task.cross_domain_pretraining.pyshows how you can perform cross-domain pre-training on different MIMeta tasks and then test the pre-trained model on a few-shot instance of a MIMeta task.cross_domain_maml.pyshows how you can perform cross-domain meta-learning with MAML on different MIMeta tasks and then test the meta-learned model on multiple few-shot instances of a MIMeta task.fully_supervised.pyshows how you can perform fully-supervised learning on MIMeta tasks by using the TorchCrossSimpleClassifier.
Metadata
Release files for mimeta-pytorch 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mimeta_pytorch-0.0.6.tar.gz | 23.6 kB | Without provenance | Details for mimeta_pytorch-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mimeta_pytorch-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for mimeta_pytorch-0.0.6-py3-none-any.whl |
Total release size: 48.3 kB
Release files / mimeta_pytorch-0.0.6.tar.gz
| Download URL | mimeta_pytorch-0.0.6.tar.gz |
|---|---|
| Size | 23.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60c49c57e6c430b6043aef6022e3cb17580d3d7bc9fbce527810ad642e8eaf56
|
|
BLAKE2b-256 checksum How to use checksums |
1070175a876e3582d4ac1490eb404a599aaa6d5e4db027647da6e2bb5bcd9ffb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / mimeta_pytorch-0.0.6-py3-none-any.whl
| Download URL | mimeta_pytorch-0.0.6-py3-none-any.whl |
|---|---|
| Size | 24.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
162207854c06388ea8a26fd618f3eb06beb5537a3637f8c32ab29ea73d6af98c
|
|
BLAKE2b-256 checksum How to use checksums |
d43f76c8adc0fbe91acbe7ad25bb37d7a658e68d68ea21de41e8bce7de0bcf50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for mimeta-pytorch 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.