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

Fix scoping of assoc_func in OCSort.cpp and use assoc_func in update code #135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions deploy/OCSort/cpp/src/OCSort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace ocsort {
{"iou", iou_batch},
{ "giou", giou_batch }};
;
std::function<Eigen::MatrixXf(const Eigen::MatrixXf&, const Eigen::MatrixXf&)> asso_func = ASSO_FUNCS[asso_func_];
asso_func = ASSO_FUNCS[asso_func_];
inertia = inertia_;
use_byte = use_byte_;
KalmanBoxTracker::count = 0;
Expand Down Expand Up @@ -92,7 +92,7 @@ namespace ocsort {
for (auto i : unmatched_trks) {
u_trks.row(index_for_u_trks++) = trks.row(i);
}
Eigen::MatrixXf iou_left = giou_batch(dets_second, u_trks);
Eigen::MatrixXf iou_left = asso_func(dets_second, u_trks);
if (iou_left.maxCoeff() > iou_threshold) {
std::vector<std::vector<float>> iou_matrix(iou_left.rows(), std::vector<float>(iou_left.cols()));
for (int i = 0; i < iou_left.rows(); i++) {
Expand Down Expand Up @@ -143,7 +143,7 @@ namespace ocsort {
for (auto i : unmatched_trks) {
left_trks.row(indx_for_trk++) = last_boxes.row(i);
}
Eigen::MatrixXf iou_left = giou_batch(left_dets, left_trks);
Eigen::MatrixXf iou_left = asso_func(left_dets, left_trks);
if (iou_left.maxCoeff() > iou_threshold) {
std::vector<std::vector<float>> iou_matrix(iou_left.rows(), std::vector<float>(iou_left.cols()));
for (int i = 0; i < iou_left.rows(); i++) {
Expand Down Expand Up @@ -222,4 +222,4 @@ namespace ocsort {
}
return ret;
}
}// namespace ocsort
}// namespace ocsort