def __init__(self, classifier_trainers=linear_svm_lr, patch_shape=(5, 5), features=sparse_hog, normalization_diagonal=None, n_levels=3, downscale=1.1, scaled_shape_models=True, max_shape_components=None, boundary=3): # general deformable model checks checks.check_n_levels(n_levels) checks.check_downscale(downscale) checks.check_normalization_diagonal(normalization_diagonal) checks.check_boundary(boundary) max_shape_components = checks.check_max_components( max_shape_components, n_levels, 'max_shape_components') features = checks.check_features(features, n_levels) # CLM specific checks classifier_trainers = check_classifier_trainers(classifier_trainers, n_levels) patch_shape = check_patch_shape(patch_shape) # store parameters self.classifier_trainers = classifier_trainers self.patch_shape = patch_shape self.features = features self.normalization_diagonal = normalization_diagonal self.n_levels = n_levels self.downscale = downscale self.scaled_shape_models = scaled_shape_models self.max_shape_components = max_shape_components self.boundary = boundary
def __init__(self, features=igo, patch_shape=(16, 16), normalization_diagonal=None, n_levels=3, downscale=2, scaled_shape_models=True, max_shape_components=None, boundary=3): # check parameters checks.check_n_levels(n_levels) checks.check_downscale(downscale) checks.check_normalization_diagonal(normalization_diagonal) checks.check_boundary(boundary) max_shape_components = checks.check_max_components( max_shape_components, n_levels, 'max_shape_components') features = checks.check_features(features, n_levels) # store parameters self.features = features self.patch_shape = patch_shape self.normalization_diagonal = normalization_diagonal self.n_levels = n_levels self.downscale = downscale self.scaled_shape_models = scaled_shape_models self.max_shape_components = max_shape_components self.boundary = boundary # patch-based AAMs can only work with TPS transform self.transform = ThinPlateSplines
def __init__(self, features=igo, patch_shape=(16, 16), normalization_diagonal=None, n_levels=3, downscale=2, scaled_shape_models=True, max_shape_components=None, max_appearance_components=None, boundary=3): # check parameters checks.check_n_levels(n_levels) checks.check_downscale(downscale) checks.check_normalization_diagonal(normalization_diagonal) checks.check_boundary(boundary) max_shape_components = checks.check_max_components( max_shape_components, n_levels, 'max_shape_components') max_appearance_components = checks.check_max_components( max_appearance_components, n_levels, 'max_appearance_components') features = checks.check_features(features, n_levels) # store parameters self.features = features self.patch_shape = patch_shape self.normalization_diagonal = normalization_diagonal self.n_levels = n_levels self.downscale = downscale self.scaled_shape_models = scaled_shape_models self.max_shape_components = max_shape_components self.max_appearance_components = max_appearance_components self.boundary = boundary # patch-based AAMs can only work with TPS transform self.transform = DifferentiableThinPlateSplines
def __init__(self, features=igo, transform=DifferentiablePiecewiseAffine, trilist=None, normalization_diagonal=None, n_levels=3, downscale=2, scaled_shape_models=True, max_shape_components=None, max_appearance_components=None, boundary=3): # check parameters checks.check_n_levels(n_levels) checks.check_downscale(downscale) checks.check_normalization_diagonal(normalization_diagonal) checks.check_boundary(boundary) max_shape_components = checks.check_max_components( max_shape_components, n_levels, 'max_shape_components') max_appearance_components = checks.check_max_components( max_appearance_components, n_levels, 'max_appearance_components') features = checks.check_features(features, n_levels) # store parameters self.features = features self.transform = transform self.trilist = trilist self.normalization_diagonal = normalization_diagonal self.n_levels = n_levels self.downscale = downscale self.scaled_shape_models = scaled_shape_models self.max_shape_components = max_shape_components self.max_appearance_components = max_appearance_components self.boundary = boundary
def __init__(self, classifier_trainers=linear_svm_lr, patch_shape=(5, 5), features=sparse_hog, normalization_diagonal=None, n_levels=3, downscale=1.1, scaled_shape_models=True, max_shape_components=None, boundary=3): # general deformable model checks checks.check_n_levels(n_levels) checks.check_downscale(downscale) checks.check_normalization_diagonal(normalization_diagonal) checks.check_boundary(boundary) max_shape_components = checks.check_max_components( max_shape_components, n_levels, 'max_shape_components') features = checks.check_features(features, n_levels) # CLM specific checks classifier_trainers = check_classifier_trainers( classifier_trainers, n_levels) patch_shape = check_patch_shape(patch_shape) # store parameters self.classifier_trainers = classifier_trainers self.patch_shape = patch_shape self.features = features self.normalization_diagonal = normalization_diagonal self.n_levels = n_levels self.downscale = downscale self.scaled_shape_models = scaled_shape_models self.max_shape_components = max_shape_components self.boundary = boundary