Hacker News new | ask | show | jobs
by hellopat 4745 days ago
I built something like this to automate cropping headshots for players in major sports. I figured it would work flawlessly after I ran a few test images through, but it turns out that it failed detecting a face or gave the wrong coordinates about 20% of the time.

I'm curious to know what the success rate of SeatGeek's process is.

2 comments

Were you using your own test data or a provided XML file?

Sports shots in our case don't get a great hit rate. Adjusting the `minNeighbors` parameter can help out with that depending on how many false positives you can accept. Musical artist misses are in the single digit percentages although shadows and strange backgrounds can give some additional faces that we don't really care for.

When collecting images we are now searching for those with more direct faces visible to make the detection easier. After that though we just try to get the face in the direct center and fall back to hoping the face is in that spot if we can't detect any.

At some point I want to try checking for partial face matches as well which should help in major sports since we tend not to use headshots.

I used a provided XML file. The library I used: https://github.com/peterbraden/node-opencv

I haven't touched the app in about a month, updated the library to the most recent version, and I'm now getting a 100% hit rate. I guess the library was a bit buggy.

Also, these headshots are the ones the players take before the season starts, not action shots. In theory there should be a high hit rate.

I've had issue with faces in shadow not being detected, which seems to make sense.
Beards and sunglasses also tend to cause problems. It's also nice to allow manual setting of where faces in some web editor to override what OpenCV might find.