RN(Relation Network)

RN(Relation Network)

There are some details of reading and implementing the Relation Network for few-shot learning.

Contents


Paper & Code & note


Paper: Learning to Compare: Relation Network for Few-Shot Learning(CVPR 2018 paper)
Code: PyTorch(Few-Shot Learning part)
Note: RN for FSL

Paper


Abstract

RN_abstract.png
As abstract of the paper, their work mainly proposed a method called Realation Network (RN) to recognise new classes given only few examples from each.

  1. It based on meta-learning. That is to say, the RN learns a deep distance metric to compare a number of images with episodes, and it is a episode-based method.
  2. It classify images of new classes by computing relation scores. That is to say, there is a score in each query image with their relations of sample images in each class.

Problem Description

RN_PD.png

It shows the task of few-shot learning and the exists model.

Problem Solution

RN_PS.png

It includes Embedding module and Relation module of the RN.

References: [36, 39], RNNs: [39, 32, 29], Fine-tuning: [29, 10].

Conceptual Understanding

RN_CU.png

It describes what is meta-learning and how to classify query images.

Remaining Problem

RN_RP.png

It is the question in my mind in terms of the paper and the code.

Core Conception

RN_CC.png

It denotes the most important conception of Relation Network (RN) and explains the Embedding module and Relation module respectively.

Besides, the network architecture shows below.
RN_RN.png
RN_NA.png

Experimental Results

RN_Omniglot.png
RN_miniImagenet.png

There are results of carring RN on Omniglot and miniImagenet datasets in paper, which shows that RN got better performance when comparing with other state-of-the-art methods.

Code


Program block

RN_PB.png

It divides program files to three blocks, which are pre-process, train and test as well as the function list of the blocks.

Program explanation

RN_PE.png

It explains the details of the code blocks in each process.

Program improvement

RN_PI.png

Main work in my improved code are tackling problems and optimizing functions as well as train and test my personnal datasets.

References


[1] Sung F, Yang Y, Zhang L, et al. Learning to compare: Relation network for few-shot learning[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2018: 1199-1208.
[2] LearningToCompare_FSL. https://github.com/floodsung/LearningToCompare_FSL.
[3] Pytorch. https://github.com/pytorch/pytorch.

Note


RN_note.png


  DLFSLRN

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×