I automated half of my first desk job by writing this Python CLI tool, which wraps the OpenCV `detectFace` method:
https://github.com/leblancfg/autocrop
Pyimagesearch is a great repository of everything OpenCV related, great to see them on the front page.