Magnetogram ViT analysis and identification model training method for paper money

By calculating the key parameters of the magnetic sensing signal and drawing a consistent magnetic spectrum, the problem of misjudgment in the adaptive drawing of the magnetic spectrum is solved, and the sensitivity of the model is improved, so that it can more accurately identify the slight changes in the magnetic characteristic signal and the magnetic spectrum.

CN119903374AActive Publication Date: 2025-04-29GUANGZHOU YINKE ELECTRONICS
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411960417.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-29
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

Misjudgment problems caused by changes in the y-axis and intensity axes in the adaptive drawing of magnetic spectrum lead to overfitting of the model, reducing the ability to identify slight changes in magnetic characteristic signals and magnetic spectrum.

Method used

By calculating the upper intensity limit, lower intensity limit, upper frequency limit and velocity frequency ratio of the magnetic sensing signal, perform Fourier transform and draw a magnetic spectrum graph to ensure the consistency of the magnetic spectrum, build a magnetic spectrum classification data set and train ViT analysis to identify the model, select appropriate optimizers and learning rate strategies to improve model sensitivity.

Benefits of technology

The problem of misjudgment in adaptive drawing of magnetic spectrum is solved, and the sensitivity of the model is improved, so that it can more accurately identify the slight changes in magnetic characteristic signals and magnetic spectrum patterns.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903374A_ABST
    Figure CN119903374A_ABST
Patent Text Reader

Abstract

The invention discloses a banknote magnetic spectrogram ViT analysis and identification model training method, which comprises the following steps: collecting banknote magnetic characteristic signals, and classifying the banknote according to the position of the banknote; calculating key parameters of magnetic spectrum transformation and magnetic spectrum drawing, wherein the key parameters comprise an intensity upper limit, an intensity lower limit, a frequency upper limit and a speed-frequency ratio of the magnetic sensing signal; fourier transform is carried out on the magnetic characteristic signals, and a magnetic spectrogram is drawn according to an intensity upper limit, an intensity lower limit and a frequency upper limit; and constructing a magnetic spectrogram classification data set, and training a magnetic spectrogram ViT analysis and identification model. According to the method, the magnetic spectrogram is drawn according to the intensity upper limit, the intensity lower limit and the frequency upper limit, so that the consistency of the magnetic spectrogram in subsequent use is ensured, and the problem of misjudgment caused by changes of a y axis and an intensity axis in adaptive drawing of the magnetic spectrogram is solved; and the model is over-fitted, so that the sensitivity of the model is improved, and tiny changes of magnetic characteristic signals and magnetic spectrograms can be distinguished.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of banknote counterfeiting identification, and in particular to a method for training a magnetic spectrum ViT analysis and recognition model of banknotes. Background Art

[0002] With the continuous development of magnetic sensor technology, magnetic image sensors have been successfully developed and have begun to be used in the field of banknote counterfeiting. Through magnetic image sensors, the complex magnetic distribution on banknotes can be detected in conjunction with a uniform paper feed device and converted into a magnetic image, thereby providing the possibility for quantitative counterfeiting of banknote magnetic characteristics. Therefore, quantitative analysis and counterfeiting of the magnetic distribution on banknotes through magnetic images has important research value and has great application potential in the field of counterfeiting. Summary of the invention

[0003] In order to solve the above technical problems, the purpose of the present invention is to provide a method for training a ViT analysis and recognition model of a banknote's magnetic spectrum, which solves the problem of misjudgment caused by changes in the y-axis and intensity axis in the adaptive drawing of the magnetic spectrum.

[0004] The purpose of the present invention is achieved through the following technical solutions:

[0005] A method for training a magnetic spectrum ViT analysis and recognition model of a banknote, comprising:

[0006] A collects magnetic characteristic signals of banknotes and classifies them according to their positions;

[0007] B. Calculate the key parameters of magnetic spectrum transformation and magnetic spectrum drawing, including the upper and lower limits of intensity, upper and lower limits of frequency and speed-frequency ratio of magnetic sensor signals;

