• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python utool.inject函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中utool.inject函数的典型用法代码示例。如果您正苦于以下问题:Python inject函数的具体用法?Python inject怎么用?Python inject使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了inject函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: plot_keypoint_scales

# flake8: noqa
from __future__ import absolute_import, division, print_function
import numpy as np
from plottool import draw_func2 as df2
from vtool import keypoint as ktool
from utool import util_latex
from ibeis.model import Config
import utool
print, print_, printDBG, rrr, profile = utool.inject(__name__, '[devport]', DEBUG=False)


def plot_keypoint_scales(hs, fnum=1):
    print('[dev] plot_keypoint_scales()')
    cx2_kpts = hs.feats.cx2_kpts
    if len(cx2_kpts) == 0:
        hs.refresh_features()
        cx2_kpts = hs.feats.cx2_kpts
    cx2_nFeats = map(len, cx2_kpts)
    kpts = np.vstack(cx2_kpts)
    print('[dev] --- LaTeX --- ')
    _printopts = np.get_printoptions()
    np.set_printoptions(precision=3)
    print(util_latex.latex_scalar(r'\# keypoints, ', len(kpts)))
    print(util_latex.latex_mystats(r'\# keypoints per image', cx2_nFeats))
    scales = ktool.get_scales(kpts)
    scales = np.array(sorted(scales))
    print(util_latex.latex_mystats(r'keypoint scale', scales))
    np.set_printoptions(**_printopts)
    print('[dev] ---/LaTeX --- ')
    #
    df2.figure(fnum=fnum, docla=True, title='sorted scales')
开发者ID:Erotemic,项目名称:ibeis,代码行数:31,代码来源:dev_port.py


示例2: reload_subs

### __init__.py ###
# flake8: noqa
from __future__ import absolute_import, division, print_function

import utool as ut

ut.noinject(__name__, "[ibeis.control.__init__]", DEBUG=False)


from ibeis.control import DB_SCHEMA
from ibeis.control import IBEISControl
from ibeis.control import _sql_helpers
from ibeis.control import accessor_decors
import utool

print, print_, printDBG, rrr, profile = utool.inject(__name__, "[ibeis.control]")


def reload_subs(verbose=True):
    """ Reloads ibeis.control and submodules """
    rrr(verbose=verbose)
    getattr(DB_SCHEMA, "rrr", lambda verbose: None)(verbose=verbose)
    getattr(IBEISControl, "rrr", lambda verbose: None)(verbose=verbose)
    getattr(SQLDatabaseControl, "rrr", lambda verbose: None)(verbose=verbose)
    getattr(_sql_helpers, "rrr", lambda verbose: None)(verbose=verbose)
    getattr(accessor_decors, "rrr", lambda verbose: None)(verbose=verbose)
    rrr(verbose=verbose)


rrrr = reload_subs
开发者ID:Erotemic,项目名称:ibeis,代码行数:30,代码来源:__init__.py


示例3: ColumnListTableView

# DEPRICATE?
from __future__ import absolute_import, division, print_function
from guitool.__PYQT__ import QtCore, QtGui
from guitool.__PYQT__.QtCore import Qt
from guitool.guitool_delegates import ComboDelegate, ButtonDelegate
from guitool import qtype
from six.moves import range, map
import utool

(print, print_, printDBG, rrr, profile) = utool.inject(__name__, "[guitbls]", DEBUG=False)


class ColumnListTableView(QtGui.QTableView):
    """ Table View for an AbstractItemModel """

    def __init__(view, *args, **kwargs):
        super(ColumnListTableView, view).__init__(*args, **kwargs)
        view.setSortingEnabled(True)
        view.vertical_header = view.verticalHeader()
        view.vertical_header.setVisible(True)
        # view.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
        view.resizeColumnsToContents()

    @QtCore.pyqtSlot()
    def cellButtonClicked(self):
        print(self.sender())
        print(self.sender().text())


class ColumnListItemModel(QtCore.QAbstractTableModel):
    """ Item model for displaying a list of columns """
开发者ID:Erotemic,项目名称:guitool,代码行数:31,代码来源:guitool_tables.py


示例4: default_interact_qres_params

