Foreign affairs certificate anti-counterfeiting feature detection method based on convolutional neural network model

By using a convolutional neural network model, the effective information area of ​​the certificate is determined by gradient amplitude sequence and difference sequence. Combined with the weighted feature signal between multiple convolutional layers, the problem of insufficient accuracy in identifying anti-counterfeiting areas in foreign affairs certificate images is solved, and more accurate authenticity judgment is achieved even when the certificate is worn and the image quality is poor.

CN121545025BActive Publication Date: 2026-05-08BEIJING DEXUN AVIATION SERVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING DEXUN AVIATION SERVICE CO LTD
Filing Date
2025-11-27
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing technologies lack sufficient accuracy in identifying anti-counterfeiting areas in foreign affairs document images, especially when the document is worn or the image quality is poor, resulting in significant image deviations.

Method used

A method based on a convolutional neural network model is adopted. The effective information region is determined by the gradient magnitude sequence and difference sequence of the target convolutional layer. Combining morphological features and gradient distribution, the anti-counterfeiting features of the certificate are extracted. The feature signals are weighted and processed between multiple convolutional layers to determine the authenticity of the certificate.

Benefits of technology

It improves the accuracy of identifying anti-counterfeiting features on foreign affairs certificates, enabling accurate judgment of authenticity even when certificates are worn or have poor image quality, thus reducing the false positive rate of counterfeit certificates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121545025B_ABST
    Figure CN121545025B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of electric digital data processing, in particular to a foreign affairs certificate anti-fake feature detection method based on a convolutional neural network model, which comprises the following steps: inputting a certificate surface image into a target convolutional layer in a preset convolutional neural network to obtain a target output image; determining an effective information area in the target output image by using a gradient amplitude sequence of the target convolutional layer; determining information effective parameters of any pixel point in the effective information area by using a current extraction area corresponding to the pixel point and each gradient amplitude in the current extraction area; determining a mapping extraction area and an actual extraction area in a corresponding output image by taking the current extraction area as input; and determining a true or false result of the foreign affairs certificate by using pixel position features corresponding to the mapping extraction area and the actual extraction area respectively and information effective parameters corresponding to the mapping extraction area and the actual extraction area respectively. According to the technical scheme, the true or false of the foreign affairs certificate can be more accurately identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic digital data processing technology, specifically to a method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model. Background Technology

[0002] Foreign affairs documents and certificates require anti-counterfeiting measures to prevent dangerous individuals from bypassing checks and carrying out hazardous activities, and to avoid identity theft that could harm the interests of the victims. Furthermore, with the widespread adoption of high-definition printing and digital imaging technologies, the cost of counterfeiting documents has decreased, while the difficulty of preventing counterfeiting has increased.

[0003] Existing technologies use convolutional neural networks (CNNs) for automatic identification of anti-counterfeiting information. By using different depths of convolutional layers to perceive element information at multiple scales, CNNs can adapt to the variability and concealment of anti-counterfeiting features in foreign affairs documents. From the input of the original image to the output of authenticity judgment, CNNs can improve detection efficiency by training and optimizing the integrated process of feature extraction and classification.

[0004] However, in actual inspection, the anti-counterfeiting features of the certificate are worn down during the production process, the image quality is poor, and the imaging angle is deviated, which leads to deviations in the captured certificate image and results in insufficient accuracy in recognizing the anti-counterfeiting areas of the certificate in the image. Summary of the Invention

[0005] To address the technical problem of low accuracy in recognizing anti-counterfeiting areas in images of foreign affairs certificates, this invention aims to provide a method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model. The specific technical solution adopted is as follows:

[0006] This invention provides a method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model, the method comprising:

[0007] Obtain the surface image of the foreign affairs certificate, and input the certificate surface image into the target convolutional layer in the preset convolutional neural network to obtain the target output image;

[0008] The effective information region in the target output image is determined by using the gradient magnitude sequence formed by the sum of the gradients of the pixels in each convolution kernel of the target convolutional layer.

[0009] Determine the current extraction region corresponding to any pixel in the effective information region, and use the gradient magnitudes of each pixel in the current extraction region to determine its effective information parameters;

[0010] The current extraction region is determined as input to obtain the mapped extraction region and the actual extraction region in the corresponding output image, and the pixel position features corresponding to the mapped extraction region and the actual extraction region are determined respectively.

[0011] The authenticity of foreign affairs certificates is determined by utilizing the pixel location features and effective information parameters corresponding to the mapped and actual extracted regions.

[0012] Furthermore, the step of determining the effective information region in the target output image by utilizing the gradient magnitude sequence formed by the sum of the pixel gradients in each convolutional kernel of the target convolutional layer includes:

