skillfed

fvcore

Collection of common code shared among different research projects in FAIR computer vision team

fvcore v0.1.5.post20221221 2.1M downloads/30d#3,277 on PyPI2,251
Permissive license Apache 2.0 Active released

What it is and what it does

fvcore is a lightweight library maintained by Facebook AI Research (FAIR) that centralizes common computer vision utilities used across their research projects. It provides PyTorch-native components: standard neural network layers and loss functions, a hierarchical FLOP counter for profiling model efficiency, recursive parameter counting for model analysis, batch normalization statistics recomputation, and a stateless hyperparameter scheduler. All code is type-annotated and tested.

The library is designed for researchers and engineers working with PyTorch who need standard computer vision utilities without heavyweight dependencies. It has no runtime dependencies listed in the package metadata, though PyTorch itself is a hard requirement. The package is actively maintained at the repository level but has not received a PyPI release since December 2022, which may affect compatibility with very recent PyTorch versions.

Use it for:

  • Profile model computational cost (FLOPs) during development to optimize architectures before training.
  • Analyze parameter counts and memory footprint of neural networks for deployment planning.
  • Recompute batch normalization statistics on a new dataset without retraining the full model.
  • Schedule learning rates and other hyperparameters in a scale-invariant, reproducible way across experiments.
  • Access common PyTorch layers and loss functions shared across FAIR research codebases.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

fvcore provides shared computer vision utilities for PyTorch, including neural network layers, loss functions, FLOP counting, parameter analysis, and hyperparameter scheduling used across FAIR's research frameworks.

Yes, if you use PyTorch for computer vision research and need standard profiling or scheduling utilities. The library is actively maintained at the repository level, permissively licensed, and widely used in FAIR projects. However, note that the last PyPI release was December 2022—verify compatibility with your PyTorch version before installing, and consider installing from GitHub if you need the latest code.

Install

fvcore on PyPI

pip

pip install fvcore

uv

uv add fvcore

poetry

poetry add fvcore

Installing fvcore

Before you install

High install friction: the package requires PyTorch as a system dependency and has not been updated on PyPI since December 2022, though the repository remains active with recent commits. Installation may require resolving PyTorch separately depending on your environment.

License in practice

Released under Apache 2.0 (permissive), allowing commercial and private use with minimal restrictions, though you must include a copy of the license and note any modifications.

Quickstart

pip install fvcore

from fvcore.nn import FlopCountAnalyzer

flops = FlopCountAnalyzer(model, input_shape).total()

Requires PyTorch to be installed separately; Python >= 3.6 required.

Verify before relying

  • Whether PyTorch version constraints exist beyond the requirement for pytorch itself
  • Current status of nightly PyPI updates mentioned in the install instructions
  • Compatibility with modern PyTorch versions given the December 2022 release date
  • Whether FlopCountAnalyzer is the primary entry point or if other APIs are more commonly used

Package facts

License Apache 2.0 (permissive)
Python support supports the current Python release (>=3.6)
Install friction high — source build required
Runtime dependencies none
Maintenance actively maintained — 1,332 days since the last release
Last repo commit
First released
Downloads 2,121,804/month — #3,277 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: fvcore-0.1.5.post20221221.tar.gz

Tags

pytorch computer vision utilitiesflop counting neural networksparameter counting pytorchbatch norm statisticshyperparameter scheduler pytorch
pytorchcomputer-visionprofiling

More Artificial Intelligence packages