fix issue log print wrong origin image shape (#581)
authorJunX <junchen0102@gmail.com>
Tue, 26 May 2020 11:27:14 +0000 (19:27 +0800)
committerGitHub <noreply@github.com>
Tue, 26 May 2020 11:27:14 +0000 (14:27 +0300)
inference-engine/ie_bridges/python/sample/object_detection_sample_ssd/object_detection_sample_ssd.py

index 96af9de..ed3e946 100644 (file)
@@ -101,8 +101,8 @@ def main():
         log.info("File was added: ")
         log.info("        {}".format(args.input[i]))
         if (ih, iw) != (h, w):
-            image = cv2.resize(image, (w, h))
             log.warning("Image {} is resized from {} to {}".format(args.input[i], image.shape[:-1], (h, w)))
+            image = cv2.resize(image, (w, h))
         image = image.transpose((2, 0, 1))  # Change data layout from HWC to CHW
         images[i] = image