[0013] The gradient magnitude sequence is determined by using the gradient magnitude sequence formed by the sum of the gradients of the pixels in each convolution kernel of the target convolutional layer.

[0014] The effective information region in the target output image is determined by using the position of the largest difference element in the amplitude difference sequence.

[0015] Furthermore, determining the effective information region in the target output image by utilizing the position of the largest difference element in the amplitude difference sequence includes:

[0016] Determine the two adjacent amplitudes corresponding to the position of the largest difference element in the amplitude difference sequence, and take the largest value among the adjacent amplitudes as the right endpoint of the gradient amplitude sequence;

[0017] The position of the largest magnitude element in the gradient magnitude sequence is taken as the left endpoint of the sequence. The analysis magnitude region is extracted from the gradient magnitude sequence based on the left endpoint and the right endpoint of the sequence.

[0018] Mark the analysis amplitude region on the target output graph to determine the effective information region in the target output graph.

[0019] Further, determining the current extraction region corresponding to any pixel in the valid information region includes:

[0020] By combining any pixel in the effective information region with surrounding pixels that have the same gradient direction, the current extraction region corresponding to that pixel is obtained.

[0021] Furthermore, the step of determining the effective parameters of information using the gradient magnitudes of each gradient in the currently extracted region includes:

[0022] The effective parameters of the information of the current extracted region are determined by using the morphological features, average gradient magnitude, magnitude standard deviation, and gradient magnitude of any pixel in the current extracted region.

[0023] Furthermore, the determination of effective parameters for the information of the currently extracted region using the morphological features, average gradient magnitude, magnitude standard deviation, and gradient magnitude of any pixel includes:

[0024] Determine the bounding rectangle of the current extraction region in the target output image, and determine the aspect ratio of the bounding rectangle;

[0025] The effective parameters of the information of the current extraction region are determined by using the aspect ratio, average gradient magnitude, magnitude standard deviation, and gradient magnitude of the bounding rectangle of the current extraction region.

[0026] Further, determining the current extraction region as input to obtain the mapped extraction region and the actual extraction region in the corresponding output image includes:

[0027] The current extracted region is used as the input of the convolutional layer to obtain the corresponding output image. The corresponding mapping position region of the current extracted region in its corresponding output image is determined and used as the mapping extracted region.

[0028] Based on the valid information region in the output image corresponding to the current extracted region, the actual extracted region in the corresponding output image is determined.

[0029] Further, determining the pixel position features corresponding to the mapped extraction region and the actual extraction region includes:

[0030] Determine the signal values ​​and coordinate values ​​of the corresponding pixels in the mapped extraction region and the actual extraction region;

[0031] The signal value and coordinate value are used as the pixel position features corresponding to the mapped extraction area and the actual extraction area, respectively.

[0032] Furthermore, the step of determining the authenticity of foreign affairs certificates by utilizing the pixel position features and valid information parameters corresponding to the mapped extraction region and the actual extraction region, respectively, includes:

[0033] Based on signal values ​​and coordinate values, determine the signal difference and point distance between corresponding pixels in the mapped extraction area and the actual extraction area;

[0034] The authenticity of foreign affairs certificates is determined by using the effective parameters of the information of the mapped extraction region and the actual extraction region, the signal difference, and the point distance.

[0035] Furthermore, the determination of the authenticity of foreign affairs certificates by utilizing the effective parameters of the information of the mapped extraction region and the actual extraction region, the signal difference, and the point distance includes:

[0036] The feature retention rate of the corresponding pixel in the mapped extraction region is determined by using the effective information parameters of the mapped extraction region and the actual extraction region, the signal difference, and the point distance.

[0037] By utilizing the feature retention rate of each pixel in the mapped extraction region, the output image containing the mapped extraction region is updated to obtain the updated output image.

[0038] The updated output image is input into the feature point region extracted in the subsequent linked layer. The feature point region is then compared with the standard source image of the foreign affairs certificate to determine the authenticity of the foreign affairs certificate.

[0039] The present invention has the following beneficial effects:

[0040] This invention combines the salience of the anti-counterfeiting features of photographed foreign affairs certificates at different scales to extract and judge them. It also targets the concentration trend of abnormal signals caused by alteration and forgery of anti-counterfeiting features, thereby judging whether the certificate information has been tampered with based on the deformation of the signal, thus more accurately identifying the authenticity of foreign affairs certificates.

[0041] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0042] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 A flowchart illustrating the steps of a method for detecting anti-counterfeiting features of foreign affairs documents based on a convolutional neural network model, provided in one embodiment of the present invention;

