An end-to-end PyTorch framework for image and video classification
See the code
The latest stable version is 0.7.0 and is available on pip, and has been tested to work with Pytorch 2.0.
fully_convolutional_linear_head (#602)ClassyOptimizer API improvements
OptionsView to retrieve options from the optimizer param_groupClassyModel.evaluation_mode (#521)ImageNetDataset, now a subset of ImagePathDataset (#494)is_master to is_primary in distributed_util (#576)PyTorch model to a ClassyModel with the ability to attach heads to it (#461)
ResNe(X)t and DenseNet models (#426, #427)ClassyHooks registrable (#401) and configurable (#402)TorchElastic v0.2.0 (#464)SyncBatchNorm support (#423)mixup train augmentation (#469)LARC for SGD optimizer (#408)Iterable datasets (#455)Tensorboard improvements
NaN / Inf) loss detectionbn_weight_decay configuration option for ResNe(X)t modelsupdate_interval to Parameter Schedulers (#418)ClassificationTask API improvement and train_step, eval_step simplification
lr to value in parameter schedulers (#417)checkpoint_folder renamed to checkpoint_load_path (#379)DenseNet (#383)ClassyTask/ClassyTrainer: eval_step, on_start, on_end, …test_phase_period in ClassificationTask (#395)ResNe(X)t configurations: #405)Classy Vision is a new end-to-end, PyTorch-based framework for large-scale training of state-of-the-art image and video classification models. Previous computer vision (CV) libraries have been focused on providing components for users to build their own frameworks for their research. While this approach offers flexibility for researchers, in production settings it leads to duplicative efforts, and requires users to migrate research between frameworks and to relearn the minutiae of efficient distributed training and data loading. Our PyTorch-based CV framework offers a better solution for training at scale and for deploying to production. It offers several notable advantages:
Classy Vision is beta software. The project is under active development and our APIs are subject to change in future releases.
Make sure you have an up-to-date installation of PyTorch (1.6), Python (3.6) and torchvision (0.7). If you want to use GPUs, then a CUDA installation (10.1) is also required.
To install Classy Vision via pip:
pip install classy_vision
To install Classy Vision via conda (only works on linux):
conda install -c conda-forge classy_vision
Alternatively you can do a manual install.
git clone https://github.com/facebookresearch/ClassyVision.git
cd ClassyVision
pip install .
Classy Vision aims to support a variety of projects to be built and open sourced on top of the core library. We provide utilities for setting up a project in a standard format with some simple generated examples to get started with. To start a new project:
classy-project my-project
cd my-project
We even include a simple, synthetic, training example to show how to use Classy Vision:
./classy_train.py --config configs/template_config.json
Voila! A few seconds later your first training run using our classification task should be done. Check out the results in the output folder:
ls output_<timestamp>/checkpoints/
checkpoint.torch model_phase-0_end.torch model_phase-1_end.torch model_phase-2_end.torch model_phase-3_end.torch
checkpoint.torch is the latest model (in this case, same as model_phase-3_end.torch), a checkpoint is saved at the end of each phase.
For more details / tutorials see the documentation section below.
Please see our tutorials to learn how to get started on Classy Vision and customize your training runs. Full documentation is available here.
See the CONTRIBUTING file for how to help out.
Classy Vision is MIT licensed, as found in the LICENSE file.
If you use Classy Vision in your work, please use the following BibTeX entry:
@misc{adcock2019classy,
title={Classy Vision},
author={{Adcock}, A. and {Reis}, V. and {Singh}, M. and {Yan}, Z. and {van der Maaten}, L. and {Zhang}, K. and {Motwani}, S. and {Guerin}, J. and {Goyal}, N. and {Misra}, I. and {Gustafson}, L. and {Changhan}, C. and {Goyal}, P.},
howpublished = {\url{https://github.com/facebookresearch/ClassyVision}},
year={2019}
}
680 followers · starred Jan 2021
234 followers · starred Dec 2019
382 followers · starred May 2020
32 followers · starred Dec 2019
An end-to-end PyTorch framework for image and video classification
See the code
The latest stable version is 0.7.0 and is available on pip, and has been tested to work with Pytorch 2.0.
fully_convolutional_linear_head (#602)ClassyOptimizer API improvements
OptionsView to retrieve options from the optimizer param_groupClassyModel.evaluation_mode (#521)ImageNetDataset, now a subset of ImagePathDataset (#494)is_master to is_primary in distributed_util (#576)PyTorch model to a ClassyModel with the ability to attach heads to it (#461)
ResNe(X)t and DenseNet models (#426, #427)ClassyHooks registrable (#401) and configurable (#402)TorchElastic v0.2.0 (#464)SyncBatchNorm support (#423)mixup train augmentation (#469)LARC for SGD optimizer (#408)Iterable datasets (#455)Tensorboard improvements
NaN / Inf) loss detectionbn_weight_decay configuration option for ResNe(X)t modelsupdate_interval to Parameter Schedulers (#418)ClassificationTask API improvement and train_step, eval_step simplification
lr to value in parameter schedulers (#417)checkpoint_folder renamed to checkpoint_load_path (#379)DenseNet (#383)ClassyTask/ClassyTrainer: eval_step, on_start, on_end, …test_phase_period in ClassificationTask (#395)ResNe(X)t configurations: #405)Classy Vision is a new end-to-end, PyTorch-based framework for large-scale training of state-of-the-art image and video classification models. Previous computer vision (CV) libraries have been focused on providing components for users to build their own frameworks for their research. While this approach offers flexibility for researchers, in production settings it leads to duplicative efforts, and requires users to migrate research between frameworks and to relearn the minutiae of efficient distributed training and data loading. Our PyTorch-based CV framework offers a better solution for training at scale and for deploying to production. It offers several notable advantages:
Classy Vision is beta software. The project is under active development and our APIs are subject to change in future releases.
Make sure you have an up-to-date installation of PyTorch (1.6), Python (3.6) and torchvision (0.7). If you want to use GPUs, then a CUDA installation (10.1) is also required.
To install Classy Vision via pip:
pip install classy_vision
To install Classy Vision via conda (only works on linux):
conda install -c conda-forge classy_vision
Alternatively you can do a manual install.
git clone https://github.com/facebookresearch/ClassyVision.git
cd ClassyVision
pip install .
Classy Vision aims to support a variety of projects to be built and open sourced on top of the core library. We provide utilities for setting up a project in a standard format with some simple generated examples to get started with. To start a new project:
classy-project my-project
cd my-project
We even include a simple, synthetic, training example to show how to use Classy Vision:
./classy_train.py --config configs/template_config.json
Voila! A few seconds later your first training run using our classification task should be done. Check out the results in the output folder:
ls output_<timestamp>/checkpoints/
checkpoint.torch model_phase-0_end.torch model_phase-1_end.torch model_phase-2_end.torch model_phase-3_end.torch
checkpoint.torch is the latest model (in this case, same as model_phase-3_end.torch), a checkpoint is saved at the end of each phase.
For more details / tutorials see the documentation section below.
Please see our tutorials to learn how to get started on Classy Vision and customize your training runs. Full documentation is available here.
See the CONTRIBUTING file for how to help out.
Classy Vision is MIT licensed, as found in the LICENSE file.
If you use Classy Vision in your work, please use the following BibTeX entry:
@misc{adcock2019classy,
title={Classy Vision},
author={{Adcock}, A. and {Reis}, V. and {Singh}, M. and {Yan}, Z. and {van der Maaten}, L. and {Zhang}, K. and {Motwani}, S. and {Guerin}, J. and {Goyal}, N. and {Misra}, I. and {Gustafson}, L. and {Changhan}, C. and {Goyal}, P.},
howpublished = {\url{https://github.com/facebookresearch/ClassyVision}},
year={2019}
}
680 followers · starred Jan 2021
234 followers · starred Dec 2019
382 followers · starred May 2020
32 followers · starred Dec 2019