keras-yolo3-ocr-tensorrt icon indicating copy to clipboard operation
keras-yolo3-ocr-tensorrt copied to clipboard

onnx dynamic

Open gentlebreeze1 opened this issue 3 years ago • 1 comments

onnx dynamic model 转trt model 推理结果不正确,请问是可能由于什么原因呢

gentlebreeze1 avatar Mar 31 '21 05:03 gentlebreeze1

onnx dynamic model 转trt model 推理结果不正确,请问是可能由于什么原因呢

我当时遇到的主要问题是数据没有对齐: trt_outputs = common.do_inference_v3(self.context, bindings=self.bindings, inputs=self.inputs, outputs=self.outputs, stream=self.stream, h=h_, w_=w_ ) scale_w=w_/608 scale_h=h_/608 output_shapes = [(1, int(h_/32), int(w_/32), 21), (1, int(h_/16), int(w_/16), 21), (1, int(h_/8), int(w_/8), 21)] trt_outputs = [output[:shape[1]*shape[2]*shape[3]].reshape(shape) for output, shape in zip(trt_outputs, output_shapes)]_ 例如这里的3个输出的特征金字塔顺序是否正确?

zhaogangthu avatar Apr 01 '21 01:04 zhaogangthu