Practical overview
When it fits
Use it when you need research code and benchmark workflows for training or testing few-shot image classifiers, particularly on the datasets and environment described in the README.
Who it is for
- Researchers comparing meta-learning and classifier-baseline methods for few-shot image classification.
- Practitioners running the repository's benchmark workflows or adapting its configurable dataset pattern for image-classification experiments.
Documented uses
- Train Classifier-Baseline or Meta-Baseline models on supported image-classification datasets.
- Test saved models in one-shot or other configured few-shot settings.
- Evaluate single-class AUC using the test script's documented option.
- Compare repository-reported 5-way benchmark results across methods and datasets.
Requirements & limits
The repository is public and lists an MIT license.
- The documented environment specifies Python 3.7.3, PyTorch 1.2.0 and tensorboardX.
- Dataset files must be downloaded and placed or linked under the expected materials/ paths.
- Training supports GPU selection through a command-line option; the README describes multi-GPU counts for its benchmark training runs.
- The README's default evaluation setting is one-shot; other shot counts require changing the configuration.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Prepare a benchmark dataset and configure few-shot evaluation
Set up a documented dataset path and adjust the experiment's shot count.
Before you start
- Python 3.7.3, PyTorch 1.2.0 and tensorboardX.
- A downloaded dataset arranged according to the repository's dataset instructions.
Steps
Download a supported dataset and link its folder under materials/ using the expected name: mini-imagenet, tiered-imagenet or imagenet.
For ImageNet, use the documented ILSVRC-2012 layout with train and val directories containing class folders.
Edit the relevant configuration file to set dataset or model arguments; set root_path if the dataset is not at the default materials/{DATASET_NAME} location.
To evaluate a different number of examples per class, change shot in the configuration; the default is one-shot.
Expected outcome
A dataset and shot setting configured for the repository's training or few-shot evaluation workflows.
Guide limitations
- These preparation steps do not train or evaluate a model.
- The README does not demonstrate adapting the dataset configuration to arbitrary custom data.
Configure and run few-shot testing with a saved model
Use the documented test script with a saved Meta-Baseline model or Classifier-Baseline encoder.
Before you start
- A prepared supported dataset.
- A saved model checkpoint, or a saved Classifier-Baseline checkpoint whose encoder can be loaded.
- The documented Python, PyTorch and tensorboardX environment.
Steps
Edit configs/test_few_shot.yaml and set load to the Meta-Baseline checkpoint, or load_encoder to the Classifier-Baseline checkpoint.
Run python test_few_shot.py --shot 1 for one-shot testing; use the documented shot setting for the intended experiment.
For single-class AUC evaluation, add --sauc to the test command.
Expected outcome
The repository's few-shot test workflow is configured to evaluate the selected saved model; the README also documents an option for single-class AUC.
Guide limitations
- This guide covers testing with a checkpoint, not training a model or validating an arbitrary dataset.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 8 November 2026
- Original website title
- yinboc/few-shot-meta-baseline · Official homepage title · retained in its source language

