summaryrefslogtreecommitdiff
path: root/megapixels/commands/demo
diff options
context:
space:
mode:
Diffstat (limited to 'megapixels/commands/demo')
-rw-r--r--megapixels/commands/demo/face_search.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/megapixels/commands/demo/face_search.py b/megapixels/commands/demo/face_search.py
index 34a25762..6e4bcdad 100644
--- a/megapixels/commands/demo/face_search.py
+++ b/megapixels/commands/demo/face_search.py
@@ -21,6 +21,8 @@ log = Logger.getLogger()
required=True,
show_default=True,
help=click_utils.show_help(types.Dataset))
+@click.option('--results', 'opt_results', default=5,
+ help='Number of match results to display')
@click.option('--gpu', 'opt_gpu', default=0,
help='GPU index (use -1 for CPU')
@click.pass_context
@@ -73,7 +75,7 @@ def cli(ctx, opt_fp_in, opt_data_store, opt_dataset, opt_gpu):
vec_query = recognition.vec(im_query, bbox)
# find matches
- image_records = dataset.find_matches(vec_query, n_results=5)
+ image_records = dataset.find_matches(vec_query, n_results=opt_results)
# summary
ims_match = [im_query]