def load_published(infr): """ Downloads, caches, and loads pre-trained verifiers. This is the default action. """ from ibeis.algo.verif import deploy ibs = infr.ibs species = ibs.get_primary_database_species(infr.aids) infr.verifiers = deploy.Deployer().load_published(ibs, species)
def load_latest_classifiers(infr, dpath): from ibeis.algo.verif import deploy task_clf_fpaths = deploy.Deployer(dpath).find_latest_local() classifiers = {} for task_key, fpath in task_clf_fpaths.items(): clf_info = ut.load_data(fpath) assert clf_info['metadata']['task_key'] == task_key, ( 'bad saved clf at fpath={}'.format(fpath)) classifiers[task_key] = clf_info infr.verifiers = classifiers
def load_published(infr): """ Downloads, caches, and loads pre-trained verifiers. This is the default action. """ from ibeis.algo.verif import deploy ibs = infr.ibs species = ibs.get_primary_database_species(infr.aids) infr.print('Loading task_thresh for species: %r' % (species, )) assert species in infr.task_thresh_dict infr.task_thresh = infr.task_thresh_dict[species] infr.print('Loading verifiers for species: %r' % (species, )) infr.verifiers = deploy.Deployer().load_published(ibs, species)
def __init__(verif, pblm, task_key, clf_key, data_key): verif.pblm = pblm verif.task_key = task_key verif.clf_key = clf_key verif.data_key = data_key verif.metadata = { 'task_key': task_key, 'clf_key': clf_key, } # Make an ensemble of the evaluation classifiers from ibeis.algo.verif import deploy deployer = deploy.Deployer(pblm=verif.pblm) verif.ensemble = deployer._make_ensemble_verifier( verif.task_key, verif.clf_key, verif.data_key) verif.class_names = verif.ensemble.class_names