[0008] C performs Fourier transformation on the magnetic characteristic signal and draws a magnetic spectrum according to the upper limit of intensity, the lower limit of intensity and the upper limit of frequency;

[0009] D. Construct a magnetic spectrum classification dataset and train a magnetic spectrum ViT analysis and recognition model.

[0010] Compared with the prior art, one or more embodiments of the present invention may have the following advantages:

[0011] This method combines the drawing of magnetic spectra according to the upper intensity limit, lower intensity limit and upper frequency limit, with the aim of ensuring that the magnetic spectra are used in subsequent Figure 1 The model can be overfitted to improve its sensitivity and distinguish the slight changes of magnetic characteristic signals and magnetic spectra. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1It is a flow chart of the training method of the magnetic spectrum ViT analysis and recognition model of banknotes.

[0013] Figure 2 The magnetic spectrum is generated by the safety line magnetic signal curve and short-time Fourier transform;

[0014] Figure 3 It is a magnetic spectrum generated by the double-color special-shaped horizontal number magnetic signal curve and short-time Fourier transform;

[0015] Figure 4 The magnetic spectrum is generated by the magnetic signal curve of the main background pattern and the short-time Fourier transform;

[0016] Figure 5 It is the actual learning rate curve for 100 rounds;

[0017] Figure 6 It is the data of the training process of the convnext model;

[0018] Figure 7 It is the training process of the Vision Transformers model. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below in conjunction with embodiments and drawings.

[0020] like Figure 1 As shown, the magnetic spectrum of banknotes ViT analysis and recognition model training method includes

[0021] A collects magnetic characteristic signals of banknotes and classifies them according to their positions;

[0022] Along the short side of the banknote, key positions include the security line, two-color special-shaped horizontal number, and main background pattern.

[0023] B. Calculate the key parameters of magnetic spectrum transformation and magnetic spectrum drawing, including the upper and lower limits of intensity, upper and lower limits of frequency and speed-frequency ratio of magnetic sensor signals;

[0024] Assume the relative scanning speed of magnetic sensor and banknote is v signal , the magnetic sensor sampling frequency is f signal , the length of the banknote is L cash , then the speed sampling ratio of the magnetic sensor signal is r signal , signal length l signal The calculation method is:

[0025] r signal =f signal / v signal

[0026] l signal =Lcash ×v signal / f signal

[0027] Assume that among all the magnetic sensor signals collected, the maximum intensity value is p max ;The maximum frequency value is f max .

[0028] The upper limit of the intensity of the magnetic sensor signal is p upper , upper frequency limit f upper .

[0029] p upper =σ p ×p max

[0030] f upper =σ f ×f max

[0031] In the formula, σ p is the upper limit coefficient of the intensity of the magnetic sensor signal, ranging from 1.0 to 2.0; σ f It is the upper limit coefficient of the frequency value of the magnetic sensor signal, and its value range is 1.0~1.5;

[0032] The lower limit of the intensity of the magnetic sensor signal is 0.

[0033] C performs Fourier transformation on the magnetic characteristic signal and draws a magnetic spectrum according to the upper limit of intensity, the lower limit of intensity and the upper limit of frequency;

[0034] Perform short-time Fourier transform on the magnetic characteristic signal. Since the scanning process of collecting magnetic characteristic signals at the key position of the banknote is related to the sensor sampling frequency, scanning speed, and banknote length, the parameters required for short-time Fourier transform generally include signal length and frequency, which are replaced by the speed sampling ratio r of the magnetic sensor signal. signal , signal length l signal .

[0035] Draw the magnetic spectrum according to the upper limit of intensity, the lower limit of intensity and the upper limit of frequency: it means that the horizontal axis starting point of the magnetic spectrum is: 0, and the horizontal axis end point is: signal length l signal ;

[0036] The vertical axis starting point of the magnetic spectrum is: 0, and the horizontal axis end point is: the upper limit of the frequency value f upper ;

[0037] The starting point of the intensity color axis of the magnetic spectrum is: the lower limit of the intensity of the magnetic sensor signal p down , the end point of the intensity color axis is: the upper limit of the intensity of the magnetic sensor signal p upper ;

