A Python Framework for Deep Active Learning
Project description
Zeef: Active Learning for Data-Centric AI
Zeef is an active learning framework that can be applied to deep learning scenarios leak of labeled data. It contains many built-in data selection algorithms to reduce the labor of data annotation.
Installation
pip install zeef
For the local development, you can install from the Anaconda environment by
conda env create -f environment.yml
A quick MNIST CNN example can be found in here. Run
conda activate zeef
python main.py
to start the quick demonstration.
Quick Start
We can start from the most easy example: random select data points from an unlabeled data pool.
from zeef.data import Pool
from zeef.strategy import RandomSampling
# define the pool and active learning strategy.
pool = Pool(torch_dataset_class, unlabeled_data)
strategy = RandomSampling(pool, network)
# start the active learning.
data_ids = strategy.query(1000)
# label those 1k sampled data points.
pool.label_by_ids(data_ids, data_labels)
# retrain the model
strategy.learn()
# test the model
predictions = strategy.predict(test_x, test_y)
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zeef-0.1.0.tar.gz
(11.4 kB
view hashes)
Built Distribution
zeef-0.1.0-py3-none-any.whl
(12.7 kB
view hashes)