mirror of
https://github.com/azaion/detections.git
synced 2026-06-21 10:41:07 +00:00
This commit is contained in:
@@ -98,6 +98,13 @@ def main():
|
||||
print(f"Cache written → {args.output}")
|
||||
|
||||
onnx_data = Path(args.onnx).read_bytes()
|
||||
try:
|
||||
from engines.onnx_tensorrt_compat import prepare_for_tensorrt
|
||||
|
||||
onnx_data = prepare_for_tensorrt(onnx_data)
|
||||
print("Prepared ONNX model for TensorRT static Jetson build")
|
||||
except Exception as e:
|
||||
print(f"WARNING: ONNX TensorRT compatibility preparation failed: {e}", file=sys.stderr)
|
||||
logger = trt.Logger(trt.Logger.INFO)
|
||||
explicit_batch = 1 << int(trt.NetworkDefinitionCreationFlag.EXPLICIT_BATCH)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user