Giter VIP home page Giter VIP logo

deep-active-learning's Introduction

Deep Active Learning with Pytorch

An implementation of the state-of-the-art Deep Active Learning algorithm. This code was built based on Jordan Ash's repository.

Dependencies

To run this code fully, you'll need PyTorch (we're using version 1.4.0), scikit-learn. We've been running our code in Python 3.7.

Algorithms Implemented

Deep active learning Strategies

Sampling Strategies Year Done
Random Sampling x
ClusterMargin [1] arXiv'21
WAAL [2] AISTATS'20
BADGE [3] ICLR'20
Adversarial Sampling for Active Learning [4] WACV'20
Learning Loss for Active Learning [5] CVPR'19
Variational Adversial Active Learning [6] ICCV'19
BatchBALD [7] NIPS'19
K-Means Sampling [8] ICLR'18
K-Centers Greedy [8] ICLR'18
Core-Set [8] ICLR'18
Adversarial - DeepFool [9] ArXiv'18
Uncertainty Ensembles [10] NIPS'17
Uncertainty Sampling with Dropout Estimation [11] ICML'17
Bayesian Active Learning Disagreement [11] ICML'17
Least Confidence [12] IJCNN'14
Margin Sampling [12] IJCNN'14
Entropy Sampling [12] IJCNN'14
UncertainGCN Sampling [13] CVPR'21
CoreGCN Sampling [13] CVPR'21
Ensemble [14] CVPR'18
MCDAL [15] Knowledge-based Systems'19

Deep active learning + Semi-supervised learning

Sampling Strategies Year Done
Consistency-SSLAL [16] ECCV'20
MixMatch-SSLAL [17] arXiv
UDA [18] NIPS'20 In progress

Running an experiment

Requirements

First, please make sure you have installed Conda. Then, our environment can be installed by:

conda create -n DAL python=3.7
conda activate DAL
pip install -r requirements.txt

Example

python main.py --model ResNet18  --dataset cifar10 --strategy LeastConfidence

It runs an active learning experiment using ResNet18 and CIFAR-10 data, querying according to the LeastConfidence algorithm. The result will be saved in the ./save directory.

You can also use run.sh to run experiments.

Self-supervised feautres of data

You can download the features/feature_model from here

Contact

If you have any questions/suggestions, or would like to contribute to this repo, please feel free to contact: Yu Li [email protected], Muxi Chen [email protected] or Prof. Qiang Xu [email protected]

References

[1] (ClusterMargin, 2021) Batch Active Learning at Scale

[2] (WAAL, AISTATS'20) Deep Active Learning: Unified and Principled Method for Query and Training paper code

[3] (BADGE, ICLR'20) Deep Batch Active Learning by Diverse, Uncertain Gradient Lower Bounds paper code

[4] (ASAL, WACV'20) Adversarial Sampling for Active Learning paper

[5] (CVPR'19) Learning Loss for Active Learning paper code

[6] (VAAL, ICCV'19) Variational Adversial Active Learning paper code

[7] (BatchBALD, NIPS'19) BatchBALD: Efficient and Diverse Batch Acquisition for Deep Bayesian Active Learning paper code

[8] (CORE-SET, ICLR'18) Active Learning for Convolutional Neural Networks: A Core-Set Approach paper code

[9] (DFAL, 2018) Adversarial Active Learning for Deep Networks: a Margin Based Approach

[10] (NIPS'17) Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles paper code

[11] (DBAL, ICML'17) Deep Bayesian Active Learning with Image Data paper code

[12] (Least Confidence/Margin/Entropy, IJCNN'14) A New Active Labeling Method for Deep Learning, IJCNN, 2014

[13] (UncertainGCN, CoreGCN, CVPR'21) Sequential Graph Convolutional Network for Active Learning paper code

[14] (Emsemble, CVPR'18) The power of ensembles for active learning in image classification paper

[15] (Knowledge-based Systems'19) Multi-criteria active deep learning for image classification paper code

[16] (ECCV'20) Consistency-based semi-supervised active learning: Towards minimizing labeling cost paper

[17] (Google, arXiv) Combining MixMatch and Active Learning for Better Accuracy with Fewer Labels

[18] (Google, NIPS’20) Unsupervised Data Augmentation for Consistency Training

deep-active-learning's People

Contributors

aaronwang-zx avatar mixiancmx avatar yuli-yl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

deep-active-learning's Issues

Learning Loss for AL query wrong idxs

https://github.com/cure-lab/deep-active-learning/blob/57aaaf3d3b166ac8919ddd774556aac3ec2676e3/query_strategies/learning_loss_for_al.py#LL281C1-L281C39

According to the original paper:
If we can predict the loss of a data point, it becomes possible to select data points that are expected to have high losses. The selected data points would be more informative to the current model.

This implies we should be taking the maximum values from the uncertainties arg[-n:]. Your current implementation returns the minimum arg[:n] and so is returning the least informative points.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.