Commit e3f8be00 authored by oscar's avatar oscar

加入计算iou时是否用type类型参与计算,使用宏来控制。

parent b6ee7af0
......@@ -207,10 +207,13 @@ double Track3D::CalculateIou(const std::vector<float>& data)
}
if (m_obj == nullptr)
return 0.0f;
#ifdef _CALC_IOU_NO_TYPE_
#else
int input_type = data[0];
int obj_type = m_obj->type;
if (input_type != obj_type)
return 0.0f;
#endif
std::vector<float> states;
GetStateData(states);
......@@ -445,8 +448,11 @@ int Track3D::GetIouData(std::vector<float>& data, int& obj_type)
data.push_back(kf_->x_[5]);
data.push_back(kf_->x_[6]);
data.push_back(kf_->x_[3]);
#ifdef _CALC_IOU_NO_TYPE_
obj_type = 0;
#else
obj_type = m_obj->type;
#endif
return 0;
}
......@@ -457,7 +463,11 @@ void Track3D::MeasureIouData(const std::vector<float>& input, std::vector<float>
SDK_LOG(SDK_INFO, "input is not 9");
return;
}
#ifdef _CALC_IOU_NO_TYPE_
obj_type = 0;
#else
obj_type = input[0];
#endif
out.push_back(input[1]);
out.push_back(input[2]);
out.push_back(input[3]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment