# mobile-vision: FBNet and ChamNet models measured against real device latency

> The mobile-vision repository ships pre-trained FBNet and ChamNet models, a model zoo for PyTorch and Caffe2, and a CNN latency look-up table built from int8 measurements on mobile phones. The models are searched against measured latency rather than FLOPs, which is the idea worth borrowing and also the reason the numbers need care.

**facebookresearch/mobile-vision** — Mobile vision models and code

- Repository: https://github.com/facebookresearch/mobile-vision
- Stars: 923 · Forks: 171
- Language: Python
- License: NOASSERTION
- Published: 2026-10-20 · Updated: 2026-10-20 · Language: en
- Canonical page: https://hysenlabs.com/projects/facebookresearch-mobile-vision

## Searching against measured latency, not FLOPs

The motivation the repository states is narrow and practical. Studies have shown the importance of optimizing for direct metrics such as latency instead of indirect metrics such as FLOPs, because a network with fewer operations is not automatically a faster network on real hardware. The problem with the direct approach is that platform specific latency measurements require engineering effort, and they are slow and difficult to parallelise. So the repository ships a CNN latency look-up table, an operator level latency database collected with the latest caffe2 int8 inference engine, QNNPACK, on mobile phones. That database is the input to the two design projects here, FBNet for hardware aware efficient ConvNet design via differentiable neural architecture search, and ChamNet for platform aware model adaptation. The audience is a researcher or engineer choosing a backbone for on-device vision when the target phone is known.

## FBNet searches the architecture against a latency table

FBNet, published at CVPR 2019, takes the differentiable neural architecture search route: the search space is scored against the latency look-up table rather than against FLOPs, so the network that comes out is one the table says will run fast. The pre-trained PyTorch models reported in the README were trained and evaluated on ImageNet 1k, the ILSVRC2012 dataset, with validation top-1 and top-5 accuracy given for the fp32 models. The spread is instructive. fbnet_a runs at 224x224 with 244.5 MFlops and 4.3 M parameters at 73.3 top-1, while dmasking_l3 at 288x288 reaches 78.9 top-1 with 9.4 M parameters, and the dmasking_f4 model sits at 75.5 top-1 with 235.9 MFlops. The variants differ in input resolution as much as in depth, which is the point: the table lets the search prefer an operator mix that fits a device rather than a generic budget.

## ChamNet adapts one network to several platforms

ChamNet, also from CVPR 2019, attacks a different problem: one architecture, deployed on different hardware. The Caffe2 model table shows the resulting family, ChamNet-A through ChamNet-F, each with its own resolution, MFlops, parameter count, int8 and fp32 accuracy, and measured latency. The spread runs from ChamNet-A at 224x224 and 552.9 MFlops down to ChamNet-F at 128x128 and 30.8 MFlops, with int8 latencies from 24.7 ms to 2.7 ms on the reference device. The FBNet family is listed alongside with FBNet-A, B, B1, C, C1 and a 96x96 FBNet-96 that runs at 12.9 MFlops and 2.3 ms int8. A design team that has to ship on a flagship and on a cheap handset can pick two points from this list instead of training two architectures from scratch, which is where the platform aware part of the method earns its keep.

## The model zoo covers PyTorch and Caffe2, fp32 and int8

There are two model zoos. The PyTorch side exposes pre-trained FBNet and FBNetV2 models, and the README gives the loading pattern, which pulls from the model_zoo module of the mobile_cv package:

```python
from mobile_cv.model_zoo.models.fbnet_v2 import fbnet
model = fbnet("dmasking_l3", pretrained=True)
model.eval()
```

A separate set is provided in TorchScript format as int8 quantized models, named fbnet_a_i8f_int8_jit, fbnet_b_i8f_int8_jit and fbnet_c_i8f_int8_jit, each with its own accuracy figures, for example 72.2 top-1 for the a variant against 73.3 for its fp32 counterpart. The Caffe2 side provides the ChamNet and FBNet models as downloadable archives hosted on Facebook's public file servers. The repository also ships example scripts, run_fbnet_v2.py, run_fbnet_v2_jit_int8.py and run_flops_estimation.py, so the loading pattern, the TorchScript path and a FLOPs estimate each have a runnable starting point.

## Preprocessing is part of the model contract

