wbia.viz package

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

>>> # 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_chip.testdata_showchip()[source]

wbia.viz.viz_graph module

DEPRICATE

Displays the matching graph of individuals

WindowsDepends:
pip install networkx wget http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.38.msi graphviz-2.38.msi
class wbia.viz.viz_graph.AnnotGraphInteraction(infr, selected_aids=[], use_image=False, temp_nids=None)[source]

Bases: wbia.plottool.abstract_interaction.AbstractInteraction

confirm(event)[source]
cut(event)[source]
edit_config(event)[source]
highlight_aid(aid, color=None)[source]
make_hud()[source]

Creates heads up display

mark_match(event)[source]
mark_nomatch(event)[source]
mark_notcomp(event)[source]
on_click_inside(**kwargs)
on_key_press(event)[source]
plot(fnum, pnum)[source]
plot_weights(event=None)[source]
print_weights(event=None)[source]
reset(event)[source]
show_selected(event)[source]
toggle_imgs(event=None)[source]
toggle_selected_aid(aid)[source]
unselect_all(event)[source]
class wbia.viz.viz_graph.InferenceConfig(**kwargs)[source]

Bases: wbia.dtool.base.Config

wbia.viz.viz_graph.augment_graph_mst(ibs, graph)[source]
wbia.viz.viz_graph.color_by_nids(graph, unique_nids=None, ibs=None, nid2_color_=None)[source]

Colors edges and nodes by nid

wbia.viz.viz_graph.ensure_graph_nid_labels(graph, unique_nids=None, ibs=None)[source]
wbia.viz.viz_graph.ensure_names_are_connected(graph, aids_list)[source]
wbia.viz.viz_graph.ensure_node_images(ibs, graph)[source]
wbia.viz.viz_graph.get_name_rowid_edges_from_aids(ibs, aid_list)[source]
wbia.viz.viz_graph.get_name_rowid_edges_from_nids(ibs, nids)[source]
wbia.viz.viz_graph.make_name_graph_interaction(ibs, nids=None, aids=None, selected_aids=[], with_all=True, invis_edges=None, ensure_edges=None, use_image=False, temp_nids=None, **kwargs)[source]
CommandLine:
python -m wbia –tf make_name_graph_interaction –db PZ_MTEST
–aids=1,2,3,4,5,6,7,8,9 –show
python -m wbia –tf make_name_graph_interaction –db LEWA_splits
–nids=1 –show –split

Example

>>> # DISABLE_DOCTEST
>>> from wbia.viz.viz_graph import *  # NOQA
>>> import wbia
>>> import wbia.plottool as pt
>>> exec(ut.execstr_funckw(make_name_graph_interaction), globals())
>>> defaultdb='testdb1'
>>> ibs = wbia.opendb(defaultdb=defaultdb)
>>> aids = ut.get_argval('--aids', type_=list, default=None)
>>> nids = ut.get_argval('--nids', type_=list, default=ibs.get_valid_nids()[0:5])
>>> nids = None if aids is not None else nids
>>> with_all = not ut.get_argflag('--no-with-all')
>>> make_name_graph_interaction(ibs, nids, aids, with_all=with_all)
>>> #pt.zoom_factory()
>>> ut.show_if_requested()
wbia.viz.viz_graph.make_netx_graph_from_aid_groups(ibs, aids_list, only_reviewed_matches=True, invis_edges=None, ensure_edges=None, temp_nids=None, allow_directed=False)[source]
Parameters:
  • ibs (wbia.IBEISController) – image analysis api
  • aids_list (list) –

Example

>>> # DISABLE_DOCTEST
>>> from wbia.viz.viz_graph import *  # NOQA
>>> import wbia
>>> ibs = wbia.opendb(defaultdb='testdb1')
>>> aids_list = [[1, 2, 3, 4], [5, 6, 7]]
>>> invis_edges = [(1, 5)]
>>> only_reviewed_matches = True
>>> graph = make_netx_graph_from_aid_groups(ibs, aids_list,
>>>                                         only_reviewed_matches,
>>>                                         invis_edges)
>>> list(nx.connected_components(graph.to_undirected()))
wbia.viz.viz_graph.make_netx_graph_from_aidpairs(ibs, aids1, aids2, unique_aids=None)[source]
wbia.viz.viz_graph.tryout_web_graphs(self, infr)[source]

