This is a package for person appearance extraction using Convolutional Channel Filter (CCF). We trained Ahmed's person identification network with CUHK01 and CUHK03 datasets, and take the first two convolutional layers of the network to take advantage of the deep feature representation. You can use it by just including a header file.
- OpenCV 2 or later
- dlib 19.9
Specify the directory you put dlib as $DLIB_ROOT.
cd /where/you/want/to/pub/dlib
wget http://dlib.net/files/dlib-19.9.tar.bz2
tar xvf dlib-19.9.tar.bz2
echo "export DLIB_ROOT=\"$(pwd)/dlib-19.9\"" >> ~/.bashrc
source ~/.bashrc
// This is a header-only library
// You can use it by just including the following header
#include <ccf_feature_extraction/ccf_extractor.hpp>
// You can use CCFs based on the original Ahmed's network (which yields 25 feature maps) or a tiny version of it (10 feature maps)
// ccf::AhmedSubnet subnet(package_dir + "/data/cnn_params"); // original
ccf::TinyAhmedSubnet subnet(package_dir + "/data/cnn_params_tiny"); // tiny
// Re-order the pixels since the network was trained with RGB pixel order
cv::Mat bgr_image = ...;
cv::cvtColor(bgr_image, rgb_image);
// Extract feature maps using CCF
// Each respose map has CV_32FC1 pixels
std::vector<cv::Mat> responses = subnet(rgb_image);
roscd ccf_feature_extraction/data/persons/
rosrun ccf_feature_extraction ccf_feature_extraction_test personA.jpg personB.jpg personC.jpg
Person images taken from CUHK01.
Kenji Koide, Jun Miura, Convolutional Channel Filter-based Person Identification for Person Following Robots, 15th IAS Conference PDF.