It seems like ML might make this possible, with some allowance for error
I was recently putting together a directory of people. People could include photos in their listing. People have…different ideas about what makes a good profile photo, but they almost always include their face somewhere. For my purposes, I needed all the photos at the same aspect ratio and at a certain minimum resolution.
So here’s what I’d like to do: create a recipe that detects a face, crops around that face with a certain margin and aspect ratio, and scales the crop to a certain resolution. Maybe create a report showing low-confidence crops.
I’m pretty sure what you want to do is possible with a custom JS plugin, and also using Apple APIs in the Vision framework (and along with Core Image).
But, it’s a lot of work, and you’ll need to be familiar with both JavaScript and Apple’s frameworks.