From 2c29218e4ee70afa28076709791ed14021575511 Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Tue, 13 Feb 2018 21:25:11 +0000
Subject: [PATCH] Added compute_mAP.cmd for calculation mAP for Pascal VOC 2007 dataset. Added reval_voc_py3.py and voc_eval_py3.py for Python3.
---
src/yolo_v2_class.hpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/yolo_v2_class.hpp b/src/yolo_v2_class.hpp
index 7d0516e..8abb9e2 100644
--- a/src/yolo_v2_class.hpp
+++ b/src/yolo_v2_class.hpp
@@ -193,8 +193,7 @@
void update_cur_bbox_vec(std::vector<bbox_t> _cur_bbox_vec)
{
cur_bbox_vec = _cur_bbox_vec;
- good_bbox_vec_flags.resize(cur_bbox_vec.size());
- for (auto &i : good_bbox_vec_flags) i = true;
+ good_bbox_vec_flags = std::vector<bool>(cur_bbox_vec.size(), true);
cv::Mat prev_pts, cur_pts_flow_cpu;
for (auto &i : cur_bbox_vec) {
@@ -297,7 +296,8 @@
float moved_y = cur_key_pt.y - prev_key_pt.y;
if (abs(moved_x) < 100 && abs(moved_y) < 100 && good_bbox_vec_flags[i])
- if (err_cpu.at<float>(0, i) < flow_error && status_cpu.at<unsigned char>(0, i) != 0)
+ if (err_cpu.at<float>(0, i) < flow_error && status_cpu.at<unsigned char>(0, i) != 0 &&
+ ((float)cur_bbox_vec[i].x + moved_x) > 0 && ((float)cur_bbox_vec[i].y + moved_y) > 0)
{
cur_bbox_vec[i].x += moved_x + 0.5;
cur_bbox_vec[i].y += moved_y + 0.5;
--
Gitblit v1.10.0