import warnings import zipfile if not sys.platform.startswith('win32'): import resource # PIPI if six.PY2: import functools32 import psutil # Qt import sip from guitool import __PYQT__ from guitool.__PYQT__ import QtCore, QtGui from guitool.__PYQT__.QtCore import Qt # Matplotlib from plottool import __MPL_INIT__ __MPL_INIT__.init_matplotlib() #mpl.use('Qt4Agg') # pyinstaller hack import matplotlib import matplotlib as mpl import matplotlib.pyplot as plt # Scientific import numpy as np import numpy.linalg as npl from numpy import (array, rollaxis, sqrt, zeros, ones, diag) from numpy.core.umath_tests import matrix_multiply import cv2 from PIL import Image from PIL.ExifTags import TAGS from scipy.cluster.hierarchy import fclusterdata from sklearn.cluster import MeanShift, estimate_bandwidth #import statsmodels
from yael import ynumpy # ensure the test data import utool utool.ensuredir('selective_match_kernel_v289') url = 'https://gforge.inria.fr/frs/download.php/file/33650/yael_mini_demo_v0.2.tgz' utool.grab_zipped_url(url, download_dir='.') # change directory to test data import os os.chdir('yael_mini_demo_v0.2') # prepare for plotting try: from plottool.__MPL_INIT__ import init_matplotlib init_matplotlib() #import matplotlib as mpl #mpl.use('Qt4Agg') import matplotlib.pyplot as plt # Python Imaging Library (used to load images) from PIL import Image show = True plt.ion() except ImportError as RuntimeError: print("Cannot import matplotlib or PIL. Not showing graphics!") show = False # the total size of the image descriptors is 128 * num_gmm_components # (128 is the size of a SIFT descriptor) num_gmm_components = 16
def _init_matplotlib(): from plottool import __MPL_INIT__ __MPL_INIT__.init_matplotlib()
from yael import ynumpy # ensure the test data import utool utool.ensuredir('selective_match_kernel_v289') url = 'https://gforge.inria.fr/frs/download.php/file/33650/yael_mini_demo_v0.2.tgz' utool.grab_zipped_url(url, download_dir='.') # change directory to test data import os os.chdir('yael_mini_demo_v0.2') # prepare for plotting try: from plottool.__MPL_INIT__ import init_matplotlib init_matplotlib() #import matplotlib as mpl #mpl.use('Qt4Agg') import matplotlib.pyplot as plt # Python Imaging Library (used to load images) from PIL import Image show = True plt.ion() except ImportError as RuntimeError: print("Cannot import matplotlib or PIL. Not showing graphics!") show = False # the total size of the image descriptors is 128 * num_gmm_components # (128 is the size of a SIFT descriptor) num_gmm_components = 16
def _init_matplotlib(): from plottool import __MPL_INIT__ __MPL_INIT__.init_matplotlib()
import warnings import zipfile if not sys.platform.startswith('win32'): import resource # PIPI if six.PY2: import functools32 import psutil # Qt import sip from guitool import __PYQT__ from guitool.__PYQT__ import QtCore, QtGui from guitool.__PYQT__.QtCore import Qt # Matplotlib from plottool import __MPL_INIT__ __MPL_INIT__.init_matplotlib() #mpl.use('Qt4Agg') # pyinstaller hack import matplotlib import matplotlib as mpl import matplotlib.pyplot as plt # Scientific import numpy as np import numpy.linalg as npl from numpy import (array, rollaxis, sqrt, zeros, ones, diag) from numpy.core.umath_tests import matrix_multiply import cv2 from PIL import Image from PIL.ExifTags import TAGS from scipy.cluster.hierarchy import fclusterdata from sklearn.cluster import MeanShift, estimate_bandwidth #import statsmodels