jkjung-avt / tensorrt_demos

TensorRT MODNet, YOLOv4, YOLOv3, SSD, MTCNN, and GoogLeNet
https://jkjung-avt.github.io/
MIT License
1.74k stars 545 forks source link

About an inference problem #519

Closed chakloong883 closed 2 years ago

chakloong883 commented 2 years ago

I read the code, and I pay attention to YOLO inference process. I want to find out how anchor settings would affect the inference of final bounding boxes. But I don't see this process in the code, could you please tell me where it is.

jkjung-avt commented 2 years ago

"onnx_to_tensorrt.py" would read anchor values from your .cfg file, and save those anchor values in the yolo_layer plugins. You could refer to the relevant source code below.

https://github.com/jkjung-avt/tensorrt_demos/blob/2e31c5deb42cf510030e8f6571b5a49671d70996/yolo/plugins.py#L24-L25

https://github.com/jkjung-avt/tensorrt_demos/blob/2e31c5deb42cf510030e8f6571b5a49671d70996/yolo/plugins.py#L135-L136

chakloong883 commented 2 years ago

"onnx_to_tensorrt.py" would read anchor values from your .cfg file, and save those anchor values in the yolo_layer plugins. You could refer to the relevant source code below.

https://github.com/jkjung-avt/tensorrt_demos/blob/2e31c5deb42cf510030e8f6571b5a49671d70996/yolo/plugins.py#L24-L25

https://github.com/jkjung-avt/tensorrt_demos/blob/2e31c5deb42cf510030e8f6571b5a49671d70996/yolo/plugins.py#L135-L136 Thank you so much!