未验证 提交 233097cc 编写于 作者: H huzhiqiang 提交者: GitHub

[BUG FIX] fix demo compiling bug(#3270)

上级 5fea8e10
......@@ -241,7 +241,7 @@ void RunModel(std::string det_model_file,
roi_color = cv::Scalar(0, 0, 255);
prob = 1 - prob;
}
std::string prob_str = paddle::lite::to_string(prob * 100);
std::string prob_str = std::to_string(prob * 100);
int point_idx = prob_str.find_last_of(".");
text += prob_str.substr(0, point_idx + 3) + "%";
......
......@@ -32,7 +32,7 @@ int64_t ShapeProduction(const shape_t& shape) {
std::string ShapePrint(const shape_t& shape) {
std::string shape_str{""};
for (auto i : shape) {
shape_str += paddle::lite::to_string(i) + " ";
shape_str += std::to_string(i) + " ";
}
return shape_str;
}
......
......@@ -126,7 +126,7 @@ std::vector<Object> detect_object(const float* data,
if (w > 0 && h > 0 && obj.prob <= 1) {
rect_out.push_back(obj);
cv::rectangle(image, rec_clip, cv::Scalar(0, 0, 255), 2, cv::LINE_AA);
std::string str_prob = paddle::lite::to_string(obj.prob);
std::string str_prob = std::to_string(obj.prob);
std::string text = std::string(class_names[obj.class_id]) + ": " +
str_prob.substr(0, str_prob.find(".") + 4);
int font_face = cv::FONT_HERSHEY_COMPLEX_SMALL;
......
......@@ -146,7 +146,7 @@ std::vector<Object> detect_object(const float* data,
if (w > 0 && h > 0 && obj.prob <= 1) {
rect_out.push_back(obj);
cv::rectangle(image, rec_clip, cv::Scalar(0, 0, 255), 1, cv::LINE_AA);
std::string str_prob = paddle::lite::to_string(obj.prob);
std::string str_prob = std::to_string(obj.prob);
std::string text = std::string(class_names[obj.class_id]) + ": " +
str_prob.substr(0, str_prob.find(".") + 4);
int font_face = cv::FONT_HERSHEY_COMPLEX_SMALL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册