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

Fixed bug #5637 #5640

Merged
merged 3 commits into from
Aug 20, 2024
Merged

Fixed bug #5637 #5640

merged 3 commits into from
Aug 20, 2024

Conversation

whyb
Copy link
Contributor

@whyb whyb commented Aug 19, 2024

Fixed bug #5637

#5637

@tencent-adm
Copy link
Member

tencent-adm commented Aug 19, 2024

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ nihui
❌ whyb
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment on lines 178 to 181
float* row_ptr = output.row(i).ptr<float>();
float* bboxes_ptr = row_ptr;
float* scores_ptr = row_ptr + 4;
float* max_s_ptr = std::max_element(scores_ptr, scores_ptr + num_labels);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
float* row_ptr = output.row(i).ptr<float>();
float* bboxes_ptr = row_ptr;
float* scores_ptr = row_ptr + 4;
float* max_s_ptr = std::max_element(scores_ptr, scores_ptr + num_labels);
const float* row_ptr = output.row(i);
const float* bboxes_ptr = row_ptr;
const float* scores_ptr = row_ptr + 4;
const float* max_s_ptr = std::max_element(scores_ptr, scores_ptr + num_labels);

Co-authored-by: nihui <shuizhuyuanluo@126.com>
examples/yolov8.cpp Outdated Show resolved Hide resolved
@nihui nihui merged commit a6d3ef5 into Tencent:master Aug 20, 2024
21 of 22 checks passed
@nihui
Copy link
Member

nihui commented Aug 20, 2024

Thanks for your contribution !

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

Successfully merging this pull request may close these issues.

3 participants