Santa's coming early this year: new recognition engine

gpu training

Current recognition engine is working fine, but there are some cards that it can't recognize no matter what: they are simply too blurry or without enough details to identify them.
That's why I decided to rebuild it and use a different method.

After a lot of researches I finally found a nice deep-learning library, that allows me to quickly train and adapt the image database. Based on a particular CNN (Convoluted Neural Network) approach, whenever new cards are published, I can edit my model in a matter of few minutes, without the need to retrain it from scratch.

For those who are wondering about coding examples, I'm sorry but I'm not going to share any implementation details :)

I will, however, share the results of my work.  Below you can find some images that I used as benchmark. From left to right, you can find some real world images taken from previous machine version (Pic 1-2), then one taken with the new hardware version (Pic 3) and finally two images that current recognition engine can't find since their quality is too bad (Pic 4-5).

test images

After feeding them  to the new system, these are the results:

test results

 Everything was correctly found: even the twisted, out of focus images did get a match, with a score closer to the better ones.

Why bother?

Some of you may be asking: Why bother? Why re-invent the wheel? Isn't faster and more cost effective to simply use a cloud provider (like Amazon Rekognition) to do the job? 

Well, things are a little more complicated than that. First of all, this is a very specific task. We're not doing something "usual" as face recognition or class labeling; plus we're working with more than 50k different cards and that's a real challenge for the training step.

Moreover, Amazon Rekognition isn't actually cheap: you will pay each time a card is identified and whenever you train your model. With 50k images updated everything 3 months, cost will become unsustainable in less than an year. This means that I would have to put some hard limitations on the amount of cards customers can handle, and if that limit is crossed I would have to ask for an extra.

This system doesn't really fit with current business model. Customers should be able to use their machine as much as they want, without worrying "Oh man, am I using too many card-credits?": as long as your subscription is active, you can do whatever you want. Full stop.

From an economic point of view, it's way better to avoid relying on an external service, too. Every company needs subscriptions to stay profitable in the long run. If I create my own recognition engine, the initial cost will be spread on several months/customers, with an higher profitability for me and lower cost for my customers.
It's a real win-win situation.

When this system will be ready for production, existing customers will have to... do nothing!

Magic Sorter environment was built by connecting several services together, each one of them acting as a black box to the other. As long as the transfer protocol remains the same, everything will happily work. The only change will be the improved results.