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

add yolox implement #418

Merged
merged 6 commits into from
Jul 24, 2024
Merged

add yolox implement #418

merged 6 commits into from
Jul 24, 2024

Conversation

wangzijian1010
Copy link
Collaborator

No description provided.

@DefTruth
Copy link
Owner

LGTM~

if (count > max_nms)
break;
}
#if LITEORT_DEBUG
Copy link
Owner

Choose a reason for hiding this comment

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

应该使用LITETRT_DEBUG宏

normalized(mat_rs,mean_vals,scale_vals);

//1. make the input
auto input = trtcv::utils::transform::create_tensor(mat_rs,input_node_dims,trtcv::utils::transform::CHW);
Copy link
Owner

Choose a reason for hiding this comment

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

input是从函数内部返回的被new的指针,这种处理方式有很大内存泄漏的风险。建议把new float[]类似的操作替换成vector<float, elem_num>,通过使用引用或者vector的指针进行处理,如果需要拷贝数据,使用vector.data()获取数据指针以及vector.size()获取长度信息

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

好的大佬@DefTruth

lite/trt/cv/trt_yolox.cpp Outdated Show resolved Hide resolved
@wangzijian1010
Copy link
Collaborator Author

大佬已经修改完成@DefTruth

@DefTruth DefTruth merged commit 42eea2b into DefTruth:main Jul 24, 2024
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

Successfully merging this pull request may close these issues.

2 participants