Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNN conversion failing backend test for RT DETR model #3085

Open
jasseeeem opened this issue Nov 15, 2024 · 4 comments
Open

MNN conversion failing backend test for RT DETR model #3085

jasseeeem opened this issue Nov 15, 2024 · 4 comments
Labels
bug Something isn't working CUDA question Further information is requested

Comments

@jasseeeem
Copy link

平台(如果交叉编译请再附上交叉编译目标平台):

Platform(Include target platform as well if cross-compiling):

Tried converting in:

  • x84_64 ubuntu20.04
  • Apple M1 Pro macOS 14.7.1

MNN and converter was built following the documentation without any additional flags.

Model files:

The above RT DETR model for object detection gives the correct output for bounding boxes, scores and labels when run on CPU, but the bounding boxes are wrong when run on CUDA GPU (scores and labels are correct). The model also fails backendTest.out with the following logs:

Test forward type: 0
Tolerance Rate: 0.050000
Open Model /Users/jaseem/Downloads/rtdetr_r50vd.mnn
hw.cpufamily: 458787763 , size = 4
The device support i8sdot:1, support fp16:1, support i8mm: 0
Input: 640,640,3,1
precision=0 in main, 280
modeNum=1 in main, 285
stopOp.c_str()=s  in main, 290
165: 4079.000000 != 1200.000000
/model/decoder/TopK_output_0 - 1 is error

Are RT DETR models unsupported in MNN?

@jxt1234 jxt1234 added the question Further information is requested label Nov 18, 2024
@jxt1234
Copy link
Collaborator

jxt1234 commented Nov 18, 2024

  1. what's the version of MNN ?
  2. It seems that MNN's CPU is right but CUDA is wrong?
  3. For TopK, if input's value is very closely. Inference engine may output different index. It's better to construct real data.

@jxt1234 jxt1234 added the CUDA label Nov 18, 2024
@jasseeeem
Copy link
Author

  1. 2.9.0, tried with the latest version too
  2. Yes, the bounding box output is correct on CPU, but wrong on GPU
  3. I tried with real images as well and saw the same issue

@jxt1234 jxt1234 added the bug Something isn't working label Nov 20, 2024
@jxt1234
Copy link
Collaborator

jxt1234 commented Nov 20, 2024

ok. We will check it.

@jasseeeem
Copy link
Author

Thanks @jxt1234!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CUDA question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants