FAIR's shared CV toolbox: less copy-paste, more FLOP counting
It exists so FAIR's computer vision teams stop rewriting the same PyTorch boilerplate in every new repo.

What it does
fvcore is FAIR’s internal utility belt for PyTorch computer vision. It consolidates the layers, losses, and bookkeeping helpers that power Detectron2, PySlowFast, and ClassyVision. Think of it as kindly maintained glue code: type-annotated, tested, and benchmarked so researchers don’t have to rediscover the basics.
The interesting bit
The library treats model accounting as a first-class feature. Its hierarchical per-operator FLOP counter and recursive parameter counter suggest someone finally got tired of estimating complexity by hand.
Key highlights
fvcore.nnbundles common PyTorch layers and losses shared across FAIR vision frameworks- Hierarchical per-operator FLOP counting shows exactly where compute is spent
- Recursive parameter counting tallies model capacity without manual module traversal
- A helper recomputes BatchNorm population statistics when you need a clean reset
- Includes a stateless, scale-invariant hyperparameter scheduler for training regimes
Verdict
Worth a look if you are building CV infrastructure in PyTorch and want battle-tested utilities. Skip it if you need a full framework—this is spare parts, not the machine.
Frequently asked
- What is facebookresearch/fvcore?
- It exists so FAIR's computer vision teams stop rewriting the same PyTorch boilerplate in every new repo.
- Is fvcore open source?
- Yes — facebookresearch/fvcore is open source, released under the Apache-2.0 license.
- What language is fvcore written in?
- facebookresearch/fvcore is primarily written in Python.
- How popular is fvcore?
- facebookresearch/fvcore has 2.2k stars on GitHub.
- Where can I find fvcore?
- facebookresearch/fvcore is on GitHub at https://github.com/facebookresearch/fvcore.