[0044] Figure 2 This is a detailed flowchart of step S2 in a method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model, provided in an embodiment of the present invention.

[0045] Figure 3 This is a detailed flowchart of step S22 in a method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model, provided in an embodiment of the present invention.

[0046] Figure 4 This is a detailed flowchart of step S5 in a method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model, provided in an embodiment of the present invention.

[0047] Figure 5 This is a detailed flowchart of step S52 in a method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model, provided in an embodiment of the present invention.

[0048] Figure 6 This is a schematic diagram of the hardware operating environment of the foreign affairs document anti-counterfeiting feature detection device based on a convolutional neural network model involved in the embodiments of the present invention. Detailed Implementation

[0049] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a method for detecting anti-counterfeiting features of foreign affairs documents based on a convolutional neural network model proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0051] The following description, in conjunction with the accompanying drawings, details the specific scheme of the foreign affairs certificate anti-counterfeiting feature detection method based on a convolutional neural network model provided by the present invention.

[0052] Example 1:

[0053] For the method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model provided by this invention, please refer to [link to relevant documentation]. Figure 1 The diagram illustrates a flowchart of the steps of a method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model, according to an embodiment of the present invention.

[0054] The method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model includes:

[0055] Step S1: Obtain the surface image of the foreign affairs certificate, and input the surface image of the certificate into the target convolutional layer in the preset convolutional neural network to obtain the target output image;

[0056] In this embodiment, an image acquisition device is first deployed to obtain an image of the surface of the foreign affairs certificate, which is then imported into a model pre-processing tool for processing.

[0057] Specifically:

[0058] By using a fixed, high-resolution optical camera positioned vertically, the document photo is taken on a fixed card slot, thereby minimizing image noise introduced during the image capture process. Furthermore, by taking the document photo on a fixed card slot from a fixed position and cropping the image according to the preset document size, an accurate image of the document surface can be obtained.

[0059] Next, import the CNN (Convolutional Neural Network) model. The default model order can be as follows:

[0060] (1) A single convolutional layer with a kernel size of 7x7;

[0061] (2) A normalized layer of two convolutional layers with a kernel size of 3x3;

[0062] (3) An instance normalization layer and a ReLU activation function are used after each computational layer;

[0063] (4) The middle part of the network consists of 6 residual modules to perform deeper image feature extraction; each residual module consists of two convolutional layers with a kernel size of 3×3, and the convolutional layers are followed by an instance normalization layer and a ReLU activation function.

[0064] (5) Upsample the image using two transposed convolutional layers with a kernel size of 3×3, and then use the kernel size...

[0065] It consists of 7×7 convolutional layers. After the first two convolutional layers, an instance normalization layer and a ReLU activation function are used, and after the last convolutional layer, a Tanh activation function is used.

[0066] (6) Finally, a global skip connection is used, in which the network mainly learns the residual information between the input and output. A high-quality image is obtained by adding the low-quality input image with the residual information.

[0067] Correspondingly, the original image of the foreign affairs certificate is input into the target convolutional layer (generally the first convolutional layer) in the above-mentioned preset convolutional neural network to obtain the target output image.

[0068] Step S2: Use the gradient magnitude sequence formed by the sum of the gradients of the pixels in each convolution kernel of the target convolutional layer to determine the effective information region in the target output image.

[0069] Specifically, please refer to Figure 2 Step S2 includes:

[0070] Step S21: Using the gradient magnitude sequence formed by the sum of the gradients of the pixels in each convolutional kernel of the target convolutional layer, determine the magnitude difference sequence corresponding to the gradient magnitude sequence.

[0071] Step S22: Determine the effective information region in the target output image by using the position of the largest difference element in the amplitude difference sequence.

[0072] More specifically, please refer to Figure 3 Step S22 includes:

[0073] Step S221: Determine the two adjacent amplitudes corresponding to the position of the largest difference element in the amplitude difference sequence, and take the largest value among the adjacent amplitudes as the right endpoint of the gradient amplitude sequence.

[0074] Step S222: Take the position of the largest magnitude element in the gradient magnitude sequence as the left endpoint of the sequence, and extract the analysis magnitude region from the gradient magnitude sequence based on the left endpoint and the right endpoint of the sequence.

[0075] Step S223: Mark the analysis amplitude region on the target output map to determine the effective information region in the target output map.

