← Back to context

Comment by mv4

1 day ago

Ironically, the pill counting example selected to showcase "the best vision model" can be easily solved with OpenCV template matching, a technology created 25 years ago.

I'm assuming you mean that this tech became available in OpenCV 25 years ago, but as it turns out, the underlying tech can be traced back much further, at least as far as 1977! :)

https://ieeexplore.ieee.org/document/1674847 G. J. Vanderbrug and A. Rosenfeld, “Two-Stage Template Matching,” IEEE Transactions on Computers, Vol. C-26, No. 4, pp. 384–393, April 1977. DOI: 10.1109/TC.1977.1674847

The point is that it's general. It can do this task and many other tasks and it doesn't need custom development like OpenCV does. Of course if you only want to count pills and you want it to be cheap/fast you're still better off using OpenCV.

Basic Template matching has severe limitations around scaling, rotation, and perspective. In my experience it greatly underperforms compared to deep network object detectors. My experience- and I imagine others have different experiences- is that SIFT techniques also fail pretty badly with noisy data.

  • That's correct, and I was specifically referring to the example chosen - where scale and perspective are known. Template rotation is relatively easy as well - but partial obstructions would pose a problem.

    Another application where template matching would work brilliantly? Car counting in parking lots using satellite imagery.

    Source: I did this [1] using OpenCV and template matching. Outperformed "Cars Overhead with Context" models.

    https://abcnews.com/International/satellite-data-suggests-co...

I'm sure a typical frontier model would also be happy to write that opencv script for you, and it would do it well.

That is certainly pretty far from what was possible 25 years ago.