Skip to main content

Cureco学習プラットフォーム用ONNX推論エンジン

Project description

cureco-inference-core

Cureco学習プラットフォームでエクスポートしたONNXモデルを使用して、画像分類などの推論を実行するためのPythonパッケージです。

特徴

  • ハードウェア自動検出: NPU/GPU/CPUを自動検出し、最適なExecution Providerを選択
  • 前処理・後処理の自動化: モデルメタデータから正規化パラメータやクラスマッピングを自動読み取り
  • 拡張可能な設計: 抽象基底クラスを継承して、独自の推論タイプを追加可能

インストール

pip install cureco-inference-core

GPU (CUDA) を使用する場合:

pip install cureco-inference-core[gpu]

DirectML (Windows GPU) を使用する場合:

pip install cureco-inference-core[directml]

クイックスタート

from PIL import Image
from cureco_inference_core import CurecoInference

engine = CurecoInference()
engine.load_model("model.onnx")

image = Image.open("test.jpg").convert("RGB")
results = engine.inference(image, params=[1.0])

for result in results:
    print(f"{result['label']}: {result['confidence']:.2%}")

メタデータの軽量読み取り

推論セッションを起動せずに、モデルのクラス名だけを取得できます。

classes = CurecoInference.read_classes("model.onnx")
print(classes)  # ['cat', 'dog', 'bird']

対応 Execution Provider

優先順位順:

Provider ハードウェア
QNNExecutionProvider Qualcomm NPU
VitisAIExecutionProvider AMD Ryzen AI
OpenVINOExecutionProvider Intel NPU
CUDAExecutionProvider NVIDIA GPU
DmlExecutionProvider DirectML (Windows GPU)
RKNPUExecutionProvider Rockchip NPU
CPUExecutionProvider CPU (フォールバック)

ライセンス

MIT

Project details


Download files

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

Source Distribution

cureco_inference_core-0.1.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

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

cureco_inference_core-0.1.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file cureco_inference_core-0.1.0.tar.gz.

File metadata

  • Download URL: cureco_inference_core-0.1.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cureco_inference_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6de60376d2960b971d7c2d1e574008658577dc09dc31b3e252363e30645d4e69
MD5 ae5978690ffe940b8a4b237ce3722c3b
BLAKE2b-256 0b4f4281d20182eb028214a5a134553bb1a5fa4314aee9ceb7742b231a2b6a1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for cureco_inference_core-0.1.0.tar.gz:

Publisher: publish.yml on cureco/cureco-inference-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cureco_inference_core-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cureco_inference_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58e4bf1b8a21b1c824986d174f3a01964d7cc43350898aa4e8f777202df9aeb2
MD5 fa95e03ad42365a2b9fdf13b90a15304
BLAKE2b-256 e1e21060963c0d8289f8dc4dba926a18f3c9a516eb58afe00323db0c6ecaa765

See more details on using hashes here.

Provenance

The following attestation bundles were made for cureco_inference_core-0.1.0-py3-none-any.whl:

Publisher: publish.yml on cureco/cureco-inference-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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