def testdata_dataframe(cfgdict=None, **kwargs): from ibeis.algo.hots.smk import smk_debug ibs, taids, daids, qaids, qreq_ = smk_debug.testdata_ibeis2(cfgdict=cfgdict, **kwargs) print('[smk_debug] testdata_dataframe') # Pandas Annotation Dataframe annots_df = smk_repr.make_annot_df(ibs) nWords = qreq_.qparams.nWords return ibs, annots_df, taids, daids, qaids, qreq_, nWords
def testdata_dataframe(cfgdict=None, **kwargs): from ibeis.algo.hots.smk import smk_debug ibs, taids, daids, qaids, qreq_ = smk_debug.testdata_ibeis2( cfgdict=cfgdict, **kwargs) print('[smk_debug] testdata_dataframe') # Pandas Annotation Dataframe annots_df = smk_repr.make_annot_df(ibs) nWords = qreq_.qparams.nWords return ibs, annots_df, taids, daids, qaids, qreq_, nWords
def execute_smk_L5(qreq_): """ ibeis query interface Example: >>> from ibeis.algo.hots.smk.smk_match import * # NOQA >>> from ibeis.algo.hots.smk import smk_match >>> from ibeis.algo.hots.smk import smk_debug >>> ibs, annots_df, daids, qaids, invindex, qreq_ = smk_debug.testdata_internals_full() >>> qaid2_scores, qaid2_chipmatch = smk_match.execute_smk_L5(qreq_) Dev:: from ibeis.algo.hots import pipeline filt2_meta = {} # Get both spatial verified and not qaid2_chipmatch_FILT_ = qaid2_chipmatch qaid2_chipmatch_SVER_ = pipeline.spatial_verification(qaid2_chipmatch_FILT_, qreq_) qaid2_qres_FILT_ = pipeline.chipmatch_to_resdict(qaid2_chipmatch_FILT_, filt2_meta, qreq_) qaid2_qres_SVER_ = pipeline.chipmatch_to_resdict(qaid2_chipmatch_SVER_, filt2_meta, qreq_) qres_FILT = qaid2_qres_FILT_[qaids[0]] qres_SVER = qaid2_qres_SVER_[qaids[0]] fig1 = qres_FILT.show_top(ibs, fnum=1, figtitle='filt') fig2 = qres_SVER.show_top(ibs, fnum=2, figtitle='sver') fig1.show() fig2.show() CommandLine:: python -m memory_profiler dev.py --db PZ_Mothers -t smk2 --allgt --index 0 python dev.py -t smk2 --allgt --db GZ_ALL python dev.py -t smk2 --allgt --db GZ_ALL python dev.py -t smk2 --allgt --db GZ_ALL --index 2:10 --vf --va python dev.py -t smk2 --allgt --db GZ_ALL --index 2:10 --vf --va --print-cfgstr python dev.py -t smk2 --allgt --db GZ_ALL --index 2:20 --vf --va python dev.py -t smk2 --allgt --db GZ_ALL --noqcache --index 2:20 --va --vf python dev.py -t smk2 --allgt --db PZ_Master0 && python dev.py -t smk3 --allgt --db PZ_Master0 python dev.py -t smk2 --allgt --db PZ_Master0 --index 2:10 --va python dev.py -t smk2 --allgt --db PZ_Mothers --index 20:30 python dev.py -t smk2 --allgt --db PZ_Mothers --noqcache --index 18:20 --super-strict --va python dev.py -t smk2 --db PZ_Master0 --qaid 7199 --va --quality --vf --noqcache python dev.py -t smk3 --allgt --db GZ_ALL --index 2:10 --vf --va python dev.py -t smk5 --allgt --db PZ_Master0 --noqcache ; python dev.py -t smk5 --allgt --db GZ_ALL --noqcache python dev.py -t smkd --allgt --db PZ_Mothers --index 1:3 --va --quality --vf --noqcache python dev.py -t smk_8k --allgt --db PZ_Mothers --index 20:30 --va --vf python dev.py -t smk_8k --allgt --db PZ_Mothers --index 20:30 --echo-hardcase python dev.py -t smk_8k --allgt --db PZ_Mothers --index 20:30 --vh python dev.py -t smk_8k_compare --allgt --db PZ_Mothers --index 20:30 --view-hard """ memtrack = ut.MemoryTracker('[SMK ENTRY]') qaids = qreq_.get_external_qaids() ibs = qreq_.ibs # Params qparams = qreq_.qparams memtrack.report('[SMK PREINIT]') # Build ~~Pandas~~ dataframe (or maybe not) annots_df = smk_repr.make_annot_df(ibs) words, invindex = prepare_qreq(qreq_, annots_df, memtrack) withinfo = True # Execute smk for each query memtrack.report('[SMK QREQ INITIALIZED]') print('[SMK_MEM] invindex is using ' + ut.get_object_size_str(invindex)) print('[SMK_MEM] qreq_ is using ' + ut.get_object_size_str(qreq_)) if ut.DEBUG2: from ibeis.algo.hots.smk import smk_debug smk_debug.invindex_dbgstr(invindex) qaid2_scores, qaid2_chipmatch = execute_smk_L4(annots_df, qaids, invindex, qparams, withinfo) memtrack.report('[SMK QREQ FINISHED]') return qaid2_scores, qaid2_chipmatch