Esempio n. 1
0
def TEST_INTERACT(ibs):

    valid_gids = ibs.get_valid_gids()
    valid_aids = ibs.get_valid_aids()

    print('''
    * len(valid_aids) = %r
    * len(valid_gids) = %r
    ''' % (len(valid_aids), len(valid_gids)))
    assert len(valid_gids) > 0, 'database images cannot be empty for test'
    gindex = int(utool.get_arg('--gx', default=0))
    cindex = int(utool.get_arg('--rx', default=0))
    gid = valid_gids[gindex]
    aid_list = ibs.get_image_aids(gid)
    aid = aid_list[cindex]

    #----------------------
    #print('Show Image')
    aids = aid_list[1:3]
    interact.ishow_image(ibs, gid, aids=aids, fnum=1)

    #----------------------
    #print('Show Chip')
    interact.ishow_chip(ibs, aid, in_image=False, fnum=2)
    #interact.ishow_chip(ibs, aid, in_image=True, fnum=3)

    #----------------------
    #print('Show Query')
    #aid1 = aid
    #qcid2_qres = ibs.query_all([aid1])
    #qres = qcid2_qres.values()[0]
    #top_cids = qres.get_top_cids(ibs)
    #assert len(top_cids) > 0, 'there does not seem to be results'
    #cid2 = top_cids[0]  # 294
    #viz.show_matches(ibs, qres, cid2, fnum=4)

    #viz.show_qres(ibs, qres, fnum=5)
    return locals()
Esempio n. 2
0
def TEST_INTERACT(ibs):

    valid_gids = ibs.get_valid_gids()
    valid_aids = ibs.get_valid_aids()

    print('''
    * len(valid_aids) = %r
    * len(valid_gids) = %r
    ''' % (len(valid_aids), len(valid_gids)))
    assert len(valid_gids) > 0, 'database images cannot be empty for test'
    gindex = int(utool.get_argval('--gx', default=0))
    cindex = int(utool.get_argval('--rx', default=0))
    gid = valid_gids[gindex]
    aid_list = ibs.get_image_aids(gid)
    aid = aid_list[cindex]

    #----------------------
    #print('Show Image')
    aids = aid_list[1:3]
    interact.ishow_image(ibs, gid, aids=aids, fnum=1)

    #----------------------
    #print('Show Chip')
    interact.ishow_chip(ibs, aid, in_image=False, fnum=2)
    #interact.ishow_chip(ibs, aid, in_image=True, fnum=3)

    #----------------------
    #print('Show Query')
    #aid1 = aid
    #qcid2_qres = ibs._query_chips4([qaid1], valid_aids)
    #qres = qcid2_qres.values()[0]
    #top_cids = qres.get_top_cids(ibs)
    #assert len(top_cids) > 0, 'there does not seem to be results'
    #cid2 = top_cids[0]  # 294
    #viz.show_matches(ibs, qres, cid2, fnum=4)

    #viz.show_qres(ibs, qres, fnum=5)
    return locals()
Esempio n. 3
0
def show_aids(ibs, qaid_list):
    from ibeis.viz import interact
    for aid in qaid_list:
        interact.ishow_chip(ibs, aid, fnum=df2.next_fnum())
Esempio n. 4
0
def show_aids(ibs, qaid_list):
    for aid in qaid_list:
        interact.ishow_chip(ibs, aid, fnum=df2.next_fnum())
Esempio n. 5
0
 def show_annotation(back, aid, show_image=False, **kwargs):
     interact.ishow_chip(back.ibs, aid, **kwargs)
     if show_image:
         gid = back.ibs.get_annot_gids(aid)
         interact.ishow_image(back.ibs, gid, sel_aids=[aid])
Esempio n. 6
0
def show_aids(ibs, qaid_list):
    for aid in qaid_list:
        interact.ishow_chip(ibs, aid, fnum=df2.next_fnum())