Skip to main content

A lightweight and modular Python package for handling computer vision inference (image/video) with Triton Inference Server.

Project description

TRISM Inference Script

This script performs batch inference on a folder of images using a Triton Inference Server model.

📂 Input

  • image_folder: Path to the folder containing images (jpg, png, etc.).
  • Images are loaded using OpenCV (cv2.imread) into a list of np.ndarray objects.

⚙️ Configuration

image_folder = "path/to/image_folder"   
model_name = "yolov_deyo_ensemble"
batch_size = 1 # You can pass a custom batch size or use default (e.g., 1)

🚀 Inference

model = TritonModel(
    model=model_name, 
    version=1,                    # Model version on Triton server
    url="localhost:8001",         # Triton server address
    grpc=True                     # Use gRPC protocol for communication
)

outputs = model.run(
    data_list=images,              # list of images 
    auto_config=True,
    batch_size=batch_size
)

📤 Output

  • A list of numpy arrays, one for each input image.
  • Each output has shape (n_detections, 6) where 6 = [x1, y1, x2, y2, confidence, class_id]

🧪 Debug Output

for i, out in enumerate(outputs):
    print(f"Image {i}: shape = {out.shape}, dtype = {out.dtype}")

License

GNU AGPL v3.0.
Copyright © 2025 Tien Nguyen Van. All rights reserved.

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

trism_cv-0.0.1.dev0.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

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

trism_cv-0.0.1.dev0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file trism_cv-0.0.1.dev0.tar.gz.

File metadata

  • Download URL: trism_cv-0.0.1.dev0.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for trism_cv-0.0.1.dev0.tar.gz
Algorithm Hash digest
SHA256 e8d63ae9bd5bbad3f78c4dc89b52e3d369b91b60b68d2b17545923420bf1d7fb
MD5 0c01292130173c7630b0174972761b9a
BLAKE2b-256 1aedb453baaacabf24824bc783dce358d6e18c2fcd37566108a29651f88ec230

See more details on using hashes here.

File details

Details for the file trism_cv-0.0.1.dev0-py3-none-any.whl.

File metadata

  • Download URL: trism_cv-0.0.1.dev0-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for trism_cv-0.0.1.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 7bff8b6a463973126b6f81b1914e237accf27fef78584bba7390f8263a92c36d
MD5 f2a92644c2e5c307348f287ebd808b6b
BLAKE2b-256 d3b84c7ba2e1e8c19c9f07ad33c8dea4b9ab17ff32f9d4693db01be487ef2d23

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