Exemple #1
0
 def __init__(self, alpha=0.1, tau=10.0, gamma=0.2, sigma0=1.0, sigma1=2.0):
     AbstractFeature.__init__(self)
     self.alpha = float(alpha)
     self.tau = float(tau)
     self.gamma = float(gamma)
     self.sigma0 = float(sigma0)
     self.sigma1 = float(sigma1)
Exemple #2
0
    def __init__(self, lbp_operator=None, size=(8, 8)):
        AbstractFeature.__init__(self)

        if lbp_operator is None:
            lbp_operator = ExtendedLBP()

        if not isinstance(lbp_operator, LBPOperator):
            raise TypeError("Only an operator of type facerec.lbp.LBPOperator is a valid lbp_operator.")

        self.lbp_operator = lbp_operator
        self.size = size