summaryrefslogtreecommitdiff
path: root/megapixels/commands/datasets/lookup.py
diff options
context:
space:
mode:
authoradamhrv <adam@ahprojects.com>2018-12-14 17:22:57 +0100
committeradamhrv <adam@ahprojects.com>2018-12-14 17:22:57 +0100
commit1690cfb4cc7b7277afca4016c295927cc4f7fafb (patch)
treefa9130c2eb0f24f71cf3cede2477bf565d27433c /megapixels/commands/datasets/lookup.py
parent5891e2f13ae9dfead0e1794c399e5ff813e694d3 (diff)
add pose filter
Diffstat (limited to 'megapixels/commands/datasets/lookup.py')
-rw-r--r--megapixels/commands/datasets/lookup.py44
1 files changed, 44 insertions, 0 deletions
diff --git a/megapixels/commands/datasets/lookup.py b/megapixels/commands/datasets/lookup.py
new file mode 100644
index 00000000..11f54957
--- /dev/null
+++ b/megapixels/commands/datasets/lookup.py
@@ -0,0 +1,44 @@
+import click
+
+from app.settings import types
+from app.utils import click_utils
+from app.settings import app_cfg as cfg
+from app.utils.logger_utils import Logger
+
+log = Logger.getLogger()
+
+lookup_types = ['image', 'identity']
+
+@click.command()
+@click.option('-i', '--input', 'opt_fp_in', required=True,
+ help='Input CSV file')
+@click.option('-t', '--type', 'opt_type', default='image',
+ type=click.Choice(lookup_types),
+ help='Type of lookup')
+@click.option('-d', '--dataset', 'opt_dataset', required=True,
+ type=cfg.DatasetVar,
+ default=click_utils.get_default(types.Dataset.LFW),
+ show_default=True,
+ help=click_utils.show_help(types.Dataset))
+@click.option('--index', 'opt_index', required=True,
+ help='Index to lookup')
+@click.pass_context
+def cli(ctx, opt_fp_in, opt_fp_out, opt_index):
+ """Display image info"""
+
+ from glob import glob
+ from os.path import join
+ from pathlib import Path
+ import time
+
+ import pandas as pd
+ from tqdm import tqdm
+
+ from app.utils import file_utils, im_utils
+
+ # lookup and index and display all information
+ df = pd.read_csv(opt_fp_in).set_index('index')
+
+
+
+ \ No newline at end of file