-
 

Package Summary

Tags No category tags.
Version 1.0.2
License MIT
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/GT-RAIL/rail_face_detection.git
VCS Type git
VCS Version indigo-devel
Last Updated 2018-11-02
Dev Status DEVELOPED
CI status Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

This package provides face detection.

Additional Links

No additional links.

Maintainers

  • Siddhartha Banerjee
  • Andrew Silva

Authors

  • Siddhartha Banerjee
  • Andrew Silva

rail_face_detector

Face detection node using caffe and python

Two Minute Intro

This detector uses Caffe to perform face detection. It publishes faces found in images from a subscribed image topic. The face detector can be found here: https://github.com/kpzhang93/MTCNN_face_detection_alignment.

The message type coming back from the face detector is a Detections.msg which contains an array of Face.msg objects. Each Face.msg has:

int16 top_left_x        # X pixel value of top-left corner of bounding box
int16 top_left_y        # Y pixel value of top-left corner of bounding box
int16 bot_right_x       # X pixel value of bottom-right corner of bounding box
int16 bot_right_y       # Y pixel value of bottom-right corner of bounding box
int16 nose_x            # X coordinate of the nose
int16 nose_y            # Y coordinate of the nose
int16 left_eye_x        # X coordinate of the left eye
int16 left_eye_y        # Y coordinate of the left eye
int16 right_eye_x       # X coordinate of the right eye
int16 right_eye_y       # Y coordinate of the right eye
int16 left_mouth_x      # X coordinate of the left corner of the mouth
int16 left_mouth_y      # Y coordinate of the left corner of the mouth
int16 right_mouth_x     # X coordinate of the right corner of the mouth
int16 right_mouth_y     # Y coordinate of the right corner of the mouth

Installation

  1. Install Caffe and PyCaffe (following instructions at http://caffe.berkeleyvision.org/installation.html)
  2. Add this package to your ROS workspace
  3. Run catkin_make and enjoy the ability to use face detection!

If caffe is not in your PYTHONPATH, you will need to explicitly point the node to your /caffe/python directory. To do this:

  1. Open scripts/face_detector.py in this package
  2. Near the top (lines 6-10) set a variable named caffe_root to the absolute path of your /caffe/python directory. There are commented examples for Ubuntu and Mac already there.
  3. Uncomment the sys.path.append(caffe_root) line (line 11)

The node should now run properly.

Testing your Installation

  • Set up an image topic that this node can subscribe to
  • Launch the face_detector_node node with the debug flag and your chosen image topic name (for example, with a Kinect):
roslaunch rail_face_detector detector.launch image_sub_topic_name:=/kinect/qhd/image_color_rect debug:=true

You can also just test the network by running the webcam_runner.py script in the home directory of this package. This uses OpenCV to pull images from your webcam, highlight faces and keypoints, and show the images in real time.

ROS Nodes

face_detector_node

Wrapper for object detection through ROS services. Relevant services and parameters are as follows:

  • Topics
    • detector_node/faces (rail_face_detector/faces)        Topic with face detections performed in the background by running on images as they come in the subscriber.
    • detector_node/debug/face_images (sensor_msgs/Image)        Topic with face detections visualized on incoming images as they come in from the subscriber. Only published if debug=true.
  • Parameters
    • image_sub_topic_name (string, default: “/kinect/qhd/image_color_rect”)        Image topic name to use for detections.
    • debug (bool, default: false)        Enable or disable debug mode, which publishes incoming images with bounding boxes over faces
    • use_gpu (bool, default: true)        Enable or disable gpu mode. Enabled by default. Significantly speeds up detection.
    • use_compressed_image (bool, default: false)        Change to compressed image stream or not. Simply appends a “/compressed” to the image topic name. This lightens the load your local network if the images are being transmitted to the detector.

Startup

Simply run the launch file to bring up all of the package’s functionality (default: use Scene Queries only):

roslaunch rail_face_detector detector.launch

CHANGELOG

Changelog for package rail_face_detector

1.0.2 (2018-11-02)

  • Renamed the default branch

1.0.1 (2018-09-07)

  • Added a metapackage
  • Created a face detector unified launch
  • Create a separate package for the messages
  • Contributors: Siddhartha Banerjee, banerjs

0.0.2 (2017-09-27)

  • Init repo

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

Launch files

  • launch/detector.launch
      • image_sub_topic_name [default: /kinect/qhd/image_color_rect]
      • debug [default: false]
      • use_gpu [default: true]
      • use_compressed_image [default: false]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged rail_face_detector at Robotics Stack Exchange