trtutils.models package

Subpackages

Module contents

Implementations of various deep learning models.

Classes

YOLO

Alias for the Detector class with args preset for YOLO.

YOLOv3

Alias for the YOLO class with args preset for YOLOv3.

YOLOv5

Alias for the YOLO class with args preset for YOLOv5.

YOLOv7

Alias for the YOLO class with args preset for YOLOv7.

YOLOv8

Alias for the YOLO class with args preset for YOLOv8.

YOLOv9

Alias for the YOLO class with args preset for YOLOv9.

YOLOv10

Alias for the YOLO class with args preset for YOLOv10.

YOLOv11

Alias for the YOLO class with args preset for YOLOv11.

YOLOv12

Alias for the YOLO class with args preset for YOLOv12.

YOLOv13

Alias for the YOLO class with args preset for YOLOv13.

YOLOv26

Alias for the YOLO class with args preset for YOLOv26.

YOLOX

Alias for the YOLO class with args preset for YOLOX.

DETR

Alias for the Detector class with args preset for DETR.

RTDETRv1

Alias for the DETR class with args preset for RT-DETRv1.

RTDETRv2

Alias for the DETR class with args preset for RT-DETRv2.

RTDETRv3

Alias for the DETR class with args preset for RT-DETRv3.

DFINE

Alias for the DETR class with args preset for D-FINE.

DEIM

Alias for the DETR class with args preset for DEIM.

DEIMv2

Alias for the DETR class with args preset for DEIMv2.

RFDETR

Alias for the DETR class with args preset for RF-DETR.

AlexNet

Alias for the Classifier class with args preset for AlexNet.

ConvNeXt

Alias for the Classifier class with args preset for ConvNeXt.

DenseNet

Alias for the Classifier class with args preset for DenseNet.

EfficientNet

Alias for the Classifier class with args preset for EfficientNet.

EfficientNetV2

Alias for the Classifier class with args preset for EfficientNet V2.

GoogLeNet

Alias for the Classifier class with args preset for GoogLeNet.

Inception

Alias for the Classifier class with args preset for Inception V3.

MaxViT

Alias for the Classifier class with args preset for MaxViT.

MNASNet

Alias for the Classifier class with args preset for MNASNet.

MobileNetV2

Alias for the Classifier class with args preset for MobileNet V2.

MobileNetV3

Alias for the Classifier class with args preset for MobileNet V3.

RegNet

Alias for the Classifier class with args preset for RegNet.

ResNet

Alias for the Classifier class with args preset for ResNet.

ResNeXt

Alias for the Classifier class with args preset for ResNeXt.

ShuffleNetV2

Alias for the Classifier class with args preset for ShuffleNet V2.

SqueezeNet

Alias for the Classifier class with args preset for SqueezeNet.

SwinTransformer

Alias for the Classifier class with args preset for Swin Transformer.

SwinTransformerV2

Alias for the Classifier class with args preset for Swin Transformer V2.

VGG

Alias for the Classifier class with args preset for VGG.

ViT

Alias for the Classifier class with args preset for ViT.

WideResNet

Alias for the Classifier class with args preset for Wide ResNet.

DepthAnythingV1

Alias for the DepthEstimator class with args preset for Depth-Anything-V1.

DepthAnythingV2

Alias for the DepthEstimator class with args preset for Depth-Anything-V2.

HOIDETR

Alias for the HandInteractionDetector class with args preset for HOI-DETR.

Hands23

Alias for the HandInteractionDetector class with args preset for Hands23.

DepthAnythingV3

Alias for the DepthEstimator class with args preset for Depth-Anything-V3.

