From 9c0f4477abe85eea1441cae19c170f03cd0054c9 Mon Sep 17 00:00:00 2001 From: Paul-Edouard Sarlin Date: Mon, 19 Sep 2022 16:20:20 +0200 Subject: [PATCH] Fix crash when the input image is small --- extract.py | 1 + 1 file changed, 1 insertion(+) diff --git a/extract.py b/extract.py index c3fea02..9339bc5 100644 --- a/extract.py +++ b/extract.py @@ -60,6 +60,7 @@ def extract_multiscale( net, img, detector, scale_f=2**0.25, assert max_scale <= 1 s = 1.0 # current scale factor + min_size = min(min_size, max(H, W)) X,Y,S,C,Q,D = [],[],[],[],[],[] while s+0.001 >= max(min_scale, min_size / max(H,W)):