algorithms package

Submodules

algorithms.eigenfaces module

class algorithms.eigenfaces.Eigenfaces(numComponents=0, threshold=-1)[source]

Class that provides easy access to the Eigenfaces algorithm.

getAlgorithmName()[source]

Get the algorithm name. :return: The algorithm name.

predict(image)[source]

Predict the image. Given a new image this function will make the prediction. :param image: The image we want to predict. :return: The subject ID (label) and the confidence.

train(images, labels)[source]

Train the face recognition algorithm :param images: A slice with all images for training. :param labels: A slice with all labels corresponding to the images.

algorithms.fisherfaces module

class algorithms.fisherfaces.Fisherfaces(numComponents=0, threshold=-1)[source]

Class that provides easy access to the Fisherfaces algorithm.

getAlgorithmName()[source]

Get the algorithm name. :return: The algorithm name.

predict(image)[source]

Predict the image. Given a new image this function will make the prediction. :param image: The image we want to predict. :return: The subject ID (label) and the confidence.

train(images, labels)[source]

Train the face recognition algorithm :param images: A slice with all images for training. :param labels: A slice with all labels corresponding to the images.

algorithms.lbph module

class algorithms.lbph.LBPH(radius=1, neighbors=8, grid_x=8, grid_y=8, threshold=-1)[source]

Class that provides easy access to the LBPH algorithm.

getAlgorithmName()[source]

Get the algorithm name. :return: The algorithm name.

predict(image)[source]

Predict the image. Given a new image this function will make the prediction. :param image: The image we want to predict. :return: The subject ID (label) and the confidence.

train(images, labels)[source]

Train the face recognition algorithm :param images: A slice with all images for training. :param labels: A slice with all labels corresponding to the images.

algorithms.sift module

class algorithms.sift.SIFT(nfeatures=0, nOctaveLayers=3, contrastThreshold=0.04, edgeThreshold=10, sigma=1.6, distance=4, crossCheck=False)[source]

Class that provides easy access to the SIFT algorithm.

getAlgorithmName()[source]

Get the algorithm name. :return: The algorithm name.

predict(image)[source]

Predict the image. Given a new image this function will make the prediction. :param image: The image we want to predict. :return: The subject ID (label) and the confidence.

train(images, labels)[source]

Train the face recognition algorithm :param images: A slice with all images for training. :param labels: A slice with all labels corresponding to the images.

algorithms.surf module

class algorithms.surf.SURF(hessianThreshold=100, nOctaves=4, nOctaveLayers=3, extended=False, upright=False, distance=4, crossCheck=False)[source]

Class that provides easy access to the SURF algorithm.

getAlgorithmName()[source]

Get the algorithm name. :return: The algorithm name.

predict(image)[source]

Predict the image. Given a new image this function will make the prediction. :param image: The image we want to predict. :return: The subject ID (label) and the confidence.

train(images, labels)[source]

Train the face recognition algorithm :param images: A slice with all images for training. :param labels: A slice with all labels corresponding to the images.

Module contents