Repository files navigation
去掉自定义算子,新增 ONNX 模型导出
python run.py --backend=<trt104/trt85/trt84/cann>
查看光流结果: python view_flo.py
backend=trt84的时候需要执行python fix_trt84_onnx.py修改onnx,TensorRT使用修复后的onnx
onnx推理
tensorrt推理
/data/sunkx/TensorRT-10.4.0.26/bin/trtexec --onnx=./pwcnet_trt104.onnx --minShapes=input1:1x3x384x768,input2:1x3x384x768 --optShapes=input1:4x3x384x768,input2:4x3x384x768 --maxShapes=input1:4x3x384x768,input2:4x3x384x768 --saveEngine=pwcnet_trt104.engine --fp16
make -f Makefile_trt <TRT_VERSION=TRT_10/TRT_VERSION=TRT_84_85>
./infer_trt pwcnet.engine video/test.mp4 video && ./infer_trt pwcnet_trt104.engine images picture
晟腾CANN推理
测试版本:8.2.RC1 8.5.0
atc --model=./pwcnet_cann.onnx --framework=5 --input_shape="input1:-1,3,384,768;input2:-1,3,384,768" --dynamic_batch_size="1,2,3,4" --insert_op_conf=./insert_op.cfg --output=pwcnet --soc_version=Ascend310P3 --precision_mode_v2=mixed_float16
make -f Makefile_cann
./infer_cann pwcnet.om video/test.mp4 video && ./infer_cann pwcnet.om images picture
You can’t perform that action at this time.