grimoire/mmdetection-to-tensorrt

FCOS head Bug:x1 y1 will be overstep the boundary and are set to 0。

Xingxu1996 opened this issue · 1 comments

Describe the bug
Before batched_distance2bbox function, all the inputs value are same between original model and trt model. But the outputs of the function are different, there are lots of x1, y1 are set to 0 in trt model, while the values of x1, y1 in original model are correct.

After I change batched_distance2bbox(points, bbox_pred, x.shape[2:]) to batched_distance2bbox(points, bbox_pred,(800, 1333)), the results turn to right, and the results is same to the original model。 But I don‘t know why?

In batched_distance2bbox(points, bbox_pred, x.shape[2:]) function, I print(max_shape), and it's actually toch.Size([800, 1333])。Why x1, y1 are set to 0 ?

Hi
Are you using the latest code? Please update amirstan_plugin, torch2trt_dynamic and mmdetection-to-tensorrt and try again.
Also, note that the current master requires mmdet>=2.18 which is slightly different from the previous version.
If you still have the same problem, please provide your environment and script to reproduce the error.