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

Weird predictions after conversion to NCNN #555

Open
adithya1-7 opened this issue Feb 16, 2024 · 1 comment
Open

Weird predictions after conversion to NCNN #555

adithya1-7 opened this issue Feb 16, 2024 · 1 comment

Comments

@adithya1-7
Copy link

After training a custom model and converting it to NCNN, I'm getting unexpected weird detections as below. There were no issues with torch or ONNX inference. Anyone able to solve it?
When I convert the given pretrained model to NCNN, it works fine. This is strange behaviour. I suspect it has something to do with code changes that happened after 2021

bad

@fire717
Copy link

fire717 commented Feb 29, 2024

I got a similiar problem. I trained a custom model which class num=1 and export ncnn.
I can use https://github.com/RangiLyu/nanodet/blob/main/demo_ncnn/nanodet.cpp to run predict, and got a right object,but the box is always not right.
It feels like the x and y always be smaller than right label.For example, for a input 320x320 test image, the right box is [21,11,285,314] in [x1,y1,x2,y2] order, but the predict is [56,0,255,275].

I have change the setting in nanodet.h which not help:

    int input_size[2] = {320,320};
    int num_class = 1;
    int reg_max = 7; // `reg_max` set in the training config. Default: 7.
    std::vector<int> strides = { 8, 16, 32};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants