ibeis.viz.interact package

Submodules

ibeis.viz.interact.interact_annotations2 module

class ibeis.viz.interact.interact_annotations2.ANNOTATION_Interaction2(ibs, gid, next_callback=None, prev_callback=None, rows_updated_callback=None, reset_window=True, dodraw=True, fnum=None)[source]

Bases: object

commit_callback(unchanged_indices, deleted_indices, changed_indices, changed_annottups, new_annottups)[source]

TODO: Rename to commit_callback Callback from interact_annotations to ibs for when data is modified

update_image_and_callbacks(gid, nextcb, prevcb, do_save=True)[source]
ibeis.viz.interact.interact_annotations2.ishow_image2(ibs, gid, fnum=None, dodraw=True)[source]
Parameters:
  • ibs (IBEISController) – ibeis controller object
  • gid (int) –
  • dodraw (bool) –

CommandLine:

python -m ibeis.viz.interact.interact_annotations2 --test-ishow_image2 --show

Example

>>> # DISABLE_DOCTEST
>>> from ibeis.viz.interact.interact_annotations2 import *  # NOQA
>>> import ibeis
>>> # build test data
>>> ibs = ibeis.opendb('testdb1')
>>> gid = 2
>>> dodraw = True
>>> # execute function
>>> self = ishow_image2(ibs, gid, dodraw)
>>> # verify results
>>> result = str(self)
>>> print(result)
>>> pt.show_if_requested()

ibeis.viz.interact.interact_chip module

Interaction for a single annoation. Also defines annotation context menu.

CommandLine:

python -m ibeis.viz.interact.interact_chip --test-ishow_chip --show --aid 2
ibeis.viz.interact.interact_chip.build_annot_context_options(ibs, aid, refresh_func=None, with_interact_name=True, with_interact_chip=True, with_interact_image=True, config2_=None)[source]
Parameters:
  • ibs (IBEISController) – ibeis controller object
  • aid (int) – annotation id
  • refresh_func (None) – (default = None)
  • with_interact_name (bool) – (default = True)
  • with_interact_chip (bool) – (default = True)
  • with_interact_image (bool) – (default = True)
  • config2 (dict) – (default = None)
Returns:

callback_list

Return type:

list

CommandLine:

python -m ibeis.viz.interact.interact_chip --exec-build_annot_context_options

Example

>>> # DISABLE_DOCTEST
>>> from ibeis.viz.interact.interact_chip import *  # NOQA
>>> import ibeis
>>> ibs = ibeis.opendb(defaultdb='testdb1')
>>> aid = ibs.get_valid_aids()[0]
>>> refresh_func = None
>>> with_interact_name = True
>>> with_interact_chip = True
>>> with_interact_image = True
>>> config2_ = None
>>> callback_list = build_annot_context_options(ibs, aid, refresh_func,
>>>                                             with_interact_name,
>>>                                             with_interact_chip,
>>>                                             with_interact_image,
>>>                                             config2_)
>>> result = ('callback_list = %s' % (ut.list_str(callback_list, nl=4),))
>>> print(result)
ibeis.viz.interact.interact_chip.interact_multichips(ibs, aid_list, config2_=None, **kwargs)[source]
Parameters:
  • ibs (IBEISController) – ibeis controller object
  • aid_list (list) – list of annotation rowids
Returns:

iteract_obj

Return type:

MultiImageInteraction

CommandLine:

python -m ibeis.viz.interact.interact_chip --exec-interact_multichips --show

Example

>>> # SLOW_DOCTEST
>>> from ibeis.viz.interact.interact_chip import *  # NOQA
>>> import ibeis
>>> ibs = ibeis.opendb(defaultdb='testdb1')
>>> aid_list = ibs.get_valid_aids()
>>> iteract_obj = interact_multichips(ibs, aid_list)
>>> iteract_obj.start()
>>> result = ('iteract_obj = %s' % (str(iteract_obj),))
>>> print(result)
>>> ut.show_if_requested()
ibeis.viz.interact.interact_chip.ishow_chip(ibs, aid, fnum=2, fx=None, dodraw=True, config2_=None, ischild=False, **kwargs)[source]
# TODO:
split into two interactions interact chip and interact chip features
Parameters:
  • ibs (IBEISController) – ibeis controller object
  • aid (int) – annotation id
  • fnum (int) – figure number
  • fx (None) –

CommandLine:

python -m ibeis.viz.interact.interact_chip --test-ishow_chip --show
python -m ibeis.viz.interact.interact_chip --test-ishow_chip --show --aid 2

Example

>>> # DISABLE_DOCTEST
>>> from ibeis.viz.interact.interact_chip import *  # NOQA
>>> import ibeis
>>> # build test data
>>> ibs = ibeis.opendb('testdb1')
>>> aid = ut.get_argval('--aid', type_=int, default=1)
>>> fnum = 2
>>> fx = None
>>> # execute function
>>> dodraw = ut.show_was_requested()
>>> result = ishow_chip(ibs, aid, fnum, fx, dodraw)
>>> # verify results
>>> pt.show_if_requested()
>>> print(result)
ibeis.viz.interact.interact_chip.show_annot_context_menu(ibs, aid, qwin, qpoint, refresh_func=None, with_interact_name=True, with_interact_chip=True, with_interact_image=True, config2_=None)[source]

Defines logic for poping up a context menu when viewing an annotation. Used in other interactions like name_interaction and interact_query_decision

CommandLine:

python -m ibeis.viz.interact.interact_chip --test-ishow_chip --show

ibeis.viz.interact.interact_image module

ibeis.viz.interact.interact_image.ishow_image(ibs, gid, sel_aids=[], fnum=None, select_callback=None, **kwargs)[source]

ibeis.viz.interact.interact_matches module

Single VsOne Chip Match Interface For VsMany Interaction

Interaction for looking at matches between a single query and database annotation

Main development file

CommandLine:

python -m ibeis.viz.interact.interact_matches --test-begin --show

python -m ibeis.viz.interact.interact_matches --test-show_coverage --show
class ibeis.viz.interact.interact_matches.MatchInteraction(ibs, cm, aid2=None, fnum=None, figtitle=u'Match Interaction', same_fig=True, qreq_=None, **kwargs)[source]

Bases: object

Plots a chip result and sets up callbacks for interaction.

SeeAlso:
plottool.interact_matches.MatchInteraction2
begin(dodraw=True)[source]

CommandLine:

python -m ibeis.viz.interact.interact_matches --test-begin
python -m ibeis.viz.interact.interact_matches --test-begin --show

Example

>>> # DISABLE_DOCTEST
>>> from ibeis.viz.interact.interact_matches import *  # NOQA
>>> self = testdata_match_interact()
>>> self.begin(dodraw=False)
>>> pt.show_if_requested()
chipmatch_view(pnum=(1, 1, 1), **kwargs_)[source]

just visualizes the matches using some type of lines

CommandLine:

python -m ibeis.viz.interact.interact_matches --test-chipmatch_view --show

Example

>>> # DISABLE_DOCTEST
>>> from ibeis.viz.interact.interact_matches import *  # NOQA
>>> self = testdata_match_interact()
>>> self.chipmatch_view()
>>> pt.show_if_requested()
dev_embed()[source]
dev_reload()[source]
on_click(event)[source]
query_last_feature()[source]
rrr(verbose=True)

special class reloading function

select_ith_match(mx)[source]

Selects the ith match and visualizes and prints information concerning features weights, keypoint details, and sift descriptions

Parameters:
  • mx (int) –
  • qaid (int) –
  • aid (int) –

CommandLine:

python -m ibeis.viz.interact.interact_matches --test-select_ith_match --show

Example

>>> # DISABLE_DOCTEST
>>> from ibeis.viz.interact.interact_matches import *  # NOQA
>>> self = testdata_match_interact(mx=1)
>>> pt.show_if_requested()
set_callbacks()[source]
show_coverage(dodraw=True)[source]

CommandLine:

python -m ibeis.viz.interact.interact_matches --test-show_coverage --show
python -m ibeis.viz.interact.interact_matches --test-show_coverage

Example

>>> # DISABLE_DOCTEST
>>> from ibeis.viz.interact.interact_matches import *  # NOQA
>>> self = testdata_match_interact(mx=1)
>>> self.show_coverage(dodraw=False)
>>> pt.show_if_requested()
show_each_chip()[source]
show_each_dstncvs_chip(dodraw=True)[source]

CommandLine:

python -m ibeis.viz.interact.interact_matches --test-show_each_dstncvs_chip --show

Example

>>> # DISABLE_DOCTEST
>>> from ibeis.viz.interact.interact_matches import *  # NOQA
>>> self = testdata_match_interact(mx=1)
>>> self.show_each_dstncvs_chip(dodraw=False)
>>> pt.show_if_requested()
show_each_fgweight_chip()[source]
show_each_probchip()[source]
sv_view(dodraw=True)[source]

spatial verification view

toggle_homog()[source]
toggle_samefig()[source]
toggle_vert()[source]
ibeis.viz.interact.interact_matches.testdata_match_interact(**kwargs)[source]

CommandLine:

python -m ibeis.viz.interact.interact_matches --test-testdata_match_interact --show --db PZ_MTEST --qaid 3

Example

>>> # VIZ_DOCTEST
>>> from ibeis.viz.interact.interact_matches import *  # NOQA
>>> import plottool as pt
>>> kwargs = {}
>>> self = testdata_match_interact(**kwargs)
>>> pt.show_if_requested()

ibeis.viz.interact.interact_name module

Matplotlib interface for name interactions. Allows for relatively fine grained control of splitting and merging.

CommandLine:

python -m ibeis.viz.interact.interact_name --test-ishow_name --show
python -m ibeis.viz.interact.interact_name --test-testsdata_match_verification --show --db PZ_MTEST --aid1 1 --aid2 30
python -m ibeis.viz.interact.interact_name --test-testsdata_match_verification --show --db PZ_MTEST --aid1 30 --aid2 32
class ibeis.viz.interact.interact_name.MatchVerificationInteraction(ibs, aid1, aid2, update_callback=None, backend_callback=None, dodraw=True, max_cols=3, **kwargs)[source]

Bases: plottool.abstract_interaction.AbstractInteraction

close_(event=None)[source]
dismiss_all(event=None)[source]

All unknown annotations are given DIFFERENT new names

figure_clicked(event=None)[source]
get_non_rotating_columns(rowx)[source]
get_other_nids()[source]
get_rotating_columns(rowx)[source]
get_row_aids_list()[source]

Args:

Returns:row_aids_list
Return type:list

CommandLine:

python -m ibeis.viz.interact.interact_name --test-get_row_aids_list

CommandLine:

python -m ibeis.viz.interact.interact_name --test-get_row_aids_list
python -m ibeis.viz.interact.interact_name --test-get_row_aids_list --aid1 2 --aid2 3
# Merge case
python -m ibeis.viz.interact.interact_name --test-get_row_aids_list --db PZ_MTEST --aid1 1 --aid2 30
# Split case
python -m ibeis.viz.interact.interact_name --test-get_row_aids_list --db PZ_MTEST --aid1 30 --aid2 32

Example

>>> # DISABLE_DOCTEST
>>> from ibeis.viz.interact.interact_name import *  # NOQA
>>> # build test data
>>> self = testsdata_match_verification('PZ_MTEST', 30, 32)
>>> # execute function
>>> row_aids_list = self.get_row_aids_list()
>>> # verify results
>>> result = str(row_aids_list)
>>> print(result)
>>> ut.quit_if_noshow()
>>> self.show_page()
>>> ut.show_if_requested()
infer_data()[source]

Initialize data related to the input aids

mark_annotation_as_new_name(aid, event=None)[source]
merge_all_into_nid(nid, event=None)[source]

All the annotations are given nid

merge_nonjunk_into_new_name(event=None)[source]

All nonjunk annotations are given the SAME new name

on_close(event=None)[source]
on_key_press(event=None)[source]
plot_chip(aid, nRows, nCols, px, fulldraw=True, **kwargs)[source]

Plots an individual chip in a subaxis

prepare_page(fulldraw=True)[source]
rename_annotation(aid, nid, event=None)[source]
reset_all_names(event=None)[source]
review(event=None)[source]
rotate_row(event=None, rowx=None)[source]

shows the next few annotations in this row (implicitly rotates the row’s columns the rows columns)

show_hud()[source]

Creates heads up display

button bar on bottom and title string

Example

>>> # DISABLE_DOCTEST
>>> from ibeis.viz.interact.interact_name import *  # NOQA
>>> # build test data
>>> self = testsdata_match_verification('PZ_MTEST', 30, 32)
>>> # execute function
>>> result = self.show_hud()
>>> # verify results
>>> print(result)
>>> ut.quit_if_noshow():
>>> self.show_page()
>>> pt.show_if_requested()
show_page(bring_to_front=False, onlyrows=None, fulldraw=True)[source]

