# Forgery Detection for Anti-Counterfeiting Patterns Using Deep Single Classifier
## 2 Related Works  
### Anti-Counterfeiting Two-Dimensional Code  
An anti-counterfeiting two-dimensional code [35] is mainly composed of a standard 2D barcode and anti-counterfeiting pattern, as shown in Figure 1. The anti-counterfeiting pattern is a pattern with fine texture, and its digital image is only composed of black and white binary pixels. Illegal copying will further magnify the ink diffusion or ink powder adsorption of fine texture in the printed anti-counterfeiting pattern so as to better expose the forgery trace, thus effectively improving the anti-counterfeiting property of the two-dimensional code. Then, it is acquired by scanning or photographing equipment and matched with relevant authenticity identification algorithms to achieve the purpose of identifying authenticity.  
The production and forgery process of an anti-counterfeiting 2D code is shown in Figure 2. The authentic anti-counterfeiting 2D code is generated by the official generation system and printed by the printing device, and it is pasted on the commodity or document as an anti-counterfeiting label for circulation. The forgery cannot obtain the original generated anti-counterfeiting 2D code digital file, so the forgery process involves scanning the digital image based on the authentic anti-counterfeiting 2D code, printing it again to obtain the forgery, and pasting it on the counterfeit goods or documents.  
The anti-counterfeiting 2D code needs to be combined with the corresponding anti-counterfeiting system to achieve an effective anti-counterfeiting function. The anti-counterfeiting system integrates a computer system, database system, software system and communication network technology, which mainly includes an anti-counterfeiting 2D code generation system, anti-counterfeiting 2D code acquisition system, cloud server and mobile applications. The generation and acquisition systems play roles in the digital image generation, physical printing and data acquisition of the anti-counterfeit 2D code. The cloud server  
Figure 1: Composition of the anti-counterfeiting 2D code.  
monitors and manages the upload, storage, verification and other processes of the anti-counterfeit 2D code. The mobile application collects and uploads the anti-counterfeit 2D code image to be tested to the server for verification; then, it feeds back the authenticity verification results to consumers.  
The authentication flow of the anti-counterfeiting 2D code based on the anti-counterfeiting system includes the following steps.  
1. The anti-counterfeiting 2D code generation system is used to generate the anti-counterfeiting 2D code digital image in batches; then, the digital images are printed as physical objects;
2. The anti-counterfeiting 2D code acquisition system uses an industrial camera to capture the printed anti-counterfeiting 2D code and then uploads it to the cloud server for storage;
3. Then, it builds the anti-counterfeiting 2D code authenticity dataset and designs the corresponding authenticity identification algorithm;
4. The consumer collects the anti-counterfeiting 2D code to be tested through mobile devices (such as smart phones) and uploads it to the cloud server;
5. A feature comparison between the anti-counterfeiting pattern inside the code and the genuine anti-counterfeiting pattern image stored in the cloud server is carried out using the authenticity identification algorithm, and an identification result is given;
6. After receiving the authentication result sent by the cloud server, the mobile application will display it to the consumer.