Interface for AI vision models.
Authors
Installation
Install as a package from source files
git clone https://github.com/Jaimead7/ViMI.git
cd ViMI
py -m pip install .
Install as a package from pypi
py -m pip install jaimead7-vimi
Usage
Create a model folder with a valid structure. You can find examples in ./test/models/.
from pathlib import Path
from typing import Optional
import cv2
import numpy as np
from vimi.engines import EnginesReg, ModelEngine
from vimi.results import Results
MODEL_PATH: Path = Path('./test/models/DetectModelNCNN')
IMGS_PATHS: list[Path] = [
Path(Path('./test/imgs/coco/bike.jpg')),
Path(Path('./test/imgs/coco/planes.jpg'))
]
model: Optional[ModelEngine] = EnginesReg.get_model(MODEL_PATH)
if model is None:
raise RuntimeError(f'Cant\'t open the model "{MODEL_PATH}".')
results: list[Results] = model(IMGS_PATHS)
if len(results) != len(IMGS_PATHS):
raise RuntimeError(f'Error processing images: Expected {len(IMGS_PATHS)} Results, got {len(results)}.')
for result, img in zip(results, IMGS_PATHS):
cv2.imshow(f'{img.name}', result.plot())
_: int = cv2.waitKey(0)
cv2.destroyAllWindows()
Available model interfaces
YOLO11 models:
| type | ncnn | pyTorch |
|---|---|---|
| classify | ✅ | ❌ |
| detect | ✅ | ❌ |
| obb | ✅ | ❌ |
| pose | ❌ | ❌ |
| segmentation | ❌ | ❌ |
License
This project is licensed under the MIT license.
Third-party models:
The ./test/ directory contains model files that are subject to their own respective licenses. Each model includes a metadata.yaml file specifying its applicable license terms. Please refer to these metadata files for details.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Metadata
Release files for jaimead7-vimi 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jaimead7_vimi-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for jaimead7_vimi-0.0.2-py3-none-any.whl |
Release files / jaimead7_vimi-0.0.2-py3-none-any.whl
| Download URL | jaimead7_vimi-0.0.2-py3-none-any.whl |
|---|---|
| Size | 28.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6797be9427a2d27a5b8e9346b7b2bf424553804f2f962c52dd36428c48bf89b5
|
|
BLAKE2b-256 checksum How to use checksums |
b4323a491f22165cec041a431180438890deb4fc10a507f7a1de5ad37134efde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for jaimead7-vimi 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.