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

Auto 3007 Pass image dimensions to detector #3

Closed
wants to merge 8 commits into from

Conversation

MRo47
Copy link

@MRo47 MRo47 commented Sep 27, 2024

Currently the NN detection output is not to scale with the input image: bug report

It is difficult to pass the input image size to the ImgDetectionConverter as imageManip doesn't have this info seen on this line.

int width;
int height;
if(ph->getParam<bool>("i_disable_resize")) {
    width = ph->getOtherNodeParam<int>(socketName, "i_preview_width");
    height = ph->getOtherNodeParam<int>(socketName, "i_preview_height");
} else {
    width = imageManip->initialConfig.getResizeConfig().width;
    height = imageManip->initialConfig.getResizeConfig().height;
}

detConverter = std::make_unique<dai::ros::ImgDetectionConverter>(tfPrefix, width, height, false, ph->getParam<bool>("i_get_base_device_timestamp"));

This is an ugly fix to set input dimensions values inside the NN.

Maybe a better way could be to set parameters but the API is very limiting on how these can be done?

@MRo47 MRo47 self-assigned this Sep 27, 2024
@MRo47 MRo47 added the bug Something isn't working label Sep 27, 2024
@MRo47 MRo47 closed this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant