This script is cool and simple enough but unfortunately it is failed in some cases. For example i have attached a file here which is not a face but detected text as a face in it.

This one also:

One more example, the picture on following link has a face but not detecting the face. It is detecting the river stream as a face.
https://drive.google.com/file/d/14BKLzYQj2MO0kcsy59MuJTgIGLYTbZfW/view?usp=sharing