Added tracking: numerating the detected objects on video

This commit is contained in:
AlexeyAB
2017-03-31 21:42:51 +03:00
parent 2662cd51a3
commit 3659d84f24
3 changed files with 92 additions and 12 deletions

View File

@ -154,7 +154,7 @@ YOLODLL_API std::vector<bbox_t> Detector::detect(image_t img, float thresh)
cudaSetDevice(net.gpu_index);
//std::cout << "net.gpu_index = " << net.gpu_index << std::endl;
float nms = .4;
//float nms = .4;
image im;
im.c = img.c;
@ -189,6 +189,7 @@ YOLODLL_API std::vector<bbox_t> Detector::detect(image_t img, float thresh)
bbox.h = b.h*im.h;
bbox.obj_id = obj_id;
bbox.prob = prob;
bbox.track_id = 0;
bbox_vec.push_back(bbox);
}