From 4e0868d091718e99f2f3696a61f88240f33503b2 Mon Sep 17 00:00:00 2001 From: Bert Date: Wed, 1 Oct 2014 15:29:24 +0200 Subject: [PATCH] Update detect.py This generator causes an error in detect_windows because it is run twice there. Better store it as a data structure instead. --- python/detect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/detect.py b/python/detect.py index bc8c0703646..b67b500aafd 100755 --- a/python/detect.py +++ b/python/detect.py @@ -130,10 +130,10 @@ def main(argv): # Detect. if args.crop_mode == 'list': # Unpack sequence of (image filename, windows). - images_windows = ( + images_windows = [ (ix, inputs.iloc[np.where(inputs.index == ix)][COORD_COLS].values) for ix in inputs.index.unique() - ) + ] detections = detector.detect_windows(images_windows) else: detections = detector.detect_selective_search(inputs)