Skip to content

piyushsinghpasi/Few-shot-Image-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Group-Name: 69-Friday

Few Shot Learning(FSL)

We implement few shot learning for image classification and perform analysis on it.

FSL is implemented on Caltech-UCSD Birds-200-2011 dataset: link

We vary N and K for N-way K-shot model to test the effect of N and K on our model architecture. More details in the report.pdf

Model Architecture

The model pipeline is designed by us and is an amalgamation of different techniques we have come acrosss. Model architecture

References: 

a. https://towardsdatascience.com/few-shot-learning-with-prototypical-networks-87949de03ccd?gi=7937389e2697
b. https://www.analyticsvidhya.com/blog/2021/05/an-introduction-to-few-shot-learning/#:~:text=Few%2Dshot%20learning%20is%20the,generalize%20to%20the%20test%20set.
c. http://www.vision.caltech.edu/visipedia/CUB-200-2011.html
d. https://sicara.ai/blog/your-few-shot-model-15mn-pytorch
e. https://blog.floydhub.com/n-shot-learning/
f. https://www.kaggle.com/code/iamleonie/few-shot-learning-tutorial-1-n-way-k-shot/notebook
g. https://github.com/MegviiDetection/FSCE
h. https://github.com/sicara/easy-few-shot-learning
i. https://github.com/YapengTian/AVVP-ECCV20/blob/master/nets/net_audiovisual.py#L38
 

Code base link : new link

Guide how to run code on colab (use above code base):

  1. Download python notebook file shared from above code base link and also data set.
  2. Go to cell number 4 and change 'N=5' and 'K=5' and mode= 'test' or 'train' as per you aim your cell no. 4 for training should look like ----> args = "--model-name [model_name] --N 5 --K 5 --mode [train|test]" look for help in argparser
  3. Finally go to runtime change it to 'GPU' and run all cells. (CPU can be used but it's too slow, for CPU change device='cpu' in train.py)

For running with terminal (use git code base)

Refer to argparser, modify paths in dataloader to relative utils path.
There is an example command in the train.py file.

About

FSL for image classification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages