From 706581b17106f6312e061f7e7df59c2d3fb3a088 Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 14 Jun 2023 20:59:11 +0300 Subject: [PATCH] Fix TRT8 export for end2end.py box_coding should be 0 to correspond with network output [x1, y1, x2, y2]. Same box coding using for TRT7. After this fix, TRT8 export successfully work. Same problem is probably here - https://github.com/tinyvision/DAMO-YOLO/issues/102 --- damo/base_models/core/end2end.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/damo/base_models/core/end2end.py b/damo/base_models/core/end2end.py index 48a70a6..a5366c9 100644 --- a/damo/base_models/core/end2end.py +++ b/damo/base_models/core/end2end.py @@ -39,7 +39,7 @@ def forward( boxes, scores, background_class=-1, - box_coding=1, + box_coding=0, iou_threshold=0.45, max_output_boxes=100, plugin_version='1', @@ -63,7 +63,7 @@ def symbolic(g, boxes, scores, background_class=-1, - box_coding=1, + box_coding=0, iou_threshold=0.45, max_output_boxes=100, plugin_version='1', @@ -277,7 +277,7 @@ def __init__(self, super().__init__() self.device = device if device else torch.device('cpu') self.background_class = -1, - self.box_coding = 1, + self.box_coding = 0, self.iou_threshold = iou_thres self.max_obj = max_obj self.plugin_version = '1'