Metadata-Version: 2.4
Name: simplevision
Version: 0.5.3
Summary: Run SimpleVision computer-vision pipelines from Python — a student-friendly companion to the SimpleVision editor.
Project-URL: Homepage, https://github.com/AutoElecAB/SimpleVision
Project-URL: Source, https://github.com/AutoElecAB/SimpleVision
Project-URL: Issues, https://github.com/AutoElecAB/SimpleVision/issues
Project-URL: Changelog, https://github.com/AutoElecAB/SimpleVision/blob/main/CHANGELOG.md
Author-email: AutoElec AB <tornblomanton@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: computer-vision,education,image-processing,opencv,pipelines
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Education
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Requires-Python: >=3.11
Requires-Dist: numpy>=1.26
Requires-Dist: opencv-python>=4.9
Requires-Dist: pygrabber>=0.2; platform_system == 'Windows'
Provides-Extra: ocr
Requires-Dist: rapidocr-onnxruntime>=1.3; extra == 'ocr'
Description-Content-Type: text/markdown

# simplevision

Run [SimpleVision](https://github.com/AutoElecAB/SimpleVision) computer-vision
pipelines from Python.

SimpleVision is a learning tool for students: you build a vision pipeline
visually in the desktop editor (threshold, blob detect, color match,
geometric match, OCR, …), tick the measurements you care about, and the
editor saves the pipeline as a single `.simplevision` JSON file. This
library is the companion that runs that pipeline from Python so you can
plug the measurements into your own code.

## Install

```bash
pip install simplevision
```

OCR is optional (it pulls in RapidOCR + ONNX Runtime, ~300 MB):

```bash
pip install "simplevision[ocr]"
```

## Use it

Open your pipeline in the SimpleVision editor, tick the measurements you
want in **Output Control**, and save. Then in Python:

```python
from simplevision import Pipeline

p = Pipeline.load("my_pipeline.simplevision")
p.run()

# Each name below is one you typed in the editor's Output Control panel.
if p.outputs.MatchPercentage[0] > 0.85:
    print("Match found at", p.outputs.Centroids[0])
```

Pass your own frame to `p.run()` to process many images through the same
pipeline:

```python
import cv2
for path in ["frame_001.png", "frame_002.png", "frame_003.png"]:
    p.run(path)
    print(path, "->", p.outputs.Count)
```

`print(p.outputs)` shows everything readably — handy while you're getting
oriented.

## What's in the package

- `simplevision.Pipeline`, `simplevision.Outputs`, `simplevision.Point` —
  the student-facing API.
- `simplevision.runtime` — the execution engine. You normally don't
  import this directly; the desktop app uses it as a sidecar and
  `Pipeline.run()` drives it under the hood. The runtime is documented
  in [`docs/pipeline-spec.md`](https://github.com/AutoElecAB/SimpleVision/blob/main/docs/pipeline-spec.md)
  if you want to build pipelines without the editor.

## License

Apache-2.0. See `LICENSE` and `NOTICE`.
