All Projects → yaoyao-liu → Mini Imagenet Tools

yaoyao-liu / Mini Imagenet Tools

Licence: mit
Tools for generating mini-ImageNet dataset and processing batches

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Mini Imagenet Tools

Cvat
Powerful and efficient Computer Vision Annotation Tool (CVAT)
Stars: ✭ 6,557 (+3037.32%)
Mutual labels:  dataset, imagenet
SAN
[ECCV 2020] Scale Adaptive Network: Learning to Learn Parameterized Classification Networks for Scalable Input Images
Stars: ✭ 41 (-80.38%)
Mutual labels:  imagenet, meta-learning
Tensorflow object tracking video
Object Tracking in Tensorflow ( Localization Detection Classification ) developed to partecipate to ImageNET VID competition
Stars: ✭ 491 (+134.93%)
Mutual labels:  dataset, imagenet
Label Studio
Label Studio is a multi-type data labeling and annotation tool with standardized output format
Stars: ✭ 7,264 (+3375.6%)
Mutual labels:  dataset, imagenet
Caffenet Benchmark
Evaluation of the CNN design choices performance on ImageNet-2012.
Stars: ✭ 700 (+234.93%)
Mutual labels:  dataset, imagenet
Multidigitmnist
Combine multiple MNIST digits to create datasets with 100/1000 classes for few-shot learning/meta-learning
Stars: ✭ 48 (-77.03%)
Mutual labels:  dataset, meta-learning
Imagenetscraper
👁 Bulk-download all thumbnails from an ImageNet synset, with optional rescaling
Stars: ✭ 24 (-88.52%)
Mutual labels:  dataset, imagenet
Imagenetv2
A new test set for ImageNet
Stars: ✭ 109 (-47.85%)
Mutual labels:  dataset, imagenet
Pytorch Cpp
PyTorch C++ inference with LibTorch
Stars: ✭ 194 (-7.18%)
Mutual labels:  imagenet
Semantic Segmentation Suite
Semantic Segmentation Suite in TensorFlow. Implement, train, and test new Semantic Segmentation models easily!
Stars: ✭ 2,395 (+1045.93%)
Mutual labels:  dataset
Hdltex
HDLTex: Hierarchical Deep Learning for Text Classification
Stars: ✭ 191 (-8.61%)
Mutual labels:  dataset
Korean Hate Speech
Korean HateSpeech Dataset
Stars: ✭ 192 (-8.13%)
Mutual labels:  dataset
Tech.ml.dataset
A Clojure high performance data processing system
Stars: ✭ 205 (-1.91%)
Mutual labels:  dataset
Meta Learning Papers
A classified list of meta learning papers based on realm.
Stars: ✭ 193 (-7.66%)
Mutual labels:  meta-learning
Labelimg
🖍️ LabelImg is a graphical image annotation tool and label object bounding boxes in images
Stars: ✭ 16,088 (+7597.61%)
Mutual labels:  imagenet
Data Set
state driven all in one data process for data visualization
Stars: ✭ 191 (-8.61%)
Mutual labels:  dataset
Dataset loaders
A collection of dataset loaders
Stars: ✭ 187 (-10.53%)
Mutual labels:  dataset
Covid19za
Coronavirus COVID-19 (2019-nCoV) Data Repository and Dashboard for South Africa
Stars: ✭ 208 (-0.48%)
Mutual labels:  dataset
Epg
Code for the paper "Evolved Policy Gradients"
Stars: ✭ 204 (-2.39%)
Mutual labels:  meta-learning
Trump Lies
Tutorial: Web scraping in Python with Beautiful Soup
Stars: ✭ 201 (-3.83%)
Mutual labels:  dataset

mini-ImageNet Logo

Tools for mini-ImageNet Dataset

LICENSE Python PyPI Downloads CodeFactor Grade

This repo provides python source code for creating mini-ImageNet dataset from ImageNet and the utils for generating batches during training. This repo is related to our work on few-shot learning: Meta-Transfer Learning.

Summary

About mini-ImageNet

The mini-ImageNet dataset was proposed by Vinyals et al. for few-shot learning evaluation. Its complexity is high due to the use of ImageNet images but requires fewer resources and infrastructure than running on the full ImageNet dataset. In total, there are 100 classes with 600 samples of 84×84 color images per class. These 100 classes are divided into 64, 16, and 20 classes respectively for sampling tasks for meta-training, meta-validation, and meta-test.

Please note that the split files in csv_files folder are created by Ravi and Larochelle (GitHub link). Vinyals et al. didn't include their split files for mini-ImageNet when they first released their paper, so Ravi and Larochelle created their own splits. Additional split files are provided here.

Requirements

  • Python 2.7 or 3.x
  • numpy
  • tqdm
  • opencv-python
  • Pillow

Installation

Install via PyPI:

pip install miniimagenettools

Install via GitHub:

git clone https://github.com/yaoyao-liu/mini-imagenet-tools.git

Usage

First, you need to download the image source files from ImageNet website. If you already have it, you may use it directly. Some people report the ImageNet website is not working. Here is an alternative download link. Please carefully read the terms for ImageNet before you download it.

Filename: ILSVRC2012_img_train.tar
Size: 138 GB
MD5: 1d675b47d978889d74fa0da5fadfb00e

Then clone the repo:

git clone https://github.com:y2l/mini-imagenet-tools.git
cd mini-imagenet-tools

To generate mini-ImageNet dataset from tar file:

python mini_imagenet_generator.py --tar_dir [your_path_of_the_ILSVRC2012_img_train.tar]

To generate mini-ImageNet dataset from untarred folder:

python mini_imagenet_generator.py --imagenet_dir [your_path_of_imagenet_folder]

If you want to resize the images to the specified resolution:

python mini_imagenet_generator.py --tar_dir [your_path_of_the_ILSVRC2012_img_train.tar] --image_resize 100

P.S. In default settings, the images will be resized to 84 × 84.

If you don't want to resize the images, you may set --image_resize 0.

To use the MiniImageNetDataLoader class:

from miniimagenettools.mini_imagenet_dataloader import MiniImageNetDataLoader

dataloader = MiniImageNetDataLoader(shot_num=5, way_num=5, episode_test_sample_num=15)

dataloader.generate_data_list(phase='train')
dataloader.generate_data_list(phase='val')
dataloader.generate_data_list(phase='test')

dataloader.load_list(phase='all')

for idx in range(total_train_step):
    episode_train_img, episode_train_label, episode_test_img, episode_test_label = \
        dataloader.get_batch(phase='train', idx=idx)
    ...

Performance

Check the SOTA results for mini-ImageNet on this page.

Download Processed Images

Download jpg files (Thanks for the contribution by @vainaijr)

Download tar files

Acknowledgement

Model-Agnostic Meta-Learning

Optimization as a Model for Few-Shot Learning

Meta-Learning for Semi-Supervised Few-Shot Classification

@ChristopherDaw

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].