Machine learning should not be your go-to solution for every task. Consider the KISS principle like I did for signature detection
In this article, I present a case study demonstrating that machine learning should not be your go-to solution for every task. Simpler techniques could give good results as well and are easier to implement.
Case Study: Signature Detection
Imagine we have a pile of contracts and we need to know whether they are signed or not. This scenario involves signature detection — reliably identifying whether a signature appears in a specific location or not — assuming you already know the rough location where a signature should be (e.g. south-east). In ancient times this task was done by binarizing the image and counting the black pixels in an area. If a signature is present, the black pixel count would surpass a threshold. But in 2023, how could we do this differently?
The Machine Learning Approach
We would use GroundingDino, which is a state-of-the-art zero-shot object detection model. The input to the model is an image combined with a prompt, while the output consists of rectangles indicating potential locations with associated confidence scores. While this may seem like an ideal solution at first glance, there are certain limitations worth considering. Let’s try it out with three different prompts: ‘signature’, ‘handwriting’ and ‘scribble’.