This is the onnxruntime and tensorrt inference code for Highly Accurate Dichotomous Image Segmentation (ECCV 2022). Official code: https://github.com/xuebinqin/DIS
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.
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.
1、cd cpp & mkdir build & cd build
2、modify CMakeLists.txt to your environment
3、cmake .. & make
4、./dis
input | pytorch | onnx | tensorrt | cpp_trt |
---|---|---|---|---|