A face is detected as a rectangular area bounding the face. What you need is an edge detection algorithm, that detects the bounding areas from the edges and then you clear the internal pixels and get a mask. You can mix the face detection and edge detection algorithm to first find a bounding box, and then do an edge detection inside. This way, the mask that you get will be used to detect the region where the face is and you can then use that polygon to draw around the face.
A deep-learning solution would be a bit simpler one, I was using this technique in one of my own application a few weeks back, segmentation detection in images using deep learning.
It will detect the segments in the image, segments are basically the objects that appear to be connected. To increase the efficiency of the algorithm you can run this in the rectangle that you get.
How to do Semantic Segmentation using Deep learning[
^]