A PyTorch framework for learning with noisy labels.
Report Bug
·
Request Feature
DeepNoise is a PyTorch framework for learning with noisy labels in the context of deep learning. It provides implementations for well-known algorithms, common datasets in the literature, and noise-related utilities for learning from noisy labels.
Note that the DeepNoise framework is in an early stage of development. We plan to implement more algorithms, datasets, better logging and visualizations, and more noise-related utilities. The current API and structure of the framework might change in the future. All suggestions and contributions are welcome.
git clone https://github.com/MohammedAlkhrashi/DeepNoise.git
cd DeepNoise
pip install -r requriments.txt
cd DeepNoise
python train.py --cfg_path configs/algorithms/default_sl.py
from DeepNoise.noise_injectors import SymmetricNoiseInjector
noise_injector = SymmetricNoiseInjector(noise_prob=0.4)
from DeepNoise.datasets.cifar import NoisyCIFAR10
train_set = NoisyCIFAR10(
noise_injector=noise_injector,
train=True,
download=True,
transforms=train_transform,
root=data_root,
)
test_set = NoisyCIFAR10(
train=False, download=True, transforms=test_transforms, root=data_root
)
from DeepNoise.callbacks.lr_scheduler import StepLRScheduler
from DeepNoise.callbacks.statistics import SimpleStatistics
callbacks = [
SimpleStatistics(),
StepLRScheduler(optimizer, milestones=[80, 120], gamma=0.1),
]
wandb.init(project="DeepNoise")
from DeepNoise.algorithms.symmetric_loss import SymmetericLossTrainer
trainer = SymmetericLossTrainer(
model=model,
optimizer=optimizer,
train_loader=train_loader,
val_loader=test_loader,
epochs=epochs,
callbacks=callbacks,
)
trainer.start()
Check example.py for a full running example.
- Uplaod DeepNoise to PyPI
- Add a documentation website
- Improve Logging
- Add resouces used