Skip to content

Latest commit

 

History

History
113 lines (75 loc) · 4.1 KB

README.md

File metadata and controls

113 lines (75 loc) · 4.1 KB

库和模型

日志

=======================================================================

=======================================================================

=======================================================================

TensorRT-Integrate

  1. Support pytorch onnx plugin(DCN、HSwish ... etc.)
  2. Simpler inference and plugin APIs

Re-implement

image1


coco.tracking.jpg


selfie.draw.jpg

Use TensorRT-Integrate

install protobuf == 3.11.4 (or >= 3.8.x, But it's more troublesome)

bash scripts/getALL.sh
make run -j32

Inference Code

auto engine = TRTInfer::loadEngine("models/efficientnet-b0.fp32.trtmodel");
float mean[3] = {0.485, 0.456, 0.406};
float std[3] = {0.229, 0.224, 0.225};
Mat image = imread("img.jpg");
auto input = engine->input();

// multi batch sample
input->resize(2);
input->setNormMatGPU(0, image, mean, std);
input->setNormMatGPU(1, image, mean, std);

engine->forward();

// get result and copy to cpu
engine->output(0)->cpu<float>();
engine->tensor("hm")->cpu<float>();

Environment


Plugin

  1. Pytorch export ONNX: plugin_onnx_export.py
  2. MReLU.cuHSwish.cuDCNv2.cu