https://plot.ly/python/

http://bokeh.pydata.org/en/latest/

pip install bokeh

Notes

http://www.coppelia.io/2014/07/an-a-to-z-of-extra-features-for-the-d3-force-layout/ http://andrewmellor.co.uk/blog/articles/2014/12/14/d3-networks/ pip install plotly # eww need to sign up and get a key http://igraph.org/

import mpld3 mpld3.save_html(fig, open(‘fig.html’, ‘w’)) mpld3.save_json(fig, open(‘fig.json’, ‘w’)) fig = pt.gcf()

wbia.viz.viz_graph.tryout_with_qt()[source]
wbia.viz.viz_graph.viz_netx_chipgraph(ibs, graph, fnum=None, use_image=False, layout=None, zoom=None, prog='neato', as_directed=False, augment_graph=True, layoutkw=None, framewidth=True, **kwargs)[source]

DEPRICATE or improve

Parameters:
  • ibs (IBEISController) – wbia controller object
  • graph (nx.DiGraph) –
  • fnum (int) – figure number(default = None)
  • use_image (bool) – (default = False)
  • zoom (float) – (default = 0.4)
Returns:

pos

Return type:

?

CommandLine:
python -m wbia –tf viz_netx_chipgraph –show
Cand:
wbia review_tagged_joins –save figures4/mergecase.png –figsize=15,15
–clipwhite –diskshow
wbia compute_occurrence_groups –save figures4/occurgraph.png
–figsize=40,40 –clipwhite –diskshow

~/code/wbia/wbia/algo/preproc/preproc_occurrence.py

Example

>>> # DISABLE_DOCTEST
>>> from wbia.viz.viz_graph import *  # NOQA
>>> import wbia
>>> ibs = wbia.opendb(defaultdb='PZ_MTEST')
>>> nid_list = ibs.get_valid_nids()[0:10]
>>> fnum = None
>>> use_image = True
>>> zoom = 0.4
>>> make_name_graph_interaction(ibs, nid_list, prog='neato')
>>> ut.show_if_requested()

wbia.viz.viz_graph2 module

CommandLine:
wbia make_qt_graph_interface –show wbia make_qt_graph_interface –show –aids=1,2,3,4,5,6,7,8,9
class wbia.viz.viz_graph2.AnnotGraphWidget(parent=None, orientation=None, verticalSizePolicy=None, horizontalSizePolicy=None, verticalStretch=None, horizontalStretch=None, spacing=None, margin=None, name=None, ori=None, **kwargs)[source]

Bases: wbia.guitool.guitool_components.GuitoolWidget

accept()[source]

First determine deltas of what has changed between internal state + staging and the the annotations node names as well as the annotmatch edges. Then commit to staging, annotmatch, and the annotation table.

closeEvent(self, QCloseEvent)[source]
commit_to_staging()[source]
custom_review(aid_pairs)[source]
debug_annot_review_state()[source]
edge_context(qtindex, qpoint)[source]
edge_doubleclick(qtindex)[source]

qtindex = qtindex = self.api_widgets[‘edges’].view.get_row_and_qtindex_from_id(1)[0]

edge_keypress(view, event)[source]

view = self.api_widgets[‘edges’].view

edge_selection(view)[source]
edit_filters()[source]
embed()[source]
emit_state_update(structure_changed=False, disable_global_update=False)[source]
ensure_cliques()[source]
ensure_full()[source]
expand_image_and_names()[source]
get_edge_options(aid_pairs)[source]

Context-menu options for annotation edges

get_node_options(aids)[source]

Context-menu options for annotation nodes

hack_keep_old_tags()[source]
init_inference()[source]
init_signals_and_slots()[source]
initialize(infr=None, use_image=False, init_mode='rereview', review_cfg=None)[source]
initialize_api_tabs()[source]
initialize_menus()[source]
make_mark_state_funcs(selection_func)[source]
mark_pair_state(pairs, state)[source]
match_and_score_edges()[source]
name_selection(view)[source]
node_context(qtindex, qpoint)[source]
node_selection(view)[source]
on_alt_pressed(view, event)[source]
populate_edge_model()[source]
populate_name_edge_model()[source]
populate_name_node_model()[source]
populate_node_model()[source]
preset_config(mode='filtered')[source]
print_annotmatch_table()[source]
print_deltas()[source]
print_info()[source]
print_staging_table()[source]
repopulate()[source]
reset_annotmatch()[source]
reset_rereview()[source]
Goal:
All names are removed. Reset edges so only reviewed edges are shown. You can change the state of those edges. They are not filtered.
reset_review()[source]
reset_split()[source]
reset_staging()[source]
restrict_graph_to_names()[source]
score_edges_vsone()[source]
showEvent(self, QShowEvent)[source]
signal_state_update
sizeHint(self) → QSize[source]
update_state(structure_changed=False, disable_global_update=False)[source]
use_wbia_names()[source]
vsone_subset(edges=None)[source]
class wbia.viz.viz_graph2.AnnotPairDialog(parent=None, orientation=None, verticalSizePolicy=None, horizontalSizePolicy=None, verticalStretch=None, horizontalStretch=None, spacing=None, margin=None, name=None, ori=None, **kwargs)[source]

Bases: wbia.guitool.guitool_components.GuitoolWidget

wbia AnnotPairDialog –show python -m wbia.algo.graph.mixin_loops qt_review_loop –show

Example

>>> # DISABLE_DOCTEST
>>> from wbia.viz.viz_graph2 import *  # NOQA
>>> import wbia.guitool as gt
>>> gt.ensure_qapp()
>>> import wbia
>>> ibs = wbia.opendb('PZ_MTEST')
>>> win = AnnotPairDialog(ibs=ibs, edge=(1, 2),
>>>                       info_text='text describing this match')
>>> gt.qtapp_loop(qwin=win, freq=10)

Example

>>> # DISABLE_DOCTEST
>>> from wbia.viz.viz_graph2 import *  # NOQA
>>> import wbia
>>> import wbia.guitool as gt
>>> gt.ensure_qapp()
>>> infr = wbia.AnnotInference('PZ_Master1', 'all')
>>> infr.reset_feedback('staging')
>>> edges = [(86, 16273), (86, 5245), (92, 16273), (559, 16240),
>>>         (559, 2111),]
>>> edge = edges[0]
>>> self = AnnotPairDialog(edge=edges, infr=infr, standalone=False)
>>> self.seek(0)
>>> self.show()
accept()[source]
continue_review()[source]
edit_jump()[source]
feedback_dict()[source]
goto_next()[source]
initialize(edge=None, infr=None, ibs=None, info_text=None, cfgdict=None, standalone=True)[source]

# Args: # standalone (bool):

keyPressEvent(self, QKeyEvent)[source]
on_finished()[source]
request_review(user_request, external=True)[source]
seek(index)[source]
set_edge(edge, info_text=None, external=True)[source]
skip()[source]
step_by(amount=1)[source]
total
class wbia.viz.viz_graph2.AnnotStateDialog(parent=None, **kwargs)[source]

Bases: wbia.guitool.guitool_components.GuitoolWidget

python -m wbia.viz.viz_graph2 AnnotStateDialog –show

Example

