function toDlibPts(shape){
    var keys = Object.keys(shape.featurePoints);
    var data = "version: 1\n"
            +"n_points:  "+keys.length+"\n"
            +"{\n";
    var l = shape.bbox.x, t = shape.bbox.y;
    keys.forEach( fp_id => {
        data += shape.featurePoints[ fp_id ].x + " " + shape.featurePoints[ fp_id ].y + "\n";
    });

    data += "}";

    return data;
}
/*PTS file contains landmark points location without label and of single label box only  */
PTS file contains landmark points location without label and of single label box only
PTS file contains landmark points location without label and of single label box only
function toDlibPts(shape){
    var keys = Object.keys(shape.featurePoints);
    var data = "version: 1\n"
            +"n_points:  "+keys.length+"\n"
            +"{\n";
    var l = shape.bbox.x, t = shape.bbox.y;
    keys.forEach( fp_id => {
        data += shape.featurePoints[ fp_id ].x + " " + shape.featurePoints[ fp_id ].y + "\n";
    });
    data += "}";
    return data;
}
function toDlibPts ( shape ) { var keys = Object . keys ( shape . featurePoints ) ; var data = "version: 1\n" + "n_points:  " + keys . length + "\n" + "{\n" ; var l = shape . bbox . x , t = shape . bbox . y ; keys . forEach ( fp_id => { data += shape . featurePoints [ fp_id ] . x + " " + shape . featurePoints [ fp_id ] . y + "\n" ; } ) ; data += "}" ; return data ; }
PTS file contains landmark points location without label and of single label box only
PTS file contains landmark points location without label and of single label box only