[0076] Based on the above embodiments, the surface image of the certificate obtained after background cropping is analyzed: the certificate surface is verified by combining the implanted information points to obtain the corresponding anti-counterfeiting result. However, in the actual shooting process, the wear and tear on the certificate surface and the unavoidable errors in the shooting process of the imprint cause errors in the implanted information points, resulting in deformation, distortion, and missing parts of the extracted local components. Therefore, it is necessary to extract the effectiveness of the remaining local anti-counterfeiting feature components and further combine the clarity of the extracted components at different levels to identify features, so as to accurately identify both counterfeit and deformed features.

[0077] In this embodiment, the effective information region is extracted by considering the inter-layer partitioning of the image during the extraction process: after convolutional layers convolve pixels, each pixel extracts neighboring information. Therefore, during convolution, the signal maxima in each layer represent the location of the feature set. Thus, the effective information content of the current region is evaluated based on the independence of the effective signals contained within the feature set. Furthermore:

[0078] (1) Input the first convolutional layer (as the target convolutional layer, regardless of the kernel size) into the preprocessed certificate surface image and obtain the output image of the convolutional layer (target output image).

[0079] (2) By using the size of the convolution kernel corresponding to the convolution layer used in this embodiment (1), the total gradient of the pixels in each convolution kernel is determined, and the magnitude of the total gradient of the convolution kernel is placed in descending order to obtain the descending sequence of the (gradient) magnitude of each convolution kernel.

[0080] (3) For the gradient magnitude descending sequence, extract the magnitude difference sequence by subtracting the first difference from the first difference, locate the position of the maximum difference (element), and further extract and calculate the two adjacent magnitudes corresponding to the position of the maximum difference.

[0081] (4) Take the larger of two adjacent amplitudes (amplitude) as the right endpoint of the gradient amplitude descending sequence and the position of the largest amplitude as the left endpoint of the sequence. This allows a portion of the amplitude region (relatively high amplitude region) to be extracted from the amplitude descending sequence. These amplitude regions are then marked in the signal map of the current convolutional layer. In this embodiment, the amplitude regions are marked in the target output map, thus obtaining the effective information region in the corresponding single-layer window (the target output map in this example).

[0082] After each convolutional layer is processed, the above process (1) to (4) in this embodiment is executed iteratively to extract the effective information region after each convolution.

[0083] Step S3: Determine the current extraction region corresponding to any pixel in the effective information region, and determine its effective information parameters using the gradient magnitudes of each pixel in the current extraction region.

[0084] Further evaluation of the effective information content in the extracted effective information regions: There is obvious gradient concentration in the extracted effective information regions, so the significant gradient distribution contained in the effective information regions should show a relatively normal distribution pattern. Therefore, the effectiveness of region labeling is judged by combining gradients based on the normality of gradient changes in the region.

[0085] Specifically, step S3, determining the current extraction region corresponding to any pixel in the valid information region, includes:

[0086] By combining any pixel in the effective information region with surrounding pixels that have the same gradient direction, the current extraction region corresponding to that pixel is obtained.

[0087] In this embodiment, within a single effective information region, for any pixel, the gradient direction of its surrounding gradient is extracted, and other pixels with the same gradient direction are marked. These other pixels are then combined with the current pixel to obtain the current extraction region w. Thus, the accurate variation within the effective information region is extracted as the effective component. Based on the distribution of the effective components, the actual authenticity of different components is determined.

[0088] Specifically, step S3, which uses the gradient magnitudes of the currently extracted region to determine their effective information parameters, includes:

[0089] The effective parameters of the information of the current extracted region are determined by using the morphological features, average gradient magnitude, magnitude standard deviation, and gradient magnitude of any pixel in the current extracted region.

[0090] Specifically, the morphological feature is the aspect ratio of the circumscribed rectangle, that is, morphological analysis is performed based on the aspect ratio of the circumscribed rectangle.

[0091] More specifically, the step of determining the effective parameters of the information of the current extracted region using the morphological features, average gradient magnitude, magnitude standard deviation, and gradient magnitude of any pixel point of the current extracted region includes:

[0092] Determine the bounding rectangle of the current extraction region in the target output image, and determine the aspect ratio of the bounding rectangle;

[0093] The effective parameters of the information of the current extraction region are determined by using the aspect ratio, average gradient magnitude, magnitude standard deviation, and gradient magnitude of the bounding rectangle of the current extraction region.

[0094] Based on the above embodiments, in this embodiment, the circumscribed rectangle corresponding to the current extracted region w in the (target) output image is obtained. The circumscribed rectangle of the extracted region w represents the proportion of high signal intensity regions in the image, thereby clearly showing the anti-counterfeiting mark point regions contained in the extracted region w. Therefore, the length of the long side of the extracted circumscribed rectangle is... With the length of the shorter side ratio The aspect ratio is denoted as . .

