Skip to content

Commit

Permalink
Update detect.py
Browse files Browse the repository at this point in the history
This generator causes an error in detect_windows because it is run twice there.
Better store it as a data structure instead.
  • Loading branch information
dbbert authored and longjon committed Oct 2, 2014
1 parent 2fa2852 commit 4e0868d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4e0868d

Please sign in to comment.