One thing I noticed is the image sizes for face recog seem to be about 300x300 pixels.
Some go down to 64x64 for car, dog, tree type recog.
Too much data is hard too analyse and takes way longer.
But if you want to detect missing/misplaced holes, a known good pattern is just differenced with the object being tested.
This is much easier to do, even at higher resolution and high speed.
The trick is to have them in a reference position, ie stick them in a fixed jig with fixed light levels.
Someone has sorted cucumbers at speed with Pi's
Start here with some simple Python coding
https://picamera.readthedocs.io/en/rele ... index.html
I think even Mathematica can do image stuff.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges