Package: mimeta-pytorch
MIMeta for PyTorchMedical Imaging Meta DatasetWe 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 fromhttps://www.l2l-challenge.org/data.html.PyTorch LibraryThis 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 withTorchCross, 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.InstallationThe toolbox can be installed via pip:pipinstallmimeta-pytorchBasic UsageThe MIMeta dataset can be accessed via themimeta.MIMetaclass, which extends thetorch.utils.data.Datasetclass. See the basic example below:frommimetaimportMIMeta# Create the dataset for the Disease task of the OCT dataset, assuming# the data is stored in the "data/MIMeta" directorydataset=MIMeta("data/MIMeta","OCT","Disease")# Get the first samplesample=dataset[0]print(sample[0].shape)print(sample[1])This will print the following:torch.Size([1,224,224])0Advanced UsageMIMeta builds on top ofTorchCross,
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.ExamplesSee theexamplesdirectory for examples on how to use MIMeta in conjunction
withTorchCross.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 withMAMLon 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.