HyperAIHyperAI

Command Palette

Search for a command to run...

4 months ago

Learning to Compare: Relation Network for Few-Shot Learning

Flood Sung; Yongxin Yang; Li Zhang; Tao Xiang; Philip H.S. Torr; Timothy M. Hospedales

Learning to Compare: Relation Network for Few-Shot Learning

Abstract

We present a conceptually simple, flexible, and general framework for few-shot learning, where a classifier must learn to recognise new classes given only few examples from each. Our method, called the Relation Network (RN), is trained end-to-end from scratch. During meta-learning, it learns to learn a deep distance metric to compare a small number of images within episodes, each of which is designed to simulate the few-shot setting. Once trained, a RN is able to classify images of new classes by computing relation scores between query images and the few examples of each new class without further updating the network. Besides providing improved performance on few-shot learning, our framework is easily extended to zero-shot learning. Extensive experiments on five benchmarks demonstrate that our simple approach provides a unified and effective approach for both of these two tasks.

Code Repositories

Mind23-2/MindCode-66
mindspore
Mentioned in GitHub
lzrobots/LearningToCompare_ZSL
pytorch
Mentioned in GitHub
Atharva-Phatak/One-Shot-Art
pytorch
Mentioned in GitHub
prolearner/LearningToCompareTF
tf
Mentioned in GitHub
knnaraghi/fewshot
tf
Mentioned in GitHub
laohur/RelationNet
pytorch
Mentioned in GitHub
jiakangyuan/helixformer
pytorch
Mentioned in GitHub
floodsung/LearningToCompare_FSL
pytorch
Mentioned in GitHub
laohur/LearnToCompareText
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
few-shot-image-classification-on-cifar-fs-5-1Relation Networks*
Accuracy: 69.3
few-shot-image-classification-on-cub-200-5Relation Net
Accuracy: 65.32
few-shot-image-classification-on-cub-200-5-1Relation Net
Accuracy: 50.44
few-shot-image-classification-on-meta-datasetRelation Networks
Accuracy: 53.315
few-shot-image-classification-on-meta-dataset-1Relation Networks
Mean Rank: 11.8
few-shot-image-classification-on-mini-12Relation Networks
Accuracy: 34.9
few-shot-image-classification-on-mini-13Relation Networks
Accuracy: 47.9
few-shot-image-classification-on-mini-2Relation Net (Sung et al., 2018)
Accuracy: 50.4
few-shot-image-classification-on-mini-5RelationNet (Sung et al., 2018)
Accuracy: 42.91
few-shot-image-classification-on-omniglot-1-1Relation Net
Accuracy: 97.6%
few-shot-image-classification-on-omniglot-1-2Relation Net
Accuracy: 99.6
few-shot-image-classification-on-omniglot-5-1Relation Net
Accuracy: 99.1%
few-shot-image-classification-on-omniglot-5-2Relation Net
Accuracy: 99.8
few-shot-image-classification-on-tiered-2Relation Networks
Accuracy: 36.3
few-shot-image-classification-on-tiered-3Relation Networks
Accuracy: 58.0
image-classification-on-tiered-imagenet-5-wayRelation Net
Accuracy: 71.31

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
Learning to Compare: Relation Network for Few-Shot Learning | Papers | HyperAI