>>> # DISABLE_DOCTEST
>>> from wbia.viz.viz_graph2 import *  # NOQA
>>> import wbia.guitool as gt
>>> gt.ensure_qapp()
>>> import wbia
>>> ibs = wbia.opendb('PZ_MTEST')
>>> aid = 1
>>> self = AnnotStateDialog(ibs=ibs, aid=aid)
>>> gt.qtapp_loop(qwin=self, freq=10)
current_annot_state()[source]
initialize(ibs, aid=None)[source]
set_aid(aid)[source]
wbia_read(aid)[source]
class wbia.viz.viz_graph2.DevGraphWidget(parent=None, orientation=None, verticalSizePolicy=None, horizontalSizePolicy=None, verticalStretch=None, horizontalStretch=None, spacing=None, margin=None, name=None, ori=None, **kwargs)[source]

Bases: wbia.guitool.guitool_components.GuitoolWidget

deselect()[source]
draw_graph()[source]
emit_graph_update()[source]
eventFilter(self, QObject, QEvent) → bool[source]
highlight_aid(aid, color=None)[source]
infr
init_signals_and_slots()[source]
initialize(use_image, self_parent)[source]
on_click_inside(event, ax)[source]
on_graph_update()[source]
on_key_press(event)[source]
on_pick(event)[source]
selected_graph_pairs()[source]
set_pin_state(flag)[source]
show_popup_menu(options, event)[source]

context menu

show_selected()[source]
signal_graph_update
toggle_selected_aid(aids)[source]
class wbia.viz.viz_graph2.EdgeAPIHelper(infr)[source]

Bases: object

edge_assert(edge)[source]
edge_attr_getter(attr, default=None)[source]
get_edge_data(edge)[source]
get_edge_kmdist(edge)[source]
get_edge_speed(edge)[source]
get_edge_timedelta(edge)[source]
get_inference_bgrole(edge)[source]

Background role for status column

get_inference_text(edge)[source]
get_match_thumbtup(edge, thumbsize=None)[source]
get_num_other(aid)[source]
get_pair_tags(edge)[source]
get_review_bgrole(edge)[source]

Background role for status column

get_review_text(edge)[source]
make_partial_edge_headers()[source]

These are partial api headers meant to augment edge headers

class wbia.viz.viz_graph2.EdgeReviewDialog(parent=None, **kwargs)[source]

Bases: wbia.guitool.guitool_components.GuitoolWidget

python -m wbia.viz.viz_graph2 EdgeReviewDialog –show

Example

>>> # DISABLE_DOCTEST
>>> from wbia.viz.viz_graph2 import *  # NOQA
>>> import wbia.guitool as gt
>>> gt.ensure_qapp()
>>> self = EdgeReviewDialog(edge=(1, 2))
>>> gt.qtapp_loop(qwin=self, freq=10)
>>> print(self.feedback_dict())
cancel()[source]
confirm()[source]
feedback_dict()[source]
initialize(edge=None, edge_data=None, conf_editor='hybrid', with_confirm=True, user_id=None)[source]
keyPressEvent(self, QKeyEvent)[source]
read_edge_state(edge, edge_data)[source]
set_edge(edge, edge_data=None)[source]
wbia.viz.viz_graph2.make_edge_api(infr, review_cfg={})[source]
wbia.viz.viz_graph2.make_name_edge_api(infr, review_cfg={})[source]
wbia.viz.viz_graph2.make_name_node_api(infr, review_cfg={})[source]
wbia.viz.viz_graph2.make_node_api(infr)[source]
wbia.viz.viz_graph2.make_qt_graph_interface(ibs, aids=None, nids=None, gids=None, init_mode='review', graph_tab=False)[source]
CommandLine:

wbia make_qt_graph_interface –dbdir ~/lev/media/hdd/work/WWF_Lynx/ –show –nids=281 –graphtab wbia make_qt_graph_interface –dbdir ~/lev/media/hdd/work/WWF_Lynx/ –show –gids=2289 –graphtab

wbia make_qt_graph_interface –dbdir ~/lev/media/hdd/work/WWF_Lynx/ –show –graph-tab –aids=2587,2398 wbia make_qt_graph_interface –show wbia make_qt_graph_interface –show –db PZ_PB_RF_TRAIN

wbia make_qt_graph_interface –show –aids=1,2,3,4,5,6,7,8,9 –graph-tab wbia make_qt_graph_interface –show –aids=1,2,3,4,5,6,7,8,9 wbia make_qt_graph_interface –show