from six.moves import range
import functools
import six
from collections import OrderedDict as odict
import utool as ut
import vtool as vt
from plottool import interact_helpers as ih
from plottool import plot_helpers as ph
import matplotlib as mpl
import plottool.draw_func2 as df2
from ibeis import ibsfuncs
from ibeis.viz import viz_helpers as vh
from ibeis.viz import viz_matches
from ibeis.viz.interact.interact_sver import ishow_sver

(print, print_, printDBG, rrr, profile) = ut.inject(
    __name__, '[interact_qres2]')


BREAK_MATCH_PREF = 'break match'
NEW_MATCH_PREF   = 'new match'
RENAME1_PREF     = 'rename query: '
RENAME2_PREF     = 'rename result: '


def default_interact_qres_params():
    params = {
        'fnum'               : 512,
        'nPerPage'           : 6,
        'ranks_lt'           : 3,
        'on_change_callback' : None
    }
开发者ID:heroinlin,项目名称:ibeis,代码行数:32,代码来源:interact_qres2.py


示例5: TEST_GUI_ALL

#!/usr/bin/env python2.7
# TODO: ADD COPYRIGHT TAG
from __future__ import absolute_import, division, print_function
import multiprocessing
import utool
import numpy as np
from ibeis.dev import sysres
from vtool.tests import grabdata
import ibeis
print, print_, printDBG, rrr, profile = utool.inject(__name__, '[TEST_GUI_ALL]')
np.tau = 2 * np.pi


def TEST_GUI_ALL(ibs, back, gpath_list):
    """
    Creates a new database
    Adds test images
    Creates dummy ANNOTATIONS
    Selects things
    """
    # DELETE OLD
    print('[TEST] DELETE_OLD_DATABASE')
    work_dir   = sysres.get_workdir()
    new_dbname = 'testdb_guiall'
    new_dbdir = utool.truepath(utool.join(work_dir, new_dbname))
    ibs_dbdir = utool.truepath(ibs.dbdir)
    msg = 'must start in different dir new_dbdir=%r != ibs_dbdir=%r,' % (new_dbdir, ibs_dbdir)
    assert new_dbdir != ibs_dbdir, msg
    print('passed: ' + msg)
    utool.delete(new_dbdir, ignore_errors=False)
    #
开发者ID:byteyoo,项目名称:ibeis,代码行数:31,代码来源:test_gui_all.py


示例6: build_name_context_options

"""
from __future__ import absolute_import, division, print_function
import numpy as np
import utool as ut
from six.moves import zip
from plottool import interact_helpers as ih
import functools
import plottool as pt
from ibeis import viz
from ibeis import constants as const
from ibeis.viz import viz_helpers as vh
from ibeis.other import ibsfuncs
from ibeis.viz import viz_chip
from plottool.abstract_interaction import AbstractInteraction
(print, print_, printDBG, rrr, profile) = ut.inject(__name__, '[interact_name]', DEBUG=False)


#==========================
# Name Interaction
#==========================

MAX_COLS = 3


def build_name_context_options(ibs, nids):
    callback_list = []
    from ibeis.viz import viz_graph
    callback_list.append(
        ('Interact name graph', functools.partial(viz_graph.make_name_graph_interaction, ibs, nids=nids)),
    )
开发者ID:Erotemic,项目名称:ibeis,代码行数:30,代码来源:interact_name.py


示例7:

from __future__ import absolute_import, division, print_function
import utool
from ibeis import constants
#from itertools import izip
(print, print_, printDBG, rrr, profile) = utool.inject(__name__, '[headers]', DEBUG=False)

ENCOUNTER_TABLE  = 'encounters'
IMAGE_TABLE      = 'images'
IMAGE_GRID       = 'image_grid'
ANNOTATION_TABLE = 'annotations'
NAME_TABLE       = 'names'
NAMES_TREE       = 'names_tree'
QRES_TABLE       = 'qres'
THUMB_TABLE      = 'thumbs'

#-----------------
# Define the tables
#-----------------

# available tables
TABLENAME_LIST = [
    IMAGE_TABLE,
    ANNOTATION_TABLE,
    #NAME_TABLE,
    ENCOUNTER_TABLE,
    IMAGE_GRID,
    THUMB_TABLE,
    NAMES_TREE
]

# table nice names
开发者ID:byteyoo,项目名称:ibeis,代码行数:31,代码来源:guiheaders.py


示例8:

import plottool as pt
import ibeis
if __name__ == '__main__':
    multiprocessing.freeze_support()
    ibeis._preload()
    #from ibeis.all_imports import *  # NOQA
#utool.util_importer.dynamic_import(__name__, ('_devcmds_ibeis', None),
#                                   developing=True)
from ibeis._devcmds_ibeis import *  # NOQA
# IBEIS
from ibeis.init import main_helpers  # NOQA
from ibeis.other import dbinfo  # NOQA
from ibeis.expt import experiment_configs  # NOQA
from ibeis.expt import harness  # NOQA
from ibeis import params  # NOQA
print, print_, printDBG, rrr, profile = utool.inject(__name__, '[dev]')


#------------------
# DEV DEVELOPMENT
#------------------
# This is where you write all of the functions that will become pristine
# and then go in _devcmds_ibeis.py


"""
./dev.py -e print_results --db PZ_Master1 -a varysize_pzm:dper_name=[1,2],dsize=1500 -t candidacy_k:K=1 --intersect_hack
./dev.py -e draw_rank_cdf -t baseline -a baseline --show --db PZ_Master1
./dev.py -e get_dbinfo --db PZ_Master1 --aid_list=baseline
./dev.py -e get_dbinfo --db PZ_MTEST
./dev.py -e get_dbinfo --db PZ_Master1 --aid_list=baseline --hackshow-unixtime --show
开发者ID:Erotemic,项目名称:ibeis,代码行数:31,代码来源:dev.py


