How to split cascades levels in dlib frontal face detector?
<p>Follow up: <a href="https://github.com/cmusatyalab/openface/issues/157#issuecomment-233597331" rel="nofollow noreferrer">openface/issue/157</a> </p>

<p>I am trying to split the five level cascade in the dlib frontal face detector to three level (front, front looking but rotated left, and front looking but rotated right one)</p>

<p><a href="https://stackoverflow.com/users/3209505/evgeniy">Evgeniy</a> suggested to split the detector in C++. I am not familiar with C++. When I look into <a href="https://github.com/davisking/dlib/blob/master/dlib/image_processing/frontal_face_detector.h" rel="nofollow noreferrer">frontal_face_detector.h</a>, <code>get_serialized_frontal_faces</code> returns a base64 encoded object. </p>

<p>I learned how to save a existing detector into a <code>.svm</code> file:</p>

<pre class="lang-cpp prettyprint-override"><code>#include &lt;dlib/image_processing/frontal_face_detector.h&gt;
#include &lt;iostream&gt;

using namespace dlib;
using namespace std;

int main()
{   
    frontal_face_detector detector = get_frontal_face_detector(); 

    dlib::serialize("new_detector.svm") &lt;&lt; detector;  

    std::cout&lt;&lt;"End of the Program"&lt;&lt;endl;
    return 0;   
}
</code></pre>

<p>So how to split the cascade and save the new detector to a <code>.svm</code> file?</p>

<p>Also will the detector performance increase by reducing the pyramid level from &lt;6> to a lower value in <a href="https://github.com/davisking/dlib/blob/master/dlib/image_processing/frontal_face_detector.h" rel="nofollow noreferrer">frontal_face_detector.h</a>?</p>