38 lines
737 B
Python
38 lines
737 B
Python
import os
|
|
|
|
# Variables populated by release build. Do not edit.
|
|
_MODEL_NAME = "gen5-balanced"
|
|
_MODEL_VERSION = "v1.1.2"
|
|
_MODEL_ENGINE = "openvino-2021.4"
|
|
|
|
|
|
def name():
|
|
return _MODEL_NAME
|
|
|
|
|
|
def version():
|
|
return _MODEL_VERSION
|
|
|
|
|
|
def engine():
|
|
return _MODEL_ENGINE
|
|
|
|
|
|
def location():
|
|
return os.path.join(os.path.dirname(os.path.realpath(__file__)), "models")
|
|
|
|
|
|
if engine() == "tensorrt":
|
|
import glob
|
|
|
|
TRT_ENGINE_PATH = location()
|
|
|
|
def clear_cached_trt_engine():
|
|
engine_files = glob.glob("{}/**/*.engine".format(TRT_ENGINE_PATH))
|
|
|
|
for f in engine_files:
|
|
try:
|
|
os.remove(f)
|
|
except Exception:
|
|
raise Exception("Error deleting engine file: ", f)
|