Logo
main

Index

  • What is VISSL?
  • Installation
    • Requirements
    • Installing VISSL from source (recommended)
      • Install from source in PIP environment
      • Install from source in Conda environment
    • Installing VISSL from pre-built binaries
      • Install VISSL conda package
      • Install VISSL pip package
  • Getting Started with VISSL
    • Quick Start with VISSL
    • Install VISSL
    • Setup dataset
    • Running SimCLR Pre-training on 1-gpu
      • If VISSL is built from source
      • If using pre-built conda/pip VISSL packages (v0.1.6)

Notes

  • YAML Configuration system
    • Detecting new configuration directories in Hydra
    • How to use VISSL provided config files
    • How to add configuration files for new SSL approaches
    • How to override a training component with config files
    • How to override single values in config files
    • How to add new keys to the dictionary in config files
  • Using Tensorboard in VISSL
    • How to use Tensorboard in VISSL
    • Example usage
  • Compatibility with Other Libraries
    • Converting Models VISSL -> {Detectron2, ClassyVision, TorchVision}
      • Converting to Detectron2
      • Converting to ClassyVision
      • Converting to TorchVision
    • Converting Caffe2 models -> VISSL
      • ResNet-50 models to VISSL
      • AlexNet models to VISSL
    • Converting Models ClassyVision -> VISSL
    • Converting Official RotNet and DeepCluster models -> VISSL
  • Contributing to VISSL
    • Our Development Process
    • Issues
    • Pull Requests
    • Coding Style
    • Contributor License Agreement (“CLA”)
    • License
  • Contact

Flowcharts for VISSL execution

  • Training: Step-by-step execution
  • Feature Extraction: Step-by-step execution
  • Benchmark on VOC07: Step-by-step execution
  • Nearest Neighbor Benchmark: Step-by-step execution

Training resource setup

  • Train models on CPU
  • Train anything on 1-gpu
  • Train on SLURM cluster

Self-supervision approaches

  • Train RotNet model
    • How to train RotNet model
      • Training different model architecture
      • Vary the number of gpus
    • Pre-trained models
    • Citation
  • Train Jigsaw model
    • How to train Jigsaw model
      • Training with different permutations
      • Vary the number of gpus
    • Pre-trained models
    • Permutations
    • Citation
  • Train NPID (and NPID++) model
    • How to train NPID model
    • How to Train NPID++ model
      • Vary the training loss settings
      • Training different model architecture
      • Vary the number of gpus
    • Pre-trained models
    • Citations
  • Train ClusterFit model
    • How to train ClusterFit model
      • How to use other pre-trained models in VISSL
      • Vary the number of gpus
    • Pre-trained models
    • Citation
  • Train PIRL model
    • How to train PIRL model
    • Vary the training loss settings
    • Training different model architecture
    • Training with Gaussian Blur augmentation
    • Training with MLP head
    • Vary the number of epochs
    • Vary the number of gpus
    • Pre-trained models
    • Citations
  • Train SimCLR model
    • How to train SimCLR model
    • Using Synchronized BatchNorm for training
    • Using LARC for training
    • Vary the training loss settings
    • Training different model architecture
    • Training with Multi-Crop data augmentation
      • Varying the multi-crop augmentation settings
      • Varying the multi-crop loss settings
    • Training with different MLP head
    • Vary the number of epochs
    • Vary the number of gpus
    • Pre-trained models
    • Citations
  • Train MoCo model
    • How to train MoCo (and MoCo v2 model) model
      • Vary the training loss settings
      • Training different model architecture
      • Vary the number of gpus
    • Pre-trained models
    • Citations
  • Train DeepCluster V2 model
    • How to train DeepClusterV2 model
    • Using Synchronized BatchNorm for training
    • Using Mixed Precision for training
    • Using LARC for training
    • Vary the training loss settings
    • Training different model architecture
    • Training with Multi-Crop data augmentation
      • Varying the multi-crop augmentation settings
    • Training with different MLP head
    • Vary the number of epochs
    • Vary the number of gpus
    • Pre-trained models
    • Citations
  • Train SwAV model
    • How to train SwAV model
    • Using Synchronized BatchNorm for training
    • Using Mixed Precision for training
    • Using LARC for training
    • Vary the training loss settings
    • Training different model architecture
    • Training with Multi-Crop data augmentation
      • Varying the multi-crop augmentation settings
    • Training with different MLP head
    • Vary the number of epochs
    • Vary the number of gpus
    • Pre-trained models
    • Citations
  • Train DINO model
    • How to train DINO model
    • Vary the training loss settings
  • Training Vision Transformer models
    • Supervised ViT training on 1 gpu
    • MoCo ViT-B16 training
    • Training DeiT with SwAV
    • ConViT
    • Additional information
    • Pre-trained models
    • Citations
  • Train Barlow Twins model
    • How to train Barlow Twins model
    • Using Synchronized BatchNorm for training
    • Vary the training loss settings
    • Training different model architecture
    • Vary the number of gpus
    • Pre-trained models
    • Citations

Evaluation tasks

  • Benchmark: Linear Image Classification
    • Eval Config settings using MLP head
      • Attaching MLP head to many layers of trunk
      • Attaching MLP head to trunk output
    • Eval Config settings using SVM training
      • Features from several layers of the trunk
      • Features from the trunk output
    • Benchmark: ImageNet-1k
    • Benchmark: Places205
    • Benchmark: iNaturalist2018
    • Benchmark: CIFAR-10
    • Benchmark: CIFAR-100
    • Benchmark: MNIST
    • Benchmark: STL-10
    • Benchmark: SVHN
    • Benchmark: Caltech-101
    • Benchmark: Describable Textures
    • Benchmark: FGVC Aircrafts
    • Benchmark: FOOD-101
    • Benchmark: GTSRB
    • Benchmark: Oxford Flowers
    • Benchmark: Oxford Pets
    • Benchmark: SUN397
    • Benchmark: UCF-101
    • Benchmark: EuroSAT
    • Benchmark: Patch Camelyon
    • Benchmark: CLEVR
    • Benchmark: dSprites
    • Benchmark: Linear SVM on VOC07
  • Benchmark task: Full-finetuning
    • Benchmark: ImageNet-1k
    • Benchmark: Places205
  • Benchmark: Low Shot Transfer
    • Benchmark: Caltech-101
    • Benchmark: CIFAR-100
    • Benchmark: CLEVR
    • Benchmark: dSprites
    • Benchmark: Describable Textures
    • Benchmark: EuroSAT
    • Benchmark: KITTI/Dist
    • Benchmark: Oxford Flowers
    • Benchmark: Oxford Pets
    • Benchmark: Patch Camelyon
    • Benchmark: Small NORB
    • Benchmark: SUN397
    • Benchmark: SVHN
  • Benchmark: Nearest Neighbor k-means
    • Eval Config settings using MLP head
      • kNN on many layers of the trunk
      • kNN on the trunk output
      • kNN on the model head output (self-supervised head)
    • Benchmark: ImageNet-1k
    • Benchmark: Places205
  • Benchmark task: Full finetuning on Imagenet 1% , 10% subsets
    • 1% and 10% Data subsets
    • Benchmark: 1% ImageNet
    • Benchmark: 10% ImageNet
  • Benchmark task: Object Detection
    • Converting weights to Detectron2
    • Benchmark: Faster R-CNN on VOC07
      • PIRL object detection
    • Benchmark: Faster R-CNN on VOC07+12
      • Scaling and Benchmarking Self-Supervised Visual Representation Learning
      • MoCoV2
      • PIRL and NPID
      • SimCLR and SwAV
    • Benchmark: Mask R-CNN on COCO
  • Benchmark: Robustness Out-Of-Distribution (OOD)
    • Benchmark: ImageNet-A
    • Benchmark: ImageNet-R
  • How to Extract Features
    • Config File for Feature Extraction
      • Extract features from several layers of the trunk
      • Extract features of the trunk output
      • Extract features of the model head output (self-supervised head)
    • How to extract features
    • Loading your extracted features.
  • Summary: Feature Eval Config Settings
    • Linear Image Classification with MLP heads
      • Attach MLP heads to several layers of the trunk
      • Attach MLP head to the trunk output
    • Linear Image Classification with SVM trainings
      • Train SVM on several layers of the trunk
      • Train SVM on the trunk output
    • Nearest Neighbor
      • knn test on trunk output
      • knn test on model head output (self-supervised head)
      • knn test on several layers of the trunk
    • Feature Extraction
      • Extract features from several layers of the trunk
      • Extract features of the trunk output
      • Extract features of the model head output (self-supervised head)
    • Full finetuning
  • How to Load Pretrained Models
  • Instance Retrieval and Copy detection Benchmarks
    • Setting Up Datasets
      • Revisited Oxford/Paris
      • CopyDays
    • Evaluating the Datasets
      • Here is an example of the config options:
      • Evaluating ROxford
      • Evaluating RParis
      • Evaluating Copydays

