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.post1.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.post1-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: trism_cv-0.0.1.post1.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.post1.tar.gz
Algorithm Hash digest
SHA256 a28895fa4aec831b6b4d24b80a28f75fbf5f3ce008a1de67ca63e0eb9240d3cd
MD5 30ded967ea3dad5e8c7ba383f4de3446
BLAKE2b-256 211007a7a9441312a2f72bd884531419f9b5f5adccea98cc231577bd0d5fe437

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trism_cv-0.0.1.post1-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.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 5b57af99b5d69d41d785406e806472e58829111a2cb9ad67c90f558c6f654fbc
MD5 4e670a7715db22655cd44b13ab788d1b
BLAKE2b-256 136be4cc446d5921572a0e8e771c20510b2060419d7dffdcf1c1a9292c76e9c5

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