[0095] For the extracted region w obtained by merging the target output image through the above embodiments, calculate the effective information parameters of the extracted region w. :

[0096]

[0097] In the formula: Let w be the aspect ratio of the bounding rectangle corresponding to the currently extracted region w in the output image. This formula represents the actual regularity of the currently extracted region w. Further, combining the shape information and area information of the extracted region w represented by this formula, i.e., using the area of ​​the currently extracted region w... The total area of ​​the effective information region selected by using each point in the extracted region w as the center point of the convolution kernel. The ratio is used to accurately assess the shape and style of the currently extracted region in the image, thereby determining whether the extracted region w contains valid texture information.

[0098] It should be noted that, to ensure the calculation results are meaningful, in this embodiment of the invention, when performing fractional operations, if the denominator is 0, a parameter adjustment factor can be added to the denominator for addition to prevent the denominator from being 0. This parameter adjustment factor is a very small positive number. For example, the value of this parameter adjustment factor can be 0.01. Its specific value can be set by the implementer according to the actual situation, and this embodiment of the invention does not impose specific limitations. Furthermore, whether the parameter adjustment factor has dimensions can change with the parameter or feature it is added to. Specifically, if the parameter or feature it is added to is dimensionless, then the parameter adjustment factor is dimensionless; if the parameter or feature it is added to has dimensions, then the dimension of the parameter adjustment factor is the same as the dimension of the parameter or feature.

[0099] The validity of the texture information is further determined by combining the gradient distribution within region w: This represents the formula for calculating skewness. This represents the gradient magnitude of any pixel i within the currently extracted region w. , and the mean amplitude in region w The difference between the average gradient magnitude and the standard deviation of the gradient magnitude. The cube of the ratio is used to determine the degree of fluctuation deviation at each point in the region, and further determined by the number of points i in region w. We perform a traversal to determine the integrity of the information content within region w.

[0100] Step S4: Determine the current extraction region as input to obtain the mapped extraction region and the actual extraction region in the corresponding output image, and determine the pixel position features corresponding to the mapped extraction region and the actual extraction region respectively.

[0101] Specifically, step S4, which determines the current extraction region as input to obtain the mapped extraction region and the actual extraction region in the corresponding output image, includes:

[0102] The current extracted region is used as the input of the convolutional layer to obtain the corresponding output image. The corresponding mapping position region of the current extracted region in its corresponding output image is determined and used as the mapping extracted region.

[0103] Based on the effective information region in the output image corresponding to the current extracted region, the actual extracted region in the corresponding output image is determined.

[0104] Specifically, step S4, determining the pixel position features corresponding to the mapped extraction region and the actual extraction region, includes:

[0105] Determine the signal values ​​and coordinate values ​​of the corresponding pixels in the mapped extraction region and the actual extraction region;

[0106] The signal value and coordinate value are used as the pixel position features corresponding to the mapped extraction area and the actual extraction area, respectively.

[0107] Step S5: Using the pixel position features and valid information parameters corresponding to the mapped extraction area and the actual extraction area, the authenticity of the foreign affairs certificate is determined.

[0108] In this embodiment, steps S4 and S5 will be explained in conjunction with the following:

[0109] Based on the above embodiments, the information damage at a region location is further determined by considering the transfer of feature signal intervals between layers after the image passes through multiple convolutional layers, thereby enabling targeted weighting of information at specific locations.

[0110] The significant changes in the features extracted from anti-counterfeiting information between convolutional layers are analyzed: shallow convolutional layers are used to capture detailed textures, while deep convolutional layers are used to capture the relationships between features. Therefore, in the context of anti-counterfeiting features for foreign affairs certificates, as the signal image is gradually extracted by the convolutional layers, the changes in the distribution of features from local salient features to the whole image feature distribution are observed. Consequently, some marker points are located in low-gradient regions of the image, and the gradient changes of these marker points are masked by the local outlier signal values ​​generated by the fluctuations of surrounding pixels during the convolution process. This leads to a gradual decrease in the significance of the gradient fluctuations at the marker point positions during the convolution process. Ultimately, in the output signal image of the deep convolutional layer, the feature information of some marker point positions is gradually lost.

[0111] Therefore, for anti-counterfeiting feature information that appears abnormal, the saliency of the feature region w in the local extraction area is weighted by position after interlayer processing.

[0112] Specifically, please refer to Figure 4 Step S5 includes:

[0113] Step S51: Based on the signal value and coordinate value, determine the signal difference and point distance between the corresponding pixels in the mapped extraction area and the actual extraction area;

