Beispiel #1
0
 def __init__(self, data_path):
     # 源代码生成的txt文件的临时存放区域
     self._data_path = data_path
     self._extractor = Extractor()
     self._interpreter = Interpreter(self._data_path)
     self._path_vec = []
Beispiel #2
0
def extractFeatures(data):
    extractor = Extractor(data)
    data = extractor.extractFeatures()
Beispiel #3
0
import cv2
import numpy as np
import Config

from tqdm import tqdm
from PIL import Image
from sklearn.svm import LinearSVC
from sklearn.neural_network import MLPClassifier
from skimage.transform import pyramid_gaussian
from sklearn.externals import joblib

from FeatureExtractor import Extractor

## Initialize the Extractor
conf = Config.Config()
extractor = Extractor(conf)


class Classifier(object):
    def __init__(self, config):
        self.config = config

    def load_data(self):
        '''
        This function is used to load the training data, positive data
        and negtive data.The features of images are stored in self.fds,
        the labels are stored in self.labels.
        :return: None
        '''
        self.fds = []
        self.labels = []