AdaBoostTransform
Wraps OpenCV's Ada Boost framework
- file: classification/adaboost.cpp
- inherits: Transform
- author(s): Scott Klum
- see:
-
properties:
Property Type Description enum type Type of Adaboost to perform. Options are: - Discrete
- Real
- Logit
- Gentle
enum splitCriteria Splitting criteria used to choose optimal splits during a weak tree construction. Options are: - Default
- Gini
- Misclass
- Sqerr
int weakCount Maximum number of weak classifiers per stage. Default is 100. float trimRate A threshold between 0 and 1 used to save computational time. Samples with summary weight int folds OpenCV parameter variable. Default value is 0. int maxDepth Maximum height of each weak classifier tree. Default is 1 (stumps). bool returnConfidence Return the confidence value of the classification or the class value of the classification. Default is true (return confidence value). bool overwriteMat If true, the output template will be a 1x1 matrix with value equal to the confidence or classification (depending on returnConfidence). If false the output template will be the same as the input template. Default is true. QString inputVariable Metadata variable storing the label for each template. Default is "Label". QString outputVariable Metadata variable to store the confidence or classification of each template (depending on returnConfidence). If overwriteMat is true nothing will be written here. Default is "".
BoostedForestClassifier
A classification wrapper on OpenCV's CvBoost class. It uses CvBoost for training a boosted forest and then performs classification using the trained nodes.
- file: classification/boostedforest.cpp
- inherits: Classifier
- author(s): Jordan Cheney, Scott Klum
-
properties:
Property Type Description representation Representation* The Representation describing the features used by the boosted forest minTAR float The minimum true accept rate during training maxFAR float The maximum false accept rate during training trimRate float The trim rate during training maxDepth int The maximum depth for each trained tree maxWeakCount int The maximum number of trees in the forest type. Type The type of boosting to perform. Options are - Discrete
- Real
- Logit
- Gentle
CaffeBaseTransform
The base transform for wrapping the Caffe deep learning library. This transform expects the input to a given Caffe model to be a MemoryDataLayer. The output of the forward pass of the Caffe network is stored in dst as a list of matrices, the size of which is equal to the batch_size of the network. Children of this transform should process dst to acheieve specifc use cases.
- file: classification/caffe.cpp
- inherits: UntrainableMetaTransform
- author(s): [Jordan Cheney][JordanCheney]
-
see:
-
properties:
Property Type Description model QString path to prototxt model file weights QString path to caffemodel file gpuDevice int ID of GPU to use. gpuDevice < 0 runs on the CPU only.
CaffeClassifierTransform
This transform treats the output of the network as a score distribution for an arbitrary number of classes. The maximum score and location for each input image is determined and stored in the template metadata. The template matrix is not changed. If the network batch size is > 1, the results are stored as lists in the dst template's metadata using the keys "Labels" and "Confidences" respectively. The length of these lists is equivalent to the provided batch size. If batch size == 1, the results are stored as a float and int using the keys "Label", and "Confidence" respectively.
- file: classification/caffe.cpp
- inherits: CaffeBaseTransform
- author(s): Jordan Cheney
-
properties:
Property Type Description model QString path to prototxt model file weights QString path to caffemodel file gpuDevice int ID of GPU to use. gpuDevice < 0 runs on the CPU only.
CaffeFVTransform
This transform treats the output of the network as a feature vector and appends it unchanged to dst. Dst will have length equal to the batch size of the network.
- file: classification/caffe.cpp
- inherits: CaffeBaseTransform
- author(s): [Jordan Cheney][JordanCheney]
-
properties:
Property Type Description model QString path to prototxt model file weights QString path to caffemodel file gpuDevice int ID of GPU to use. gpuDevice < 0 runs on the CPU only.
CascadeClassifier
A meta Classifier that creates a cascade of another Classifier. The cascade is a series of stages, each with its own instance of a given classifier. A sample can only reach the next stage if it is classified as positive by the previous stage.
- file: classification/cascade.cpp
- inherits: Classifier
- author(s): Jordan Cheney, Scott Klum
- see: Rapid Object Detection using a Boosted Cascade of Simple Features
-
read:
- Paul Viola, Michael Jones
Rapid Object Detection using a Boosted Cascade of Simple Features CVPR, 2001
- Paul Viola, Michael Jones
-
properties:
Property Type Description numStages int The number of stages in the cascade numPos int The number of positives to feed each stage during training numNegs int The number of negatives to feed each stage during training. A negative sample must have been classified by the previous stages in the cascade as positive to be fed to the next stage during training. maxFAR float A termination parameter. Calculated as (number of passed negatives) / (total number of checked negatives) for a given stage during training. If that number is below the given maxFAR cascade training is terminated early. This can help prevent overfitting.
DLibShapeResourceMaker
Wrapper to dlib's landmarker.
- file: classification/dlib.cpp
- inherits: ResourceMaker
- author(s): Scott Klum
- properties: None
DObjectDetectorTransform
Wrapper to dlib's trainable object detector.
- file: classification/dlib.cpp
- inherits: Transform
- author(s): Scott Klum
- properties: None
EBIFTransform
Face Recognition Using Early Biologically Inspired Features
- file: classification/ebif.cpp
- inherits: UntrainableTransform
- author(s): Josh Klontz
-
read:
- Li, Min, et al.
"Face recognition using early biologically inspired features." Biometrics: Theory, Applications and Systems (BTAS), 2013 IEEE Sixth International Conference on. IEEE, 2013.
- Li, Min, et al.
-
properties:
Property Type Description N int The number of scales. Default is 6. M int The number of orientations between 0 and pi. Default is 9.
ForestInductionTransform
Wraps OpenCV's random trees framework to induce features
- file: classification/forest.cpp
- inherits: ForestTransform
- author(s): Scott Klum
- see:
-
properties:
Property Type Description useRegressionValue bool SCOTT FILL ME IN.
ForestTransform
Wraps OpenCV's random trees framework
- file: classification/forest.cpp
- inherits: Transform
- author(s): Scott Klum
- see:
-
properties:
Property Type Description classification bool If true the labels are expected to be categorical. Otherwise they are expected to be numerical. Default is true. splitPercentage float Used to calculate the minimum number of samples per split in a random tree. The minimum number of samples is calculated as the number of samples x splitPercentage. Default is 0.01. maxDepth int The maximum depth of each decision tree. Default is std::numeric_limits ::max() and typically should be set by the user. maxTrees int The maximum number of trees in the forest. Default is 10. forestAccuracy float A sufficient accuracy for the forest for training to terminate. Used if termCrit is EPS or Both. Default is 0.1. returnConfidence bool If both classification and returnConfidence are use a fuzzy class label as the output of the forest. Default is true. overwriteMat bool If true set dst to be a 1x1 Mat with the forest response as its value. Otherwise append the forest response to metadata using outputVariable as a key. Default is true. inputVariable QString The metadata key for each templates label. Default is "Label". outputVariable QString The metadata key for the forest response if overwriteMat is false. Default is "". weight bool If true and classification is true the random forest will use prior accuracies. Default is false. termCrit enum Termination criteria for training the random forest. Options are Iter, EPS and Both. Iter terminates when the maximum number of trees is reached. EPS terminates when forestAccuracy is met. Both terminates when either is true. Default is Iter.
IPC2013FaceRecognitionTransform
Intel Perceptual Computing SDK 2013 Face Recognition
- file: classification/ipc2013.cpp
- inherits: UntrainableTransform
- author(s): Josh Klontz
- properties: None
LDATransform
Projects input into learned Linear Discriminant Analysis subspace.
- file: classification/lda.cpp
- inherits: Transform
- author(s): Brendan Klare, Josh Klontz
-
properties:
Property Type Description pcaKeep float If <= 1, the percentage of variance to retain in initial PCA step. If > 1, the number of dimensions to keep. pcaWhiten bool Whether or not to perform whitening during PCA step directLDA int Whether or not to use the Direct LDA algorithm. directDrop float Parameter for Direct LDA to specify how many leading vectors in within class matrix to drop. Based on variance. inputVariable QString Metadata key for subject labels. isBinary bool Whether or not to perform binary LDA. Default is multi-class LDA (i.e., distance metric learning). normalize bool For binary LDA, whether or not to z-score normalize projection.
Linear
Wraps LibLinear's Linear SVM framework.
- file: classification/liblinear.cpp
- inherits: Transform
- author(s): Scott Klum
- properties: None
MLPTransform
Wraps OpenCV's multi-layer perceptron framework
- file: classification/mlp.cpp
- inherits: MetaTransform
- author(s): Scott Klum
- see:
-
properties:
Property Type Description kernel enum Type of MLP kernel to use. Options are Identity, Sigmoid, Gaussian. Default is Sigmoid. alpha float Determines activation function for neural network. See OpenCV documentation for more details. Default is 1. beta float Determines activation function for neural network. See OpenCV documentation for more details. Default is 1. inputVariables QStringList Metadata keys for the labels associated with each template. There should be the same number of keys in the list as there are neurons in the final layer. Default is QStringList(). outputVariables QStringList Metadata keys to store the output of the neural network. There should be the same number of keys in the list as there are neurons in the final layer. Default is QStringList(). neuronsPerLayer QList The number of neurons in each layer of the net. Default is QList () << 1 << 1.
NT4Compare
Compare templates with Neurotech SDK 4
- file: classification/nt4.cpp
- inherits: Distance
- author(s): Josh Klontz, E. Taborsky
- properties: None
NT4DetectFace
Neurotech face detection
- file: classification/nt4.cpp
- inherits: UntrainableTransform
- author(s): Josh Klontz, E. Taborsky
- properties: None
NT4EnrollFace
Enroll face in Neurotech SDK 4
- file: classification/nt4.cpp
- inherits: UntrainableTransform
- author(s): Josh Klontz
- properties: None
NT4EnrollIris
Enroll iris in Neurotech SDK 4
- file: classification/nt4.cpp
- inherits: UntrainableTransform
- author(s): E. Taborsky
- properties: None
PCATransform
Projects input into learned Principal Component Analysis subspace.
- file: classification/lda.cpp
- inherits: Transform
- author(s): Brendan Klare, Josh Klontz
-
properties:
Property Type Description keep float Options are: - keep < 0 - All eigenvalues are retained
- keep == 0 - No PCA is performed and the eigenvectors form an identity matrix
- 0 < keep < 1 - Keep is the fraction of the variance to retain
- keep >= 1 - keep is the number of leading eigenvectors to retain
drop int The number of leading eigen-dimensions to drop. whiten bool Whether or not to perform PCA whitening (i.e., normalize variance of each dimension to unit norm)
PP4Compare
Compare faces using PittPatt 4.
- file: classification/pp4.cpp
- inherits: Distance
- author(s): Josh Klontz
- properties: None
PP4EnrollTransform
Enroll faces in PittPatt 4
- file: classification/pp4.cpp
- inherits: UntrainableMetaTransform
- author(s): Josh Klontz
-
properties:
Property Type Description detectOnly bool If true, return all detected faces. Otherwise, return only faces that are suitable for recognition. Default is false.
PP5CompareDistance
Compare templates with PP5. PP5 distance is known to be asymmetric
- file: classification/pp5.cpp
- inherits: UntrainableDistance
- author(s): Josh Klontz, E. Taborsky
- properties: None
PP5EnrollTransform
Enroll faces in PP5
- file: classification/pp5.cpp
- inherits: UntrainableMetaTransform
- author(s): Josh Klontz, E. Taborsky
-
properties:
Property Type Description detectOnly bool If true, enroll all detected faces. Otherwise, only enroll faces suitable for recognition. Default is false. requireLandmarks bool If true, require the right eye, left eye, and nose base to be detectable by PP5. If this does not happen FTE is set to true for that template. Default is false. adaptiveMinSize float The minimum face size as a percentage of total image width. 0.1 corresponds to a minimum face size of 10% the total image width. Default is 0.01. minSize int The absolute minimum face size to search for. This is not a pixel value. Please see PittPatt documentation for the relationship between minSize and pixel IPD. Default is 4. landmarkRange enum Range of landmarks to search for. Options are Frontal, Extended, Full, and Comprehensive. Default is Comprehensive. searchPruningAggressiveness int The amount of aggressiveness involved in search for faces in images. 0 means all scales and locations are searched. 1 means fewer detectors are used in the early stages but all scales are still searched. 2-4 means that the largest faces are found first and then fewer scales are searched. Default is 0.
PP5GalleryTransform
DOCUMENT ME
- file: classification/pp5.cpp
- inherits: UntrainableMetaTransform
- author(s): Unknown
- properties: None
SVMTransform
Wraps OpenCV's SVM framework.
- file: classification/svm.cpp
- inherits: Transform
- author(s): Josh Klontz
- see:
-
read:
- C. Burges.
"A tutorial on support vector machines for pattern recognition" Knowledge Discovery and Data Mining 2(2), 1998.
- C. Burges.
-
properties:
Property Type Description Kernel enum The type of SVM kernel to use. Options are Linear, Poly, RBF, Sigmoid. Default is Linear. Type enum The type of SVM to do. Options are C_SVC, NU_SVC, ONE_CLASS, EPS_SVR, NU_SVR. Default is C_SVC. C float Parameter C of an SVM optimization problem. Needed when Type is C_SVC, EPS_SVR or NU_SVR. Default is -1. gamma float Parameter gamma of a kernel function. Needed when Kernel is Poly, RBF, or Sigmoid. Default is -1. inputVariable QString Metadata variable storing the label for each template. Default is "Label". outputVariable QString Metadata variable to store the prediction value of the trained SVM. If type is EPS_SVR or NU_SVR the stored value is the output of the SVM. Otherwise the value is the output of the SVM mapped through the reverse lookup table. Default is "". returnDFVal bool If true, dst is set to a 1x1 Mat with value equal to the predicted output of the SVM. Default is false. termCriteria int The maximum number of training iterations. Default is 1000. folds int Cross validation parameter used for autoselecting other parameters. Default is 5. balanceFolds bool If true and the problem is 2-class classification then more balanced cross validation subsets are created. Default is false.
SparseLDATransform
Projects input into learned Linear Discriminant Analysis subspace learned on a sparse subset of features with the highest weight in the original LDA algorithm.
- file: classification/lda.cpp
- inherits: Transform
- author(s): Brendan Klare
-
properties:
Property Type Description varThreshold float BRENDAN FILL ME IN. Default is 1.5. pcaKeep float BRENDAN FILL ME IN. Default is 0.98. normalize bool BRENDAN FILL ME IN. Default is true.
TurkClassifierTransform
Convenience class for training turk attribute regressors
- file: classification/turk.cpp
- inherits: Transform
- author(s): Josh Klontz
-
properties:
Property Type Description key QString Metadata key to pass input values to SVM. Actual lookup key is "key_value" where value is each value in the parameter values. Default is "". values QStringList Metadata keys to pass input values to SVM. Actual lookup key is "key_value" where key is the parameter key and value is each value in this list. Each passed value trains a new SVM with the input values found in metadata - "key_value"
isMeta bool If true, "Average+SaveMat(predicted_key_value)" is appended to each classifier. If false, nothing is appended. Default is false.
WCDATransform
Projects input into a within-class minimizing subspace.
Like LDA but without the explicit between-class consideration.
Note on Compression: Projection matricies can become quite large, resulting in proportionally large model files. WCDA automatically alleviates this issue with lossy compression of the projection matrix. Each element is stored as an 8-bit integer instead of a 32-bit float, resulting in a 75% reduction in the size of the projection matrix. A non-linear (sqrt) scaling is used because element values are distributed around 0, in affect allowing for higher precision storage of the more frequently occuring values.
- file: classification/lda.cpp
- inherits: Transform
- author(s): Josh Klontz
- properties: None