Using VISSL Modules

  • Training
    • Trainer
      • Training workflow
      • Feature extraction workflow
    • Train Task
    • Train Loop
    • Debugging Trainings
  • Building Models
    • Trunks
    • Heads
      • Types of Heads one can specify
      • Applying heads on multiple trunk features
  • Using Optimizers
    • Creating Optimizers
      • Using different LR for Head and trunk
      • Using LARC
    • Creating LR Schedulers
      • How to set learning rate
      • Auto-scaling of Learning Rate
  • Using PyTorch and VISSL Losses
    • Using Cross Entropy Loss for Training and Testing
    • Using SwAV loss for Training
    • Using DINO loss for Training
  • Using Meters
  • Hooks
    • VISSL Hooks
      • Performance Stats hook
      • Memory Summary hook
      • Model Complexity Hook
      • Monitor Activation Statistics
      • Profiling Hook
      • Logging, checkpoint, training variable update hooks
      • Self-supervised Loss hooks
  • Using Data
    • Reading data from several sources
    • Using dataset_catalog.json
      • Template for a dataset entry in dataset_catalog.json
    • Using Builtin datasets
      • Expected dataset structure for ImageNet, Places205, Places365
      • Expected dataset structure for Pascal VOC [2007, 2012]
      • Expected dataset structure for COCO2014
      • Expected dataset structure for CIFAR10
      • Expected dataset structure for CIFAR100
      • Expected dataset structure for MNIST
      • Expected dataset structure for STL10
      • Expected dataset structure for SVHN
      • Expected dataset structure for the other benchmark datasets
    • Dataloader
    • Using Data Collators
    • Using Data Transforms
    • Using Data Sampler

Extending VISSL Modules

  • Add custom Train loop
  • Add new Hooks
  • Add new Optimizers
  • Add new LR schedulers
  • Add new Losses to VISSL
  • Add new Meters
  • Add new Models
    • Adding New Heads
    • Adding New Trunks
    • Adding New Base Model
  • Using Custom Datasets
  • Add new Data Source
    • Transforming to a disk_filelist format
    • Transforming to a disk_folder format
    • Adding a new type of data source
  • Add new Dataloader
  • Add new Data Transforms
  • Add new Data Collators

Large Scale Training

  • Activation checkpointing to reduce model memory
    • How it works?
    • How to use activation checkpointing in VISSL?
  • LARC for Large batch size training
    • What is LARC
    • How to enable LARC
      • Using Apex
  • Handling invalid images in dataloader
    • How VISSL solves it
    • Enabling QueueDataset
      • Tuning the queue size of QueueDataset
  • Resume training from iteration: Stateful data sampler
    • Issue with PyTorch DataSampler for large data training
    • How to use VISSL custom DataSampler
  • Mixed precision training (fp16)
    • Using Apex
  • Train on multiple-gpus
  • Train on multiple machines
  • Using SLURM
  • ZeRO: Optimizer state and gradient sharding
    • How ZeRO works?
    • How to use ZeRO in VISSL?

