From 4ecb4d64ae5f3499e8d99fc91df2e999cab53b67 Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Thu, 21 Feb 2013 15:54:09 -0500 Subject: [PATCH] updated examples, finished #12 --- CMakeLists.txt | 4 ++-- app/br/br.cpp | 6 ++++-- app/examples/age_estimation.cpp | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/examples/compare_faces.cpp | 71 ----------------------------------------------------------------------- app/examples/evaluate_face_recognition.cpp | 70 ---------------------------------------------------------------------- app/examples/face_recognition.cpp | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/examples/face_recognition_evaluation.cpp | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ app/examples/gender_estimation.cpp | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ sdk/core/qtutils.cpp | 4 +++- sdk/openbr.h | 9 +++++---- sdk/openbr_export.cpp | 10 +++++----- sdk/openbr_plugin.h | 19 +++++++++++++++---- sdk/plugins/algorithms.cpp | 4 ++-- 13 files changed, 293 insertions(+), 161 deletions(-) create mode 100644 app/examples/age_estimation.cpp delete mode 100644 app/examples/compare_faces.cpp delete mode 100644 app/examples/evaluate_face_recognition.cpp create mode 100644 app/examples/face_recognition.cpp create mode 100644 app/examples/face_recognition_evaluation.cpp create mode 100644 app/examples/gender_estimation.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 9886575..7dab26f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,8 @@ set(BR_SHARE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/share/openbr") set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CPACK_PACKAGE_NAME "OpenBR") -set(CPACK_PACKAGE_VENDOR "Open Biometric Recognition") -set(CPACK_PACKAGE_DESCRIPTION "Open Source Biometric Recognition and Evaluation") +set(CPACK_PACKAGE_VENDOR "OpenBR") +set(CPACK_PACKAGE_DESCRIPTION "Open Source Biometric Recognition") set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) set(CPACK_PACKAGE_VERSION_MAJOR 0) set(CPACK_PACKAGE_VERSION_MINOR 2) diff --git a/app/br/br.cpp b/app/br/br.cpp index 9f8b1d1..dfe1fe2 100644 --- a/app/br/br.cpp +++ b/app/br/br.cpp @@ -31,8 +31,10 @@ * \endcode * * \section cli_examples Examples - * - \ref cli_compare_faces - * - \ref cli_evaluate_face_recognition + * - \ref cli_age_estimation + * - \ref cli_face_recognition + * - \ref cli_face_recognition_evaluation + * - \ref cli_gender_estimation */ static void help() diff --git a/app/examples/age_estimation.cpp b/app/examples/age_estimation.cpp new file mode 100644 index 0000000..fa55ade --- /dev/null +++ b/app/examples/age_estimation.cpp @@ -0,0 +1,58 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright 2012 The MITRE Corporation * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at * + * * + * http://www.apache.org/licenses/LICENSE-2.0 * + * * + * Unless required by applicable law or agreed to in writing, software * + * distributed under the License is distributed on an "AS IS" BASIS, * + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and * + * limitations under the License. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/*! + * \ingroup cli + * \page cli_age_estimation Age Estimation + * \ref cpp_age_estimation "C++ Equivalent" + * \code + * $ br -algorithm AgeEstimation \ + * -enroll ../data/MEDS/img/S354-01-t10_01.jpg ../data/MEDS/img/S001-01-t10_01.jpg metadata.csv + * \endcode + */ + +//! [age_estimation] +#include + +static void printTemplate(const br::Template &t) +{ + printf("%s age: %d\n", + qPrintable(t.file.fileName()), + t.file.getInt("Label")); +} + +int main(int argc, char *argv[]) +{ + br::Context::initialize(argc, argv); + + // Retrieve class for enrolling templates using the AgeEstimation algorithm + QSharedPointer transform = br::Transform::fromAlgorithm("AgeEstimation"); + + // Initialize templates + br::Template queryA("../data/MEDS/img/S354-01-t10_01.jpg"); + br::Template queryB("../data/MEDS/img/S001-01-t10_01.jpg"); + + // Enroll templates + queryA >> *transform; + queryB >> *transform; + + printTemplate(queryA); + printTemplate(queryB); + + br::Context::finalize(); + return 0; +} +//! [age_estimation] diff --git a/app/examples/compare_faces.cpp b/app/examples/compare_faces.cpp deleted file mode 100644 index 55eabb5..0000000 --- a/app/examples/compare_faces.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright 2012 The MITRE Corporation * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/*! - * \ingroup cli - * \page cli_compare_faces Compare Faces - * \ref cpp_compare_faces "Source Equivalent" - * \code - * $ br -algorithm FaceRecognition \ - * -compare ../data/MEDS/img/S354-01-t10_01.jpg ../data/MEDS/img/S354-02-t10_01.jpg \ - * -compare ../data/MEDS/img/S354-01-t10_01.jpg ../data/MEDS/img/S386-04-t10_01.jpg - * \endcode - */ - -//! [compare_faces] -#include - -static void printTemplate(const br::Template &t) -{ - printf("%s eyes: (%d, %d) (%d, %d)\n", - qPrintable(t.file.fileName()), - t.file.getInt("Affine_0_X"), t.file.getInt("Affine_0_Y"), - t.file.getInt("Affine_1_X"), t.file.getInt("Affine_1_Y")); -} - -int main(int argc, char *argv[]) -{ - br::Context::initialize(argc, argv); - - // Retrieve classes for enrolling and comparing templates using the FaceRecognition algorithm - QSharedPointer transform = br::Transform::fromAlgorithm("FaceRecognition"); - QSharedPointer distance = br::Distance::fromAlgorithm("FaceRecognition"); - - // Initialize templates - br::Template queryA("../data/MEDS/img/S354-01-t10_01.jpg"); - br::Template queryB("../data/MEDS/img/S386-04-t10_01.jpg"); - br::Template target("../data/MEDS/img/S354-02-t10_01.jpg"); - - // Enroll templates - queryA >> *transform; - queryB >> *transform; - target >> *transform; - - printTemplate(queryA); - printTemplate(queryB); - printTemplate(target); - - // Compare templates - float comparisonA = distance->compare(target, queryA); - float comparisonB = distance->compare(target, queryB); - - printf("Genuine match score: %.3f\n", comparisonA); // Scores above 1 are strong matches - printf("Impostor match score: %.3f\n", comparisonB); // Scores below 0.5 are strong non-matches - - br::Context::finalize(); - return 0; -} -//! [compare_faces] diff --git a/app/examples/evaluate_face_recognition.cpp b/app/examples/evaluate_face_recognition.cpp deleted file mode 100644 index 30ace1c..0000000 --- a/app/examples/evaluate_face_recognition.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Copyright 2012 The MITRE Corporation * - * * - * Licensed under the Apache License, Version 2.0 (the "License"); * - * you may not use this file except in compliance with the License. * - * You may obtain a copy of the License at * - * * - * http://www.apache.org/licenses/LICENSE-2.0 * - * * - * Unless required by applicable law or agreed to in writing, software * - * distributed under the License is distributed on an "AS IS" BASIS, * - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * - * See the License for the specific language governing permissions and * - * limitations under the License. * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/*! - * \ingroup cli - * \page cli_evaluate_face_recognition Evaluate Face Recognition - * \ref c_evaluate_face_recognition "Source Equivalent" - * \code - * $ br -algorithm FaceRecognition -path ../data/MEDS/img/ \ - * -enroll ../data/MEDS/sigset/MEDS_frontal_target.xml target.gal \ - * -enroll ../data/MEDS/sigset/MEDS_frontal_query.xml query.gal \ - * -compare target.gal query.gal scores.mtx \ - * -makeMask ../data/MEDS/sigset/MEDS_frontal_target.xml ../data/MEDS/sigset/MEDS_frontal_query.xml MEDS.mask \ - * -eval scores.mtx MEDS.mask Algorithm_Dataset/FaceRecognition_MEDS.csv \ - * -eval ../data/MEDS/simmat/COTS_MEDS.mtx MEDS.mask Algorithm_Dataset/COTS_MEDS.csv \ - * -plot Algorithm_Dataset/FaceRecognition_MEDS.csv Algorithm_Dataset/COTS_MEDS.csv MEDS - * \endcode - */ - -//! [evaluate_face_recognition] -#include - -int main(int argc, char *argv[]) -{ - br_initialize(argc, argv); - - // Equivalent to 'Globals->algorithm = "FaceRecognion";' in C++ API - br_set_property("algorithm", "FaceRecognition"); - - // Equivalent to 'Globals->path = "../data/MEDS/img/";' in C++ API - br_set_property("path", "../data/MEDS/img/"); - - // Enroll galleries - br_enroll("../data/MEDS/sigset/MEDS_frontal_target.xml", "target.gal"); - br_enroll("../data/MEDS/sigset/MEDS_frontal_query.xml", "query.gal"); - - // Compare galleries and store result in a binary similarity matrix - br_compare("target.gal", "query.gal", "FaceRecognition_MEDS.mtx"); - - // Make a ground truth "mask" matrix from the sigsets. - br_make_mask("../data/MEDS/sigset/MEDS_frontal_target.xml", "../data/MEDS/sigset/MEDS_frontal_query.xml", "MEDS.mask"); - - // Evaluate the performance of OpenBR's FaceRecognition and a COTS face recognition system. - br_eval("FaceRecognition_MEDS.mtx", "MEDS.mask", "Algorithm_Dataset/FaceRecognition_MEDS.csv"); - br_eval("../data/MEDS/simmat/COTS_MEDS.mtx", "MEDS.mask", "Algorithm_Dataset/COTS_MEDS.csv"); - - // The '_' character has special significance and is used to populate plot legends. - // Requires R installation, see documentation of br_plot for details. - const char *files[2]; - files[0] = "Algorithm_Dataset/FaceRecognition_MEDS.csv"; - files[1] = "Algorithm_Dataset/COTS_MEDS.csv"; - br_plot(2, files, "MEDS", true); - - br_finalize(); - return 0; -} -//! [evaluate_face_recognition] diff --git a/app/examples/face_recognition.cpp b/app/examples/face_recognition.cpp new file mode 100644 index 0000000..23c4bf4 --- /dev/null +++ b/app/examples/face_recognition.cpp @@ -0,0 +1,71 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright 2012 The MITRE Corporation * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at * + * * + * http://www.apache.org/licenses/LICENSE-2.0 * + * * + * Unless required by applicable law or agreed to in writing, software * + * distributed under the License is distributed on an "AS IS" BASIS, * + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and * + * limitations under the License. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/*! + * \ingroup cli + * \page cli_face_recognition Face Recognition + * \ref cpp_face_recognition "C++ Equivalent" + * \code + * $ br -algorithm FaceRecognition \ + * -compare ../data/MEDS/img/S354-01-t10_01.jpg ../data/MEDS/img/S354-02-t10_01.jpg \ + * -compare ../data/MEDS/img/S354-01-t10_01.jpg ../data/MEDS/img/S386-04-t10_01.jpg + * \endcode + */ + +//! [face_recognition] +#include + +static void printTemplate(const br::Template &t) +{ + printf("%s eyes: (%d, %d) (%d, %d)\n", + qPrintable(t.file.fileName()), + t.file.getInt("Affine_0_X"), t.file.getInt("Affine_0_Y"), + t.file.getInt("Affine_1_X"), t.file.getInt("Affine_1_Y")); +} + +int main(int argc, char *argv[]) +{ + br::Context::initialize(argc, argv); + + // Retrieve classes for enrolling and comparing templates using the FaceRecognition algorithm + QSharedPointer transform = br::Transform::fromAlgorithm("FaceRecognition"); + QSharedPointer distance = br::Distance::fromAlgorithm("FaceRecognition"); + + // Initialize templates + br::Template queryA("../data/MEDS/img/S354-01-t10_01.jpg"); + br::Template queryB("../data/MEDS/img/S386-04-t10_01.jpg"); + br::Template target("../data/MEDS/img/S354-02-t10_01.jpg"); + + // Enroll templates + queryA >> *transform; + queryB >> *transform; + target >> *transform; + + printTemplate(queryA); + printTemplate(queryB); + printTemplate(target); + + // Compare templates + float comparisonA = distance->compare(target, queryA); + float comparisonB = distance->compare(target, queryB); + + printf("Genuine match score: %.3f\n", comparisonA); // Scores above 1 are strong matches + printf("Impostor match score: %.3f\n", comparisonB); // Scores below 0.5 are strong non-matches + + br::Context::finalize(); + return 0; +} +//! [face_recognition] diff --git a/app/examples/face_recognition_evaluation.cpp b/app/examples/face_recognition_evaluation.cpp new file mode 100644 index 0000000..9b70abb --- /dev/null +++ b/app/examples/face_recognition_evaluation.cpp @@ -0,0 +1,70 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright 2012 The MITRE Corporation * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at * + * * + * http://www.apache.org/licenses/LICENSE-2.0 * + * * + * Unless required by applicable law or agreed to in writing, software * + * distributed under the License is distributed on an "AS IS" BASIS, * + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and * + * limitations under the License. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/*! + * \ingroup cli + * \page cli_face_recognition_evaluation Face Recognition Evaluation + * \ref c_face_recognition_evaluation "C Equivalent" + * \code + * $ br -algorithm FaceRecognition -path ../data/MEDS/img/ \ + * -enroll ../data/MEDS/sigset/MEDS_frontal_target.xml target.gal \ + * -enroll ../data/MEDS/sigset/MEDS_frontal_query.xml query.gal \ + * -compare target.gal query.gal scores.mtx \ + * -makeMask ../data/MEDS/sigset/MEDS_frontal_target.xml ../data/MEDS/sigset/MEDS_frontal_query.xml MEDS.mask \ + * -eval scores.mtx MEDS.mask Algorithm_Dataset/FaceRecognition_MEDS.csv \ + * -eval ../data/MEDS/simmat/COTS_MEDS.mtx MEDS.mask Algorithm_Dataset/COTS_MEDS.csv \ + * -plot Algorithm_Dataset/FaceRecognition_MEDS.csv Algorithm_Dataset/COTS_MEDS.csv MEDS + * \endcode + */ + +//! [face_recognition_evaluation] +#include + +int main(int argc, char *argv[]) +{ + br_initialize(argc, argv); + + // Equivalent to 'Globals->algorithm = "FaceRecognion";' in C++ API + br_set_property("algorithm", "FaceRecognition"); + + // Equivalent to 'Globals->path = "../data/MEDS/img/";' in C++ API + br_set_property("path", "../data/MEDS/img/"); + + // Enroll galleries + br_enroll("../data/MEDS/sigset/MEDS_frontal_target.xml", "target.gal"); + br_enroll("../data/MEDS/sigset/MEDS_frontal_query.xml", "query.gal"); + + // Compare galleries and store result in a binary similarity matrix + br_compare("target.gal", "query.gal", "FaceRecognition_MEDS.mtx"); + + // Make a ground truth "mask" matrix from the sigsets. + br_make_mask("../data/MEDS/sigset/MEDS_frontal_target.xml", "../data/MEDS/sigset/MEDS_frontal_query.xml", "MEDS.mask"); + + // Evaluate the performance of OpenBR's FaceRecognition and a COTS face recognition system. + br_eval("FaceRecognition_MEDS.mtx", "MEDS.mask", "Algorithm_Dataset/FaceRecognition_MEDS.csv"); + br_eval("../data/MEDS/simmat/COTS_MEDS.mtx", "MEDS.mask", "Algorithm_Dataset/COTS_MEDS.csv"); + + // The '_' character has special significance and is used to populate plot legends. + // Requires R installation, see documentation of br_plot for details. + const char *files[2]; + files[0] = "Algorithm_Dataset/FaceRecognition_MEDS.csv"; + files[1] = "Algorithm_Dataset/COTS_MEDS.csv"; + br_plot(2, files, "MEDS", true); + + br_finalize(); + return 0; +} +//! [face_recognition_evaluation] diff --git a/app/examples/gender_estimation.cpp b/app/examples/gender_estimation.cpp new file mode 100644 index 0000000..fd88eea --- /dev/null +++ b/app/examples/gender_estimation.cpp @@ -0,0 +1,58 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Copyright 2012 The MITRE Corporation * + * * + * Licensed under the Apache License, Version 2.0 (the "License"); * + * you may not use this file except in compliance with the License. * + * You may obtain a copy of the License at * + * * + * http://www.apache.org/licenses/LICENSE-2.0 * + * * + * Unless required by applicable law or agreed to in writing, software * + * distributed under the License is distributed on an "AS IS" BASIS, * + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * + * See the License for the specific language governing permissions and * + * limitations under the License. * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/*! + * \ingroup cli + * \page cli_gender_estimation Gender Estimation + * \ref cpp_gender_estimation "C++ Equivalent" + * \code + * $ br -algorithm GenderEstimation \ + * -enroll ../data/MEDS/img/S354-01-t10_01.jpg ../data/MEDS/img/S001-01-t10_01.jpg metadata.csv + * \endcode + */ + +//! [gender_estimation] +#include + +static void printTemplate(const br::Template &t) +{ + printf("%s gender: %s\n", + qPrintable(t.file.fileName()), + t.file.getInt("Label") == 1 ? "Female" : "Male"); +} + +int main(int argc, char *argv[]) +{ + br::Context::initialize(argc, argv); + + // Retrieve class for enrolling templates using the GenderEstimation algorithm + QSharedPointer transform = br::Transform::fromAlgorithm("GenderEstimation"); + + // Initialize templates + br::Template queryA("../data/MEDS/img/S354-01-t10_01.jpg"); + br::Template queryB("../data/MEDS/img/S001-01-t10_01.jpg"); + + // Enroll templates + queryA >> *transform; + queryB >> *transform; + + printTemplate(queryA); + printTemplate(queryB); + + br::Context::finalize(); + return 0; +} +//! [gender_estimation] diff --git a/sdk/core/qtutils.cpp b/sdk/core/qtutils.cpp index 7b791fa..563b9d7 100644 --- a/sdk/core/qtutils.cpp +++ b/sdk/core/qtutils.cpp @@ -288,7 +288,9 @@ bool QtUtils::runDot(const QString &file) void QtUtils::showFile(const QString &file) { #ifndef BR_EMBEDDED - QDesktopServices::openUrl(QUrl::fromLocalFile(file)); + (void) file; + // A bug in Qt5 currently prevents us from doing this: + // QDesktopServices::openUrl(QUrl::fromLocalFile(file)); #else // BR_EMBEDDED (void) file; #endif // BR_EMBEDDED diff --git a/sdk/openbr.h b/sdk/openbr.h index a81d7ef..c362328 100644 --- a/sdk/openbr.h +++ b/sdk/openbr.h @@ -54,10 +54,11 @@ extern "C" { * \endcode * * \section examples Examples - * - \ref c_evaluate_face_recognition - * \subsection c_evaluate_face_recognition Evaluate Face Recognition - * \ref cli_evaluate_face_recognition "Command Line Interface Equivalent" - * \snippet app/examples/evaluate_face_recognition.cpp evaluate_face_recognition + * - \ref c_face_recognition_evaluation + * + * \subsection c_face_recognition_evaluation Face Recognition Evaluation + * \ref cli_face_recognition_evaluation "Command Line Interface Equivalent" + * \snippet app/examples/face_recognition_evaluation.cpp face_recognition_evaluation */ /*! diff --git a/sdk/openbr_export.cpp b/sdk/openbr_export.cpp index 53a5753..aa54277 100644 --- a/sdk/openbr_export.cpp +++ b/sdk/openbr_export.cpp @@ -19,7 +19,7 @@ * \section overview Overview * OpenBR \cite openbr is a toolkit for biometric recognition and evaluation. * Supported use cases include training new recognition algorithms, interfacing with commercial systems, and measuring algorithm performance. - * Free algorithms are also available for specific modalities including face recognition, face gender \& age estimation, face quality, and document classification. + * Free algorithms are also available for specific modalities including \ref cpp_face_recognition, \ref cpp_age_estimation, and \ref cpp_gender_estimation. * * There are three modules users may interact with: * - \ref cli - \copybrief cli @@ -32,7 +32,7 @@ /*! * \page installation Installation - * \brief A hacker's guide to building, editing, and running the source code. + * \brief A hacker's guide to building, editing, and running the project. * * \section installation_from_source From Source * Installation from source is the recommended method for getting OpenBR on your machine. @@ -44,7 +44,7 @@ * - \subpage linux_icc * * \section installation_from_binary From Binary - * Pre-built releases are generally not provided, though they can be built from source using the instructions above. + * Pre-compiled releases are not currently provided, but they can be built from source using the instructions above. * Generally you should follow your operating system's best practices for installing a binary package. * However, for temporary evaluation, one simple configuration approach is: * @@ -104,7 +104,7 @@ $ br -help * \endcode * -# Download Qt 5.0.1 and install: * -# Unzip "qt-everywhere-opensource-src-5.0.1.zip" - * -# Install Perl/Python/Ruby dependencies as explained in the "Windows" section of "qt-everywhere-opensource-src-5.0.1\README". + * -# Install Perl/Python/Ruby dependencies as explained in the "Windows" section of "qt-everywhere-opensource-src-5.0.1\\README". * -# From the VS2012 x64 Cross Tools Command Prompt: * \code * $ cd qt-everywhere-opensource-src-5.0.1 @@ -183,7 +183,7 @@ $ br -help * \endcode * -# Download Qt 5.0.1 and install: * -# Unzip "qt-everywhere-opensource-src-5.0.1.zip" - * -# Install Perl/Python/Ruby dependencies as explained in the "Windows" section of "qt-everywhere-opensource-src-5.0.1\README". + * -# Install Perl/Python/Ruby dependencies as explained in the "Windows" section of "qt-everywhere-opensource-src-5.0.1\\README". * -# From the MinGW-w64 Command Prompt: * \code * $ cd qt-everywhere-opensource-src-5.0.1 diff --git a/sdk/openbr_plugin.h b/sdk/openbr_plugin.h index af75d81..d9dc6e1 100644 --- a/sdk/openbr_plugin.h +++ b/sdk/openbr_plugin.h @@ -60,10 +60,21 @@ * Plugin authors are encouraged to \\cite relevant papers by adding them to share/openbr/openbr.bib. * * \section examples Examples - * - \ref cpp_compare_faces - * \subsection cpp_compare_faces Compare Faces - * \ref cli_compare_faces "Command Line Interface Equivalent" - * \snippet app/examples/compare_faces.cpp compare_faces + * - \ref cpp_face_recognition + * - \ref cpp_age_estimation + * - \ref cpp_gender_estimation + * + * \subsection cpp_face_recognition Face Recognition + * \ref cli_face_recognition "Command Line Interface Equivalent" + * \snippet app/examples/face_recognition.cpp face_recognition + * + * \subsection cpp_age_estimation Age Estimation + * \ref cli_age_estimation "Command Line Interface Equivalent" + * \snippet app/examples/age_estimation.cpp age_estimation + * + * \subsection cpp_gender_estimation Gender Estimation + * \ref cli_gender_estimation "Command Line Interface Equivalent" + * \snippet app/examples/gender_estimation.cpp gender_estimation */ namespace br diff --git a/sdk/plugins/algorithms.cpp b/sdk/plugins/algorithms.cpp index b4d53b5..37b491d 100644 --- a/sdk/plugins/algorithms.cpp +++ b/sdk/plugins/algorithms.cpp @@ -39,6 +39,8 @@ class AlgorithmsInitializer : public Initializer Globals->abbreviations.insert("MedianFace", "Open!Cascade(FrontalFace)+ASEFEyes+Affine(256,256,0.37,0.45)+Center(Median)"); Globals->abbreviations.insert("BlurredFaceDetection", "Open+LimitSize(1024)+SkinMask/(Cvt(Gray)+GradientMask)+And+Morph(Erode,16)+LargestConvexArea"); Globals->abbreviations.insert("OpenBR", "FaceRecognition"); + Globals->abbreviations.insert("GenderEstimation", "GenderClassification"); + Globals->abbreviations.insert("AgeEstimation", "AgeRegression"); // Generic Image Processing Globals->abbreviations.insert("SIFT", "Open+KeyPointDetector(SIFT)+KeyPointDescriptor(SIFT):KeyPointMatcher(BruteForce)"); @@ -59,8 +61,6 @@ class AlgorithmsInitializer : public Initializer Globals->abbreviations.insert("ColoredLBP", "Open+Affine(128,128,0.37,0.45)+Cvt(Gray)+Blur(1.1)+Gamma(0.2)+DoG(1,2)+ContrastEq(0.1,10)+LBP(1,2)+ColoredU2"); // Transforms - Globals->abbreviations.insert("SketchDetector", "(Cvt(Gray)+Cascade(FrontalFace)+ASEFEyes+RenameFirst([eyeLx,ASEF_Right_Eye_X],Affine_0_X)+RenameFirst([eyeLy,ASEF_Right_Eye_Y],Affine_0_Y)+RenameFirst([eyeRx,ASEF_Left_Eye_X],Affine_1_X)+RenameFirst([eyeRy,ASEF_Left_Eye_Y],Affine_1_Y))"); - // Globals->abbreviations.insert("SketchDetector", "(EnsureChannels(3)+PP5Enroll(true)+RenameFirst([eyeLx,PP5_Landmark0_Right_Eye_X],Affine_0_X)+RenameFirst([eyeLy,PP5_Landmark0_Right_Eye_Y],Affine_0_Y)+RenameFirst([eyeRx,PP5_Landmark1_Left_Eye_X],Affine_1_X)+RenameFirst([eyeRy,PP5_Landmark1_Left_Eye_Y],Affine_1_Y)+Cvt(Gray))"); Globals->abbreviations.insert("FaceDetection", "(Open+Cvt(Gray)+Cascade(FrontalFace))"); Globals->abbreviations.insert("DenseLBP", "(Blur(1.1)+Gamma(0.2)+DoG(1,2)+ContrastEq(0.1,10)+LBP(1,2)+RectRegions(8,8,6,6)+Hist(59))"); Globals->abbreviations.insert("DenseSIFT", "(Grid(10,10)+SIFTDescriptor(12)+ByRow)"); -- libgit2 0.21.4