I'm working on an AWS Lambda function that needs to automatically blur faces and license plates in user-uploaded images. I've looked into various detection methods but I'm feeling overwhelmed by the options. Here are some approaches I've considered:
1. **OpenCV Haar Cascades:** It's lightweight and easy to deploy, but I've noticed tons of false positives with license plates, especially European ones.
2. **Contour Detection:** This method is better for finding rectangular shapes, but it still flags too many false positives.
3. **Contour + OCR Validation (pytesseract):** This allows me to validate the detected text against plate formats but requires Tesseract, pushing me towards using a Lambda Container Image.
4. **YOLO (v8 or v11) with ONNX Runtime:** This offers high accuracy for face detection, but I'll need to train a model for license plates, meaning a larger deployment size.
5. **AWS Rekognition:** It's a managed service with good accuracy, but it comes at an additional cost of around $1 per 1000 images.
I have to consider:
- Operating within AWS Lambda
- Processing 50-100 images a day
- Minimizing false positives—don't want to blur random objects
- Focusing on European (specifically French) license plates
- Balancing reliability with budget—I'm okay with spending for dependable results.
Right now, I'm leaning towards using YOLO for face detection and possibly using contour detection with OCR for license plates. Any thoughts? Is YOLO + ONNX overkill for this? Should I just go with Rekognition for simplicity? Are there any solid pre-trained models out there for European license plate detection? I appreciate any insights!
5 Answers
While you're limited to Lambda, you might want to check out Amazon Bedrock’s AgentCore Runtime. It’s tailored for AI workloads and could be a better fit for your needs, even if it’s less known right now.
If you're processing only 50-100 images daily, Rekognition seems like a no-brainer. Unless this is a side project, investing time in building and optimizing your own models may not make financial sense.
Can you explain why AI models in Lambda are less recommended?
Yeah, I’m curious about that too! What are the issues when running them on Lambda?
As someone from Roboflow, I can say we ran YOLO models on Lambda before. It was good until we scaled up, but at your scale, both our APIs and Rekognition are likely to cost around $2/month. It’s more about convenience and effectiveness than cost here!
Good points! Cost should definitely take a back seat if ease of use is prioritized.
Honestly, for just $3 a month with AWS Rekognition, why not go with that? It’s super easy and takes the hassle away from dealing with all these models.
Totally agree! With such a low cost, it might not be worth the time to set up a more complicated solution.
A custom YOLO model might give you more control over the accuracy, but with the image volume you have, Rekognition sounds like the faster route with less hassle—5 cents a day is hard to beat!
Lol, true! 5 cents is basically nothing for a reliable service.

Interesting! I’ve heard of SageMaker being used for this, is Bedrock comparable?