示例9: timeit2

#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# TODO: ADD COPYRIGHT TAG
from __future__ import absolute_import, division, print_function
# Python
import multiprocessing
# Tools
import utool
from functools import partial
print, print_, printDBG, rrr, profile = utool.inject(__name__,
                                                     '[TIME_GEN_PREPROC]')


def timeit2(stmt, setup='', number=1000):
    import timeit
    stmt_ = utool.unindent(stmt)
    setup_ = utool.unindent(setup)
    print('----------')
    print('TIMEIT: \n' + stmt_)
    try:
        total_time = timeit.timeit(stmt_, setup_, number=number)
    except Exception as ex:
        utool.printex(ex, iswarning=False)
        raise
    print(' * timed: %r seconds' % (total_time))


@profile
def TIME_GEN_PREPROC_IMG(ibs):
    from ibeis.algo.preproc.preproc_image import add_images_params_gen
    print('[TIME_GEN_PREPROC_IMG]')
开发者ID:Erotemic,项目名称:ibeis,代码行数:31,代码来源:time_generate_preproc_image.py


示例10: fix_compname_configs

# developer convenience functions for ibs
from __future__ import absolute_import, division, print_function
import utool
from six.moves import zip
from itertools import izip
from ibeis import constants
from ibeis.dev import ibsfuncs

# Inject utool functions
(print, print_, printDBG, rrr, profile) = utool.inject(__name__, '[duct_tape]', DEBUG=False)


