fix bugs for SLANet infer (#13861)

pull/13895/head
Liu Jiaxuan 2024-09-13 12:53:09 +08:00 committed by GitHub
parent 284a20bf10
commit ac5313d0b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -129,8 +129,11 @@ class TableLabelDecode(AttnLabelDecode):
def _bbox_decode(self, bbox, shape):
h, w, ratio_h, ratio_w, pad_h, pad_w = shape
h, w = pad_h, pad_w
bbox[0::2] *= w
bbox[1::2] *= h
bbox[0::2] /= ratio_w
bbox[1::2] /= ratio_h
return bbox