v0.1.0 is live on PyPI

The Microsecond Data Sentinel
for Production Computer Vision.

Intercept optical corruption, lens blur, dynamic range clipping, and distribution drift before inference hits expensive GPUs. Pure NumPy · CPU-first · 223µs pre-flight checks.

pip install vigilcv
Pure CPU, no GPU required95% test coverageStrict mypy typingApache-2.0 License

Why VigilCV

Built for the demands of production ML

223µs Pre-flight

Pure NumPy Laplacian variance and Shannon entropy computed in microseconds on CPU. Zero GPU warmup.

Zero Silent Failures

Hard raises on corrupt JPEG headers, truncated files, and extreme exposure clipping before any model call.

54D Drift Detection

Wasserstein-1 (EMD) and unbiased MMD (RBF kernel) over spatial color moments — no CNN backbone needed.

CPU-First Design

Vectorized NumPy and SciPy operations. Works on serverless, edge inference, and CI runners with no CUDA.

Stream-Ready

audit_stream() generator wraps any OpenCV or GStreamer frame loop with sub-millisecond overhead.

Typed & Tested

Full mypy strict typing, 95% test coverage, ruff-formatted. Production-grade from day one.

Live Interactive Demo

Drop any image. See it analyzed in milliseconds.

This playground runs the exact same heuristics as VisionSentinel — pure client-side, zero server round-trips.

Results will appear here

Drop an image to start analysis

Performance

223µs. The fastest gate in the pipeline.

Single-image pre-flight latency on a standard 4-core CPU (512×512 px, NumPy backend). No GPU, no ONNX runtime, no batching required.

VigilCVVigilCV (CPU)223 µs
223 µs
OpenCV blur check890 µs
PIL thumbnail + hash2.1 ms
torchvision transform4.8 ms
CLIP embedding38.0 ms
ResNet-50 inference74.0 ms

Measured on Apple M2 equivalent / AMD Ryzen 7 5800H · Python 3.11 · NumPy 1.26 · Single thread

Integrations

Drop-in guard for any Python stack.

VigilCV integrates in under 5 lines with FastAPI, PyTorch DataLoaders, and OpenCV streams.

integration_examples.py
300">"text-violet-400">from fastapi 300">"text-violet-400">import FastAPI, UploadFile, File
300">"text-violet-400">from vigilcv 300">"text-violet-400">import VisionSentinel
300">"text-violet-400">from vigilcv.exceptions 300">"text-violet-400">import CorruptImageError, QualityThresholdExceeded
300">"text-violet-400">import io

app = FastAPI()
sentinel = VisionSentinel(blur_threshold=100.0, min_entropy=3.0)

@app.post(300">"/predict")
300">"text-violet-400">async 300">"text-violet-400">def predict(file: UploadFile = File(...)):
    image_bytes = 300">"text-violet-400">await file.read()
    
    300">"text-violet-400">class=300">"text-slate-500 italic"># Pre-flight guard — raises before model 300">"text-violet-400">is invoked
    sentinel.guard(io.BytesIO(image_bytes))
    
    result = my_model(image_bytes)  300">"text-violet-400">class=300">"text-slate-500 italic"># Only runs on pristine images
    300">"text-violet-400">return {300">"predictions": result}

Stop silent model degradation.

Your GPU is expensive. Your data quality shouldn't be a mystery.

Get started in 2 minutespip install vigilcv