Machine learning-based seal impression inspection and evidence obtaining system and method thereof
Through a deep twin network based on machine learning, combined with the comparison loss function, the authenticity of the seal text is identified, and the problem of insufficient accuracy of the seal text recognition in the existing technology is solved, and the seal text recognition effect with high accuracy and strong adaptability is achieved.
Patent Information
- Application Number
- CN202510260848.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-06-20
AI Technical Summary
The prior art is difficult to effectively identify the authenticity of seal texts, especially when faced with complex and diverse counterfeiting methods.
A deep twin network based on machine learning is adopted to obtain real and forged seal images, feature extraction and similarity calculation are performed, and training is combined with a comparison loss function to realize the authenticity of seal messages.
It improves the accuracy of seal text recognition, reduces the risk of misjudgment, can accurately judge the authenticity of seal text under complex situations, and adapts to small sample learning, solving the problem of traditional deep learning dependence on massive samples.
Smart Images

Figure CN120182798A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of seal impression inspection, and particularly to a system and method for seal impression inspection and evidence collection based on machine learning. Background Art
[0002] A seal impression refers to an imprint (characters, patterns or symbols) left on various documents, calligraphy and painting works, certificates, etc. by using a seal (such as a company seal, personal seal, artistic seal, etc.) to represent various functions such as approval, identity certification, authorization, etc. For example, the official seal impression of a company usually contains the full name of the company, and these seal impressions are stamped on contract documents to represent the company's confirmation of the contract content and assumption of corresponding legal responsibilities.
[0003] Since seals often represent credit identities, there are often lawbreakers who forge and alter seals to fabricate and impersonate legal person credit identities for improper benefits. In recent years, the methods of forging seal impressions mainly include forging by manual carving, photoengraving forging, image scanning and plate-making forging, copier copying forging, image scanning and printing forging, industrial printing method forging, etc.
[0004] Traditional methods for identifying the authenticity of seal impressions are manual identification, traditional methods for authenticating seal impressions such as measurement comparison method, scribing comparison method, splicing comparison method, superposition comparison method, etc. These methods have been basically phased out in practice due to their coarseness. However, manually inspecting the detailed features of seal impressions is currently the most reliable technical means.
[0005] With the development of computer technology, especially the maturity of machine learning technology, it has become possible to use a computer to inspect the authenticity of seal impressions. Summary of the Invention
[0006] The present invention provides a system and method for seal impression inspection and evidence collection based on machine learning, and the technical problem to be solved is: how to combine machine learning to identify the authenticity of seal impressions.
[0007] In order to achieve the above invention purpose, the following technical solutions are adopted in the present invention.
[0008] On the one hand, a method for seal impression inspection and evidence collection based on machine learning includes the following steps:
[0009] Step S100: Obtain real seal impression images and forged seal impression images of the seal;
[0010] Step S200: Mark the real seal impression images and forged seal impression images differently;
[0011] Step S300: Match the real seal impression images and forged seal impression images to form training samples, and construct sample data based on multiple training samples;
[0012] Step S400: Construct a deep siamese network based on two deep neural networks, with the parameters in the two deep neural networks shared; each deep neural network consists of a feature extraction network and a similarity calculation layer;
[0013] Step S500: Input the processed training samples into the deep siamese network for parameter training, and use the contrastive loss function as the loss function of the deep siamese network;
[0014] Its formula is:
[0015]
[0016] where X1, X2 are the inputs of the deep siamese network, Y is the discriminant factor, a binary label indicating whether X1 and X2 match. If X1 and X2 are similar, then Y = 0; if not, then Y = 1; the parameters of the deep siamese network are denoted by w; hereinafter, D w represents the Euclidean distance between the two feature vectors obtained by the deep siamese network, and its formula is:
[0017] D w (X1, X2) = ∥F w (X1) - F w (X2)∥2
[0018] In the above formula, F w (X1) is used to represent the feature vector output by the deep siamese network when the input is X1, and F w (X2) is used to represent the feature vector output by the deep siamese network when the input is X2; ∥∥2 represents the 2-norm;
[0019] Step S600: Divide the training samples into mini-batches of different sizes, and use the stochastic gradient descent method to train the deep siamese network on different mini-batches to complete the training of the deep siamese network;
[0020] Step S700: Apply the trained deep siamese network to seal recognition.
[0021] Further, in step S100, the real seal impression image / forged seal impression image is obtained by collecting the image of the real seal impression / forged seal impression through a professional scanner or a high-definition camera.
[0022] Further, in step S200, the real seal impression image and the forged seal impression image are translated, rotated, and shifted through the SIFT algorithm to obtain new real seal impression images and forged seal impression images, thereby increasing the number of real seal impression images and forged seal impression images.
[0023] Further, in step S400, the feature extraction network consists of 5 convolutional layers, 4 pooling layers alternating with each other, and then two fully connected layers;
[0024] Among them, the activation function of the convolutional layer is Sigmoid, the pooling layer uses the Mean-Pooling method to maintain translation, rotation, and scale invariance, and a dropout layer is added to prevent overfitting; the output of the last fully connected layer outputs features to the similarity calculation layer for judgment.
[0025] Further, in step S600, the deep siamese neural network has K layers, and the input of the k-th layer (k = 1, 2,..., K) is expressed as: Then the output of the k-th layer is: Where w k represents the coefficient of the k-th layer, b k represents the bias vector of the k-th layer, and f() is the Sigmoid function; the feature vector output by the deep siamese neural network is:
[0026]
[0027] The process of training the parameters of the deep siamese network by the stochastic gradient descent method is as follows:
[0028]
[0029] The training objective of the deep siamese network is to minimize the loss function L(w, Y, X1, X1), and the training parameters w k and b k , such that D w is monotonically decreasing when similar seal samples are input, and D w is monotonically increasing when different seals are input.
[0030] On the other hand, a system for inked impression verification and forensic evidence based on machine learning includes an inked impression image acquisition module, a genuine and forged inked impression marking module, a sample data construction module, a deep siamese network construction module, a loss function creation module, a training module, and an application module;
[0031] Among them, the inked impression image acquisition module is used to acquire the real inked impression image and the forged inked impression image of the seal;
[0032] The genuine and forged inked impression marking module is used to make distinguishable marks on the real inked impression image and the forged inked impression image;
[0033] The sample data construction module is used to match the real inked impression image and the forged inked impression image to form training samples, and construct sample data based on multiple training samples;
[0034] A deep siamese network construction module for constructing a deep siamese network based on two deep neural networks with shared parameters; each deep neural network consists of a feature extraction network and a similarity calculation layer;
[0035] A loss function creation module for using a contrastive loss function as the loss function of the deep siamese network;
[0036] Its form is:
[0037]
[0038] where X1, X2 are the inputs of the deep siamese network, Y is the discriminant factor, a binary label indicating whether X1 and X2 match. If X1 and X2 are similar, then Y = 0; if not, then Y = 1; the parameters of the deep siamese network are denoted by w; below, D w represents the Euclidean distance between the two feature vectors obtained by the deep siamese network, and its formula is:
[0039] D w (X1, X2) = ∥F w (X1) - F w (X2)∥2
[0040] In the above formula, F w (X1) is used to represent the feature vector output by the deep siamese network when the input is X1, and F w (X2) is used to represent the feature vector output by the deep siamese network when the input is X2; ∥∥2 represents the 2-norm;
[0041] A training module for dividing the training samples into mini-batches of different sizes and training the deep siamese network using the stochastic gradient descent method on different mini-batches to complete the training of the deep siamese network;
[0042] An application module for applying the trained deep siamese network to seal recognition.
[0043] Furthermore, in the seal impression image acquisition module, the real seal impression image / forged seal impression image is obtained by collecting the image of the real seal impression / forged seal impression using a professional scanner or a high-definition camera.
[0044] Furthermore, in the genuine and forged seal impression marking module, the real seal impression image and the forged seal impression image are translated, rotated, and shifted through the SIFT algorithm to obtain new real seal impression images and forged seal impression images, thereby increasing the number of real seal impression images and forged seal impression images.
[0045] Further, in the deep siamese network construction module, the feature extraction network consists of 5 convolutional layers, 4 pooling layers alternating with two fully connected layers;
[0046] Among them, the activation function of the convolutional layer is Sigmoid, the pooling layer uses the Mean-Pooling method to maintain translation, rotation, and scale invariance, and a dropout layer is added to prevent overfitting; the output of the last fully connected layer is sent to the similarity calculation layer for judgment.
[0047] Further, in the training module, assuming that the deep siamese neural network has K layers, the input of the k-th layer (k = 1, 2,..., K) is expressed as: Then the output of the k-th layer is: Where w k represents the coefficient of the k-th layer, b k represents the bias vector of the k-th layer, and f() is the Sigmoid function; the feature vector output by the deep siamese neural network is:
[0048]
[0049] The process of training the parameters of the deep siamese network by the stochastic gradient descent method is:
[0050]
[0051] The training objective of the deep siamese network is to minimize the loss function L(w, Y, X1, X1), and train the parameters w k and b k , so that when similar seal samples are input, D w decreases monotonically, and when different seals are input, D w increases monotonically.
[0052] The beneficial effects of the present invention are:
[0053] 1. Improve the accuracy of seal impression recognition
[0054] Using the deep siamese network for seal impression recognition, the network structure is unique. Through the dual-channel input and weight sharing mechanism, it can effectively extract seal impression features and accurately measure the similarity of sample pairs. Combined with the training of the contrastive loss function, it can enhance the feature difference and make the classification more accurate, thus improving the accuracy of seal impression recognition and reducing the risk of misjudgment.
[0055] Using the SIFT algorithm to perform operations such as translation, rotation, and displacement on the seal impression image increases the diversity of training samples, enables the network to learn more seal impression feature changes, further improves the recognition ability of seal impressions in different states, and ensures accurate judgment of the authenticity of seal impressions under complex conditions.
[0056] 2. Adapt to small-sample learning
[0057] In the field of seal recognition, deep learning is often limited by the limited number of labeled samples. However, the deep siamese network adopted by this method can learn the similarity measurement criterion through a small number of samples. By reasonably combining and expanding the sample pairs, the problem of the dependence of traditional deep learning on a large number of samples is effectively solved, and efficient learning and accurate recognition can be achieved with relatively few samples. Brief Description of the Drawings
[0058] Figure 1 It is a logic block diagram of a system for seal inspection and evidence collection based on machine learning. Detailed Embodiments
[0059] In order to make the content of the present invention easier to be clearly understood, the technical solutions in the embodiments of the present invention are described clearly and completely.
[0060] Embodiment 1
[0061] A method for seal inspection and evidence collection based on machine learning includes the following steps:
[0062] Step S100: Obtain a real seal impression image and a forged seal impression image. The real seal impression image / forged seal impression image is an image of a real seal impression / a forged seal impression collected by a professional scanner or a high-definition camera.
[0063] Step S200: Mark the real seal impression image and the forged seal impression image differently; in addition, translate, rotate, and shift the real seal impression image and the forged seal impression image through the SIFT algorithm to obtain new real seal impression images and forged seal impression images, thereby expanding the number of real seal impression images and forged seal impression images.
[0064] Step S300: Match the real seal impression image and the forged seal impression image to form training samples, and construct sample data based on multiple training samples.
[0065] Step S400: Construct a deep siamese network based on two deep neural networks, and the parameters in the two deep neural networks are shared; each deep neural network consists of a feature extraction network and a similarity calculation layer; the feature extraction network consists of 5 convolutional layers, 4 pooling layers alternately plus two fully connected layers.
[0066] Among them, the activation function of the convolutional layer is Sigmoid, the pooling layer adopts the Mean-Pooling method to maintain translation, rotation, and scale invariance, and a dropout layer is added to prevent overfitting; the last fully connected layer outputs features to the similarity calculation layer for judgment.
[0067] Step S500: Input the processed training samples into the deep siamese network for parameter training, and use the contrastive loss function (constructive loss) as the loss function of the deep siamese network;
[0068] Its form is:
[0069]
[0070] where X1, X2 are the inputs of the deep siamese network, Y is the discriminant factor, a binary label indicating whether X1 and X2 match. If X1 and X2 are similar, then Y = 0; if not, then Y = 1; the parameters of the deep siamese network are denoted by w; below, D w represents the Euclidean distance between the two feature vectors obtained by the deep siamese network, and its formula is:
[0071] D w (X1, X2) = ∥F w (X1) - F w (X2)∥2
[0072] In the above formula, F w (X1) is used to represent the feature vector output by the deep siamese network when the input is X1, and F w (X2) is used to represent the feature vector output by the deep siamese network when the input is X2; ∥∥2 represents the 2-norm.
[0073] Step S600: Divide the training samples into mini-batches of different sizes, and use the stochastic gradient descent method to train the deep siamese network on different mini-batches to complete the training of the deep siamese network. Assume that the deep siamese neural network has K layers, and the input of the k-th layer (k = 1, 2,..., K) is represented as: Then the output of the k-th layer is: where w k represents the coefficient of the k-th layer, b k represents the bias vector of the k-th layer, and f() is the Sigmoid function. The feature vector output by the deep siamese neural network is:
[0074]
[0075] The process of training the parameters of the deep siamese network by the stochastic gradient descent method is:
[0076]
[0077] The training objective of the deep siamese network is to minimize the loss function L(w, Y, X1, X1), and train the parameters w k and b k , such that when inputting similar seal samples, Dw Monotonically decreasing, D when different seals are input w Monotonically increasing.
[0078] Step S700: Apply the trained deep siamese network to seal recognition.
[0079] In summary, it has the following advantages:
[0080] 1. Improve the accuracy of seal impression recognition
[0081] Use the deep siamese network for seal impression recognition. This network structure is unique. Through the dual-channel input and weight sharing mechanism, it can effectively extract the features of the seal impression and accurately measure the similarity of sample pairs. Combined with training using the contrastive loss function, it can enhance the feature difference, make the classification more accurate, thus improving the accuracy of seal impression recognition and reducing the risk of misjudgment.
[0082] Use the SIFT algorithm to perform operations such as translation, rotation, and displacement on the seal impression image, increasing the diversity of training samples, enabling the network to learn more changes in seal impression features, further enhancing the recognition ability for seal impressions in different states, and ensuring accurate judgment of the authenticity of seal impressions in complex situations.
[0083] 2. Adapt to small-sample learning
[0084] In the field of seal recognition, deep learning is often limited by the limited number of labeled samples. However, the deep siamese network adopted in this method can learn the similarity measurement criterion through a small number of samples. By reasonably combining and expanding sample pairs, it effectively solves the problem of the dependence of traditional deep learning on a large number of samples, and can achieve efficient learning and accurate recognition in the case of relatively few samples.
[0085] Embodiment 2
[0086] Corresponding to the method for seal impression inspection and evidence collection based on machine learning in Embodiment 1, there is also a system for seal impression inspection and evidence collection based on machine learning.
[0087] Among them, the system for seal impression inspection and evidence collection based on machine learning includes a seal impression image acquisition module, a genuine and forged seal impression marking module, a sample data construction module, a deep siamese network construction module, a loss function creation module, a training module, and an application module;
[0088] The seal impression image acquisition module is used to acquire the real seal impression image and the forged seal impression image of the seal. The real seal impression image / forged seal impression image is the image of the real seal impression / forged seal impression collected by a professional scanner or a high-definition camera.
[0089] The genuine and forged seal impression marking module is used to distinctively mark genuine seal impression images and forged seal impression images. Among them, the genuine seal impression images and forged seal impression images are translated, rotated, and shifted through the SIFT algorithm to obtain new genuine seal impression images and forged seal impression images, thereby increasing the quantity of genuine seal impression images and forged seal impression images.
[0090] The sample data construction module is used to match genuine seal impression images and forged seal impression images to form training samples, and construct sample data based on multiple training samples.
[0091] The deep siamese network construction module is used to construct a deep siamese network based on two deep neural networks, with the parameters in the two deep neural networks shared. Each deep neural network consists of a feature extraction network and a similarity calculation layer. The feature extraction network consists of 5 convolutional layers, 4 pooling layers alternating, and then two fully connected layers.
[0092] Among them, the activation function of the convolutional layer is Sigmoid, the pooling layer adopts the Mean-Pooling method to maintain translational, rotational, and scale invariance, and a dropout layer is added to prevent overfitting. The last fully connected layer outputs features to the similarity calculation layer for judgment.
[0093] The loss function creation module is used to adopt the contrastive loss function (constructive loss) as the loss function of the deep siamese network.
[0094] Its form is,
[0095]
[0096] Among them, X1 and X2 are the inputs of the deep siamese network, Y is the discriminant factor, a binary label indicating whether X1 and X2 match. If X1 and X2 are similar, then Y = 0; if not, then Y = 1. The parameters of the deep siamese network are represented by w. Below, use D w to represent the Euclidean distance between the two feature vectors obtained by the deep siamese network, and its formula is:
[0097] D w (X1, X2) = ∥F w (X1) - F w (X2)∥2
[0098] In the above formula, F w (X1) is used to represent the feature vector output by the deep siamese network when the input is X1, and F w (X2) is used to represent the feature vector output by the deep siamese network when the input is X2; ∥∥2 represents the 2-norm.
[0099] A training module, which is used to divide training samples into mini-batches of different sizes, and train a deep siamese network using the stochastic gradient descent method on different mini-batches to complete the training of the deep siamese network. Assume that the deep siamese neural network has K layers, and the input of the k-th layer (k = 1, 2,..., K) is represented as: Then the output of the k-th layer is: where w k represents the coefficients of the k-th layer, b k represents the bias vector of the k-th layer, and f() is the Sigmoid function; the feature vector of the output of the deep siamese neural network is:
[0100]
[0101] The process of training the parameters of the deep siamese network using the stochastic gradient descent method is:
[0102]
[0103] The training objective of the deep siamese network is to minimize the loss function L(w, Y, X1, X1), and train the parameters w k and b k such that D w is monotonically decreasing when similar seal samples are input, and D w is monotonically increasing when different seals are input.
[0104] An application module, which is used to apply the trained deep siamese network to seal recognition.
[0105] 1. Improve the accuracy of seal impression recognition
[0106] Using the deep siamese network for seal impression recognition, this network structure is unique. Through the dual-channel input and weight sharing mechanism, it can effectively extract seal impression features and accurately measure the similarity of sample pairs. Combined with the training of the contrast loss function, it can enhance the feature difference and make the classification more accurate, thereby improving the accuracy of seal impression recognition and reducing the risk of misjudgment.
[0107] Using the SIFT algorithm to perform operations such as translation, rotation, and displacement on the seal impression image increases the diversity of training samples, enables the network to learn more seal impression feature variation situations, and further improves the recognition ability of seal impressions in different states, ensuring accurate judgment of the authenticity of seal impressions under complex conditions.
[0108] 2. Adapt to small-sample learning
[0109] In the field of seal recognition, deep learning is often limited by the limited number of labeled samples. However, the deep siamese network adopted by this method can learn similarity measurement criteria through a small number of samples. By reasonably combining and expanding sample pairs, the problem of the dependence of traditional deep learning on a large number of samples is effectively solved, and efficient learning and accurate recognition can be achieved with relatively few samples.
[0110] The above are only the preferred embodiments of the present invention patent and are not intended to limit the present invention patent. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention patent shall be included within the protection scope of the present invention patent.
Claims
1. A method for seal inspection and evidence collection based on machine learning, characterized in that: The following steps are involved: Step S100: Acquire a genuine seal image and a forged seal image; Step S200: Differentiating the authentic seal image from the forged seal image; Step S300: Matching the real seal image and the forged seal image to form a training sample, and constructing sample data based on the multiple training samples; Step S400: constructing a deep twin network based on two deep neural networks, wherein parameters in the two deep neural networks are shared; each deep neural network is composed of a feature extraction network and a similarity calculation layer; Step S500: input the processed training samples into the deep twin network for parameter training, and use the contrast loss function as the loss function of the deep twin network; The formula is: Where X1 and X2 are the inputs of the deep twin network, and Y is the discriminant factor, which is a binary label indicating whether X1 and X2 match. If X1 and X2 are similar, Y = 0, and if they are not similar, Y = 1. The parameters of the deep twin network are represented by w. w Represents the Euclidean distance between two feature vectors obtained by the deep twin network, and its formula is: D w (X1,X2)=||F w (X1)-F w (X2)||2 In the above formula, F w (X1) is used to represent the feature vector output by the deep twin network when the input is X1, F w (X2) is used to represent the feature vector output by the deep twin network when the input is X2; ||||2 represents the 2-norm; Step S600: Divide the training samples into mini-batches of different sizes, train the deep twin network using the stochastic gradient descent method on different mini-batches, and complete the training of the deep twin network; Step S700: Apply the trained deep twin network to seal recognition.
2. The method for seal inspection and evidence collection based on machine learning according to claim 1 is characterized in that: In step S100, the real seal image / forged seal image is obtained by collecting the real seal image / forged seal image through a professional scanner or a high-definition camera.
3. The method for seal inspection and evidence collection based on machine learning according to claim 1 is characterized in that: In step S200, the real seal image and the forged seal image are translated, rotated and shifted by SIFT algorithm to obtain new real seal image and forged seal image, thereby increasing the number of real seal images and forged seal images.
4. The method for seal inspection and evidence collection based on machine learning according to claim 1 is characterized in that: In step S400, the feature extraction network consists of 5 convolutional layers, 4 pooling layers alternating with two fully connected layers; Among them, the activation function of the convolution layer is Sigmoid, the pooling layer uses the Mean-Pooling method to keep the translation, rotation, and scale unchanged, and adds a dropout layer to prevent overfitting; the last fully connected layer outputs features to the similarity calculation layer for judgment.
5. The method for seal inspection and evidence collection based on machine learning according to claim 1 is characterized in that: In step S600, the deep twin neural network has K layers, and the input of the kth layer (k=1, 2, ..., K) is expressed as: The output of the kth layer is: where w k represents the coefficient of the kth layer, b k represents the bias vector of the kth layer, f() is the Sigmoid function; the feature vector of the output of the deep twin neural network is: The process of training the parameters of the deep twin network by stochastic gradient descent is: The training goal of the deep twin network is to minimize the loss function L(w,Y,X1,X1), and the training parameter w k and b k , so that when similar seal samples are input, D w Monotonically decreasing, D when different seals are input w Monotonically increasing.
6. A system for seal inspection and evidence collection based on machine learning, characterized in that: It includes a seal image acquisition module, a true and false seal marking module, a sample data construction module, a deep twin network construction module, a loss function creation module, a training module, and an application module; The seal image acquisition module is used to acquire the real seal image and the forged seal image of the seal; The genuine and fake seal text marking module is used to distinguish between the genuine seal text image and the fake seal text image; A sample data construction module is used to match the real seal image and the forged seal image to form a training sample, and to construct sample data based on multiple training samples; A deep twin network construction module, used to construct a deep twin network based on two deep neural networks, wherein parameters in the two deep neural networks are shared; each deep neural network consists of a feature extraction network and a similarity calculation layer; The loss function creation module is used to adopt the contrast loss function as the loss function of the deep twin network; Its form is: Where X1 and X2 are the inputs of the deep twin network, and Y is the discriminant factor, which is a binary label indicating whether X1 and X2 match. If X1 and X2 are similar, Y = 0, and if they are not similar, Y = 1. The parameters of the deep twin network are represented by w. w Represents the Euclidean distance between two feature vectors obtained by the deep twin network, and its formula is: D w (X1,X2)=||F w (X1)-F w (X2)||2 In the above formula, F w (X1) is used to represent the feature vector output by the deep twin network when the input is X1, F w (X2) is used to represent the feature vector output by the deep twin network when the input is X2; ||||2 represents the 2-norm; The training module is used to divide the training samples into mini-batches of different sizes, and train the deep twin network using the stochastic gradient descent method on different mini-batches to complete the training of the deep twin network; Application module, used to apply the trained deep twin network to seal recognition; In the seal image acquisition module, the real seal image / forged seal image is an image of the real seal / forged seal collected by a professional scanner or a high-definition camera.
7. The system for seal inspection and evidence collection based on machine learning according to claim 6, characterized in that: In the authenticity seal marking module, the SIFT algorithm is used to translate, rotate and shift the real seal image and the forged seal image to obtain new real seal image and forged seal image, thereby increasing the number of real seal images and forged seal images.
8. The system for seal inspection and evidence collection based on machine learning according to claim 6, characterized in that: In the deep twin network building module, the feature extraction network consists of 5 convolutional layers, 4 pooling layers alternating with two fully connected layers; Among them, the activation function of the convolution layer is Sigmoid, the pooling layer uses the Mean-Pooling method to keep the translation, rotation, and scale unchanged, and adds a dropout layer to prevent overfitting. The last fully connected layer outputs features to the similarity calculation layer for judgment.
9. The system for seal inspection and evidence collection based on machine learning according to claim 6, characterized in that: In the training module, assuming that the deep twin neural network has K layers, the input of the kth layer (k = 1, 2, ..., K) is expressed as: The output of the kth layer is: where w k represents the coefficient of the kth layer, b k represents the bias vector of the kth layer, f() is the Sigmoid function; the feature vector of the output of the deep twin neural network is: The process of training the parameters of the deep twin network by stochastic gradient descent is: The training goal of the deep twin network is to minimize the loss function L(w,Y,X1,X1), and the training parameter w k and b k , so that when similar seal samples are input, D w Monotonically decreasing, D when different seals are input w Monotonically increasing.