The models expect a specific input treatment, and getting it wrong is the usual reason a copied checkpoint disagrees with its published accuracy. The README states that the input image should be loaded in the range of [0, 255] in BGR format, and normalized using mean = [0.406, 0.456, 0.485] and std = [0.225, 0.224, 0.229], and it recommends that the transformation preferably happen at preprocessing time rather than inside the model. The BGR ordering is worth flagging, since most PyTorch code paths assume RGB, and the mean and standard deviation values are per channel in that same order. There is also a note on how int8 is used, which connects the two model zoos: the models are best used in int8, because they were searched using on-device int8 latency metrics in the first place.

## The latency numbers are one phone and one inference engine

The measurement conditions are stated in the README, and they are the first thing to check before quoting any of those latencies. Model latencies are benchmarked on a Samsung S8 CPU with NNPACK for fp32 and QNNPACK for int8, using Caffe2. That is a specific phone from a specific generation with specific engines, and it is not your phone. The look-up table itself has the same limitation, since it is an operator level database gathered on mobile phones with one particular int8 engine. This is where the practical difference between the two resources sits. The table is fast and reproducible, which is why it is useful for the search step and for estimating latency before you build anything, but for a production decision you would still measure on the real device. The repository also links to the two papers, FBNet and ChamNet, and asks that they be cited if you use the code or models in research.

## A CC BY-NC licence, no releases and a 2026 push

Two things about the licensing and packaging deserve a mention before anyone builds on this. The licence field on the repository is listed as a custom licence GitHub cannot classify, and the LICENSE file itself says the project is licensed under CC BY-NC. That is a non-commercial licence, so the models and code here are not something you can drop into a commercial product without checking the terms. The project itself says that if you use the code or models in research, you should cite the paper, and the README carries both BibTeX entries. On packaging, the Python distribution is mobile_cv, requiring Python 3.6 or later and depending on iopath, diskcache, termcolor, cloudpickle and tabulate. The version string is read from mobile_cv/__init__.py, and setup.py contains a note that the BUILD_NIGHTLY environment variable exists to build CI nightlies and that users should never use it. The repository has no GitHub releases, and the last push to the main branch was on 2026-10-21.

## Conclusion

Adopt mobile-vision when your on-device vision target is a phone you can measure, and you want backbones that were searched against measured int8 latency rather than FLOPs, along with int8 TorchScript checkpoints and a latency table that makes the trade-off quick to explore. Do not adopt it for a commercial product without reading the LICENSE file, since the project is published under CC BY-NC and asks for a paper citation, and do not quote its latency figures as your own device's numbers, because they come from a Samsung S8 CPU with NNPACK and QNNPACK. Verify first that the BGR input range and the mean and standard deviation values are applied exactly as documented, that the int8 model you pick matches the engine you deploy, and that the packaging release you use is one you have read the mobile_cv/model_zoo README for.

## FAQ

### What models does the Facebook mobile-vision repository provide?

It provides pre-trained FBNet and FBNetV2 models in PyTorch, int8 quantized versions of fbnet_a, fbnet_b and fbnet_c in TorchScript, pre-trained ChamNet and FBNet models in Caffe2, and a CNN latency look-up table built from operator level measurements with the caffe2 int8 engine on mobile phones.

### How do I load a pre-trained model from mobile-vision?

Import the builder from the model zoo and pass the model name with pretrained=True, for example from mobile_cv.model_zoo.models.fbnet_v2 import fbnet then fbnet("dmasking_l3", pretrained=True) followed by model.eval(). The README points to mobile_cv/model_zoo/README.md for more detail.

### What input format do the FBNet and ChamNet models expect?

The input image should be loaded in the range [0, 255] in BGR format and normalized using mean = [0.406, 0.456, 0.485] and std = [0.225, 0.224, 0.229], with the transformation preferably applied at preprocessing time.

### Why are the int8 numbers preferred in mobile-vision?

The README states the models are best used in int8 because they were searched using on-device int8 latency metrics. The measured latencies in the table were produced on a Samsung S8 CPU with NNPACK for fp32 and QNNPACK for int8.

### Can I use the mobile-vision models in a commercial product?

The LICENSE file says the project is licensed under CC BY-NC, and the repository licence field is listed as a custom licence. The models and code are published for research use with a request to cite the FBNet and ChamNet papers, so the terms need reading before any commercial use.

## Sources

- [facebookresearch/mobile-vision on GitHub](https://github.com/facebookresearch/mobile-vision)
- [Issues](https://github.com/facebookresearch/mobile-vision/issues)
- [README](https://github.com/facebookresearch/mobile-vision/blob/main/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/facebookresearch-mobile-vision
