Skip to main content

Interface for AI vision models.

Project description

ViMI - Vision Models interface

License PyPI Latest Release

Interface for AI vision models.

Authors

Jaime Alvarez Diaz
email
GitHub Profile

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 models 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 SystemError(f'Cant\'t open the model "{MODEL_PATH}".')

results: list[Results] = model(IMGS_PATHS)

if len(results) >= 0:
    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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jaimead7_vimi-0.0.1-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file jaimead7_vimi-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: jaimead7_vimi-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for jaimead7_vimi-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 46c0422e3f2e99a80ef44acdb01f4071311171a01bf9497065530a42a7f14197
MD5 aee67a6be89aa1a74d0cca3fe834cf9d
BLAKE2b-256 8e95978896447045ff1431c1df292e32fda844ffbe7de3017a4db6145d3b434c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page