wbia make_qt_graph_interface –show –db RotanTurtles –aids=610,716

wbia make_qt_graph_interface –db LEWA_splits –nids=1 –show –sample

wbia make_qt_graph_interface –db PZ_MTEST –nids=1 –show –init-mode=rereview

wbia make_qt_graph_interface –dbdir=~/lev/media/danger/GGR/GGR-IBEIS –nids=2300 –show wbia make_qt_graph_interface –dbdir=~/lev/media/danger/GGR/GGR-IBEIS –nids=4617 –show

# unmount fusermount -u ~/lev # mount sshfs -o idmap=user lev:/ ~/lev wbia make_qt_graph_interface –dbdir=/home/joncrall/lev/media/hdd/work/EWT_Cheetahs –show -a default:view=right;frontright;backright

Example

>>> # DISABLE_DOCTEST
>>> from wbia.viz.viz_graph2 import *  # NOQA
>>> import wbia.guitool as gt
>>> import wbia
>>> defaultdb = 'PZ_MTEST'
>>> ibs = wbia.opendb(defaultdb=defaultdb)
>>> aids = ut.get_argval('--aids', type_=list, default=None)
>>> nids = ut.get_argval('--nids', type_=list, default=None)
>>> gids = ut.get_argval('--gids', type_=list, default=None)
>>> init_mode = ut.get_argval('--init_mode', default='review')
>>> graph_tab = ut.get_argflag('--graph-tab')
>>> gt.ensure_qtapp()
>>> win = make_qt_graph_interface(ibs, aids, nids, gids, init_mode, graph_tab)
>>> ut.quit_if_noshow()
>>> gt.qtapp_loop(qwin=win, freq=10)
wbia.viz.viz_graph2.make_qt_graph_review(qreq_, cm_list)[source]
CommandLine:
wbia make_qt_graph_review –show

Example

>>> # DISABLE_DOCTEST
>>> from wbia.viz.viz_graph2 import *  # NOQA
>>> import wbia.guitool as gt
>>> import wbia
>>> defaultdb = 'PZ_MTEST'
>>> qreq_ = wbia.testdata_qreq_(defaultdb=defaultdb)
>>> cm_list = qreq_.execute()
>>> gt.ensure_qtapp()
>>> win = make_qt_graph_review(qreq_, cm_list)
>>> ut.quit_if_noshow()
>>> gt.qtapp_loop(qwin=win, freq=10)

wbia.viz.viz_helpers module

wbia.viz.viz_helpers.get_aidstrs(aid_list, **kwargs)[source]
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_text(ibs, aid_list, draw_lbls)[source]
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:

