Install¶
The core needs numpy and OpenCV only. Everything else is an optional extra, so you install the one your models actually need. Releases are on PyPI at pypi.org/project/vizor.
That gives you Vizor, Refiner,
Tracks, Vote and the video helpers.
It does not give you any model, and it does not give you a detector.
Extras¶
Each extra pulls in the dependency for one group of model wrappers.
| Extra | Installs | Gets you |
|---|---|---|
hf |
torch, transformers, pillow, einops, timm |
HF and Florence |
api |
openai |
VLM against OpenAI, Gemini, or any compatible url |
dev |
pytest, ruff |
the test suite and the linter |
docs |
zensical, mkdocstrings[python] |
building this site |
Combine them with a comma.
Pkl needs no extra. It replays predictions you saved
earlier, so it works on the core install.
From source¶
Clone and install in editable mode if you want to change the package or run the tests.
The suite needs no GPU, no API key and no model weights. It stubs the secondary instead of calling one.
The four replay tests in tests/test_replay.py skip themselves when the cached
predictions are not on disk, and those files are not in the repo, so a fresh
clone reports 103 passed and 4 skipped.
Lazy imports¶
import vizor never imports torch, transformers or openai. The model
wrappers are resolved through a module-level __getattr__ and imported the first
time you name one.
import vizor as vz # numpy and OpenCV only
model = vz.Florence() # transformers and torch are imported here
The practical consequence is that a missing extra shows up as an ImportError
when you construct the model, not when you import the package.