[0114] Step S52: Using the effective parameters of the information of the mapped extraction area and the actual extraction area, the signal difference, and the point distance, the authenticity of the foreign affairs certificate is determined.

[0115] More specifically, please refer to Figure 5 Step S52 includes:

[0116] Step S521: Using the effective information parameters of the mapped extraction region and the actual extraction region, the signal difference, and the point distance, determine the feature retention rate of the corresponding pixel in the mapped extraction region;

[0117] Step S522: Use the feature retention rate of each pixel in the mapping extraction region to update the output image where the mapping extraction region is located to obtain the updated output image;

[0118] Step S523: Input the updated output image into the feature point region extracted in the subsequent linked layer, and compare the feature point region with the standard source image of the foreign affairs certificate to determine the authenticity of the foreign affairs certificate.

[0119] In this embodiment, the input image and output image of the convolutional layer are first compared to determine the validity of the feature region. Since the image size is not changed, the mapping extraction region is determined by the signal saliency of the extraction region w in the input image (which is essentially the output image of the previous convolutional layer). The displacement of the feature points that appear in the image is used to process each position.

[0120] Here, the extracted region w in the input image and its corresponding mapping position in the output image, which is also input, are denoted as the mapped extracted region. The actual extraction region determined from the output image is denoted as... For the specific judgment process, please refer to the implementation process of determining the effective information area and the extraction area w in the above embodiments.

[0121] against Mid-point position Extraction region of the output image Between, the closest positions , here and That is, the corresponding pixels in the mapped extraction area and the actual extraction area mentioned above.

[0122] If the two points are relatively far apart, and their locations are... In the extraction area of ​​the output image If the signal strength decreases significantly, then the feature information contained in the location is diluted.

[0123] Based on this, calculate the mapped extraction region corresponding to the current extraction region w. Mid-point position Feature retention :

[0124]

[0125] In the formula: The mapping position of the input image (the input image containing the currently extracted region w) in the output image of the convolutional layer. signal value and Distance to extraction area nearest point signal value The signal difference between them is mapped to the position. and actual location Distance between points The ratio of the Euclidean distance between the two coordinates represents the mapped position. With actual location The signal strength values ​​between them are judged by the distance between them, which reflects that the position of the significant signal in the output image of the current convolutional layer is smaller than that in the input image, and the signal value is more significant (since the signal values ​​all pass through the normalization layer, the significance compared is the normalized significance). This represents the parameter tuning factor, a safety value set to prevent the denominator from being 0; specifically, it is 0.1. The error caused by this parameter tuning factor is within a controllable range. Furthermore, Dimensions of distance from point They have the same dimensions.

[0126] Furthermore, the difference in effective parameters x corresponding to the information extracted from each region of the input and output images of the convolutional layer is combined. ,in Valid parameters representing the information extracted from the mapping region. This represents the effective parameters of the actual extracted region; by reflecting the fluctuation of the current extracted region w, this formula is used to evaluate the significant differences between all extracted regions in the current signal graph.

[0127] The feature retention of the above point locations is assessed using a normalization function (such as linear normalization of maximum and minimum values). It has been processed and further linearly mapped to a numerical range of [-1, 1], denoted as... The specific linear mapping process is as follows: First, subtract 0.5 from the normalized value range [0, 1] to obtain a value in the range [-0.5, 0.5]. Then, multiply by the value 2 to obtain a value in the range [-1, 1]. Of course, in other embodiments of the present invention, other methods may also be used to linearly map the range of numerical values ​​to the numerical interval [-1, 1].

[0128] Further analysis of the points in the output graph of the convolutional layer Location processing:

[0129] Pixels with low feature retention are assigned higher weights so that their signals regain a more dominant position in subsequent calculations; conversely, the weights of pixels with high information retention are kept as unchanged as possible.

[0130] Here, pixels with low feature retention can be filtered out. Pixels with a feature retention rate less than a preset retention threshold (e.g., 0.5) are considered to have low feature retention. Then, these pixels with low feature retention are weighted: a weight matrix with the same size as the output image is created, and the points that need to be weighted are... Evaluation of its feature retention The normalized value of the opposite number , that is The larger the value, the more corresponding The smaller the value, the better. The sum of 1 and 1: Based on the pixel coordinates in the image, place them at the corresponding row and column coordinate positions in the weight matrix F.

[0131] The weight matrix F is mapped to the corresponding layer to extract the feature map of the region (the output image corresponding to the input of the extracted region w). The new feature map obtained by performing pixel-by-pixel multiplication (i.e., Hadamard product) (corresponding to the updated output image above) : Here This indicates element-wise multiplication.

[0132] Finally, we obtain the updated feature map of this convolutional layer after processing. The input is then fed into subsequent linked layers to extract feature point regions present in the image.

[0133] The feature point regions in the obtained updated feature maps have different sizes. When compared with the labeled standard source image files backed up on the server, they are easily cropped and stretched by the CNN (Convolutional Neural Network) model, resulting in abnormal features. Therefore, during the comparison process, the pooling window sequence set by the SPP (Spatial Pyramid Pooling) layer is used to convert them into feature vectors of the same size for comparison.

[0134] When automating the authentication of documents, the system will compare the anti-counterfeiting feature vector extracted from the image of the document to be tested with the pre-stored anti-counterfeiting feature vector extracted from the real standard image source file in the same high-dimensional feature space using cosine similarity.

[0135] The similarity between two vectors is assessed by measuring the consistency of their directions, with a value range of [-1, 1]. The closer the value is to 1, the more consistent the directions of the two vectors are, indicating a higher degree of anti-counterfeiting feature matching.

[0136] High confidence (match): Similarity ≥ 0.95. This indicates that the anti-counterfeiting features of the certificate being tested are highly consistent with the source file, and can be determined to be genuine.

[0137] High confidence (basic match): Similarity between [0.85, 0.95). This indicates slight differences, but high similarity in key anti-counterfeiting features. It can be preliminarily determined to be genuine, but the system will prompt doubt, requiring manual verification using a few other elements.

[0138] Moderate confidence (doubtful): Similarity between [0.60, 0.85]. This indicates some differences, low feature matching, and a highly uncertain judgment result, requiring manual review.

[0139] Low confidence (mismatch): Similarity < 0.60. This indicates that the anti-counterfeiting features of the document being tested deviate significantly from the source document, and it can be determined to be counterfeit.

[0140] This invention combines the salience of the anti-counterfeiting features of photographed foreign affairs certificates at different scales to extract and judge them. It also targets the concentration trend of abnormal signals caused by alteration and forgery of anti-counterfeiting features, thereby judging whether the certificate information has been tampered with based on the deformation of the signal, thus more accurately identifying the authenticity of foreign affairs certificates.

[0141] Example 2:

[0142] This invention also proposes a device for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model. The device can be a data processing device such as a computer or server, or a combination of multiple devices.

[0143] like Figure 6 As shown, Figure 6 This is a schematic diagram of the hardware operating environment of the foreign affairs document anti-counterfeiting feature detection device based on a convolutional neural network model involved in the embodiments of the present invention.

[0144] like Figure 6As shown, the foreign affairs document anti-counterfeiting feature detection device based on a convolutional neural network model may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display or an input unit such as a control panel; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WIFI interface). The memory 1005 may be a high-speed RAM or a stable, non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001. The memory 1005, as a computer storage medium, may include a foreign affairs document anti-counterfeiting feature detection program based on a convolutional neural network model, referred to as the foreign affairs document anti-counterfeiting feature detection program.

[0145] Those skilled in the art will understand that Figure 6 The hardware structure shown does not constitute a limitation on the device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0146] Continue to refer to Figure 6 , Figure 6 The memory 1005, which is a computer-readable storage medium, may include an operating device, a user interface module, a network communication module, and a foreign affairs certificate anti-counterfeiting feature detection program based on a convolutional neural network model.

[0147] exist Figure 6 In this embodiment, the network communication module is mainly used to connect to the server and can communicate with the server for data; while the processor 1001 can call the foreign affairs certificate anti-counterfeiting feature detection program based on the convolutional neural network model stored in the memory 1005 and execute the steps in the above embodiments.

[0148] The hardware structure of the foreign affairs document anti-counterfeiting feature detection device based on the above convolutional neural network model is used to implement various embodiments of the foreign affairs document anti-counterfeiting feature detection method based on the convolutional neural network model of the present invention.

[0149] Furthermore, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a foreign affairs document anti-counterfeiting feature detection program based on a convolutional neural network model. When executed by a processor, the foreign affairs document anti-counterfeiting feature detection program based on a convolutional neural network model implements the steps of the foreign affairs document anti-counterfeiting feature detection method based on a convolutional neural network model as described above.

[0150] The method implemented when the foreign affairs document anti-counterfeiting feature detection program based on the convolutional neural network model is executed can be referred to in various embodiments of the foreign affairs document anti-counterfeiting feature detection method based on the convolutional neural network model of the present invention, and will not be repeated here.

[0151] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0152] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0153] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0154] The above description is only a preferred embodiment of the present invention and does not limit the scope of protection of the present invention. All equivalent structural / method transformations made under the inventive concept of the present invention using the contents of the present invention specification and drawings, or direct / indirect applications in other related technical fields, are included within the scope of protection of the present invention.

Claims

1. A method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model, characterized in that, The method includes: Obtain the surface image of the foreign affairs certificate, and input the certificate surface image into the target convolutional layer in the preset convolutional neural network to obtain the target output image; The effective information region in the target output image is determined by using the gradient magnitude sequence formed by the sum of the gradients of the pixels in each convolution kernel of the target convolutional layer. Determine the current extraction region corresponding to any pixel in the effective information region, and use the gradient magnitudes of each pixel in the current extraction region to determine its effective information parameters; The current extraction region is determined as input to obtain the mapped extraction region and the actual extraction region in the corresponding output image, and the pixel position features corresponding to the mapped extraction region and the actual extraction region are determined respectively. The authenticity of foreign affairs certificates is determined by utilizing the pixel location features and effective information parameters corresponding to the mapped and actual extracted regions. The determination of the effective information region in the target output image using the gradient magnitude sequence formed by the sum of the gradients of pixels in each convolutional kernel of the target convolutional layer includes: The gradient magnitude sequence is determined by using the gradient magnitude sequence formed by the sum of the gradients of the pixels in each convolution kernel of the target convolutional layer. The effective information region in the target output image is determined by using the position of the maximum difference element in the amplitude difference sequence; The step of determining the effective information region in the target output image by utilizing the position of the maximum difference element in the amplitude difference sequence includes: Determine the two adjacent amplitudes corresponding to the position of the largest difference element in the amplitude difference sequence, and take the largest value among the adjacent amplitudes as the right endpoint of the gradient amplitude sequence; The position of the largest magnitude element in the gradient magnitude sequence is taken as the left endpoint of the sequence. The analysis magnitude region is extracted from the gradient magnitude sequence based on the left endpoint and the right endpoint of the sequence. Mark the analysis amplitude region on the target output graph to determine the effective information region in the target output graph.

2. The method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model according to claim 1, characterized in that, The determination of the current extraction region corresponding to any pixel in the valid information region includes: By combining any pixel in the effective information region with surrounding pixels that have the same gradient direction, the current extraction region corresponding to that pixel is obtained.

3. The method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model according to claim 1, characterized in that, The process of determining the effective parameters of information using the gradient magnitudes of each gradient in the currently extracted region includes: The effective parameters of the information of the current extracted region are determined by using the morphological features, average gradient magnitude, magnitude standard deviation, and gradient magnitude of any pixel in the current extracted region.

4. The method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model according to claim 3, characterized in that, The method of determining effective parameters for information about the currently extracted region by utilizing the morphological features, average gradient magnitude, standard deviation of the magnitude, and gradient magnitude of any pixel point of the currently extracted region includes: Determine the bounding rectangle of the current extraction region in the target output image, and determine the aspect ratio of the bounding rectangle; The effective parameters of the information of the current extraction region are determined by using the aspect ratio, average gradient magnitude, magnitude standard deviation, and gradient magnitude of the bounding rectangle of the current extraction region.

5. The method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model according to claim 1, characterized in that, The step of determining the current extraction region as input to obtain the mapped extraction region and the actual extraction region in the corresponding output image includes: The current extracted region is used as the input of the convolutional layer to obtain the corresponding output image. The corresponding mapping position region of the current extracted region in its corresponding output image is determined and used as the mapping extracted region. Based on the valid information region in the output image corresponding to the current extracted region, the actual extracted region in the corresponding output image is determined.

6. The method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model according to claim 1, characterized in that, The determination of the pixel position features corresponding to the mapped extraction region and the actual extraction region includes: Determine the signal values ​​and coordinate values ​​of the corresponding pixels in the mapped extraction region and the actual extraction region; The signal value and coordinate value are used as the pixel position features corresponding to the mapped extraction area and the actual extraction area, respectively.

7. The method for detecting anti-counterfeiting features of foreign affairs certificates based on a convolutional neural network model according to claim 6, characterized in that, The method of determining the authenticity of foreign affairs certificates by utilizing the pixel position features and effective information parameters corresponding to the mapped extraction region and the actual extraction region includes: Based on signal values ​​and coordinate values, determine the signal difference and point distance between corresponding pixels in the mapped extraction area and the actual extraction area; The authenticity of foreign affairs certificates is determined by using the effective parameters of the information of the mapped extraction region and the actual extraction region, the signal difference, and the point distance.

Citation Information

Patent Citations

  • Certificate authenticity identification method and device, computer readable medium and electronic equipment

    CN115375893A

  • Image detection method and device based on adversarial generation, equipment and medium

    CN120564015A