fix coords convert

This commit is contained in:
Francesco Gatti
2020-07-27 13:52:39 +02:00
parent 3a0802d70c
commit a5d2d4792a
+6 -6
View File
@@ -114,17 +114,17 @@ void Yolo3Detection::postprocess(const int bi, const bool mAP){
int y0 = (b.y-b.h/2.);
int y1 = (b.y+b.h/2.);
// convert to image coords
x0 = x_ratio*x0;
x1 = x_ratio*x1;
y0 = y_ratio*y0;
y1 = y_ratio*y1;
for(int c=0; c<classes; c++) {
if(dets[j].prob[c] >= confThreshold) {
int obj_class = c;
float prob = dets[j].prob[c];
// convert to image coords
x0 = x_ratio*x0;
x1 = x_ratio*x1;
y0 = y_ratio*y0;
y1 = y_ratio*y1;
tk::dnn::box res;
res.cl = obj_class;
res.prob = prob;