def fix_compname_configs(ibs):
    """ duct tape to keep version in check """
    #ibs.MANUAL_CONFIG_SUFFIX = '_MANUAL_'  #+ utool.get_computer_name()
    #ibs.MANUAL_CONFIGID = ibs.add_config(ibs.MANUAL_CONFIG_SUFFIX)
    # We need to fix the manual config suffix to not use computer names anymore

    configid_list = ibs.get_valid_configids()
    cfgsuffix_list = ibs.get_config_suffixes(configid_list)

    ibs.MANUAL_CONFIG_SUFFIX = 'MANUAL_CONFIG'
    ibs.MANUAL_CONFIGID = ibs.add_config(ibs.MANUAL_CONFIG_SUFFIX)

    for rowid, suffix in filter(lambda tup:
                                tup[1].startswith('_MANUAL_'),
                                izip(configid_list, cfgsuffix_list)):
        print("EVALUATING: %r, %r" % (rowid, suffix))
        # Fix the tables with bad config_rowids
        ibs.db.executeone(
            '''
开发者ID:byteyoo,项目名称:ibeis,代码行数:31,代码来源:duct_tape.py


示例11: show_chip

from __future__ import absolute_import, division, print_function
import utool
import plottool.draw_func2 as df2
from plottool.viz_keypoints import _annotate_kpts
from plottool import viz_image2
from . import viz_helpers as vh
from . import viz_image
(print, print_, printDBG, rrr, profile) = utool.inject(__name__, '[viz_chip]',
                                                       DEBUG=False)


@utool.indent_func
def show_chip(ibs, aid, in_image=False, annote=True, **kwargs):
    """ Driver function to show chips """
    printDBG('[viz] show_chip()')
    vh.ibsfuncs.assert_valid_aids(ibs, (aid,))
    #utool.embed()
    # Get chip
    chip = vh.get_chips(ibs, aid, in_image, **kwargs)
    # Create chip title
    chip_text = vh.get_annot_texts(ibs, [aid], **kwargs)[0]
    # Draw chip
    fig, ax = df2.imshow(chip, **kwargs)
    # Populate axis user data
    vh.set_ibsdat(ax, 'viztype', 'chip')
    vh.set_ibsdat(ax, 'aid', aid)
    if annote and not kwargs.get('nokpts', False):
        # Get and draw keypoints
        kpts = vh.get_kpts(ibs, aid, in_image, **kwargs)
        _annotate_kpts(kpts, **kwargs)
    df2.upperleft_text(chip_text, color=kwargs.get('text_color', None))
开发者ID:byteyoo,项目名称:ibeis,代码行数:31,代码来源:viz_chip.py


示例12: TEST_HOTS_SPLITTREE

#!/usr/bin/env python2.7
# TODO: ADD COPYRIGHT TAG
from __future__ import absolute_import, division, print_function
# Python
import multiprocessing
# Tools
import utool
print, print_, printDBG, rrr, profile = utool.inject(__name__, '[TEST_HOTS_SPLITTREE]')


def TEST_HOTS_SPLITTREE(ibs):
    from ibeis.model.hots.hots_nn_index import NNSplitIndex
    num_forests = 8
    daid_list = ibs.get_valid_aids()
    num_neighbors = 3
    qfx2_desc = ibs.get_annot_desc(daid_list[2])

    split_index = NNSplitIndex(ibs, daid_list, num_forests=num_forests)

    #nid_list  = ibs.get_annot_nids(aid_list)
    ##flag_list = ibs.get_annot_exemplar_flag(aid_list)
    #nid2_aids = utool.group_items(aid_list, nid_list)
    #key_list = nid2_aids.keys()
    #val_list = nid2_aids.values()
    #isunknown_list = ibs.is_nid_unknown(key_list)

    #num_forests = 8
    ## Put one name per forest
    #forest_aids, overflow_aids = utool.sample_zip(val_list, num_forests, allow_overflow=True)

    #forest_indexes = []
开发者ID:byteyoo,项目名称:ibeis,代码行数:31,代码来源:test_hots_split_trees.py


示例13: plot_rank_stem

#flake8:noqa
from __future__ import absolute_import, division, print_function
from os.path import join
from plottool import draw_func2 as df2
import numpy as np
import os
import utool
print, print_, printDBG, rrr, profile = utool.inject(__name__, '[viz_allres]', DEBUG=False)
# Global variables
BROWSE = True
DUMP = False
FIGNUM = 1


def plot_rank_stem(allres, orgres_type='true'):
    print('[viz] plotting rank stem')
    # Visualize rankings with the stem plot
    ibs = allres.ibs
    title = orgres_type + 'rankings stem plot\n' + allres.title_suffix
    orgres = allres.__dict__[orgres_type]
    df2.figure(fnum=FIGNUM, doclf=True, title=title)
    x_data = orgres.qcxs
    y_data = orgres.ranks
    df2.draw_stems(x_data, y_data)
    slice_num = int(np.ceil(np.log10(len(orgres.qcxs))))
    df2.set_xticks(ibs.test_sample_cx[::slice_num])
    df2.set_xlabel('query chip indeX (qcx)')
    df2.set_ylabel('groundtruth chip ranks')
    #df2.set_yticks(list(seen_ranks))
    __dump_or_browse(allres.ibs, 'rankviz')
开发者ID:byteyoo,项目名称:ibeis,代码行数:30,代码来源:viz_allres.py


示例14: reload_subs

# flake8: noqa
from __future__ import absolute_import, division, print_function, unicode_literals
import utool as ut
ut.noinject(__name__, '[ibeis.algo.preproc.__init__]', DEBUG=False)

from ibeis.algo.preproc import preproc_chip
from ibeis.algo.preproc import preproc_detectimg
from ibeis.algo.preproc import preproc_encounter
from ibeis.algo.preproc import preproc_feat
from ibeis.algo.preproc import preproc_featweight
from ibeis.algo.preproc import preproc_image
from ibeis.algo.preproc import preproc_probchip
from ibeis.algo.preproc import preproc_residual
from ibeis.algo.preproc import preproc_rvec
import utool
print, print_, printDBG, rrr, profile = utool.inject(
    __name__, '[ibeis.algo.preproc]')


def reload_subs(verbose=True):
    """ Reloads ibeis.algo.preproc and submodules """
    rrr(verbose=verbose)
    def fbrrr(*args, **kwargs):
        """ fallback reload """
        pass
    #getattr(preproc_annot, 'rrr', fbrrr)(verbose=verbose)
    getattr(preproc_chip, 'rrr', fbrrr)(verbose=verbose)
    getattr(preproc_detectimg, 'rrr', fbrrr)(verbose=verbose)
    getattr(preproc_encounter, 'rrr', fbrrr)(verbose=verbose)
    getattr(preproc_feat, 'rrr', fbrrr)(verbose=verbose)
    getattr(preproc_featweight, 'rrr', fbrrr)(verbose=verbose)
    getattr(preproc_image, 'rrr', fbrrr)(verbose=verbose)
开发者ID:heroinlin,项目名称:ibeis,代码行数:32,代码来源:__init__.py


示例15: get_hsdb_image_gpaths

#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
"""
Converts an IBEIS database to a hotspotter db
"""
# TODO: ADD COPYRIGHT TAG
from __future__ import absolute_import, division, print_function
from six.moves import map
from os.path import join, relpath

# import ibeis
import utool as ut

print, print_, printDBG, rrr, profile = ut.inject(__name__, "[export_hsdb]")


def get_hsdb_image_gpaths(ibs, gid_list):
    r"""
    Args:
        ibs (IBEISController):  ibeis controller object
        gid_list (list):

    Returns:
        list: gpath_list

    CommandLine:
        python -m ibeis.dbio.export_hsdb --test-get_hsdb_image_gpaths

    Example:
        >>> # ENABLE_DOCTEST
        >>> from ibeis.dbio.export_hsdb import *  # NOQA
开发者ID:Erotemic,项目名称:ibeis,代码行数:31,代码来源:export_hsdb.py


示例16: import

# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import six  # NOQA
from ibeis import constants as const
from ibeis.control.accessor_decors import (adder, getter_1to1, ider)
import utool as ut
from ibeis.control.controller_inject import make_ibs_register_decorator
print, print_, printDBG, rrr, profile = ut.inject(__name__, '[manual_lbltype]')


CLASS_INJECT_KEY, register_ibs_method = make_ibs_register_decorator(__name__)


@register_ibs_method
@ider
def _get_all_known_lblannot_rowids(ibs, _lbltype):
    """
    Returns:
        list_ (list): all nids of known animals
        (does not include unknown names) """
    all_known_lblannot_rowids = ibs.db.get_all_rowids_where(const.LBLANNOT_TABLE, 'lbltype_rowid=?', (ibs.lbltype_ids[_lbltype],))
    return all_known_lblannot_rowids


@register_ibs_method
@adder
def add_lbltype(ibs, text_list, default_list):
    """ Adds a label type and its default value
    Should only be called at the begining of the program.
    """
    params_iter = zip(text_list, default_list)
开发者ID:Erotemic,项目名称:ibeis,代码行数:31,代码来源:manual_lbltype_funcs.py


示例17: get_testdata_dir

"""
DEPRICATE
"""
from __future__ import absolute_import, division, print_function
import utool
import six
from os.path import join, realpath
from itertools import cycle
from six.moves import range
print, print_, printDBG, rrr, profile = utool.inject(__name__, '[testdata]')


def get_testdata_dir(ensure=True, key='testdb1'):
    """
    Gets test img directory and downloads it if it doesn't exist
    """
    testdata_map = {
        'testdb1': 'https://lev.cs.rpi.edu/public/data/testdata.zip'
    }
    zipped_testdata_url = testdata_map[key]
    testdata_dir = utool.grab_zipped_url(zipped_testdata_url, ensure=ensure)
    return testdata_dir


def get_test_gpaths(ndata=None, names=None, **kwargs):
    # Read ndata from args or command line
    ndata_arg = utool.get_argval('--ndata', type_=int, default=None, help_='use --ndata to specify bigger data')
    if ndata_arg is not None:
        ndata = ndata_arg
    imgdir = get_testdata_dir(**kwargs)
    gpath_list = sorted(list(utool.list_images(imgdir, full=True, recursive=True)))
开发者ID:Erotemic,项目名称:vtool,代码行数:31,代码来源:grabdata.py


示例18: TEST_PIL_HASH

#!/usr/bin/env python2.7
# TODO: ADD COPYRIGHT TAG
from __future__ import absolute_import, division, print_function
import multiprocessing
import utool
from vtool.tests import grabdata
from ibeis.model.preproc import preproc_image
from PIL import Image
print, print_, printDBG, rrr, profile = utool.inject(__name__, '[TEST_PIL_HASH]')

def TEST_PIL_HASH():
    print('[TEST] GET_TEST_IMAGE_PATHS')
    # The test api returns a list of interesting chip indexes
    gpath_list = grabdata.get_test_gpaths(ndata=None)
    pil_img_list = [Image.open(gpath, 'r') for gpath in gpath_list]
    uuid_list = [preproc_image.get_image_uuid(pil_img) for pil_img in pil_img_list]
    unique_uuid_list = list(set(uuid_list))
    assert len(uuid_list) == len(unique_uuid_list), 'Reinstall PIL, watch for libjpeg'
    return locals()


if __name__ == '__main__':
    multiprocessing.freeze_support()  # For win32
    test_locals = utool.run_test(TEST_PIL_HASH)
    execstr = utool.execstr_dict(test_locals, 'test_locals')
    exec(execstr)
开发者ID:byteyoo,项目名称:ibeis,代码行数:26,代码来源:test_pil_hash.py


示例19: IBEISGuiWidget

#!/usr/bin/env python2.7
from __future__ import absolute_import, division, print_function
from itertools import izip  # noqa
import functools  # NOQA
from PyQt4 import QtGui, QtCore
from guitool import signal_, slot_, checks_qt_error, ChangeLayoutContext  # NOQA
from ibeis.control import IBEISControl
from ibeis.dev import ibsfuncs
from ibeis.gui import guiheaders as gh
from ibeis.gui.guiheaders import NAMES_TREE
from ibeis.gui.models_and_views import IBEISTableModel, IBEISTreeView
import guitool
import utool
print, print_, printDBG, rrr, profile = utool.inject(__name__, '[newgui]')


IBEIS_WIDGET_BASE = QtGui.QWidget


#############################
###### Window Widgets #######
#############################


class IBEISGuiWidget(IBEIS_WIDGET_BASE):
    #@checks_qt_error
    def __init__(ibswgt, ibs=None, parent=None):
        IBEIS_WIDGET_BASE.__init__(ibswgt, parent)
        ibswgt.ibs = ibs
        ibswgt.tblname_list = [NAMES_TREE]
        # Create and layout components
开发者ID:byteyoo,项目名称:ibeis,代码行数:31,代码来源:test_qt_tree.py


示例20: vizualize_vocabulary

    Per Name
    Incremental Version
"""
from __future__ import absolute_import, division, print_function
import utool as ut
import numpy as np
from ibeis.algo.hots.smk import smk_debug
from vtool import patch as ptool
from vtool import image as gtool
import six
import scipy.stats.mstats as spms
from os.path import join
from os.path import basename
import scipy.spatial.distance as spdist
from collections import namedtuple
(print, print_, printDBG, rrr, profile) = ut.inject(__name__, '[smk_plots]')


Metrics = namedtuple('Metrics', ('wx2_nMembers', 'wx2_pdist_stats', 'wx2_wdist_stats',))


def vizualize_vocabulary(ibs, invindex):
    """
    cleaned up version of dump_word_patches. Makes idf scatter plots and dumps
    the patches that contributed to each word.

    CommandLine:
        python -m ibeis.algo.hots.smk.smk_plots --test-vizualize_vocabulary
        python -m ibeis.algo.hots.smk.smk_plots --test-vizualize_vocabulary --vf

    Example:
开发者ID:heroinlin,项目名称:ibeis,代码行数:31,代码来源:smk_plots.py



注:本文中的utool.inject函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utool.inject2函数代码示例发布时间:2022-05-26
下一篇:
Python utool.get_list_column函数代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap