CVNets: Apple's Training Toolkit for Mobile Vision and Foundation Models
CVNets: A library for training computer vision networks
At a glance
- What is it?
- CVNets is a PyTorch library for training classification, detection, segmentation and CLIP-style models, with an emphasis on mobile architectures. It is a research codebase first, and its licence file needs reading before anything else.
- Who is it for?
- Adopt CVNets if you are training or reproducing mobile-oriented vision models (MobileViT, MobileNet, EfficientNet, Swin, ViT) or a CLIP-style foundation model, and you are comfortable reading example configs rather than a formal API reference. Do not adopt it if you need a stable public API with semantic versioning and long deprecation windows, or if your stack is built around torchvision or Detectron2 abstractions, because CVNets does not try to match them.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 5 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
The Gap CVNets Fills Between torchvision and a Research Repo
Most vision codebases pick a side. torchvision gives you stable, documented model definitions with pretrained weights and a narrow training loop. Research repositories give you one paper's training recipe, hardcoded to one dataset and one architecture, with no path to reuse. CVNets sits between them: a single training harness that covers image classification, object detection, semantic segmentation and foundation models, with the model list spanning MobileNetv1 through v3, EfficientNet, ResNet, RegNet, ViT, MobileViTv1 and v2, Swin Transformer, SSD, Mask R-CNN, DeepLabv3, PSPNet, ByteFormer and CLIP. The intended user is someone who wants to train or reproduce a mobile-oriented architecture on ImageNet, ADE20K, MSCOCO or Pascal VOC without rewriting the data pipeline, the augmentation stack and the optimizer setup for each new backbone. The topics list on the repository names exactly those datasets, which tells you where the examples are aimed. If your work is a single ResNet fine-tune on a private dataset, the library's breadth is dead weight. If you are comparing MobileViTv2 against EfficientNet under one augmentation policy, the shared harness is the whole point.
One Training Engine, Task-Specific Heads and Configs
The architecture visible in the README is a common training core with task-specific pieces plugged in. Augmentation is a first-class component rather than a fixed transform list: RangeAugment, AutoAugment and RandAugment are all listed as supported, and RangeAugment is described in the release notes as online augmentation with range learning, meaning the augmentation parameters are learned during training rather than sampled from a fixed schedule. Distillation is supported in two forms, soft and hard, and version 0.4 is described as adding enhanced distillation support, so a teacher-student setup is a configuration choice rather than a separate training script. The model families map onto task heads: classification backbones (the CNN and transformer lists), detection heads (SSD, Mask R-CNN), segmentation heads (DeepLabv3, PSPNet), and CLIP for multimodal work. ByteFormer is the outlier, a transformer operating directly on file bytes, which is why it appears under multimodal classification rather than under image models. The practical consequence is that swapping a backbone should not require touching the data loader, and swapping the task should not require touching the backbone. That is the claim the repository layout supports; I have not run it, so I cannot tell you how clean the seams actually are in practice.
Installation: Conda, Pinned Constraints, Editable Install
The README recommends Python 3.10 or newer and PyTorch version 1.12.0 or newer, and gives a Conda-based sequence. Clone the repository with git clone git@github.com:apple/ml-cvnets.git, then create and activate an environment with conda create -n cvnets python=3.10.8 and conda activate cvnets. Dependencies are installed with pip install -r requirements.txt -c constraints.txt, and the package itself with pip install --editable . . The constraints file is doing real work here: it pins transitive dependencies to versions the maintainers have tested together, and skipping it is the most likely way to end up with a broken environment. The editable install means your local checkout is the installed package, which matters if you intend to modify model code rather than just call it. Note the SSH clone URL in the README; if you do not have GitHub SSH keys configured, substitute the HTTPS URL. After installation, the entry points are the docs under docs/source/en/general, the per-model examples under docs/source/en/models and the examples folder, and the model zoo listing at docs/source/en/general/README-model-zoo.md. There is also a documented path for converting a PyTorch model to CoreML at docs/source/en/general/README-pytorch-to-coreml.md, which is the piece that connects training to on-device deployment and is not something you get from a generic PyTorch training loop.
Where CVNets Is the Wrong Tool
The README does not describe a stable public API, a semantic versioning policy, or a deprecation window. Configuration appears to be driven by example files and docs rather than a formal config schema reference, and the primary documentation entry points are the per-model examples. That is normal for a research library and awkward for a production pipeline that needs to pin behaviour across upgrades. The second limitation is scope. The supported task list is classification, detection, segmentation, multimodal classification and CLIP. If your problem is pose estimation, instance tracking, video action recognition or 3D vision, the model list gives you nothing, and you would be adopting the training harness without the models. The third is the licence. Repository metadata reports the licence as NOASSERTION, and the README only says to see the LICENSE file for details. I cannot tell you from the supplied material what terms apply, and I will not guess. NOASSERTION means the automated classifier could not match the file to a known licence, which is not the same as no licence and not the same as a permissive one. Treat the LICENSE file as required reading before you build anything on top of this, and if the terms are unclear to you, that is a question for your legal team, not for a review.
The Alternative Depends on Which Half You Need
If what you want is a maintained model zoo with pretrained weights and a training loop you can extend, torchvision is the obvious comparison, and the difference is in the approach rather than the model list. torchvision ships models as library objects with documented signatures and a reference training script per task; it does not ship a unified multi-task training engine. CVNets ships the engine and expects you to follow its example configs. If your work is detection and segmentation specifically, Detectron2 is the closer comparison: it is built around a config system and a registry for models, datasets and heads, and it targets detection and segmentation rather than classification and CLIP. CVNets covers a wider task range but a narrower set of detection architectures (SSD and Mask R-CNN only, per the README). If your interest is the mobile architectures themselves, the alternative is going to the original MobileViT and MobileViTv2 repositories, which give you the model and its training recipe for that paper alone. CVNets is the choice when you want several of these families under one augmentation and distillation setup. It is not the choice when you want the smallest possible dependency for one architecture.
Version 0.4, Maintenance and the Cost of Upgrading
The repository reports no releases retrieved, so version 0.4 is described in the README's What's new section rather than as a tagged artifact I can point you to. That section dates the release to July 2023 and lists what it added: ByteFormer, RangeAugment, CLIP training and evaluation, Mask R-CNN, EfficientNet, Swin Transformer, ViT, and enhanced distillation. The last push to the default branch is dated 2026-09-11, and the repository is not archived, so the project is active. Maintenance is credited to four named maintainers (Sachin, Maxwell Horton, Mohammad Sekhavat and Yanzi Jin) with one previous maintainer, which is a small team for a library covering this many architectures. The upgrade cost you should plan for is the constraints file: every upgrade means re-resolving against a pinned dependency set, and the editable install means an upgrade is a git pull plus a reinstall rather than a version bump in a requirements file. The CoreML conversion path is the other piece to check on each upgrade, since it is documented separately from the training code and can lag model changes. On licence, the only thing the supplied material tells me is that the README points at the LICENSE file and the metadata reports NOASSERTION. Apple's research releases have historically carried their own terms, but I am not going to characterise them from memory. Read the file.
What to Verify Before You Commit a Training Run
Start with the LICENSE file, since everything else is moot if the terms do not fit your use. Then check three things against the docs. First, confirm that the model you intend to train has an example under docs/source/en/models or the examples folder, because the model zoo listing and the examples are the two places the README points to for what is actually runnable. Second, confirm the dataset you need is represented among the topics the repository advertises (ADE20K, ImageNet, MSCOCO, Pascal VOC); if your dataset is not in that list, expect to write your own data pipeline, and the README gives no indication of how pluggable that is. Third, if on-device deployment is the goal, read docs/source/en/general/README-pytorch-to-coreml.md before you start training, not after, since the export path constrains which operators and model structures survive conversion. The honest summary is that CVNets is a well-scoped research training harness with an unusually broad model list for its size, and the two things standing between you and using it are a licence file you have to read yourself and a documentation set organised around examples rather than an API reference.
Editorial conclusion
Adopt CVNets if you are training or reproducing mobile-oriented vision models (MobileViT, MobileNet, EfficientNet, Swin, ViT) or a CLIP-style foundation model, and you are comfortable reading example configs rather than a formal API reference. Do not adopt it if you need a stable public API with semantic versioning and long deprecation windows, or if your stack is built around torchvision or Detectron2 abstractions, because CVNets does not try to match them. Before committing, open the LICENSE file and confirm the terms yourself, since the repository metadata reports NOASSERTION; then run the pip install with the constraints file on a clean Python 3.10 environment and confirm the example config for your target task loads without modification.
Community notes