mvkit
Machine vision inspection for production lines — a framework you install, not a library you call.
mvkit runs an unattended inspection loop: wait for a trigger, grab a frame,
run an inspection chain, report the verdict to the line, repeat. Cameras,
triggers, result sinks and inspection modules are all plugins, so a new site is
a configuration change rather than a code change.
No PyTorch in the default install. The runtime is onnxruntime + numpy +
opencv.
Install
pip install mvkit # CPU
pip install "mvkit[gpu]" # NVIDIA CUDA via onnxruntime-gpu
pip install "mvkit[genicam]" # GenICam/GenTL industrial cameras
Then:
mvkit serve # http://127.0.0.1:8000 — dashboard and REST API
mvkit doctor # what is installed, what is missing, and why
The dashboard opens on a demo file camera reading the bundled sample images, so a fresh install has something to look at before any hardware arrives.
What it does
| Layer | Plugins |
|---|---|
| Cameras | file · opencv (webcam, RTSP) · watch_folder · harvester (GenICam) |
| Triggers | hardware · digital_input · software · interval · push |
| Result sinks | digital_output · modbus_tcp · log — several at once |
| Inspection | see below |
The runtime keeps capture, inference and dispatch on separate threads with bounded queues, so a slow PLC never stalls inference and a fast line never silently piles up frames. Camera drop-outs reconnect with backoff; a watchdog heartbeat tells the line when the inspector itself has stopped.
Inspection modules
| Module | What it checks | Weights |
|---|---|---|
barcode |
1D barcodes, QR, DataMatrix | none |
presence |
part present / missing, by template | none |
count |
number of objects | none |
color |
colour deviation (Lab ΔE) | none |
patchcore |
surface defects — teach from 5–10 good parts | DINOv2 (ONNX) |
crane |
surface defects, zero-shot | CLIP + DINOv2 (ONNX) |
detect |
object detection | D-FINE (ONNX) |
detect_gate |
detect a region, then inspect only that region | D-FINE (ONNX) |
ocr |
text reading — needs mvkit[ocr] and PyTorch |
EasyOCR |
schad |
structural + logical anomalies — needs mvkit[train] and PyTorch |
trained on your machine |
Model weights are not bundled in the wheel. They are downloaded per module on first use, or imported from a disk:
mvkit models download --module patchcore
mvkit models import D:\mvkit_assets
mvkit models status
Teaching a part
Upload five to ten good samples in the dashboard; no defect images are required and no labelling is involved. The result is stored on your machine and never leaves it, and a product folder can be copied to another machine as it is.
Teaching from the command line is not available yet.
What needs to be installed separately
Two things cannot come from PyPI.
Industrial camera SDKs. harvesters talks to a GenTL producer (.cti), and
that file ships with the camera vendor's runtime — Basler pylon, Hikrobot MVS,
Teledyne FLIR Spinnaker, and so on. Install the vendor runtime and mvkit will
find the producer on its own. Order does not matter; the search happens when a
camera is opened, not at install time.
PyTorch, for mvkit[ocr] and mvkit[train] only. PyPI metadata cannot
express which CUDA build you need, so install it yourself first:
pip install torch --index-url https://download.pytorch.org/whl/cu128
pip install "mvkit[train]"
mvkit doctor reports both, and distinguishes "not installed" from "broken".
Where things are stored
| Location | |
|---|---|
| Model cache | %LOCALAPPDATA%\mvkit\Cache · ~/Library/Caches/mvkit · ~/.cache/mvkit |
| Products, teaching results, logs | %LOCALAPPDATA%\mvkit\artifacts · ~/Library/Application Support/mvkit/artifacts · ~/.local/share/mvkit/artifacts |
| Site configuration | %APPDATA%\mvkit\site.yaml · ~/.config/mvkit/site.yaml |
A product folder is self-contained: copy it to another machine and inspection works there. Retraining caches live outside it and can be deleted.
Line PCs often have a small system drive. mvkit doctor prints the artifacts
path with free space; move it with mvkit config set artifacts_dir D:\....
Evaluation
All modules are available for three months. After that, barcode,
presence, count and color keep working; the rest need a licence.
An expired licence never stops a running line. Inspection in progress continues; only starting a new run and teaching new products are blocked, and the dashboard warns 30, 7 and 1 days ahead.
Your teaching results are yours. They are not deleted when a licence expires and can always be exported.
For a licence, email pashidl.lab@gmail.com with your name, organisation and intended use.
License
Proprietary. Evaluation and non-commercial research use only — see LICENSE.
Contact the copyright holder for commercial licensing.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mvkit-0.3.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: mvkit-0.3.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 8.7 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcd32f439fdea90fadfd1fc253c4a9b406b039f849c2f937128c4d0048abcb9b
|
|
| MD5 |
9888b2ae112bf1d1cfedc0124a1e5028
|
|
| BLAKE2b-256 |
8d1754c0a711baa839bd5ca2488865ea941a4118524729ff27c5ffb2f53f0733
|
Provenance
The following attestation bundles were made for mvkit-0.3.0-cp311-cp311-win_amd64.whl:
Publisher:
release.yml on pashidl-lab/mvkit-src
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mvkit-0.3.0-cp311-cp311-win_amd64.whl -
Subject digest:
bcd32f439fdea90fadfd1fc253c4a9b406b039f849c2f937128c4d0048abcb9b - Sigstore transparency entry: 2578955000
- Sigstore integration time:
-
Permalink:
pashidl-lab/mvkit-src@7a635f9cb321007add47ab39de9bb1c0f3ffae2e -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/pashidl-lab
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7a635f9cb321007add47ab39de9bb1c0f3ffae2e -
Trigger Event:
push
-
Statement type: