Contact Us
Back to all case studies

Deep Learning-Based Anti-Counterfeiting Solution

Unique in its kind deep learning-based model for QR code recognition.

Man taking a photo of a screenshot
Key Details

Unique in its kind deep learning-based model for QR code recognition.

  • Challenge
    model training for anti-counterfeiting identification
  • Solution
    deep learning-based model for QR code recognition
  • Technologies and tools
    TensorFlow, PyTorch, TorchVision, Catalyst, Albumentations, zbar, OpenCV, Scikit Learn, NumPy


The Client is a scientific and business-oriented organization in Europe. They have developed an innovative approach to anti-counterfeiting, which can be used by both manufacturers and vendors of physical goods and by digital commerce businesses.

Counterfeiting dramatically affects vendors in various niches. They suffer income losses receiving a shipment and finding counterfeits in it. That is how it happens in China in the baby food market, for example. Even the vendor may be unaware of selling counterfeit goods since widely-used QR codes are easy enough to fake. That raises the need to implement an additional feature that will make faking codes impossible and will thus minimize the chance to receive counterfeits. And having a product tagged with a special mark could be the way out. It would then be possible to use that mark to verify the origin and manufacture of a product.

Different anti-counterfeiting labeling allows insufficient protection to stop fraudsters. For the Client, it was crucial to obtain the verification method as easy-to-use and cheap as possible.

The issue to solve was a massive amount of counterfeits being produced across industries. The team on the Client’s side offered a concept, and they were looking for tech-savvy specialists to assist with making their idea viable. The Client turned to InData Labs as an expert in computer vision software and deep learning application development.

Challenge: model training for anti-counterfeiting identification

The key task our team faced at the PoC stage was to create a software solution for recognizing and verifying marks applied on top of QR codes. This pattern сan be extracted independently of the information embedded within the QR code.

In the case of QRs, the dusting on top of codes shapes patterns practically unnoticeable at first glance. Such a feature does not impede reading codes. At the same time, being a result of the same applying process, each pattern, however, is impossible to replicate, even for the same manufacturer. And since it is impossible to predict a pattern for one or another good and to counterfeit it, then that makes such an anti-counterfeiting technique super-secure.

Solution: deep learning-based model for QR code recognition

Our task was similar to face recognition: detecting and recognizing unique patterns, but for things, not people. The Client provided us with a training dataset containing half a million items. Bellow, there is an example of a QR code and a PUF as seen zoomed in:

qr code example example of an image

We came up with several possible approaches to solve the problem and test the results. Our team employed a convolutional neural network (CNN) to train the model to recognize and verify patterns.

It was challenging to achieve a value of 99% in the identification metric. We also solved the difficulty of false pattern detection in the database.

Result: Android app to authenticate QR codes

The outcome of the work done at the PoC stage was the Android-based application that demonstrated technological capabilities. That app functions as follows:

  • A user takes a picture of a QR
  • Our CNN-based model recognizes the PUF
  • The result gets automatically checked against the information in the database
  • The app outputs a successful verification or counterfeit alert

The business potential for applying technology is immense, as well as the range of industries where this new anti-counterfeiting method will be in high demand. For instance, special patterns can be applied on top of ink or integrated into the packaging design, and so on.

The anti-counterfeiting solution, invented by the Client and finalized with the help of InData Labs, can be used differently. Our engineering team met the challenge successfully and delivered a working prototype of the app.

Start Your Computer Vision Project with InData Labs

  • TensorFlow
  • OCR
  • Computer Vision

Contact InData Labs

Want to start getting value from your data? Fill the form. Click send. Let's talk.

    By clicking Send Message, you agree to our Terms of Use and Privacy Policy.