ONNX and TensorRT inference demo for CGI-Stereo.
- OpenCV
- numpy
- ONNXRuntime
- OpenCV
- numpy
- TensorRT
- pycuda
from PINTO_model_zoo
usage: demo_onnx.py [-h] [-m MODEL_PATH] [-l LEFT_IMAGE] [-r RIGHT_IMAGE] [-o OUTPUT_PATH]
optional arguments:
-h, --help show this help message and exit
-m MODEL_PATH, --model_path MODEL_PATH
ONNX model file path. (default: cgi_stereo_sceneflow_480x640/cgi_stereo_sceneflow_480x640.onnx)
-l LEFT_IMAGE, --left_image LEFT_IMAGE
input left image. (default: data/left.png)
-r RIGHT_IMAGE, --right_image RIGHT_IMAGE
input right image. (default: data/right.png)
-o OUTPUT_PATH, --output_path OUTPUT_PATH
output colored disparity image paht. (default: output.png)
bash convert_onnx2trt.bash <onnx-model-path> <output-engine-path>
usage: demo_trt.py [-h] [-e ENGINE_PATH] [-ih INPUT_HEIGHT] [-iw INPUT_WIDTH] [-l LEFT_IMAGE] [-r RIGHT_IMAGE] [-o OUTPUT_PATH]
optional arguments:
-h, --help show this help message and exit
-e ENGINE_PATH, --engine_path ENGINE_PATH
TensorRT engine file path. (default: cgi_stereo_sceneflow_480x640.engine)
-ih INPUT_HEIGHT, --input_height INPUT_HEIGHT
Model input height. (default: 480)
-iw INPUT_WIDTH, --input_width INPUT_WIDTH
Model input width. (default: 640)
-l LEFT_IMAGE, --left_image LEFT_IMAGE
input left image. (default: data/left.png)
-r RIGHT_IMAGE, --right_image RIGHT_IMAGE
input right image. (default: data/right.png)
-o OUTPUT_PATH, --output_path OUTPUT_PATH
output colored disparity image paht. (default: output.png)