[Other] Add onnx_ort_runtime cpp/python demos (#565)

* add onnx_ort_runtime demo

* rm in requirements
This commit is contained in:
WJJ1995
2022-11-11 12:47:06 +08:00
committed by GitHub
parent 224c2cf1e8
commit 4bbfd977c7
9 changed files with 131 additions and 20 deletions

View File

@@ -16,9 +16,6 @@ import fastdeploy as fd
import cv2
import os
import numpy as np
import pynvml
import psutil
import GPUtil
import time
@@ -112,6 +109,8 @@ def build_option(args):
def get_current_memory_mb(gpu_id=None):
import pynvml
import psutil
pid = os.getpid()
p = psutil.Process(pid)
info = p.memory_full_info()
@@ -126,6 +125,7 @@ def get_current_memory_mb(gpu_id=None):
def get_current_gputil(gpu_id):
import GPUtil
GPUs = GPUtil.getGPUs()
gpu_load = GPUs[gpu_id].load
return gpu_load