class trtutils.models.DEIM(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, mean: tuple[float, float, float] = (0.485, 0.456, 0.406), std: tuple[float, float, float] = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of DETR with default args for DEIM.

class trtutils.models.DETR(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector

Alias of Detector with default args for DETR.

class trtutils.models.DFINE(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, mean: tuple[float, float, float] = (0.485, 0.456, 0.406), std: tuple[float, float, float] = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of DETR with default args for D-FINE.

class trtutils.models.HOIDETR(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0.0, 1.0), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.3, pair_thres: float = 0.5, second_pair_thres: float | None = None, nms_iou_thres: float = 0.5, mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: HandInteractionDetector, Model

Alias of HandInteractionDetector with default args for HOI-DETR.

class trtutils.models.RFDETR(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, mean: tuple[float, float, float] = (0.485, 0.456, 0.406), std: tuple[float, float, float] = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of DETR with default args for RF-DETR.

class trtutils.models.VGG(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for VGG.

class trtutils.models.YOLO(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector

Alias of Detector with default args for YOLO.

class trtutils.models.YOLOX(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 255), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of Detector with default args for YOLOX.

class trtutils.models.AlexNet(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for AlexNet.

class trtutils.models.ConvNeXt(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for ConvNeXt.

class trtutils.models.DEIMv2(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, mean: tuple[float, float, float] = (0.485, 0.456, 0.406), std: tuple[float, float, float] = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of DETR with default args for DEIMv2.

class trtutils.models.DenseNet(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for DenseNet.

class trtutils.models.DepthAnythingV1(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: DepthEstimator, Model

Alias of DepthEstimator with default args for Depth-Anything-V1.

class trtutils.models.DepthAnythingV2(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: DepthEstimator, Model

Alias of DepthEstimator with default args for Depth-Anything-V2.

class trtutils.models.DepthAnythingV3(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: DepthEstimator, Model

Alias of DepthEstimator with default args for Depth-Anything-V3.

class trtutils.models.EfficientNet(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for EfficientNet.

class trtutils.models.EfficientNetV2(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for EfficientNet V2.

class trtutils.models.GoogLeNet(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for GoogLeNet.

class trtutils.models.Hands23(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0.0, 255.0), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.3, pair_thres: float = 0.3, second_pair_thres: float | None = 0.7, nms_iou_thres: float = 0.5, mean: tuple[float, float, float] | None = None, std: tuple[float, float, float] | None = None, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = False, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: HandInteractionDetector, Model

Alias of HandInteractionDetector with default args for Hands23.

Normalization (BGR flip, mean/std) is baked into the exported ONNX, so the wrapper passes raw 0-255 RGB input straight through. A single conf_thres is used for all three classes, unlike the reference demo which uses per-class thresholds of 0.7/0.5/0.3. CUDA graphs default to off: the in-graph NMS yields data-dependent shapes, which TensorRT cannot capture.

class trtutils.models.Inception(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for Inception V3.

class trtutils.models.MNASNet(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for MNASNet.

class trtutils.models.MaxViT(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for MaxViT.

class trtutils.models.MobileNetV2(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for MobileNet V2.

class trtutils.models.MobileNetV3(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for MobileNet V3.

class trtutils.models.RTDETRv1(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 255), preprocessor: str = 'trt', resize_method: str = 'linear', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, mean: tuple[float, float, float] | None = None, std: tuple[float, float, float] | None = None, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of DETR with default args for RT-DETRv1.

class trtutils.models.RTDETRv2(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 255), preprocessor: str = 'trt', resize_method: str = 'linear', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, mean: tuple[float, float, float] | None = None, std: tuple[float, float, float] | None = None, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of DETR with default args for RT-DETRv2.

class trtutils.models.RTDETRv3(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 255), preprocessor: str = 'trt', resize_method: str = 'linear', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, mean: tuple[float, float, float] | None = None, std: tuple[float, float, float] | None = None, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of DETR with default args for RT-DETRv3.

class trtutils.models.RegNet(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for RegNet.

class trtutils.models.ResNeXt(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for ResNeXt.

class trtutils.models.ResNet(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for ResNet.

class trtutils.models.ShuffleNetV2(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for ShuffleNet V2.

class trtutils.models.SqueezeNet(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for SqueezeNet.

class trtutils.models.SwinTransformer(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for Swin Transformer.

class trtutils.models.SwinTransformerV2(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for Swin Transformer V2.

class trtutils.models.ViT(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for ViT.

class trtutils.models.WideResNet(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'linear', mean: tuple[float, float, float] | None = (0.485, 0.456, 0.406), std: tuple[float, float, float] | None = (0.229, 0.224, 0.225), dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Classifier, Model

Alias of Classifier with default args for Wide ResNet.

class trtutils.models.YOLOv3(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of Detector with default args for YOLOv3.

class trtutils.models.YOLOv5(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of Detector with default args for YOLOv5.

class trtutils.models.YOLOv7(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of Detector with default args for YOLOv7.

class trtutils.models.YOLOv8(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of Detector with default args for YOLOv8.

class trtutils.models.YOLOv9(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of Detector with default args for YOLOv9.

class trtutils.models.YOLOv10(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of Detector with default args for YOLOv10.

class trtutils.models.YOLOv11(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of Detector with default args for YOLOv11.

class trtutils.models.YOLOv12(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of Detector with default args for YOLOv12.

class trtutils.models.YOLOv13(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of Detector with default args for YOLOv13.

class trtutils.models.YOLOv26(engine_path: Path | str, warmup_iterations: int = 10, input_range: tuple[float, float] = (0, 1), preprocessor: str = 'trt', resize_method: str = 'letterbox', conf_thres: float = 0.1, nms_iou_thres: float = 0.5, dla_core: int | None = None, device: int | None = None, backend: str = 'auto', *, warmup: bool | None = None, pagelocked_mem: bool | None = None, unified_mem: bool | None = None, cuda_graph: bool | None = None, extra_nms: bool | None = None, agnostic_nms: bool | None = None, no_warn: bool | None = None, verbose: bool | None = None)[source]

Bases: Detector, Model

Alias of Detector with default args for YOLOv26.