Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 1.33 KB

File metadata and controls

26 lines (21 loc) · 1.33 KB

DIS-onnxruntime-and-tensorrt-demo

This is the onnxruntime and tensorrt inference code for Highly Accurate Dichotomous Image Segmentation (ECCV 2022). Official code: https://github.com/xuebinqin/DIS

test onnx

1、cp pre-train model isnet.pth to here.
2、run python torch2onnx.py, get model isnet.onnx
3、run python demo_onnx.py, get image output.

test tensorrt

1、Use trtexec tool convert onnx model to trt model. You can also try something else, please make sure to get the correct trt model. Name it isnet.engine.
2、run python demo_trt.py, get image output.

test cpp tensorrt

1、cd cpp & mkdir build & cd build
2、modify CMakeLists.txt to your environment
3、cmake .. & make
4、./dis

output compare

input pytorch onnx tensorrt cpp_trt