Fix rtmdet decoder in easydeploy (#519)

pull/520/head
tripleMu 2023-02-07 14:45:27 +08:00 committed by GitHub
parent e90c369f9d
commit 4a7228a5cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,8 @@ def yolov5_bbox_decoder(priors: Tensor, bbox_preds: Tensor,
def rtmdet_bbox_decoder(priors: Tensor, bbox_preds: Tensor,
stride: Optional[Tensor]) -> Tensor:
stride = stride[None, :, None]
bbox_preds *= stride
tl_x = (priors[..., 0] - bbox_preds[..., 0])
tl_y = (priors[..., 1] - bbox_preds[..., 1])
br_x = (priors[..., 0] + bbox_preds[..., 2])