aboutsummaryrefslogtreecommitdiff
path: root/file-tagger.py
diff options
context:
space:
mode:
Diffstat (limited to 'file-tagger.py')
-rw-r--r--file-tagger.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/file-tagger.py b/file-tagger.py
index 92eb023..0cf1f76 100644
--- a/file-tagger.py
+++ b/file-tagger.py
@@ -77,7 +77,7 @@ def walk(args):
tags_predict.update(predict_image(model, raw, args["predict_images_top"]))
img = cv2.rotate(img, cv2.ROTATE_90_CLOCKWISE)
if not args["predict_images_skip_detail"]:
- pool = ThreadPool(max(1, os.cpu_count() - 2), 1000)
+ pool = ThreadPool(max(1, os.cpu_count() - 2), 10000)
for _ in range(4):
if img.shape[0] > img.shape[1]:
detail = image_resize(img.copy(), height=(args["predict_images_detail_factor"] * MODEL_DIMENSIONS))
@@ -85,7 +85,7 @@ def walk(args):
detail = image_resize(img.copy(), width=(args["predict_images_detail_factor"] * MODEL_DIMENSIONS))
for x in range(0, detail.shape[0], int(MODEL_DIMENSIONS/2)):
for y in range(0, detail.shape[1], int(MODEL_DIMENSIONS/2)):
- pool.add_task(predict_partial, tags_predict, model, detail.copy(), x, y, args["predict_images_top"])
+ pool.add_task(predict_partial, tags_predict, model, detail, x, y, args["predict_images_top"])
img = cv2.rotate(img, cv2.ROTATE_90_CLOCKWISE)
pool.wait_completion()
tags_sorted = [tag[0] for tag in sorted(tags_predict, key=lambda tag: tag[1], reverse=True)]