[0038] The magnetic spectra drawn by this method have the same characteristics for the same signal. This can ensure that the magnetic spectra in subsequent use Figure 1 It can solve the misjudgment problem caused by the changes of the horizontal axis, vertical axis, and intensity color axis in the adaptive drawing of the magnetic spectrum.

[0039] The magnetic signal curves of the security line, the two-color special-shaped horizontal number, and the main background pattern and the magnetic spectrum generated by short-time Fourier transform are shown in Figure 2. Figure 2 , Figure 3 , Figure 4 .

[0040] D. Construct a magnetic spectrum classification dataset and train a magnetic spectrum ViT analysis and recognition model.

[0041] Construct a magnetic spectrum classification data set, and annotate the magnetic spectrum according to safety line, two-color special horizontal number, main background pattern, suspicious, and no signal. Figure 4 .

[0042] The labeling method of the magnetic spectrum classification dataset is carried out in accordance with the labeling of the image classification dataset, which is mainly to place the magnetic spectrum in a folder named after the category name, such as "safety line", "two-color irregular horizontal number", "main background pattern", "suspicious", and "no signal".

[0043] Training the magnetic spectrum ViT analysis and recognition model, using the ADAM (Adaptive Moment Estimation) optimizer, the optimizer's first-order moment estimation (momentum term) coefficient β 1 =0.9; second-order moment estimate (square gradient) coefficient β 2 =0.999, deviation correction ε=1×10 -8 .

[0044] The learning rate l of the optimizer r =2×10 -5 , LinearLR is used. The initial scale factor is 1 and the final scale factor is 0.1; the ratio is 80% of the total number of rounds.

[0045] The special feature is that the number of learning rounds is as large as possible, 50 rounds, 100 rounds or 150 rounds are selected to make the model overfit, thereby improving the sensitivity of the model and being able to distinguish even the slight changes in the magnetic characteristic signal and magnetic spectrum.

[0046] Taking 100 rounds as an example, the actual learning rate changes are shown in Figure 5 .

[0047]

Training Example 1

[0048] According to the above data set, a small convnext model is used for training 50 rounds. The final loss is 0.2452 and the accuracy is 1.0. It can achieve relatively accurate distinction (as shown in Table 1, Figure 6 shown).

[0049] Table 1 Training process data of convnext model

[0050]

[0051]

[0052]

[0053]

Training Example 2

[0054] According to the above data set, the Vision Transformers model of Patch16 was used for training for 50 rounds. The final loss was 0.3024 and the accuracy was 1.0. It can achieve relatively accurate distinction (as shown in Table 2, Figure 7 shown).

[0055] Table 2 Training process data of Vision Transformers model

[0056]

[0057]

[0058]

[0059] Combining the two examples, it can be seen that the present invention can achieve a good distinction between known counterfeiting and alteration methods. Due to the use of deep learning, the corresponding newly emerging methods can also be marked and then trained and upgraded. However, the ability of different models to identify new methods still needs to be continuously discovered and improved in practice.

[0060] Although the embodiments disclosed in the present invention are as above, the above contents are only embodiments adopted for facilitating the understanding of the present invention and are not intended to limit the present invention. Any technician in the technical field to which the present invention belongs can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present invention, but the patent protection scope of the present invention shall still be subject to the scope defined in the attached claims.

Claims

1. A method for training a magnetic spectrum ViT analysis and recognition model of banknotes, characterized in that: The method comprises: A collects magnetic characteristic signals of banknotes and classifies them according to their positions; B. Calculate the key parameters of magnetic spectrum transformation and magnetic spectrum drawing, including the upper and lower limits of intensity, upper and lower limits of frequency and speed-frequency ratio of magnetic sensor signals; C performs Fourier transformation on the magnetic characteristic signal and draws a magnetic spectrum according to the upper limit of intensity, the lower limit of intensity and the upper limit of frequency; D. Construct a magnetic spectrum classification dataset and train a magnetic spectrum ViT analysis and recognition model.

