1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge pull request #25264 from lpylpy0514:4.x

fix a bug about vittrack post-process
This commit is contained in:
Alexander Smorkalov
2024-03-28 09:53:29 +03:00
committed by GitHub
+2 -2
View File
@@ -163,7 +163,7 @@ void TrackerVitImpl::init(InputArray image_, const Rect &boundingBox_)
preprocess(crop, blob, templateSize);
net.setInput(blob, "template");
Size size(16, 16);
hanningWindow = hann2d(size, false);
hanningWindow = hann2d(size, true);
rect_last = boundingBox_;
}
@@ -184,7 +184,7 @@ bool TrackerVitImpl::update(InputArray image_, Rect &boundingBoxRes)
Mat size_map = outs[1].reshape(0, {2, 16, 16});
Mat offset_map = outs[2].reshape(0, {2, 16, 16});
multiply(conf_map, (1.0 - hanningWindow), conf_map);
multiply(conf_map, hanningWindow, conf_map);
double maxVal;
Point maxLoc;