嗨,我是製作的應用程序,其檢測面的標記(68點)關於DLIB :: frontal_face_detector優化
我麻煩優化系統來的。我正在使用HOG方法來檢測臉部。
In,detector(cv_grayscale,face_detections,-0.2);類型「dlib :: frontal_face_detector &檢測器」
那裏有太多的計算。所以,android cpu不能覆蓋它們。
那麼,誰解決了這個問題或相關問題?從here.
bool DetectFacesHOG(vector<cv::Rect_<double> >& o_regions, const cv::Mat_<uchar>& intensity, dlib::frontal_face_detector& detector, std::vector<double>& o_confidences)
{
double scaling = 1.3;
cv::Mat_<uchar> upsampled_intensity;
cv::resize(intensity, upsampled_intensity, cv::Size((int)(intensity.cols*scaling), (int)(intensity.rows*scaling)));
dlib::cv_image<uchar> cv_grayscale(upsampled_intensity);
std::vector<dlib::full_detection> face_detections;
// millions of computation !!!!!!!!!!!!!!!!!!!!!!!!
detector(cv_grayscale, face_detections, -0.2);
....
}