All Projects → shaohua0116 → Multidigitmnist

shaohua0116 / Multidigitmnist

Licence: mit
Combine multiple MNIST digits to create datasets with 100/1000 classes for few-shot learning/meta-learning

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Multidigitmnist

LibFewShot
LibFewShot: A Comprehensive Library for Few-shot Learning.
Stars: ✭ 629 (+1210.42%)
Mutual labels:  image-classification, meta-learning
Medmnist
[ISBI'21] MedMNIST Classification Decathlon: A Lightweight AutoML Benchmark for Medical Image Analysis
Stars: ✭ 338 (+604.17%)
Mutual labels:  dataset, mnist
catacomb
The simplest machine learning library for launching UIs, running evaluations, and comparing model performance.
Stars: ✭ 13 (-72.92%)
Mutual labels:  mnist, image-classification
Fashion Mnist
A MNIST-like fashion product database. Benchmark 👇
Stars: ✭ 9,675 (+20056.25%)
Mutual labels:  dataset, mnist
Cvat
Powerful and efficient Computer Vision Annotation Tool (CVAT)
Stars: ✭ 6,557 (+13560.42%)
Mutual labels:  dataset, image-classification
Protest Detection Violence Estimation
Implementation of the model used in the paper Protest Activity Detection and Perceived Violence Estimation from Social Media Images (ACM Multimedia 2017)
Stars: ✭ 114 (+137.5%)
Mutual labels:  dataset, image-classification
MNIST
Handwritten digit recognizer using a feed-forward neural network and the MNIST dataset of 70,000 human-labeled handwritten digits.
Stars: ✭ 28 (-41.67%)
Mutual labels:  mnist, image-classification
pytorch-siamese-triplet
One-Shot Learning with Triplet CNNs in Pytorch
Stars: ✭ 74 (+54.17%)
Mutual labels:  mnist, meta-learning
Metaoptnet
Meta-Learning with Differentiable Convex Optimization (CVPR 2019 Oral)
Stars: ✭ 412 (+758.33%)
Mutual labels:  meta-learning, image-classification
Free Spoken Digit Dataset
A free audio dataset of spoken digits. Think MNIST for audio.
Stars: ✭ 396 (+725%)
Mutual labels:  dataset, mnist
Codar
✅ CODAR is a Framework built using PyTorch to analyze post (Text+Media) and predict Cyber Bullying and offensive content. 💬📷
Stars: ✭ 52 (+8.33%)
Mutual labels:  dataset, image-classification
Awesome Project Ideas
Curated list of Machine Learning, NLP, Vision, Recommender Systems Project Ideas
Stars: ✭ 6,114 (+12637.5%)
Mutual labels:  dataset, image-classification
Images Web Crawler
This package is a complete tool for creating a large dataset of images (specially designed -but not only- for machine learning enthusiasts). It can crawl the web, download images, rename / resize / covert the images and merge folders..
Stars: ✭ 51 (+6.25%)
Mutual labels:  dataset, image-classification
Mini Imagenet Tools
Tools for generating mini-ImageNet dataset and processing batches
Stars: ✭ 209 (+335.42%)
Mutual labels:  dataset, meta-learning
Trashnet
Dataset of images of trash; Torch-based CNN for garbage image classification
Stars: ✭ 368 (+666.67%)
Mutual labels:  dataset, image-classification
Label Studio
Label Studio is a multi-type data labeling and annotation tool with standardized output format
Stars: ✭ 7,264 (+15033.33%)
Mutual labels:  dataset, image-classification
Deep learning projects
Stars: ✭ 28 (-41.67%)
Mutual labels:  dataset, image-classification
Pts
Quantized Mesh Terrain Data Generator and Server for CesiumJS Library
Stars: ✭ 36 (-25%)
Mutual labels:  dataset
Hardhat Detector
A convolutional neural network implementation of a script that detects whether an individual is wearing a hardhat or not.
Stars: ✭ 41 (-14.58%)
Mutual labels:  image-classification
Okutama Action
Okutama-Action: An Aerial View Video Dataset for Concurrent Human Action Detection
Stars: ✭ 36 (-25%)
Mutual labels:  dataset

Multi-digit MNIST for Few-shot Learning

Multi-digit MNIST generator creates datasets consisting of handwritten digit images from MNIST for few-shot image classification and meta-learning. It simply samples images from MNIST dataset and put digits together to create images with multiple digits. It also creates training/validation/testing splits (64/20/16 classes for DoubleMNIST and 640/200/160 for TripleMNIST).

You can generate customized by following the cammands provided in Usage to change the number of images in each class, the image size, etc. You can also download generated datasets from Datasets.

This repository benchmarks the performance of MAML (Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks) using datasets created via the generation script in a variety of settings.

Some examples of images from the datasets are as follows.

  • Double MNIST Datasets (100 classes: 00 to 99)
Class 10 48 59 62 73
Image
  • Triple MNIST Datasets (1000 classes: 000 to 999)
Class 039 146 258 512 874
Image

Prerequisites

Usage

Generate a DoubleMNIST dataset with 1k images for each class

python generator.py --num_image_per_class 1000 --multimnist_path ./dataset/double_mnist --num_digit 2 --image_size 64 64

Generate a TripleMNIST dataset with 1k images for each class

python generator.py --num_image_per_class 1000 --multimnist_path ./dataset/triple_mnist --num_digit 3 --image_size 84 84

Arguments

  • --mnist_path: the path to the MNIST dataset (download it if not found)
  • --multimnist_path: the path to the output Multi-digit MNIST dataset
  • --num_digit: how many digits in an image
  • --train_val_test_ratio: determine how many classes for train, val, and test
  • --image_size: the size of images. Note that the width needs to be larger than num_digit * mnist_width
  • --num_image_per_class: how many images for each class
  • --random_seed: numpy random seed

Datasets

You can download the generated datasets

Dataset Image size Train/Val/Test classes # of images per class File size link
DoubleMNIST (64, 64) 64, 16, 20 1000 69MB Google Drive
TripleMNIST (84, 84) 640, 160, 200 1000 883MB Google Drive

Benchmark

This repository benchmarks training MAML (Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks) using datasets created via this generation script in a variety of settings.

Dataset/Setup 5-way 1-shot 5-way 5-shot 20-way 1-shot 20-way 1-shot
Double MNIST 97.046% in progress 85.461% in progress
Triple MNIST 98.813% in progress 96.251% in progress
Omniglot 98.7% 99.9% 95.8% 98.9%

Hyperparameters

  • slow learning rate: 1e-3
  • fast learning rate: 0.4
  • number of gradient steps: 1
  • meta batch size: 12
  • number of conv layers: 4
  • iterations: 100k

Training

*The trainings have not fully converged and the new results will be reported once they are finished.

Cite this repository

@misc{mulitdigitmnist,
  author = {Sun, Shao-Hua},
  title = {Multi-digit MNIST for Few-shot Learning},
  year = {2019},
  journal = {GitHub repository},
  url = {https://github.com/shaohua0116/MultiDigitMNIST},
}

Author

Shao-Hua Sun

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].