wbia.viz package¶
Subpackages¶
- wbia.viz.interact package
- Submodules
- wbia.viz.interact.interact_annotations2 module
- wbia.viz.interact.interact_chip module
- wbia.viz.interact.interact_image module
- wbia.viz.interact.interact_matches module
- wbia.viz.interact.interact_name module
- wbia.viz.interact.interact_qres module
- wbia.viz.interact.interact_query_decision module
- wbia.viz.interact.interact_sver module
- Module contents
Submodules¶
wbia.viz.viz_chip module¶
-
wbia.viz.viz_chip.
HARDCODE_SHOW_PB_PAIR
()[source]¶ python -m wbia.viz.viz_chip HARDCODE_SHOW_PB_PAIR –show
Example
>>> # SCRIPT >>> from wbia.viz.viz_chip import * # NOQA >>> import wbia.plottool as pt >>> HARDCODE_SHOW_PB_PAIR() >>> pt.show_if_requested()
-
wbia.viz.viz_chip.
show_chip
(ibs, aid, in_image=False, annote=True, title_suffix='', weight_label=None, weights=None, config2_=None, **kwargs)[source]¶ Driver function to show chips
Parameters: - ibs (wbia.IBEISController) –
- aid (int) – annotation rowid
- in_image (bool) – displays annotation with the context of its source image
- annote (bool) – enables overlay annoations
- title_suffix (str) –
- weight_label (None) – (default = None)
- weights (None) – (default = None)
- config2 (dict) – (default = None)
- Kwargs:
- enable_chip_title_prefix, nokpts, kpts_subset, kpts, text_color, notitle, draw_lbls, show_aidstr, show_gname, show_name, show_nid, show_exemplar, show_num_gt, show_quality_text, show_viewcode, fnum, title, figtitle, pnum, interpolation, cmap, heatmap, data_colorbar, darken, update, xlabel, redraw_image, ax, alpha, docla, doclf, projection, pts, ell color (3/4-tuple, ndarray, or str): colors for keypoints
- CommandLine:
python -m wbia.viz.viz_chip show_chip –show –ecc python -c “import utool as ut; ut.print_auto_docstr(‘wbia.viz.viz_chip’, ‘show_chip’)” python -m wbia.viz.viz_chip show_chip –show –db NNP_Master3 –aids 14047 –no-annote python -m wbia.viz.viz_chip show_chip –show –db NNP_Master3 –aids 14047 –no-annote
python -m wbia.viz.viz_chip show_chip –show –db PZ_MTEST –aid 1 –bgmethod=cnn python -m wbia.viz.viz_chip show_chip –show –db PZ_MTEST –aid 1 –bgmethod=cnn –scale_max=30
python -m wbia.viz.viz_chip show_chip –show –db PZ_MTEST –aid 1 –ecc –draw_lbls=False –notitle –save=~/slides/lnbnn_query.jpg –dpi=300
Example
>>> # xdoctest: +REQUIRES(module:wbia_cnn) >>> # VIZ_TEST >>> from wbia.viz.viz_chip import * # NOQA >>> import numpy as np >>> import vtool as vt >>> in_image = False >>> ibs, aid_list, kwargs, config2_ = testdata_showchip() >>> aid = aid_list[0] >>> if True: >>> import matplotlib as mpl >>> from wbia.scripts.thesis import TMP_RC >>> mpl.rcParams.update(TMP_RC) >>> if ut.get_argflag('--ecc'): >>> kpts = ibs.get_annot_kpts(aid, config2_=config2_) >>> weights = ibs.get_annot_fgweights([aid], ensure=True, config2_=config2_)[0] >>> kpts = ut.random_sample(kpts[weights > .9], 200, seed=0) >>> ecc = vt.get_kpts_eccentricity(kpts) >>> scale = 1 / vt.get_scales(kpts) >>> #s = ecc if config2_.affine_invariance else scale >>> s = scale >>> colors = pt.scores_to_color(s, cmap_='jet') >>> kwargs['color'] = colors >>> kwargs['kpts'] = kpts >>> kwargs['ell_linewidth'] = 3 >>> kwargs['ell_alpha'] = .7 >>> show_chip(ibs, aid, in_image=in_image, config2_=config2_, **kwargs) >>> pt.show_if_requested()
-
wbia.viz.viz_chip.
show_many_chips
(ibs, aid_list, config2_=None, fnum=None, pnum=None, vert=True)[source]¶ - CommandLine:
- python -m wbia.viz.viz_chip –test-show_many_chips python -m wbia.viz.viz_chip –test-show_many_chips –show python -m wbia.viz.viz_chip –test-show_many_chips –show –db NNP_Master3 –aids=13276,14047,14489,14906,10194,10201,12656,10150,11002,15315,7191,13127,15591,12838,13970,14123,14167 –no-annote –dpath figures –save ~/latex/crall-candidacy-2015/figures/challengechips.jpg ‘–caption=challenging images’
Example
>>> # ENABLE_DOCTEST >>> from wbia.viz.viz_chip import * # NOQA >>> import numpy as np >>> in_image = False >>> ibs, aid_list, kwargs, config2_ = testdata_showchip() >>> # execute function >>> show_many_chips(ibs, aid_list, config2_) >>> ut.show_if_requested()
wbia.viz.viz_graph module¶
wbia.viz.viz_graph2 module¶
wbia.viz.viz_helpers module¶
-
wbia.viz.viz_helpers.
get_annot_kpts_in_imgspace
(ibs, aid_list, config2_=None, ensure=True)[source]¶ Transforms keypoints so they are plotable in imagespace
-
wbia.viz.viz_helpers.
get_annot_texts
(ibs, aid_list, **kwargs)[source]¶ Add each type of text_list to the strings list
Parameters: - ibs (IBEISController) – wbia controller object
- aid_list (int) – list of annotation ids
Returns: annotation_text_list
Return type: - CommandLine:
- python -m wbia.viz.viz_helpers –test-get_annot_texts
Example
>>> # ENABLE_DOCTEST >>> from wbia.viz.viz_helpers import * # NOQA >>> import wbia >>> import collections >>> ibs = wbia.opendb('testdb1') >>> # Default all kwargs to true >>> class KwargsProxy(object): ... def get(self, a, b): ... return True >>> kwargs_proxy = KwargsProxy() >>> aid_list = ibs.get_valid_aids()[::3] >>> # execute function >>> annotation_text_list = get_annot_texts(ibs, aid_list, kwargs_proxy=kwargs_proxy) >>> # verify results >>> result = ut.repr2(annotation_text_list, nl=1) >>> print(result) [ 'aid1, gname=easy1.JPG, name=____, nid=-1, , nGt=0, quality=UNKNOWN, view=left', 'aid4, gname=hard1.JPG, name=____, nid=-4, , nGt=0, quality=UNKNOWN, view=left', 'aid7, gname=jeff.png, name=jeff, nid=3, EX, nGt=0, quality=UNKNOWN, view=unknown', 'aid10, gname=occl2.JPG, name=occl, nid=5, EX, nGt=0, quality=UNKNOWN, view=left', 'aid13, gname=zebra.jpg, name=zebra, nid=7, EX, nGt=0, quality=UNKNOWN, view=unknown', ]
-
wbia.viz.viz_helpers.
get_chips
(ibs, aid_list, in_image=False, config2_=None, as_fpath=False)[source]¶
-
wbia.viz.viz_helpers.
get_kpts
(ibs, aid_list, in_image=False, config2_=None, ensure=True, kpts_subset=None, kpts=None)[source]¶
-
wbia.viz.viz_helpers.
get_query_text
(ibs, cm, aid2, truth, **kwargs)[source]¶ returns title based on the query chip and result
Parameters: - ibs (IBEISController) – wbia controller object
- cm (ChipMatch) – object of feature correspondences and scores
- aid2 (int) – annotation id
- truth (int) – 0, 1, 2
- Kwargs:
- qaid, score, rawscore, aid2_raw_rank, show_truth, name_score, name_rank, show_name_score, show_name_rank, show_timedelta
Returns: query_text Return type: str - CommandLine:
- python -m wbia.viz.viz_helpers –exec-get_query_text
Example
>>> # DISABLE_DOCTEST >>> from wbia.viz.viz_helpers import * # NOQA >>> import wbia >>> cm, qreq_ = wbia.testdata_cm() >>> aid2 = cm.get_top_aids()[0] >>> truth = 1 >>> query_text = get_query_text(ibs, cm, aid2, truth) >>> result = ('query_text = %s' % (str(query_text),)) >>> print(result)
-
wbia.viz.viz_helpers.
get_timedelta_str
(ibs, aid1, aid2)[source]¶ Parameters: - ibs (IBEISController) – wbia controller object
- aid1 (int) – annotation id
- aid2 (int) – annotation id
Returns: timedelta_str
Return type: - CommandLine:
- python -m wbia.viz.viz_helpers –test-get_timedelta_str
Example
>>> # ENABLE_DOCTEST >>> from wbia.viz.viz_helpers import * # NOQA >>> import wbia >>> ibs = wbia.opendb('testdb1') >>> aid1, aid2 = 1, 8 >>> timedelta_str = get_timedelta_str(ibs, aid1, aid2) >>> result = str(timedelta_str) >>> print(result) td(2 hours 28 minutes 22 seconds)
td(+2:28:22) td(02:28:22)
wbia.viz.viz_hough module¶
-
wbia.viz.viz_hough.
show_probability_chip
(ibs, aid, species=None, fnum=None, config2_=None, blend=False, **kwargs)[source]¶ TODO: allow species override in controller
- CommandLine:
- python -m wbia.viz.viz_hough –exec-show_probability_chip –cnn –show python -m wbia.viz.viz_hough –exec-show_probability_chip –cnn –show –db PZ_Master1 python -m wbia.viz.viz_hough –exec-show_probability_chip –cnn –show –db PZ_Master1 –aid 9970
Example
>>> # SCRIPT >>> from wbia.viz.viz_hough import * # NOQA >>> import wbia >>> from wbia.viz import viz_chip >>> ibs, aid_list, kwargs, config2_ = viz_chip.testdata_showchip() >>> fnum = 1 >>> species = None >>> aid = aid_list[0] >>> fig, ax = show_probability_chip(ibs, aid, species, fnum, blend=True, **kwargs) >>> ut.show_if_requested()
wbia.viz.viz_image module¶
-
wbia.viz.viz_image.
drive_test_script
(ibs)[source]¶ Test script where we drive around and take pictures of animals both in a given database and not in a given databse to make sure the system works.
- CommandLine:
python -m wbia.viz.viz_image –test-drive_test_script python -m wbia.viz.viz_image –test-drive_test_script –db PZ_MTEST –show python -m wbia.viz.viz_image –test-drive_test_script –db GIR_Tanya –show python -m wbia.viz.viz_image –test-drive_test_script –db GIR_Master0 –show python -m wbia.viz.viz_image –test-drive_test_script –db PZ_Master0 –show python -m wbia.viz.viz_image –test-drive_test_script –db PZ_FlankHack –show
python -m wbia.viz.viz_image –test-drive_test_script –db PZ_FlankHack –show python -m wbia.viz.viz_image –test-drive_test_script –dbdir /raid/work2/GIR_Master –show
Example
>>> # DISABLE_DOCTEST >>> from wbia.viz.viz_image import * # NOQA >>> import wbia >>> ibs = wbia.opendb() >>> drive_test_script(ibs)
-
wbia.viz.viz_image.
show_image
(ibs, gid, sel_aids=[], fnum=None, annote=True, draw_lbls=True, notitle=False, rich_title=False, pnum=(1, 1, 1), **kwargs)[source]¶ Driver function to show images
Parameters: Returns: (fig, ax)
Return type: - CommandLine:
python -m wbia.viz.viz_image –test-show_image –show python -m wbia.viz.viz_image –test-show_image –show –db GZ_ALL python -m wbia.viz.viz_image –test-show_image –show –db GZ_ALL –gid 100 python -m wbia.viz.viz_image –test-show_image –show –db PZ_MTEST –aid 10
python -m wbia.viz.viz_image –test-show_image –show –db PZ_MTEST –aid 91 –no-annot –rich-title python -m wbia.viz.viz_image –test-show_image –show –db GIR_Tanya –aid 1 –no-annot –rich-title
Example
>>> # SLOW_DOCTEST >>> # VIZ_TEST >>> from wbia.viz.viz_image import * # NOQA >>> import wbia >>> # build test data >>> ibs = wbia.opendb(ut.get_argval('--db', str, 'testdb1')) >>> #gid = ibs.get_valid_gids()[0] >>> gid = ut.get_argval('--gid', int, 1) >>> aid = ut.get_argval('--aid', int, None) >>> if aid is not None: >>> gid = ibs.get_annot_gids(aid) >>> sel_aids = [] >>> fnum = None >>> annote = not ut.get_argflag('--no-annot') >>> rich_title = ut.get_argflag('--rich-title') >>> draw_lbls = True >>> # execute function >>> (fig, ax) = show_image(ibs, gid, sel_aids, fnum, annote, draw_lbls, rich_title) >>> pt.show_if_requested()
-
wbia.viz.viz_image.
show_multi_images
(ibs, gid_list, fnum=None, **kwargs)[source]¶ Parameters: - ibs (IBEISController) – wbia controller object
- gid_list (list) –
- fnum (int) – figure number(default = None)
- CommandLine:
- python -m wbia.viz.viz_image –test-show_multi_images –db NNP_Master3 –gids=7409,7448,4670,7497,7496,7464,7446,7442 –show python -m wbia.viz.viz_image –test-show_multi_images –db NNP_Master3 –gids=1,2,3 –show
- Ignore:
>>> # print to 8 gids sorted by num aids >>> import wbia >>> ibs = wbia.opendb('NNP_Master3') >>> gid_list = ibs.get_valid_gids() >>> aids_list = ibs.get_image_aids(gid_list) >>> index_list = ut.list_argsort(list(map(len, aids_list)))[::-1] >>> gid_list = ut.take(gid_list, index_list[0:8]) >>> print(','.join(map(str, gid_list)))
Example
>>> # DISABLE_DOCTEST >>> from wbia.viz.viz_image import * # NOQA >>> import wbia >>> ibs = wbia.opendb(defaultdb='testdb1') >>> gid_list = ut.get_argval('--gids', list, default=[1, 2]) >>> fnum = None >>> result = show_multi_images(ibs, gid_list, fnum, draw_lbls=False, notitle=True, sel_aids='all') >>> print(result) >>> ut.show_if_requested()
wbia.viz.viz_matches module¶
-
wbia.viz.viz_matches.
annotate_matches2
(ibs, aid1, aid2, fm, fs, offset1=(0, 0), offset2=(0, 0), xywh2=None, xywh1=None, qreq_=None, **kwargs)[source]¶ TODO: use this as the main function.
-
wbia.viz.viz_matches.
annotate_matches3
(ibs, aid_list, bbox_list, offset_list, name_fm_list, name_fs_list, qreq_=None, **kwargs)[source]¶ TODO: use this as the main function.
-
wbia.viz.viz_matches.
get_data_annot_pair_info
(ibs, aid_list, qreq_, draw_fmatches, scale_down=False, kpts2_list=None, as_fpath=False)[source]¶
-
wbia.viz.viz_matches.
get_query_annot_pair_info
(ibs, qaid, qreq_, draw_fmatches, kpts1=None, as_fpath=False)[source]¶
-
wbia.viz.viz_matches.
show_matches
(ibs, cm, aid2, sel_fm=[], qreq_=None, **kwargs)[source]¶ DEPRICATE
shows single annotated match result.
Parameters: - ibs (IBEISController) –
- cm (ChipMatch) – object of feature correspondences and scores
- aid2 (int) – result annotation id
- sel_fm (list) – selected features match indices
- Kwargs:
- vert (bool)
Returns: (ax, xywh1, xywh2) Return type: tuple
-
wbia.viz.viz_matches.
show_matches2
(ibs, aid1, aid2, fm=None, fs=None, fm_norm=None, sel_fm=[], H1=None, H2=None, qreq_=None, **kwargs)[source]¶ TODO: DEPRICATE and use special case of show_name_matches Integrate ChipMatch
- Used in:
- Found 1 line(s) in ‘/home/joncrall/code/wbia_cnn/wbia_cnn/ingest_wbia.py’: ingest_wbia.py : 827 | >>> wbia.viz.viz_matches.show_matches2(ibs, aid1, aid2, fm=None, kpts1=kpts1, kpts2=kpts2) ———————- Found 4 line(s) in ‘/home/joncrall/code/wbia/wbia/viz/viz_matches.py’: viz_matches.py : 423 |def show_matches2(ibs, aid1, aid2, fm=None, fs=None, fm_norm=None, sel_fm=[], viz_matches.py : 430 | python -m wbia.viz.viz_matches –exec-show_matches2 –show viz_matches.py : 431 | python -m wbia –tf ChipMatch.ishow_single_annotmatch show_matches2 –show viz_matches.py : 515 | return show_matches2(ibs, aid1, aid2, fm, fs, qreq_=qreq_, **kwargs) ———————- Found 1 line(s) in ‘/home/joncrall/code/wbia/wbia/viz/interact/interact_matches.py’: interact_matches.py : 372 | tup = viz.viz_matches.show_matches2(ibs, self.qaid, self.daid, ———————- Found 2 line(s) in ‘/home/joncrall/code/wbia/wbia/algo/hots/chip_match.py’: chip_match.py : 204 | viz_matches.show_matches2(qreq_.ibs, cm.qaid, daid, qreq_=qreq_, chip_match.py : 219 | wbia.viz.viz_matches.show_matches2 ———————- Found 1 line(s) in ‘/home/joncrall/code/wbia/wbia/algo/hots/scoring.py’: scoring.py : 562 | viz.viz_matches.show_matches2(qreq_.ibs, qaid, daid, fm, fs,
- CommandLine:
- python -m wbia.viz.viz_matches –exec-show_matches2 –show python -m wbia –tf ChipMatch.ishow_single_annotmatch show_matches2 –show
Example
>>> # DISABLE_DOCTEST >>> from wbia.algo.hots.chip_match import * # NOQA >>> import wbia >>> cm, qreq_ = wbia.testdata_cm(defaultdb='PZ_MTEST', default_qaids=[18]) >>> cm.score_name_nsum(qreq_) >>> daid = cm.get_top_aids()[0] >>> cm.show_single_annotmatch(qreq_, daid) >>> ut.show_if_requested()
-
wbia.viz.viz_matches.
show_multichip_match
(rchip1, rchip2_list, kpts1, kpts2_list, fm_list, fs_list, featflag_list, fnum=None, pnum=None, **kwargs)[source]¶ move to df2 rchip = rchip1 H = H1 = None target_wh = None
-
wbia.viz.viz_matches.
show_name_matches
(ibs, qaid, name_daid_list, name_fm_list, name_fs_list, name_H1_list, name_featflag_list, qreq_=None, **kwargs)[source]¶ Called from chip_match.py
Parameters: - ibs (IBEISController) – wbia controller object
- qaid (int) – query annotation id
- name_daid_list (list) –
- name_fm_list (list) –
- name_fs_list (list) –
- name_H1_list (list) –
- name_featflag_list (list) –
- qreq (QueryRequest) – query request object with hyper-parameters(default = None)
- Kwargs:
- draw_fmatches, name_rank, fnum, pnum, colorbar_, nonvote_mode, fastmode, show_matches, fs, fm_norm, lbl1, lbl2, rect, draw_border, cmap, H1, H2, scale_factor1, scale_factor2, draw_pts, draw_ell, draw_lines, show_nMatches, all_kpts, in_image, show_query, draw_lbl, name_annot_scores, score, rawscore, aid2_raw_rank, show_name, show_nid, show_aid, show_annot_score, show_truth, name_score, show_name_score, show_name_rank, show_timedelta
- CommandLine:
- python -m wbia.viz.viz_matches –exec-show_name_matches python -m wbia.viz.viz_matches –test-show_name_matches –show
Example
>>> # DISABLE_DOCTEST >>> from wbia.viz.viz_matches import * # NOQA >>> from wbia.algo.hots import chip_match >>> from wbia.algo.hots import name_scoring >>> import vtool as vt >>> from wbia.algo.hots import _pipeline_helpers as plh # NOQA >>> import numpy as np >>> func = chip_match.ChipMatch.show_single_namematch >>> sourcecode = ut.get_func_sourcecode(func, stripdef=True, stripret=True, >>> strip_docstr=True) >>> setup = ut.regex_replace('viz_matches.show_name_matches', '#', sourcecode) >>> homog = False >>> print(ut.indent(setup, '>>> ')) >>> ibs, qreq_, cm_list = plh.testdata_post_sver('PZ_MTEST', qaid_list=[1]) >>> cm = cm_list[0] >>> cm.score_name_nsum(qreq_) >>> dnid = ibs.get_annot_nids(cm.qaid) >>> # +--- COPIED SECTION >>> locals_ = locals() >>> var_list = ut.exec_func_src( >>> func, locals_=locals_, >>> sentinal='name_annot_scores = cm.annot_score_list.take(sorted_groupxs') >>> exec(ut.execstr_dict(var_list)) >>> # L___ COPIED SECTION >>> kwargs = {} >>> show_name_matches(ibs, qaid, name_daid_list, name_fm_list, >>> name_fs_list, name_h1_list, name_featflag_list, >>> qreq_=qreq_, **kwargs) >>> ut.quit_if_noshow() >>> ut.show_if_requested()
wbia.viz.viz_name module¶
-
wbia.viz.viz_name.
show_multiple_chips
(ibs, aid_list, in_image=True, fnum=0, sel_aids=[], subtitle='', annote=False, **kwargs)[source]¶ - CommandLine:
python -m wbia.viz.viz_name –test-show_multiple_chips –show –no-inimage python -m wbia.viz.viz_name –test-show_multiple_chips –show –db NNP_Master3 –aids=6435,9861,137,6563,9167,12547,9332,12598,13285 –no-inimage –notitle python -m wbia.viz.viz_name –test-show_multiple_chips –show –db NNP_Master3 –aids=137,6563,12547,9332,12598,13285 –no-inimage –notitle –adjust=.05 python -m wbia.viz.viz_name –test-show_multiple_chips –show –db NNP_Master3 –aids=6563,9332,13285,12598 –no-inimage –notitle –adjust=.05 –rc=1,4 python -m wbia.viz.viz_name –test-show_multiple_chips –show –db PZ_Master0 –aids=1288 –no-inimage –notitle –adjust=.05 python -m wbia.viz.viz_name –test-show_multiple_chips –show –db PZ_Master0 –aids=4020,4839 –no-inimage –notitle –adjust=.05
python -m wbia.viz.viz_name –test-show_multiple_chips –db NNP_Master3 –aids=6524,6540,6571,6751 –no-inimage –notitle –adjust=.05 –diskshow
python -m wbia.viz.viz_name –test-show_multiple_chips –db PZ_MTEST -a default:index=0:4 –show –aids=1 –doboth –show –no-inimage
python -m wbia.viz.viz_name –test-show_multiple_chips –db PZ_MTEST –aids=1 –doboth –show –no-inimage python -m wbia.viz.viz_name –test-show_multiple_chips –db PZ_MTEST –aids=1 –doboth –rc=2,1 –show –no-inimage python -m wbia.viz.viz_name –test-show_multiple_chips –db PZ_MTEST –aids=1 –doboth –rc=2,1 –show –notitle –trydrawline –no-draw_lbls python -m wbia.viz.viz_name –test-show_multiple_chips –db PZ_MTEST –aids=1,2 –doboth –show –notitle –trydrawline
python -m wbia.viz.viz_name –test-show_multiple_chips –db PZ_MTEST –aids=1,2,3,4,5 –doboth –rc=2,5 –show –chrlbl –trydrawline –qualtitle –no-figtitle –notitle –doboth –doboth –show
python -m wbia.viz.viz_name –test-show_multiple_chips –db NNP_Master3 –aids=15419 –doboth –rc=2,1 –show –notitle –trydrawline –no-draw_lbls
Example
>>> # DISABLE_DOCTEST >>> from wbia.viz.viz_name import * # NOQA >>> import wbia >>> ibs, aid_list, in_image = testdata_multichips() >>> if True: >>> import matplotlib as mpl >>> from wbia.scripts.thesis import TMP_RC >>> mpl.rcParams.update(TMP_RC) >>> fnum = 0 >>> sel_aids = [] >>> subtitle = '' >>> annote = False >>> fig = show_multiple_chips(ibs, aid_list, in_image, fnum, sel_aids, subtitle, annote) >>> ut.quit_if_noshow() >>> fig.canvas.draw() >>> ut.show_if_requested()
-
wbia.viz.viz_name.
show_name
(ibs, nid, in_image=True, fnum=0, sel_aids=[], subtitle='', annote=False, aid_list=None, index_list=None, **kwargs)[source]¶ Parameters: CommandLine:
python -m wbia.viz.viz_name –test-show_name –dpath ~/latex/crall-candidacy-2015 –save ‘figures/{name}.jpg’ –no-figtitle –notitle –db NNP_Master3 –figsize=9,4 –clipwhite –dpi=180 –adjust=.05 –index_list=[0,1,2,3] –rc=2,4 –append temp_out_figure.tex –name=IBEIS_PZ_0739 –no-draw_lbls –doboth –no-inimage –diskshow
python -m wbia.viz.viz_name –test-show_name –no-figtitle –notitle –db NNP_Master3 –figsize=9,4 –clipwhite –dpi=180 –adjust=.05 –index_list=[0,1,2,3] –rc=2,4 –append temp_out_figure.tex –name=IBEIS_PZ_0739 –no-draw_lbls –doboth –no-inimage –show
python -m wbia.viz.viz_name –test-show_name –show
Example
>>> # DISABLE_DOCTEST >>> from wbia.viz.viz_name import * # NOQA >>> ibs, nid, in_image, index_list = testdata_showname() >>> fnum = 0 >>> sel_aids = [] >>> subtitle = '' >>> annote = False >>> # execute function >>> show_name(ibs, nid, in_image, fnum, sel_aids, subtitle, annote, index_list=index_list) >>> ut.show_if_requested()
wbia.viz.viz_nearest_descriptors module¶
-
wbia.viz.viz_nearest_descriptors.
show_nearest_descriptors
(ibs, qaid, qfx, fnum=None, stride=5, qreq_=None, **kwargs)[source]¶ Parameters: - CommandLine:
# Find a good match to inspect python -m wbia.viz.interact.interact_matches –test-testdata_match_interact –show –db PZ_MTEST –qaid 3
# Now inspect it python -m wbia.viz.viz_nearest_descriptors –test-show_nearest_descriptors –show –db PZ_MTEST –qaid 3 –qfx 879 python -m wbia.viz.viz_nearest_descriptors –test-show_nearest_descriptors –show python -m wbia.viz.viz_nearest_descriptors –test-show_nearest_descriptors –db PZ_MTEST –qaid 3 –qfx 879 –diskshow –save foo.png –dpi=256
- SeeAlso:
- plottool.viz_featrow ~/code/plottool/plottool/viz_featrow.py
Example
>>> # DISABLE_DOCTEST >>> from wbia.viz.viz_nearest_descriptors import * # NOQA >>> import wbia >>> # build test data >>> if True: >>> import matplotlib as mpl >>> from wbia.scripts.thesis import TMP_RC >>> mpl.rcParams.update(TMP_RC) >>> qreq_ = wbia.testdata_qreq_() >>> ibs = wbia.opendb('PZ_MTEST') >>> qaid = qreq_.qaids[0] >>> qfx = ut.get_argval('--qfx', type_=None, default=879) >>> fnum = None >>> stride = 5 >>> # execute function >>> skip = False >>> result = show_nearest_descriptors(ibs, qaid, qfx, fnum, stride, >>> draw_chip=True, >>> draw_warped=True, >>> draw_unwarped=False, >>> draw_desc=False, qreq_=qreq_) >>> # verify results >>> print(result) >>> pt.show_if_requested()
-
wbia.viz.viz_nearest_descriptors.
show_top_featmatches
(qreq_, cm_list)[source]¶ Parameters: - qreq (wbia.QueryRequest) – query request object with hyper-parameters
- cm_list (list) –
- SeeAlso:
python -m wbia –tf TestResult.draw_feat_scoresep –show –db PZ_MTEST -t best:lnbnn_on=True,lnbnn_normalizer=normlnbnn-test -a default –sephack
python -m wbia –tf TestResult.draw_feat_scoresep –show –db PZ_Master1 -t best:lnbnn_on=True -a timectrl –sephack python -m wbia –tf TestResult.draw_feat_scoresep –show –db PZ_MTEST -t best:lnbnn_on=True -a default:size=30 –sephack python -m wbia –tf TestResult.draw_feat_scoresep –show –db PZ_MTEST -t best:K=1,Knorm=5,lnbnn_on=True -a default:size=30 –sephack python -m wbia –tf TestResult.draw_feat_scoresep –show –db PZ_MTEST -t best:K=1,Knorm=3,lnbnn_on=True -a default –sephack
- CommandLine:
- python -m wbia.viz.viz_nearest_descriptors –exec-show_top_featmatches –show
Example
>>> # DISABLE_DOCTEST >>> from wbia.viz.viz_nearest_descriptors import * # NOQA >>> import wbia >>> cm_list, qreq_ = wbia.testdata_cmlist(defaultdb='PZ_MTEST', >>> a=['default:has_none=mother,size=30']) >>> show_top_featmatches(qreq_, cm_list) >>> ut.quit_if_noshow() >>> import wbia.plottool as pt >>> ut.show_if_requested()
wbia.viz.viz_other module¶
wbia.viz.viz_qres module¶
-
wbia.viz.viz_qres.
show_qres
(ibs, cm, qreq_=None, **kwargs)[source]¶ Display Query Result Logic Defaults to: query chip, groundtruth matches, and top matches
Parameters: - ibs (wbia.IBEISController) – wbia controller object
- cm (wbia.ChipMatch) – object of feature correspondences and scores
- qreq (wbia.QueryRequest) – query request object with hyper-parameters(default = None)
- Kwargs:
annot_mode, figtitle, make_figtitle, aug, top_aids, all_kpts, show_query, in_image, sidebyside, name_scoring, max_nCols, failed_to_match, fnum in_image (bool) show result in image view if True else chip view annot_mode (int):
if annot_mode == 0, then draw lines and ellipse elif annot_mode == 1, then dont draw lines or ellipse elif annot_mode == 2, then draw only lines elif annot_mode == 3, draw heatmask onlySee: viz_matches.show_name_matches, viz_helpers.get_query_text
Returns: fig Return type: mpl.Figure - CommandLine:
./main.py –query 1 -y –db PZ_MTEST –noshow-qres python -m wbia.viz.viz_qres show_qres –show python -m wbia.viz.viz_qres show_qres –show –top-aids=10 –db=PZ_MTEST
–sidebyside –annot_mode=0 –notitle –no-viz_name_score –qaids=5 –max_nCols=2 –adjust=.01,.01,.01
Example
>>> # DISABLE_DOCTEST >>> from wbia.viz.viz_qres import * # NOQA >>> import wbia >>> cm, qreq_ = wbia.testdata_cm() >>> kwargs = dict( >>> top_aids=ut.get_argval('--top-aids', type_=int, default=3), >>> sidebyside=not ut.get_argflag('--no-sidebyside'), >>> annot_mode=ut.get_argval('--annot_mode', type_=int, default=1), >>> viz_name_score=not ut.get_argflag('--no-viz_name_score'), >>> simplemode=ut.get_argflag('--simplemode'), >>> max_nCols=ut.get_argval('--max_nCols', type_=int, default=None) >>> ) >>> ibs = qreq_.ibs >>> fig = show_qres(ibs, cm, show_query=False, qreq_=qreq_, **kwargs) >>> ut.show_if_requested()
-
wbia.viz.viz_qres.
show_qres_analysis
(ibs, cm, qreq_=None, **kwargs)[source]¶ Wrapper around show_qres.
- KWARGS:
- aid_list - show matches against aid_list (default top 3)
Parameters: - ibs (IBEISController) – wbia controller object
- cm (ChipMatch) – object of feature correspondences and scores
- qreq (QueryRequest) – query request object with hyper-parameters(default = None)
- Kwargs:
- N, show_gt, show_query, aid_list, figtitle, viz_name_score, viz_name_score
- CommandLine:
- python -m wbia.viz.viz_qres –exec-show_qres_analysis –show
Example
>>> # ENABLE_DOCTEST >>> from wbia.viz.viz_qres import * # NOQA >>> import wbia >>> cm, qreq_ = wbia.testdata_cm( >>> defaultdb='PZ_MTEST', default_qaids=[1], >>> default_daids=[2, 3, 4, 5, 6, 7, 8, 9]) >>> kwargs = dict(show_query=False, viz_name_score=True, >>> show_timedelta=True, N=3, show_gf=True) >>> ibs = qreq_.ibs >>> show_qres_analysis(ibs, cm, qreq_, **kwargs) >>> ut.show_if_requested()
Example
>>> # ENABLE_DOCTEST >>> from wbia.viz.viz_qres import * # NOQA >>> import wbia >>> cm, qreq_ = wbia.testdata_cm( >>> defaultdb='PZ_MTEST', default_qaids=[1], >>> default_daids=[2]) >>> kwargs = dict(show_query=False, viz_name_score=True, >>> show_timedelta=True, N=3, show_gf=True) >>> ibs = qreq_.ibs >>> show_qres_analysis(ibs, cm, qreq_, **kwargs) >>> ut.show_if_requested()
wbia.viz.viz_sver module¶
-
wbia.viz.viz_sver.
show_sver
(ibs, aid1, aid2, chipmatch_FILT=None, aid2_svtup=None, config2_=None, **kwargs)[source]¶ Compiles IBEIS information and sends it to plottool
- CommandLine:
- python -m wbia.viz.viz_sver –test-show_sver –show
Example
>>> # SLOW_DOCTEST >>> from wbia.viz.viz_sver import * # NOQA >>> import wbia >>> import utool as ut >>> ibs = wbia.opendb('testdb1') >>> aid_list = ibs.get_valid_aids() >>> aid1, aid2 = aid_list[0:2] >>> chipmatch_FILT = None >>> aid2_svtup = None >>> kwargs = {} >>> show_sver(ibs, aid1, aid2) >>> ut.quit_if_noshow() >>> import wbia.plottool as pt >>> exec(pt.present())