I found out, how to find a rectangle that containes a face on a photo, using basic haarcascade, but now I need to return not only a rectangle coordinates, but also an accuracy. It should be some value, that could indicate an algorithm's assurance in found face.