From 456af21d8bbe29341141b149360593811f608a59 Mon Sep 17 00:00:00 2001 From: Zhiyuan Chen Date: Sun, 18 Oct 2020 22:33:45 +0800 Subject: [PATCH] fixes #18613 --- samples/dnn/siamrpnpp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/dnn/siamrpnpp.py b/samples/dnn/siamrpnpp.py index bb126b71e5..c7c49b1b85 100644 --- a/samples/dnn/siamrpnpp.py +++ b/samples/dnn/siamrpnpp.py @@ -234,10 +234,10 @@ class SiamRPNTracker: """ Args: img(np.ndarray): bgr based input image frame - bbox: (x,y,w,h): bounding box + bbox: (x, y, w, h): bounding box """ - x,y,h,w = bbox - self.center_pos = np.array([x + (h - 1) / 2, y + (w - 1) / 2]) + x, y, w, h = bbox + self.center_pos = np.array([x + (w - 1) / 2, y + (h - 1) / 2]) self.h = h self.w = w w_z = self.w + self.track_context_amount * np.add(h, w)