list

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_bbox_centers(bbox_list)[source]
wbia.viz.viz_helpers.get_bboxes(ibs, aid_list, offset_list=None)[source]
wbia.viz.viz_helpers.get_chips(ibs, aid_list, in_image=False, config2_=None, as_fpath=False)[source]
wbia.viz.viz_helpers.get_image_titles(ibs, gid_list)[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_nidstrs(nid_list, **kwargs)[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:

str

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_helpers.get_truth_color(truth, base255=False, lighten_amount=None)[source]
wbia.viz.viz_helpers.get_vsstr(qaid, aid)[source]
wbia.viz.viz_helpers.is_unknown(ibs, nid_list)[source]
wbia.viz.viz_helpers.kp_info(kp)[source]
wbia.viz.viz_helpers.register_FNUMS(FNUMS_)[source]
wbia.viz.viz_helpers.show_keypoint_gradient_orientations(ibs, aid, fx, fnum=None, pnum=None, config2_=None)[source]

wbia.viz.viz_hough module

wbia.viz.viz_hough.show_hough_image(ibs, gid, species=None, fnum=None, **kwargs)[source]
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.draw_image_overlay(ibs, ax, gid, sel_aids, draw_lbls=True, annote=True)[source]
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/Turk/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.get_annot_annotations(ibs, aid_list, sel_aids=[], draw_lbls=True)[source]
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:
  • ibs (IBEISController) – wbia controller object
  • gid (int) – image row id
  • sel_aids (list) –
  • fnum (int) – figure number
  • annote (bool) –
  • draw_lbls (bool) –
Returns:

(fig, ax)

Return type:

tuple

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_multitruth(ibs, aid_list)[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/ibeis_cnn/ibeis_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:
  • ibs (IBEISController) – wbia controller object
  • nid
  • in_image (bool) –
  • fnum (int) – figure number
  • sel_aids (list) –
  • subtitle (str) –
  • annote (bool) –

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_name.show_name_of(ibs, aid, **kwargs)[source]
wbia.viz.viz_name.testdata_multichips()[source]
wbia.viz.viz_name.testdata_showname()[source]

wbia.viz.viz_nearest_descriptors module

wbia.viz.viz_nearest_descriptors.get_annotfeat_nn_index(ibs, qaid, qfx, qreq_=None)[source]
wbia.viz.viz_nearest_descriptors.show_nearest_descriptors(ibs, qaid, qfx, fnum=None, stride=5, qreq_=None, **kwargs)[source]
Parameters:
  • ibs (wbia.IBEISController) – image analysis api
  • qaid (int) – query annotation id
  • qfx (int) – query feature index
  • fnum (int) – figure number
  • stride (int) –
  • consecutive_distance_compare (bool) –
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_other.chip_montage(ibs, qaids, config=None)[source]
CommandLine:
python -m wbia.viz.viz_other chip_montage –show –db PZ_MTEST python -m wbia.viz.viz_other chip_montage –show –db GZ_ALL

Example

>>> # DISABLE_DOCTEST
>>> from wbia.viz.viz_other import *  # NOQA
>>> defaltdb = 'seaturtles'
>>> import wbia
>>> a = ['default']
>>> ibs = wbia.opendb(defaultdb=defaltdb)
>>> ibs, qaids, daids = wbia.testdata_expanded_aids(ibs=ibs, a=a)
>>> config = None
>>> chip_montage(ibs, qaids, config)
>>> ut.quit_if_noshow()
>>> import wbia.plottool as pt
>>> ut.show_if_requested()
wbia.viz.viz_other.image_montage(ibs, gids, config=None)[source]
CommandLine:
python -m wbia.viz.viz_other image_montage –show –db PZ_Master1 python -m wbia.viz.viz_other image_montage –show –db GZ_ALL

Example

>>> # DISABLE_DOCTEST
>>> from wbia.viz.viz_other import *  # NOQA
>>> defaltdb = 'seaturtles'
>>> import wbia
>>> a = ['default']
>>> ibs = wbia.opendb(defaultdb=defaltdb)
>>> ibs, qaids, daids = wbia.testdata_expanded_aids(ibs=ibs, a=a)
>>> config = None
>>> gids = ibs.get_annot_gids(qaids[0:1000])
>>> image_montage(ibs, gids, config)
>>> ut.quit_if_noshow()
>>> import wbia.plottool as pt
>>> ut.show_if_requested()

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 only

See: 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_qres.show_qres_top(ibs, cm, qreq_=None, **kwargs)[source]

Wrapper around show_qres.

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())

Module contents

wbia.viz.IMPORT_TUPLES = [('viz_chip', None), ('viz_helpers', None), ('viz_hough', None), ('viz_image', None), ('viz_matches', None), ('viz_name', None), ('viz_nearest_descriptors', None), ('viz_qres', None), ('viz_sver', None)]

cd /home/joncrall/code/wbia/wbia/viz makeinit.py

Type:Regen Command
wbia.viz.import_subs()[source]
wbia.viz.reassign_submodule_attributes(verbose=True)[source]

why reloading all the modules doesnt do this I don’t know

wbia.viz.reload_subs(verbose=True)[source]

Reloads wbia.viz and submodules

wbia.viz.rrrr(verbose=True)

Reloads wbia.viz and submodules