Metadata-Version: 2.4
Name: ai-center
Version: 2026.8.1
Summary: Automated Sample Alignment for MX using a YOLO Model
License-Expression: MIT
License-File: LICENSE
Author: Michel Fodje
Author-email: michel.fodje@lightsource.ca
Requires-Python: >=3.11, !=3.14.1, <3.15
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Provides-Extra: model
Provides-Extra: view
Requires-Dist: devioc (>=2025.6.2,<2026.0.0)
Requires-Dist: huggingface-hub (==1.28.0) ; extra == "model"
Requires-Dist: numpy (>=2.4.6,<3.0.0)
Requires-Dist: onnxruntime-gpu (>=1.26.0,<2.0.0)
Requires-Dist: opencv-contrib-python (>=4.13.0.92,<5.0.0.0) ; extra == "view"
Requires-Dist: opencv-python (>=4.13.0.92,<5.0.0.0)
Requires-Dist: redis (>=8.0.0,<9.0.0)
Requires-Dist: ultralytics (==8.4.62)
Project-URL: Homepage, https://github.com/michel4j/ai-center
Project-URL: Issues, https://github.com/michel4j/ai-center/issues
Project-URL: Models, https://huggingface.co/michel4j/mxsamples
Description-Content-Type: text/markdown

aicenter
========

A python based Soft IOC Server for Sample Alignment using a YOLO model.

Installation
============

```
python -m venv my-venv
source my-venv/bin/activate
pip install ai-center
```

To enabled downloading of the latest model file from HuggingFace, install with the `[model]` extra as follows:

```
pip install ai-center[model]
```

Running
=======

To run the EPICS IOC directly, use the following command:

```
app.epics --device "AIC001" --model "/path/to/model.pt" --video "video_uri"
```

### Command-line Arguments

*   `--device`: The EPICS root name of the device (e.g., `AIC001` or `AIC002`). **(Required)**
*   `--model`: Path to the YOLO model file. If omitted, the latest model will be downloaded from HuggingFace. The model is about 50 MB in size.
*   `--video`: The URI for the video stream. (e.g., `redis://hostname/0030180F06E5:JPG`) **(Required)**
*   `--confidence`: Object detection confidence threshold. (Optional, default: 0.1)
*   `-v`: Enable verbose logging. (Optional)

Currently, only `file://`, `redis://` and `http[s]://` video schemes are supported


If you installed the `[view]` extra, you can also run the stand-alone inference viewer which displays the inference in a
window as follows:

```
app.view --model "/path/to/model.pt" --video "video_uri"
```

### Command-line Arguments

*   `--model`: Path to the YOLO model file. If omitted, the latest model will be downloaded from HuggingFace. The model is about 50 MB in size.
*   `--video`: The URI for the video stream. (e.g., `redis://hostname/0030180F06E5:JPG`) **(Required)**
*   `--confidence`: Object detection confidence threshold. (Optional, default: 0.1)
*   `-v`: Enable verbose logging. (Optional)
