chimeramix
Official PyTorch implementation for ChimeraMix: Image Classification on Small Datasets via Masked Feature Mixing (IJCAI 2022)
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.1%) to scientific vocabulary
Keywords
Repository
Official PyTorch implementation for ChimeraMix: Image Classification on Small Datasets via Masked Feature Mixing (IJCAI 2022)
Basic Info
Statistics
- Stars: 14
- Watchers: 2
- Forks: 3
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
ChimeraMix: Image Classification on Small Datasets via Masked Feature Mixing
This is the official implementation of the paper ChimeraMix: Image Classification on Small Datasets via Masked Feature Mixing (IJCAI 2022).

Abstract
Deep convolutional neural networks require large amounts of labeled data samples. For many real-world applications, this is a major limitation which is commonly treated by augmentation methods. In this work, we address the problem of learning deep neural networks on small datasets. Our proposed architecture called ChimeraMix learns a data augmentation by generating compositions of instances. The generative model encodes images in pairs, combines the features guided by a mask, and creates new samples. For evaluation, all methods are trained from scratch without any additional data. Several experiments on benchmark datasets, e.g., ciFAIR-10, STL-10, and ciFAIR-100, demonstrate the superior performance of ChimeraMix compared to current state-of-the-art methods for classification on small datasets.
Citation
bibtex
@inproceedings{chimeramix,
title = {ChimeraMix: Image Classification on Small Datasets via Masked Feature Mixing},
author = {Reinders, Christoph and Schubert, Frederik and Rosenhahn, Bodo},
booktitle = {Proceedings of the Thirty-First International Joint Conference on
Artificial Intelligence, {IJCAI-22}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {Lud De Raedt},
pages = {1298--1305},
year = {2022},
month = {7},
note = {Main Track},
doi = {10.24963/ijcai.2022/181},
url = {https://doi.org/10.24963/ijcai.2022/181},
}
Installation
The Anaconda environment can be created as follows.
bash
conda env create -f environment.yaml
conda activate chimeramix
Experiments
Training ChimeraMix on ciFAIR-10, ciFAIR-100, and STL-10 is shown in the following sections.
You can set the number of examples per class via the max_labels_per_class parameter.
The experiments require a single GPU with 10GB of memory, such as the NVIDIA GeForce GTX 1080 Ti.
ciFAIR-10
```bash
ChimeraMix+Grid
python traingenerator.py +dataset=cifair10 +experiment=chimeramixgrid maxlabelsperclass=5 python trainclassifier.py +dataset=cifair10 +experiment=chimeramixgrid maxlabelsperclass=5
ChimeraMix+Seg
python traingenerator.py +dataset=cifair10 +experiment=chimeramixsegmentation maxlabelsperclass=5 python trainclassifier.py +dataset=cifair10 +experiment=chimeramixsegmentation maxlabelsperclass=5 ```
ciFAIR-100
```bash
ChimeraMix+Grid
python traingenerator.py +dataset=cifair100 +experiment=chimeramixgrid maxlabelsperclass=5 python trainclassifier.py +dataset=cifair100 +experiment=chimeramixgrid maxlabelsperclass=5
ChimeraMix+Seg
python traingenerator.py +dataset=cifair100 +experiment=chimeramixsegmentation maxlabelsperclass=5 python trainclassifier.py +dataset=cifair100 +experiment=chimeramixsegmentation maxlabelsperclass=5 ```
STL-10
```bash
ChimeraMix+Grid
python traingenerator.py +dataset=stl10 +experiment=chimeramixgrid maxlabelsperclass=5 python trainclassifier.py +dataset=stl10 +experiment=chimeramixgrid maxlabelsperclass=5
ChimeraMix+Seg
python traingenerator.py +dataset=stl10 +experiment=chimeramixsegmentation maxlabelsperclass=5 python trainclassifier.py +dataset=stl10 +experiment=chimeramixsegmentation maxlabelsperclass=5 ```
Experiment Sweeps
To reproduce all main experiments on your Slurm cluster, execute the following two commands.
Replace <SLURM PARTITION> with the name of your Slurm partition.
bash
python train_generator.py "+dataset=glob(*)" "+experiment=glob(*)" "max_labels_per_class=5,10,20,30,50,100" "seed=range(0,5)" "hydra.launcher.partition=<SLURM PARTITION>" --multirun
python train_classifier.py "+dataset=glob(*)" "+experiment=glob(*)" "max_labels_per_class=5,10,20,30,50,100" "seed=range(0,5)" "hydra.launcher.partition=<SLURM PARTITION>" --multirun
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: >-
ChimeraMix: Image Classification on Small Datasets
via Masked Feature Mixing
message: >-
If you use our work, please cite it using the
metadata from this file.
authors:
- given-names: Christoph
family-names: Reinders
email: reinders@tnt.uni-hannover.de
affiliation: Leibniz University Hannover
- given-names: Frederik
family-names: Schubert
email: schubert@tnt.uni-hannover.de
affiliation: 'Leibniz University Hannover '
orcid: ' https://orcid.org/0000-0001-8312-3943'
- given-names: Bodo
family-names: Rosenhahn
email: rosenhahn@tnt.uni-hannover.de
affiliation: Leibniz University Hannover
preferred-citation:
type: conference-paper
title: "ChimeraMix: Image Classification on Small Datasets via Masked Feature Mixing"
collection-title: Proceedings of the Thirty-First International Joint Conference on Artificial Intelligence, IJCAI-22
collection-type: proceedings
pages: 1298--1305
year: 2022
month: 7
doi: 10.24963/ijcai.2022/181
url: https://doi.org/10.24963/ijcai.2022/181
authors:
- given-names: Christoph
family-names: Reinders
email: reinders@tnt.uni-hannover.de
affiliation: Leibniz University Hannover
- given-names: Frederik
family-names: Schubert
email: schubert@tnt.uni-hannover.de
affiliation: 'Leibniz University Hannover '
orcid: ' https://orcid.org/0000-0001-8312-3943'
- given-names: Bodo
family-names: Rosenhahn
email: rosenhahn@tnt.uni-hannover.de
affiliation: Leibniz University Hannover
GitHub Events
Total
Last Year
Dependencies
- black
- pip
- pylint
- python 3.10.*
- pytorch
- pytorch-cuda 11.8.*
- rope
- torchvision