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 ofnp.ndarrayobjects.
⚙️ 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)where6 = [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
Release history Release notifications | RSS feed
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.2.tar.gz
(19.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
trism_cv-0.0.2-py3-none-any.whl
(19.2 kB
view details)
File details
Details for the file trism_cv-0.0.2.tar.gz.
File metadata
- Download URL: trism_cv-0.0.2.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20a8602175a91b393aecbd852aa0a4bd0a42d37cfcc96be154d21f678ec2dd3a
|
|
| MD5 |
bdffda213d7e4fa15d3f8df1e7b15b78
|
|
| BLAKE2b-256 |
7cb422312d1e38f79b9cfb887e89c812a6687884476a850a7a9c947eed40baf9
|
File details
Details for the file trism_cv-0.0.2-py3-none-any.whl.
File metadata
- Download URL: trism_cv-0.0.2-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.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6cc0bfb86bb70e6bb011723e5b2e1878dd88589c8a978a49c4f8d8c048c9c8b
|
|
| MD5 |
fe7e351fbe0dfc714cbf8c2caa11e4b5
|
|
| BLAKE2b-256 |
1957293adf6ce5421abf0b71d0c1d1360f95c0fe7dcf6b30108b032d8bcad34b
|