Plots all subaxes on a page

onlyrows is a hack to only draw a subset of the data again

unname_all(event=None)[source]
unname_annotation(aid, event=None)[source]
ibeis.viz.interact.interact_name.build_name_context_options(ibs, nids)[source]
ibeis.viz.interact.interact_name.ishow_name(ibs, nid, sel_aids=[], select_aid_callback=None, fnum=5, dodraw=True, **kwargs)[source]
Parameters:
  • ibs (IBEISController) – ibeis controller object
  • nid
  • sel_aids (list) –
  • select_aid_callback (None) –
  • fnum (int) – figure number

CommandLine:

python -m ibeis.viz.interact.interact_name --test-ishow_name --show

Example

>>> # DISABLE_DOCTEST
>>> from ibeis.viz.interact.interact_name import *  # NOQA
>>> import ibeis
>>> # build test data
>>> ibs = ibeis.opendb('testdb1')
>>> nid = ut.get_argval('--nid', int, default=1)
>>> sel_aids = []
>>> select_aid_callback = None
>>> fnum = 5
>>> dodraw = ut.show_was_requested()
>>> # execute function
>>> result = ishow_name(ibs, nid, sel_aids, select_aid_callback, fnum, dodraw)
>>> # verify results
>>> pt.show_if_requested()
>>> print(result)
ibeis.viz.interact.interact_name.testsdata_match_verification(defaultdb='testdb1', aid1=1, aid2=2)[source]

CommandLine:

main.py --imgsetid 2
main.py --imgsetid 13 --db PZ_MUGU_19

CommandLine:

python -m ibeis.viz.interact.interact_name --test-testsdata_match_verification --show
python -m ibeis.viz.interact.interact_name --test-testsdata_match_verification --aid1 2 --aid2 3 --show

# Merge case
python -m ibeis.viz.interact.interact_name --test-testsdata_match_verification --show --db PZ_MTEST --aid1 1 --aid2 30

# Split case
python -m ibeis.viz.interact.interact_name --test-testsdata_match_verification --show --db PZ_MTEST --aid1 30 --aid2 32

Example

>>> # ENABLE_DOCTEST
>>> from ibeis.viz.interact.interact_name import *  # NOQA
>>> self = testsdata_match_verification()
>>> # verify results
>>> ut.quit_if_noshow()
>>> self.show_page()
>>> ut.show_if_requested()

ibeis.viz.interact.interact_qres module

class ibeis.viz.interact.interact_qres.InteractQres(ibs, cm, analysis=False, qreq_=None, **kwargs)[source]

Bases: plottool.abstract_interaction.AbstractInteraction

Displays query chip, groundtruth matches, and top matches

THERE IS A DIFFERENCE BETWEEN THIS AND MATCH INTERACTION. THIS IS FOR DISPLAYING THE RANKED LIST MATCH INTERACTION IS LOOKING AT A SINGLE PAIR

SeeAlso:
#interact_matches.MatchInteraction2 #ibeis.viz.interact.MatchInteraction
on_click_inside(event, ax)[source]
on_click_outside(event)[source]
plot(*args, **kwargs)[source]
show_matches_to_aid(aid2)[source]
show_sver_process_to_aid(aid2)[source]
ibeis.viz.interact.interact_qres.ishow_analysis(ibs, cm, qreq_=None, **kwargs)[source]

CommandLine:

python -m ibeis.viz.interact.interact_qres --test-ishow_analysis:0 --show
python -m ibeis.viz.interact.interact_qres --test-ishow_analysis:1 --show
Example0:
>>> # SLOW_DOCTEST
>>> from ibeis.viz.interact.interact_qres import *  # NOQA
>>> import ibeis
>>> cm, qreq_ = ibeis.testdata_cm()
>>> fig = ishow_analysis(qreq_.ibs, cm, qreq_=qreq_)
>>> pt.show_if_requested()
Example1:
>>> # DISABLE_DOCTEST
>>> from ibeis.viz.interact.interact_qres import *  # NOQA
>>> import ibeis
>>> cm, qreq_ = ibeis.testdata_cm()
>>> fig = ishow_analysis(qreq_.ibs, cm, qreq_=qreq_)
>>> pt.show_if_requested()