2. The method for training a magnetic spectrum ViT analysis and recognition model of banknotes according to claim 1, characterized in that: The magnetic characteristic signals of the banknotes in A are collected along the short sides of the banknotes at key positions of the banknotes; the key positions include the security line, the two-color special-shaped horizontal numbers and the main background pattern.

3. The method for training a magnetic spectrum ViT analysis and recognition model of banknotes according to claim 1, characterized in that: The speed sampling ratio of the magnetic sensor signal in B is r signal , the signal length is l signal , the speed sampling ratio is r signal With a signal length of l signal Used for signal preprocessing before magnetic spectrum conversion.

4. The method for training a magnetic spectrum ViT analysis and recognition model of banknotes according to claim 3, characterized in that: Magnetic sensor - banknote relative scanning speed is v signal , the magnetic sensor sampling frequency is f signal , the length of the banknote is L cash ; Then the speed sampling ratio of the magnetic sensor signal is r signal , signal length l signal The calculation method is:

5. The method for training a magnetic spectrum ViT analysis and recognition model of banknotes according to claim 1, characterized in that: In B, suppose that among all the magnetic sensor signals collected, the maximum intensity value is p max , the maximum frequency value is f max , then the upper limit of the intensity of the magnetic sensor signal is p upper , upper frequency limit f upper The calculation formula is: In the formula, σ p is the upper limit coefficient of the intensity of the magnetic sensor signal, ranging from 1.0 to 2.0; σ f It is the upper limit coefficient of the frequency value of the magnetic sensor signal, and its value range is 1.0~1.5; The lower limit of the intensity of the magnetic sensor signal is p down is 0.

6. The method for training a magnetic spectrum ViT analysis and recognition model of banknotes according to claim 1, characterized in that: In the above C, the magnetic characteristic signal is subjected to short-time Fourier transform, and the parameters included in the short-time Fourier transform are: signal length and signal frequency, and the signal length and signal frequency are replaced by the speed sampling ratio r of the magnetic sensor signal respectively. signal , signal length l signal .

7. The method for training a magnetic spectrum ViT analysis and recognition model of banknotes according to claim 1, characterized in that: In the above C, the magnetic spectrum is drawn according to the upper limit of intensity, the lower limit of intensity and the upper limit of frequency, including The starting point of the abscissa of the magnetic spectrum is set to 0, and the end point of the abscissa is set to the signal length l signal ; The vertical axis of the magnetic spectrum starts at 0, and the horizontal axis ends at the upper limit of the frequency value f upper ; The starting point of the intensity color axis of the magnetic spectrum is the lower limit of the intensity of the magnetic sensor signal p down The end point of the intensity color axis is the upper limit of the intensity of the magnetic sensor signal p upper ; The magnetic spectra drawn have the same characteristics for the same signal.

8. The method for training a magnetic spectrum ViT analysis and recognition model of banknotes according to claim 1, characterized in that: The D includes: Construct a magnetic spectrum classification data set and label the magnetic spectrum according to safety lines, two-color special-shaped horizontal numbers, main background patterns, suspicious, and no signals; The marking method of the magnetic spectrum classification data set is carried out according to the marking of the image classification data set, and the magnetic spectrum is placed in a folder named as the category name; including "safety line", "two-color special horizontal number", "main background pattern", "suspicious" and "no signal"; The magnetic spectrum ViT analysis and recognition model was trained using the ADAM optimizer. The first-order moment estimate of the optimizer, i.e., the momentum term coefficient β1 = 0.9; the second-order moment estimate, i.e., the square gradient coefficient β2 = 0.999, and the deviation correction ε = 1×10 -8 ; The learning rate l of the optimizer r =2×10 -5 , using linear learning rate LinearLR; starting scale factor 1 and final scale factor 0.1; the ratio is 80% of the total number of rounds.

9. The method for training a magnetic spectrum ViT analysis and recognition model of banknotes according to claim 7, characterized in that: The number of model learning training rounds is 50, 100, or 150 rounds to make the model overfit.

Citation Information

Patent Citations

  • Artificial intelligence-based method for detecting lane using spectrogram pattern, and apparatus for same

    WO2023132436A1