From f347391e8ea3a837860c894d9c21e93550039f32 Mon Sep 17 00:00:00 2001
From: SpeedProg <speedprog@googlemail.com>
Date: Fri, 06 Sep 2019 19:43:49 +0000
Subject: [PATCH] small adjustments

---
 opencv_dnn.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/opencv_dnn.py b/opencv_dnn.py
old mode 100644
new mode 100755
index e1591f5..321bcd3
--- a/opencv_dnn.py
+++ b/opencv_dnn.py
@@ -113,8 +113,8 @@
     elif isinstance(hash_size, int):
         hash_size = [hash_size]
 
-    num_cores = 15
-    num_partitions = round(card_pool.shape[0]/100)
+    num_cores = 16
+    num_partitions = round(card_pool.shape[0]/1000)
     if num_partitions < min(num_cores, card_pool.shape[0]):
         num_partitions = min(num_cores, card_pool.shape[0])
     pool = Pool(num_cores)
@@ -696,6 +696,8 @@
         if test_ext in ['jpg', 'jpeg', 'bmp', 'png', 'tiff']:
             # Test file is an image
             img = cv2.imread(args.in_path)
+            if img is None:
+                print('Could not read', args.in_path)
             detect_frame(img, card_pool, hash_size=args.hash_size, out_path=out_path, display=args.display,
                          debug=args.debug)
         else:

--
Gitblit v1.10.0