pesi
/

Luigi commited on
Commit
1c5dc58
1 Parent(s): 01042ef

Load ./libmmdeploy_tensorrt_ops.so for TensorRT EP if available

Browse files
Files changed (1) hide show
  1. rtmo_gpu.py +2 -1
rtmo_gpu.py CHANGED
@@ -3,6 +3,7 @@ import numpy as np
3
  from typing import List, Tuple
4
  import onnxruntime as ort
5
  import cv2
 
6
 
7
  # dictionary from https://github.com/Tau-J/rtmlib/blob/4b29101d54b611048ef165277cebfffff3030074/rtmlib/visualization/skeleton/coco17.py
8
  coco17 = dict(name='coco17',
@@ -486,4 +487,4 @@ class RTMO_GPU_Batch(RTMO_GPU):
486
  batch_img, ratios = self.preprocess_batch(images)
487
  outputs = self.inference(batch_img)
488
  keypoints, scores = self.postprocess_batch(outputs, ratios)
489
- return keypoints, scores
 
3
  from typing import List, Tuple
4
  import onnxruntime as ort
5
  import cv2
6
+ os.environ['ORT_TENSORRT_EXTRA_PLUGIN_LIB_PATHS']='libmmdeploy_tensorrt_ops.so'
7
 
8
  # dictionary from https://github.com/Tau-J/rtmlib/blob/4b29101d54b611048ef165277cebfffff3030074/rtmlib/visualization/skeleton/coco17.py
9
  coco17 = dict(name='coco17',
 
487
  batch_img, ratios = self.preprocess_batch(images)
488
  outputs = self.inference(batch_img)
489
  keypoints, scores = self.postprocess_batch(outputs, ratios)
490
+ return keypoints, scores