Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not pefrom face recognition process without the trained data #91

Conversation

tongtybj
Copy link
Contributor

Add a check line in callback function to decide whether to perform the face recognition, according to the size of the label mapper. Refer to #90 .

Any suggestion to add a test code for the training phase

…back function, according to the content of the label mapper.
@tongtybj tongtybj changed the title Do not pefrom face recognition process withou the trained data Do not pefrom face recognition process without the trained data Apr 19, 2019
@@ -345,6 +346,9 @@ namespace opencv_apps {
NODELET_DEBUG("faceImageCallback");
boost::mutex::scoped_lock lock(mutex_);

// check if the face data is being trained
if(label_mapper_->getMap().empty()) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (label_mapper_->getMap().empty())
{
  NODELET_WARN_THROTTLE(1.0, "Face data is not trained. Please train first.");
  return;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Have added

@k-okada k-okada merged commit f037fbb into ros-perception:indigo Apr 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants