• Stars
    star
    132
  • Rank 274,205 (Top 6 %)
  • Language
    Jupyter Notebook
  • Created almost 7 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tensorflow implementation of NIPS 2017 Paper "Prototypical Networks for Few-shot Learning"

Prototypical Networks for Few-shot Learning

Tensorflow implementation of NIPS 2017 Paper Prototypical Networks for Few-shot Learning[1].

This code has been ported from the official implementation in PyTorch (jakesnell/prototypical-networks) and may be buggy.

Usage

Omniglot Dataset

  • Download the Omniglot dataset by executing download_omniglot.sh
  • Use the IPython Notebook ProtoNet-Omniglot.ipynb

mini ImageNet v2

Downloading Images

  • Create an account on image-net.org with your institutional ID.
  • Replace <username> and <accesskey> in download_miniimagenet.sh with the username and accesskey you receive upon registration.
  • Run download_miniimagenet.sh which will download 84 ImageNet classes from ILSVRC2011. (64 train + 20 test)

Testing on miniImageNet

  • Run create_miniimagenet.py which will generate mini-imagenet-train.npy and mini-imagenet-test.npy which are numpy arrays of shapes 64 x 350 x 84 x 84 x 3 and 20 x 350 x 84 x 84 x 3 respectively.
  • Use the IPython Notebook ProtoNet-MiniImageNet-v2.ipynb.

NOTE: This miniImageNet dataset is not identical to the one used by Ravi et. al.[2] They have used images from ILSVRC2012 which can be downloaded from here. Ravi et. al. have used 100 classes (64 training + 16 validation + 20 test) with 600 examples from each class. The script provided in this dataset downloads images from image-net.org which currently (Feb, 2018) contains images from ILSVRC2011. Therefore, some of the classes suggested by Ravi et. al. have less than 600 examples. For this reason, the number of examples of each class has been reduced to 350. The scripts provided download images corresponding to 84 classes (64 train + 20 test), the ones suggested by Ravi et. al., and then randomly samples 350 examples for each class.

References

[1] Jake Snell, Kevin Swersky, and Richard S. Zemel. Prototypical networks for few-shot learning.
[2] Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning.

More Repositories

1

twitter-sentiment-analysis

Sentiment analysis on tweets using Naive Bayes, SVM, CNN, LSTM, etc.
Python
1,506
star
2

ZipBomb

A simple implementation of ZipBomb in Python
Python
325
star
3

normalizing-flows

Understanding normalizing flows
Jupyter Notebook
131
star
4

pyANPD

Automatic Number Plate Detection for Python using OpenCV
Python
66
star
5

sampling-methods-numpy

This repository contains implementations of some basic sampling methods in numpy.
Jupyter Notebook
63
star
6

langevin-monte-carlo

A simple pytorch implementation of Langevin Monte Carlo algorithms.
Jupyter Notebook
40
star
7

REDSDS

Pytorch implementation of RED-SDS (NeurIPS 2021).
Python
18
star
8

jcomplexnumber

A library which implements the complex number data type in Java.
Java
18
star
9

planar-flow-pytorch

Pytorch implementation of Planar Flow
Jupyter Notebook
18
star
10

Youtube-via-FB

A tool to control YouTube using Facebook messenger by browser automation using selenium.
Python
14
star
11

pyBlur

Soft Blurring in Python using OpenCV
Python
10
star
12

IWAE-tensorflow

Tensorflow implementation of Importance Weighted Auto Encoder
Python
5
star
13

fb-mosaic

Create a mosaic using profiles pictures from Facebook.
Python
4
star
14

SimulatedAnnealing-TSP

Simulated Annealing heuristic to solve the travelling salesman problem written in JavaScript.
JavaScript
4
star
15

blood-analysis-app

Android Source for GSoC '16 project Mobile Based Blood Analysis with Computational Biology @ UNL.
Java
4
star
16

JEvoLisa

Java reimplementation of Roger Alsing's EvoLisa
Java
3
star
17

capsule-networks-pytorch

PyTorch implementation of Capsule Networks
Python
2
star
18

subKmeans

Numpy and pyCUDA implementation of subKmeans
Python
1
star
19

learn-jax

Learning JAX as a PyTorch User
Jupyter Notebook
1
star
20

blood-analysis-app-ios

iOS Source for GSoC '17 project Mobile Based Blood Analysis-iOS with Computational Biology @ UNL.
Swift
1
star
21

learning2learn-pytorch

Jupyter Notebook
1
star
22

neural-ode

Jupyter Notebook
1
star
23

Blood-Analysis

TeX
1
star
24

vae-tensorflow

Variational Auto-Encoder based on DC-GAN-like architecture
Jupyter Notebook
1
star
25

disentanglement-metrics

A list of different disentanglement metrics proposed in literature.
1
star