frigate/detect_objects_gpu.py
Alexander Smirnov 2298ca740c features added:
- GPU via TensorRT
 - CPU: TensorFlow Lite -> Tensorflow
2020-04-08 20:53:58 +01:00

15 lines
527 B
Python

import os
import subprocess
if __name__ == '__main__':
if not os.path.isfile('/gpu_model.buf'):
engine = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'engine.py')
subprocess.run(['python3', '-u', engine,
'-i', '/gpu_model.uff',
'-o', '/gpu_model.buf',
'-p', os.getenv('TRT_FLOAT_PRECISION', '32')
], check=True)
from detect_objects import main as detect_objects_main
detect_objects_main()