ibeis.viz.interact.interact_qres2 module

class ibeis.viz.interact.interact_qres2.Interact_QueryResult(ibs, qaid2_qres, **kwargs)[source]

Bases: object

append_button(text, divider=None, rect=None, callback=None, size=u'9%', **kwargs)[source]

Adds a button to the current page

bring_to_front()[source]
clean_scope()[source]

Removes any widgets saved in the interaction scope

draw()[source]
get_default_params()[source]
init_candidates(qaid2_qres)[source]
make_hud()[source]

Creates heads up display

match_reviewed(event)[source]
next_page(event)[source]
on_clicked_match(aid1, aid2)[source]

HELPER: Executed when a result ANNOTATION is clicked

on_ctrl_clicked_match(aid1, aid2)[source]

HELPER: Executed when a result ANNOTATION is control-clicked

on_figure_clicked(event)[source]

Clicked a match between query annotation and result annotation: parses the type of click it was and execute the correct visualiztion

plot_annotationmatch(index, draw=True, make_buttons=True)[source]
prepare_page(pagenum)[source]

Gets indexes for the pagenum ready to be displayed

prev_page(event)[source]
select_candidate_match(index)[source]
show()[source]
show_page(pagenum=None)[source]

Displays a page of matches

toggle_kw(event, keyword=None)[source]
ibeis.viz.interact.interact_qres2.default_interact_qres_params()[source]

ibeis.viz.interact.interact_query_decision module

class ibeis.viz.interact.interact_query_decision.QueryVerificationInteraction(qreq_, cm, comp_aids, suggest_aids, progress_current=None, progress_total=None, update_callback=None, backend_callback=None, name_decision_callback=None, **kwargs)[source]

Bases: plottool.abstract_interaction.AbstractInteraction

CommandLine:

python -m ibeis.viz.interact.interact_query_decision --test-QueryVerificationInteraction --show
python -m ibeis --imgsetid 2 --inc-query --yes

Example

>>> # DISABLE_DOCTEST
>>> from ibeis.viz.interact.interact_query_decision import *  # NOQA
>>> import ibeis
>>> cm, qreq_ = ibeis.testdata_cm()
>>> comp_aids = cm.get_top_aids(NUM_TOP)
>>> suggest_aids = comp_aids[0:1]
>>> qvi = QueryVerificationInteraction(
>>>     qreq_, cm, comp_aids, suggest_aids, progress_current=42, progress_total=1337)
>>> ut.show_if_requested()
confirm(event=None)[source]

CommandLine:

python -m ibeis.viz.interact.interact_query_decision --test-confirm

Example

>>> # DISABLE_DOCTEST
>>> from ibeis.viz.interact.interact_query_decision import *  # NOQA
>>> import utool as ut
>>> # build test data
>>> import ibeis
>>> ibs = ibeis.opendb('testdb1')
>>> self = ibs
>>> self.ibs = ibs
>>> selected_aids = ut.get_list_column(ibs.get_name_aids(ibs.get_valid_nids()), 0)
>>> comfirm_res = 'jeff'
>>> # execute function
>>> #result = self.confirm(event)
>>> # verify results
>>> #print(result)
examine(aid, event=None)[source]
figure_clicked(event=None)[source]
infer_data()[source]

Initialize data related to the input aids

plot_chip(aid, nRows, nCols, px, **kwargs)[source]

Plots an individual chip in a subaxis

prepare_page()[source]
quit(event=None)[source]
select(aid, event=None)[source]
select_junk(event=None)[source]
select_none(event=None)[source]
show_hud()[source]

Creates heads up display

show_page(bring_to_front=False)[source]

Plots all subaxes on a page

ibeis.viz.interact.interact_sver module

ibeis.viz.interact.interact_sver.ishow_sver(ibs, aid1, aid2, chipmatch_FILT=None, aid2_svtup=None, fnum=None, **kwargs)[source]

Module contents

ibeis.viz.interact.reassign_submodule_attributes(verbose=True)[source]

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

ibeis.viz.interact.reload_subs(verbose=True)[source]

Reloads ibeis.viz.interact and submodules

ibeis.viz.interact.rrrr(verbose=True)

Reloads ibeis.viz.interact and submodules