API Documentation

  • API Documentation
    • vissl.data package
      • vissl.data.collators module
      • vissl.data.collators.mixup_collator module
      • vissl.data.collators.moco_collator module
      • vissl.data.collators.multicrop_collator module
      • vissl.data.collators.patch_and_image_collator module
      • vissl.data.collators.siamese_collator module
      • vissl.data.collators.simclr_collator module
      • vissl.data.collators.targets_one_hot_default_collator module
      • vissl.data.ssl_transforms module
      • vissl.data.ssl_transforms.img_patches_tensor module
      • vissl.data.ssl_transforms.img_pil_color_distortion module
      • vissl.data.ssl_transforms.img_pil_gaussian_blur module
      • vissl.data.ssl_transforms.img_pil_multicrop_random_apply module
      • vissl.data.ssl_transforms.img_pil_random_color_jitter module
      • vissl.data.ssl_transforms.img_pil_random_photometric module
      • vissl.data.ssl_transforms.img_pil_random_solarize module
      • vissl.data.ssl_transforms.img_pil_to_lab_tensor module
      • vissl.data.ssl_transforms.img_pil_to_multicrop module
      • vissl.data.ssl_transforms.img_pil_to_patches_and_image module
      • vissl.data.ssl_transforms.img_pil_to_raw_tensor module
      • vissl.data.ssl_transforms.img_pil_to_tensor module
      • vissl.data.ssl_transforms.img_replicate_pil module
      • vissl.data.ssl_transforms.img_rotate_pil module
      • vissl.data.ssl_transforms.pil_photometric_transforms_lib module
      • vissl.data.ssl_transforms.shuffle_img_patches module
      • vissl.data.data_helper module
      • vissl.data.dataloader_sync_gpu_wrapper module
      • vissl.data.ssl_dataset module
      • vissl.data.disk_dataset module
      • vissl.data.synthetic_dataset module
      • vissl.data.dataset_catalog module
    • vissl.engines package
      • vissl.engines.train module
      • vissl.engines.extract_features module
    • vissl.meters package
      • vissl.meters.accuracy_list_meter
      • vissl.meters.mean_ap_meter
      • vissl.meters.mean_ap_list_meter
    • vissl.models package
      • vissl.models.model_helpers module
      • vissl.models.heads module
      • vissl.models.trunks module
    • vissl.losses package
      • vissl.losses.simclr_info_nce_loss
      • vissl.losses.multicrop_simclr_info_nce_loss
      • vissl.losses.swav_loss
      • vissl.losses.bce_logits_multiple_output_single_target
      • vissl.losses.swav_momentum_loss
      • vissl.losses.moco_loss
      • vissl.losses.nce_loss
      • vissl.losses.deepclusterv2_loss
      • vissl.losses.barlow_twins_loss
      • vissl.losses.cross_entropy_multiple_output_single_target
    • vissl.hooks package
      • vissl.hooks.deepclusterv2_hooks module
      • vissl.hooks.log_hooks module
      • vissl.hooks.moco_hooks module
      • vissl.hooks.state_update_hooks module
      • vissl.hooks.swav_hooks module
      • vissl.hooks.swav_momentum_hooks module
      • vissl.hooks.tensorboard_hooks module
    • vissl.optimizers package
      • vissl.optimizers.optimizer_helper module
      • vissl.optimizers.param_scheduler.cosine_warm_restart_scheduler module
      • vissl.optimizers.param_scheduler.inverse_sqrt_decay module
    • vissl.trainer package
      • vissl.train_task package
      • vissl.trainer.train_steps module
      • vissl.trainer.train_steps.standard_train_step module
    • vissl.utils package
      • vissl.utils.instance_retrieval_utils.data_util module
      • vissl.utils.instance_retrieval_utils.evaluate module
      • vissl.utils.instance_retrieval_utils.pca module
      • vissl.utils.instance_retrieval_utils.rmac module
      • vissl.utils.svm_utils.evaluate module
      • vissl.utils.svm_utils.svm_trainer module
      • vissl.utils.svm_utils.svm_low_shot_trainer module
      • vissl.utils.activation_checkpointing module
      • vissl.utils.checkpoint module
      • vissl.utils.collect_env module
      • vissl.utils.env module
      • vissl.utils.hydra_config module
      • vissl.utils.io module
      • vissl.utils.logger module
      • vissl.utils.misc module
      • vissl.utils.perf_stats module
      • vissl.utils.slurm module
      • vissl.utils.tensorboard module
VISSL
  • Docs »
  • Overview: module code

All modules for which code is available

  • vissl.utils.activation_checkpointing
  • vissl.utils.collect_env
  • vissl.utils.env
  • vissl.utils.instance_retrieval_utils.evaluate
  • vissl.utils.instance_retrieval_utils.rmac
  • vissl.utils.perf_stats
  • vissl.utils.slurm
  • vissl.utils.svm_utils.evaluate

© Copyright 2021, VISSL contributors Revision c5068d75.

Built with Sphinx using a theme provided by Read the Docs.