Skip to main content

An end-to-end PyTorch framework for image and video classification.

Project description

GitHub license CircleCI PRs Welcome


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:

  • Ease of use. The library features a modular, flexible design that allows anyone to train machine learning models on top of PyTorch using very simple abstractions. The system also has out-of-the-box integration with Amazon Web Services (AWS), facilitating research at scale and making it simple to move between research and production.
  • High performance. Researchers can use the framework to train Resnet50 on ImageNet in as little as 15 minutes, for example.
  • Demonstrated success in training at scale. We’ve used it to replicate the state-of-the-art results from the paper Exploring the Limits of Weakly Supervised Pretraining.
  • Integration with PyTorch Hub. AI researchers and engineers can download and fine-tune the best publically available ImageNet models with just a few lines of code.
  • Elastic training. We have also added experimental integration with PyTorch Elastic, which allows distributed training jobs to adjust as available resources in the cluster changes. It also makes distributed training robust to transient hardware failures.

Classy Vision is beta software. The project is under active development and our APIs are subject to change in future releases.

Installation

Installation Requirements

Make sure you have an up-to-date installation of PyTorch (1.4), Python (3.6) and torchvision (0.5). If you want to use GPUs, then a CUDA installation (10.1) is also required.

Installing the latest stable release

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

Manual install of latest commit on master

Alternatively you can do a manual install.

git clone https://github.com/facebookresearch/ClassyVision.git
cd ClassyVision
pip install .

Getting started

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.

Documentation

Please see our tutorials to learn how to get started on Classy Vision and customize your training runs. Full documentation is available here.

Join the Classy Vision community

See the CONTRIBUTING file for how to help out.

License

Classy Vision is MIT licensed, as found in the LICENSE file.

Citing Classy Vision

If you use Classy Vision in your work, please use the following BibTeX entry:

@article{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}
}

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

classy_vision-0.4.0.tar.gz (187.9 kB view details)

Uploaded Source

Built Distribution

classy_vision-0.4.0-py3-none-any.whl (313.5 kB view details)

Uploaded Python 3

File details

Details for the file classy_vision-0.4.0.tar.gz.

File metadata

  • Download URL: classy_vision-0.4.0.tar.gz
  • Upload date:
  • Size: 187.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10

File hashes

Hashes for classy_vision-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d935595e7b0c13a4f0d6e16a3bfb7d5d9e87755828c0e4d14a449d6e1e4755e7
MD5 7cbcbda19eae15b8fd00bd5743b80d34
BLAKE2b-256 885c4f2dcd378ce4e911a0cffb7792f8c53d0f05485874096b773bc9ee29fc00

See more details on using hashes here.

File details

Details for the file classy_vision-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: classy_vision-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 313.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10

File hashes

Hashes for classy_vision-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 912714b0d28b8080f441fbb02af7294d0d094c79f4c3f0c23dee201057c8a75b
MD5 646f15e277171ea296d5f3541b1f81b3
BLAKE2b-256 46b6dfd501713b2f76a46ab477bc1b847eb10e7f88d8097bab99a58940454936

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page