Package: classy-vision
Classy Vision is not longer actively maintained.The latest stable version is 0.7.0 and is available on pip, and has been tested to work with Pytorch 2.0.What's New:March 2021: AddedRegNetZ modelsNovember 2020:Vision Transformersnow available, with trainingrecipes!2020-11-20: Classy Vision v0.5 ReleasedNew FeaturesReleaseVision Transformersmodel implementation, withrecipes(#646)Implemented gradient clipping (#643)Implemented gradient accumulation (#644)Added support forAdamW(#636)Added Precise batch norm hook (#592)Added support for adaptive pooling infully_convolutional_linear_head(#602)Added support for sync batch norm group size (#534)Added a CSV Hook to manually inspect model predictionsAdded a ClassyModel tutorial (#485)Migrated toHydra 1.0(#536)Migrated off oftensorboardX(#488)Breaking ChangesClassyOptimizerAPI improvementsaddedOptionsViewto retrieve options from the optimizerparam_groupRemovedClassyModel.evaluation_mode(#521)RemovedImageNetDataset, now a subset ofImagePathDataset(#494)Renamedis_mastertois_primaryindistributed_util(#576)2020-04-29: Classy Vision v0.4 ReleasedNew FeaturesReleaseEfficientNetmodel implementation (#475)Add support to convert anyPyTorchmodel to aClassyModelwith the ability to attach heads to it (#461)Added a correspondingtutorialonClassyModelandClassyHeads(#485)Squeeze and Excitationsupport forResNe(X)tandDenseNetmodels (#426,#427)MadeClassyHooks registrable (#401) and configurable (#402)Migrated toTorchElastic v0.2.0(#464)AddSyncBatchNormsupport (#423)Implementmixuptrain augmentation (#469)SupportLARCfor SGD optimizer (#408)Added convenience wrappers forIterabledatasets (#455)TensorboardimprovementsPlot histograms of model weights to Tensorboard (#432)Reduce data logged to tensorboard (#436)Invalid (NaN/Inf) loss detectionRevamped logging (#478)Addbn_weight_decayconfiguration option forResNe(X)tmodelsSupport specifyingupdate_intervalto Parameter Schedulers (#418)Breaking changesClassificationTaskAPI improvement andtrain_step,eval_stepsimplificationRemovedlocal_variablesfromClassificationTask(#411,#412,#413,#414,#416,#421)Moveuse_gpufromClassyTrainertoClassificationTask(#468)Movenum_dataloader_workersout ofClassyTrainer(#477)Renamelrtovaluein parameter schedulers (#417)2020-03-06: Classy Vision v0.3 ReleasedRelease notescheckpoint_folderrenamed tocheckpoint_load_path(#379)head support onDenseNet(#383)Cleaner abstraction inClassyTask/ClassyTrainer:eval_step,on_start,on_end, …Speed metrics in TB (#385)test_phase_periodinClassificationTask(#395)support for losses with trainable parameters (#394)Added presets for some typicalResNe(X)tconfigurations:#405)AboutClassy Visionis 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 paperExploring 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 withPyTorch 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.InstallationInstallation RequirementsMake 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.Installing the latest stable releaseTo install Classy Vision via pip:pipinstallclassy_visionTo install Classy Vision via conda (only works on linux):condainstall-cconda-forgeclassy_visionManual install of latest commit on mainAlternatively you can do a manual install.gitclonehttps://github.com/facebookresearch/ClassyVision.gitcdClassyVision
pipinstall.Getting startedClassy 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-projectmy-projectcdmy-projectWe even include a simple, synthetic, training example to show how to use Classy Vision:./classy_train.py--configconfigs/template_config.jsonVoila! A few seconds later your first training run using our classification task should be done. Check out the results in the output folder:lsoutput_<timestamp>/checkpoints/
checkpoint.torchmodel_phase-0_end.torchmodel_phase-1_end.torchmodel_phase-2_end.torchmodel_phase-3_end.torchcheckpoint.torchis the latest model (in this case, same asmodel_phase-3_end.torch), a checkpoint is saved at the end of each phase.For more details / tutorials see the documentation section below.DocumentationPlease see ourtutorialsto learn how to get started on Classy Vision and customize your training runs. Full documentation is availablehere.Join the Classy Vision communityWebsite:https://classyvision.aiStack overflowSlack:invite linkSee theCONTRIBUTINGfile for how to help out.LicenseClassy Vision is MIT licensed, as found in the LICENSE file.Citing Classy VisionIf 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}}