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
-
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)
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_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()
-
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()
-
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_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()
-
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
-
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()
-
merge_nonjunk_into_new_name
(event=None)[source]¶ All nonjunk annotations are given the SAME new name
-
plot_chip
(aid, nRows, nCols, px, fulldraw=True, **kwargs)[source]¶ Plots an individual chip in a subaxis
-
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()
-
-
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
-
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
Adds a button to the current page
-
on_ctrl_clicked_match
(aid1, aid2)[source]¶ HELPER: Executed when a result ANNOTATION is control-clicked
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)
-