Wagtail has the ability to automatically detect faces and features inside your images and automatically crop the images to those features.
Feature detection is used by the ``fill`` image filter. An image that has had feature detection run on it would be cropped based on the features that were detected.
Setup
=====
Feature detection requires OpenCV which can be a bit tricky to set up as it is not currently pip-installable.
Feature detection runs when new images are uploaded in to Wagtail. If you already have images in your Wagtail site and would like to run feature detection on them, you will have to run it manually.
Manually running feature detection
----------------------------------
You can manually feature detection on all images by running the following code in the python shell: