OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Cvt

Cvt is Microsoft’s Python implementation of CvT, a computer-vision architecture that combines hierarchical Transformer stages with convolutional token embeddings and convolutional projections inside Transformer blocks. The repository provides experiment configurations and scripts for local training and testing, alongside links to pretrained model files.

Independent OpenViST project profile, based on linked sources.

Cvt — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Cvt when you need an implementation and experiment workflow for researching or running CvT computer-vision models, rather than a hosted image-classification service.

Who it is for

  • Computer-vision researchers studying vision Transformer architectures
  • Developers running image-classification training or evaluation experiments
  • Teams comparing convolutional token embedding designs with standard Vision Transformers

Documented uses

  • Train a CvT model with a repository-provided YAML experiment configuration.
  • Test a pretrained CvT model by supplying its model-file path.
  • Adjust documented training configuration values from the command line.
  • Compare listed CvT model variants and ImageNet results when selecting an experiment.
Before you choose

Requirements & limits

The repository is public and licensed under MIT. The documented implementation uses Python, PyTorch, and TorchVision.

  • PyTorch and TorchVision must be installed before the repository’s listed dependencies.
  • The README identifies PyTorch 1.7.1 as the development and test version and says other versions are not fully tested.
  • ImageNet experiments expect separate train and validation directories with class-named subfolders.
  • Listed CvT variants differ in input resolution, parameter count, and compute requirements.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Prepare an ImageNet experiment environment

Set up the documented prerequisites and folder structure for an ImageNet CvT experiment.

Before you start

  • Python environment with PyTorch and TorchVision installed
  • Repository dependencies listed in requirements.txt
  • ImageNet training and validation images organized in class-named folders

Steps

  1. Install PyTorch and TorchVision following their official installation instructions.

  2. From the repository, install its listed dependencies with the command below.

    Documented command
    python -m pip install -r requirements.txt --user -q
  3. Arrange ImageNet data under DATASET/imagenet/train and DATASET/imagenet/val, with a folder for each class in each split.

Expected outcome

The documented software prerequisites and ImageNet directory layout are prepared for a configured experiment.

Guide limitations

  • The repository states that development and testing used PyTorch 1.7.1 and that other PyTorch versions are not fully tested.
  • This guide covers preparation only; it does not run training or test a model.
Source-based practical guide

Run a configured local training or testing job

Use a repository YAML experiment configuration with the documented local job script.

Before you start

  • The repository and its dependencies are set up
  • A dataset prepared for the selected experiment when training
  • A pretrained model file when testing
  • A YAML configuration under the experiments directory

Steps

  1. Choose an experiment YAML file under experiments.

  2. For local training, run the command below.

    Documented command
    bash run.sh -g 8 -t train --cfg experiments/imagenet/cvt/cvt-13-224x224.yaml
  3. For testing a pretrained model, run the command below, replacing the placeholder with the model-file path.

    Documented command
    bash run.sh -t test --cfg experiments/imagenet/cvt/cvt-13-224x224.yaml TEST.MODEL_FILE ${PRETRAINED_MODLE_FILE}
  4. If needed, provide configuration overrides after the training command’s config path, as shown in the README’s TRAIN.LR 0.1 example.

Expected outcome

The repository’s local script is invoked for a configured training or testing job; training outputs are documented under `OUTPUT/{dataset}/{training config}` by default.

Guide limitations

  • The training example requests eight GPUs; available hardware and suitable settings are the user’s responsibility.
  • Testing requires a pretrained model file.
  • The README documents commands but does not establish that they will work unchanged in every environment.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
16 October 2026
Original website title
microsoft/CvT · Official homepage title · retained in its source language