A method for detecting similar trademark changes based on a selective state space model
By using a U-shaped twin network model based on a selective state-space model, the problem of low accuracy in trademark similarity change detection is solved, achieving high-precision difference detection and annotation between trademark images, and improving the application capability of trademark image change detection.
Patent Information
- Application Number
- CN202411378173.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-09-30
AI Technical Summary
Existing technologies cannot effectively capture subtle features and differences between images in trademark similarity variation detection, resulting in low detection accuracy. Furthermore, existing methods cannot provide effective capture capabilities for changes and differences between images.
A U-shaped twin network model based on a selective state space model is adopted, which combines an encoder, connector and decoder. The processing module with the selective state space model as the core improves the model's ability to apply long-range features and realizes differentiated prediction between similar trademark images.
It improves the accuracy of trademark image change detection and difference annotation capabilities, enhances the ability to calculate and apply long-range features between trademark images, and reduces the time consumption of the prediction process.
Smart Images

Figure CN119380049B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer software technology and relates to a method for detecting similar trademark changes based on a selective state-space model. Background Technology
[0002] A trademark is a sign used to identify and distinguish the source of goods or services, and is an important intellectual property right belonging to an individual or organization. According to Article 8 of my country's Trademark Law, "Any sign capable of distinguishing the goods of a natural person, legal person, or other organization from those of others, including words, graphics, letters, numbers, three-dimensional signs, color combinations, and sounds, as well as combinations of the above elements, may be applied for registration as a trademark." Article 57, Paragraph 2 stipulates that "using a trademark similar to a registered trademark on the same goods, or using a trademark identical or similar to a registered trademark on similar goods, without the permission of the trademark registrant, and which is likely to cause confusion," constitutes an infringement of the exclusive right to use a registered trademark.
[0003] In today's era of rapid economic and social development driven by innovation, the protection of intellectual property rights is constantly being strengthened. However, trademark misuse and theft continue to occur frequently. Infringement no longer solely involves the direct misappropriation or counterfeiting of registered trademarks belonging to other rights holders; more often, it involves altering the colors, adding or deleting graphics, or modifying the design of a registered trademark to create visual confusion with the original. This type of infringement is not only more covert but also causes more severe commercial losses and brand damage to the infringed party. Meanwhile, computer vision intelligent models based on deep learning technology have been applied in various scenarios, and in the problem of trademark similarity change detection, they can now detect even subtle changes to trademark images.
[0004] In existing technical solutions, Alshowaish et al. implemented a trademark similarity detection model based on shape similarity using convolutional neural networks (CNNs). The CNNs extract features from trademark images in different storage formats and find the similarity between a given image and each stored image based on their distance. Two different pre-trained CNNs, ResNet-50 and VGG-16, were used as feature extractors. To reduce the impact of high-dimensional features on recognition performance, PCA was applied to the extracted features for dimensionality reduction, improving the accuracy of similar trademark recognition. This method uses a pre-trained visual model and CNNs to construct a similarity evaluation model for similar trademarks. However, this method is not strong at capturing subtle features in images and cannot detect differences between two similar trademarks, only providing an evaluation result based on similarity distance. Furthermore, the use of PCA-based dimensionality reduction leads to significant loss of image features, failing to achieve a balance between data dimensionality and evaluation accuracy.
[0005] Liu et al. proposed a neural network model that utilizes the semantic, visual, and phonetic information of characters appearing in trademarks as data features for similarity assessment between similar trademarks. In terms of visual feature detection, this approach uses feature vectors from different trademarks to construct a similarity matrix to calculate the maximum similarity assessment vector and the relative maximum similarity position vector. These two vectors are then used as inputs to calculate the probability distribution for similarity classification through a convolutional neural network. The key to this method is the formation of a new feature vector calculation pattern through the construction of a similarity matrix. However, this method can only provide classification results for images as similar or dissimilar, and cannot effectively capture the changes and differences between images. Summary of the Invention
[0006] To address the problems existing in the prior art, the present invention aims to provide a method for detecting similar trademark variations based on a selective state space model. This invention takes the provisions of trademark law and the problem of detecting similar trademark pattern variations in judicial practice as its starting point, focusing on proposing a technical method based on a selective state space model to improve the detection capability of differences between images. The invention is implemented using a machine learning algorithm based on the selective state space model, which has a stronger feature capture capability than existing convolutional neural networks and attention-based neural networks.
[0007] The main objective of this invention is to provide an effective solution and means for comparing variations between similar trademarks by applying computer vision and deep learning technologies, thereby enhancing the application capabilities of computers in this field, reducing the proportion of manual work in trademark applications, trademark infringement enforcement, and intellectual property case trials, and thus contributing to the protection of intellectual property rights.
[0008] This method proposes a trademark similarity change detection approach based on a selective state-space model, capable of predicting the center position, length, and width of the differences between two similar trademarks. Firstly, by employing a U-shaped twin network model, it fully utilizes the image features of the two similar trademarks, providing the model architecture foundation for achieving differentiated prediction capabilities. Secondly, by using a processing module based on the selective state-space model to form the encoder and decoder, it effectively enhances the model's ability to apply long-range features while reducing the total number of model parameters, thus significantly improving the model's prediction accuracy.
[0009] The technical solution of this invention is as follows:
[0010] A method for detecting similar trademark changes based on a selective state-space model, comprising the following steps:
[0011] 1) Obtain a trademark similarity change detection dataset, which includes multiple pairs of sample images, each pair of sample images including a trademark image and its similar images;
[0012] 2) A selective state-space model is trained using the trademark similarity change detection dataset to obtain a similar trademark change detection model. The selective state-space model includes an encoder, a connector, a decoder, a segmentation image expansion module, a linear mapping calculation module, and a convolutional neural network. The encoder employs a Siamese network architecture, comprising two structurally identical branches. Each branch includes a first encoder sub-block, a second encoder sub-block, a third encoder sub-block, and a segmentation image merging module that sequentially process the input data. The connector includes two cascaded visual state-space calculation modules. The decoder includes three decoder sub-blocks and a segmentation image expansion module. One image in a pair of sample images is segmented into multiple sub-images and input into one of the branches; the other image in the pair of sample images is segmented into multiple sub-images and input into another branch.
[0013] The encoder is used to calculate the input image from shallow features to deep features, and inputs the deep features to the connector and sends the shallow features to the decoder. Specifically, the first encoder sub-block extracts first shallow features from each input sub-image and inputs them to the second encoder sub-block and the third decoder sub-block, respectively; the second encoder sub-block extracts second shallow features from the first shallow features of each sub-image and inputs them to the third encoder sub-block and the second decoder sub-block, respectively; the third encoder sub-block extracts deep features from the second shallow features of each sub-image and inputs them to the segmentation image merging module and the first decoder sub-block, respectively; the segmentation image merging module merges the deep features of each sub-image to obtain the deep features of the input image and inputs them to the connector.
[0014] The connector is used to extract features from the input deep features and input the extracted features into the first decoder sub-block of the decoder; each decoder sub-block of the decoder decodes the input feature data to obtain the image representation corresponding to different levels of each pair of sample images; the image representation output by the third decoder sub-block is restored by the segmentation image expansion module and the linear mapping calculation module in sequence and then input into the convolutional neural network for prediction to obtain the change region corresponding to each pair of sample images.
[0015] The loss value of the predicted change region and the annotation information of the pair of sample images is calculated based on the selected loss function, and the selective state space model is optimized based on the loss value.
[0016] 3) Input a target trademark image and similar trademark images into the similar trademark change detection model, and return the change detection result of the similar trademark image relative to the target trademark.
[0017] Furthermore, for each pair of sample images, the similar image corresponding to the trademark image is an image with the trademark image as the background and other icon data as the foreground.
[0018] Furthermore, a loss function L = L is adopted. hm +λ wh L wh The loss value is calculated; where λ wh To define custom hyperparameters, the focus loss function L hm The difference between the predicted center point of the changed region and the labeled center point of the changed region is calculated using the change region length and width loss function L. wh This is used to calculate the difference between the predicted changes in the area and the labeled changes in the area.
[0019] Furthermore, the first encoder sub-block includes a linear embedding encoding calculation module that processes the input data sequentially and two cascaded visual state space calculation modules. The linear embedding encoding calculation module is used to perform linear calculations on each input sub-graph to obtain its encoding vector and input it into the visual state space calculation module. The visual state space calculation module is used to learn the feature representation of the image. The visual state space calculation modules in the two encoders of the Siamese network share model parameters.
[0020] Furthermore, the second encoder sub-block has the same structure as the third encoder sub-block, both including a segmented image merging module that processes the input data sequentially and two serially connected visual state space calculation modules; wherein the segmented image merging module is used to merge the segmented images and expand the feature channels.
[0021] Furthermore, the decoder sub-block includes a segmentation image expansion module that processes the input data sequentially and two cascaded visual state space calculation modules; wherein, the segmentation image expansion module is used to upsample the input features, reconstruct the feature maps of adjacent dimensions into higher resolution feature maps, and then upsample the reconstructed higher resolution feature maps by 2 times, while reducing the dimension of the feature channels of the reconstructed higher resolution feature maps to half.
[0022] Furthermore, the visual state space calculation module contains three calculation paths. In the first calculation path, the original input data is processed sequentially through the first-layer normalization module, the first linear calculation module, the depthwise convolution module, the selective state space calculation module, and the second-layer normalization module. In the second calculation path, the calculation result of the first-layer normalization module is used as the input of the second linear calculation module, and the calculation result of the second linear calculation module and the calculation result of the second-layer normalization module are respectively input into the matrix multiplication unit for matrix multiplication, and the result of the matrix multiplication is input into the third linear calculation module layer. In the third calculation path, the original input data and the calculation result of the third linear calculation module are subjected to matrix addition.
[0023] Furthermore, the trademark image and its similar image in each pair of sample images are H×W×1 images, wherein the first encoder sub-block is used to extract from each input sub-image. The first shallow features, and the second encoder sub-blocks are used to extract from the first shallow features of each sub-graph The second shallow features, and the third encoder sub-block are used to extract from the second shallow features of each subgraph. The deep features, the segmented image merging module transforms the dimension of the deep features output by the third encoder sub-block into... First decoder sub-block output Image representation, second decoder sub-block output Image representation, third decoder sub-block output The image representation; where H is the vertical resolution of the image, W is the horizontal resolution of the image, and C is the number of feature channels of the image.
[0024] A server is characterized by comprising a memory and a processor, the memory storing a computer program configured to be executed by the processor, the computer program including instructions for performing the methods described above.
[0025] A computer-readable storage medium having a computer program stored thereon, characterized in that the computer program implements the above-described method when executed by a processor.
[0026] Compared with the prior art, the advantages of the present invention are as follows:
[0027] Traditional methods often employ convolutional neural networks combined with classification algorithms to provide qualitative similarity comparison capabilities, lacking effective change detection and annotation capabilities. Furthermore, these algorithms fail to efficiently capture long-range dependencies between images, resulting in low prediction accuracy and limited model applicability. This invention, by using a selective state-space model as a foundation and employing a change detection method, effectively captures changes and differences between similar trademark images, achieving high-precision change detection and difference annotation capabilities. This demonstrates strong application potential in trademark image change detection. Attached Figure Description
[0028] Figure 1 This is the flowchart for this method.
[0029] Figure 2 This is a diagram of the overall structure of the model.
[0030] Figure 3 This is a structural diagram of the visual state space computation module. Detailed Implementation
[0031] The present invention will now be described in further detail with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0032] This invention provides a trademark similarity variation detection method based on a selective state-space model, used for detecting differences between similar trademark images, and thus identifying image similarity features of the trademarks. By adopting a model architecture based on a selective state-space model as the core module, the method improves the computational and application capabilities for long-range features between trademark images, increases the accuracy of identifying differential features, and reduces the time consumed in the prediction process. The technical solution in the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Figure 1 This is a flowchart of the technical method for implementing the present invention. Figure 2 This is a model structure diagram of the embodiment of the present invention. Figure 3 This is an architecture diagram of the visual state space computation module. This technical method includes the following steps:
[0033] 1. Process the data to form a trademark similarity change detection dataset and divide it into a training set, a validation set, and a test set.
[0034] 2. The encoder part of the trademark similarity change detection model calculates features from shallow to deep for two similar trademark images;
[0035] 3. The connector part of the trademark similarity change detection model calculates and further obtains the deep features of the two images, and outputs the calculation result to the decoder part;
[0036] 4. The decoder part of the trademark similarity change detection model calculates the decoded feature data based on the deep feature data obtained in the previous step and the corresponding level feature data obtained by the skip connection.
[0037] 5. Calculate the loss function and train the trademark similarity change detection model to obtain the trained detection model;
[0038] 6. Input the trademark image to be detected, and return the identification results of the changed parts in similar trademark images.
[0039] Step 1 includes the following sub-steps:
[0040] Step 1.1: Based on the open-source trademark dataset Logo-2K+, select 100 different trademark images as the basic trademark dataset.
[0041] Step 1.2: Using the open-source Icon645 dataset as the variable icon dataset, select 200 icons and use the OpenCV image fusion method to fuse them with the icon data as the foreground and the trademark image selected in Step 1.1 as the background, forming 20,000 similar trademark images with certain differences. Combine the 100 trademark images selected in Step 1.1 with the corresponding 20,000 synthesized images to form 20,000 sample pairs as the dataset.
[0042] Step 1.3: Split the dataset into training set T according to the different purposes of training and testing. train , verification set T val and test set T test The ratio of sample pairs in the three datasets is 6:2:2.
[0043] T cases =T train ∪T val ∪T test (1)
[0044] Step 2 includes the following sub-steps:
[0045] Step 2.1: Process the two images separately using the image segmentation module, dividing each image into 16 sub-images in an equal proportion.
[0046] Step 2.2: The encoder adopts a twin network architecture. The two images are input into an encoder with the same structure. The encoder consists of three structurally similar encoder sub-blocks and a segmented image merging module.
[0047] The first encoder sub-block contains a linear embedding coding computation module and two vision state space computation modules, wherein the structure of the vision state space computation module is as follows: Figure 3 As shown, the visual state space computation modules in the two encoders of the Siamese network share model parameters. The visual state space computation module contains three computation paths and seven computation sub-modules. In the middle computation path, the first is the first-layer normalization module, the second is the first linear computation, the third is the depthwise convolution module, the fourth is the selective state space computation module, and the fifth is the second-layer normalization module. In the right-hand computation path, after the first-layer normalization module completes its computation, the result is used as the input to the second linear computation module. The result of the second linear computation module is then multiplied by the input of the second-layer normalization module in the middle computation path, and the result of the matrix multiplication is input to the third linear computation module layer. In the third computation path, the original input and the result of the third linear computation module are added together.
[0048] The linear embedding encoding computation module obtains the encoding vector of each segmented small image through linear computation, and uses the computation result as input to the visual state space computation module. The visual state space computation module is used layer by layer during training to learn the feature representation of the image.
[0049] The selective state-space computation module is an algorithm model formed by modeling a linear time-invariant system as a prototype.
[0050]
[0051] The first equation, h′(t)=Ah(t)+B(x), is the state equation, where h(t) is the hidden state, and A∈C. N×N It is a trainable parameter matrix that stores all historical information represented by a coefficient matrix and can be used to determine the influence of past hidden states on the hidden states used to update the next time step. The projection parameter vector B∈C N This determines the degree to which the input x(t) affects the hidden state.
[0052] The second equation, y(t) = Ch(t) + Dx(t), is the output equation, describing the hidden state through the projection parameter matrix C ∈ C. N Transform the input x(t) into the output, and the input x(t) into the parameter D∈C. 1 This affects the output. However, to simplify the equation, D is generally set to 0.
[0053] After recursion, the formula becomes:
[0054]
[0055] After computation by the two visual state space computation modules, the two output results are concatenated as tensors and then concatenated with the corresponding computation results in the decoder in a skip connection manner.
[0056] Step 2.3: The second encoder sub-block is a computational module composed of a segmentation image merging module and two visual state space calculation modules. The segmentation image merging module merges the segmented images and expands the feature channels. By downsampling, the tensor dimension is reduced by half, and the channel dimension is doubled, resulting in a calculated dimension of... The tensor of the original image. Where H is the vertical resolution of the original image, W is the horizontal resolution of the original image, and C is the number of feature channels of the original image.
[0057] Step 2.4: The third encoder sub-block has the same structure as the second encoder sub-block. After calculation by the segmented image merging module, a dimension is obtained. The tensor is the new image feature representation.
[0058] Step 2.5: The encoder's segmented image merging module transforms the dimension of the tensor output by the third encoder sub-block into...
[0059] Step 3 includes the following sub-steps:
[0060] Step 3.1: The connection between the encoder and decoder in the model is a computation module consisting of two visual state space computation modules. The first visual state space computation module receives the operation results calculated by the segmentation image merging module in the two encoders, concatenates and merges the two encoded vectors, and then performs computation by the first visual state space computation module.
[0061] Step 3.2: The second visual state space calculation module further calculates and obtains deep image features. Combined with the subsequent skip connection process, it enhances the spatial details of the fused image by merging the differentiated image features of the shallow and deep layers.
[0062] Step 4 includes the following sub-steps:
[0063] Step 4.1: The decoder's specific structure corresponds to that of the encoder, including three decoder sub-blocks and a segmentation image expansion module. The three decoder sub-blocks have identical structures, each consisting of a segmentation image expansion module and two visual state space calculation modules, and receiving feature information transmitted by the corresponding encoder components through skip connections. The segmentation image expansion module upsamples the extracted depth features, reconstructing adjacent dimension feature maps into higher-resolution feature maps. Then, it upsamples the reconstructed higher-resolution feature maps by a factor of 2, reducing the dimension of the feature channels by half.
[0064] Step 4.2: The second decoder sub-block expands the image features into... Then, through two calculations by the visual state space calculation module, new image representation results are obtained.
[0065] Step 4.3: The third decoder sub-block expands the image features into... Then, through two calculations by the visual state space calculation module, new image representation results are obtained.
[0066] Step 4.4: Through the calculation of the segmentation image expansion module, the feature dimensions of the feature map are restored to [the specified dimensions].
[0067] Step 4.5, change the dimension to The feature map is used as input to a linear mapping calculation module, which outputs a feature map of dimension H×W×1. The last dimension is then compressed and reduced to H×W.
[0068] Step 4.6: Pass the resulting feature map through a convolutional neural network with 2 kernels, outputting two matrices of dimension H×W, which are defined as the prediction mapping matrices for the center points of the changed regions. Length and width prediction mapping of the range of change area
[0069] Step 5 includes the following sub-steps:
[0070] Step 5.1: The purpose of this method is to calculate the center position of the differential part in the two images through model calculation, and to calculate the loss value using the focus loss function.
[0071] Based on the labeled data, the center point mapping map of the image's changed regions is defined as S. hm ∈[0,1] 128×128×1 That is, the value of the center point is 1, while the probability of the surrounding points decreases with increasing distance according to a Gaussian distribution, as shown in the following formula:
[0072]
[0073] in the formula It is mapped to S hm The x-coordinate of the center point marked is similar. It is mapped to S hm The y-coordinate of the marked center point. In the formula, x and y are the pixel coordinates in the mapping map, and σ is a custom variance.
[0074] Define the focus loss function as follows
[0075]
[0076] In this formula, N is the number of center points of the differential parts in the two images, and α and β are defined hyperparameters used to penalize the difference between the predicted center points and the true values.
[0077] And the loss function for the length and width of the changing region:
[0078]
[0079] In the above formula Let p be the width and height tuples of the labeled p-th data variation region, where p is the region number. The two loss functions are combined into the final loss function using the following linear function:
[0080] L = L hm +λ wh L wh (7)
[0081] Where λ wh These are custom hyperparameters used to balance the values of the components in the loss function.
[0082] Step 5.2: Apply the training set T to the model defined above. train Complete the training and use T val During training, validate the model's capabilities and adjust training parameters using T. test Test the predictive ability of the model.
[0083] Step 6 includes the following sub-steps:
[0084] Step 6.1: Input two trademark images as the trademark image data to be compared.
[0085] Step 6.2: Output the center point coordinates, length, width, and offset values of the changed area from the model output.
[0086] Although specific embodiments of the invention have been disclosed for illustrative purposes to aid in understanding and implementing the invention, those skilled in the art will understand that various substitutions, variations, and modifications are possible without departing from the spirit and scope of the invention and the appended claims. Therefore, the invention should not be limited to the content disclosed in the preferred embodiments, and the scope of protection claimed by the invention is defined by the claims.
Claims
1. A method for detecting similar trademark changes based on a selective state-space model, comprising the following steps: 1) Obtain a trademark similarity change detection dataset, which includes multiple pairs of sample images, each pair of sample images including a trademark image and its similar images; 2) A selective state-space model is trained using the trademark similarity change detection dataset to obtain a similar trademark change detection model. The selective state-space model includes an encoder, a connector, a decoder, a segmentation image expansion module, a linear mapping calculation module, and a convolutional neural network. The encoder employs a Siamese network architecture, comprising two structurally identical branches. Each branch includes a first encoder sub-block, a second encoder sub-block, a third encoder sub-block, and a segmentation image merging module that sequentially process the input data. The connector includes two cascaded visual state-space calculation modules. The decoder includes three decoder sub-blocks and a segmentation image expansion module. One image in a pair of sample images is segmented into multiple sub-images and input into one of the branches; the other image in the pair of sample images is segmented into multiple sub-images and input into another branch. The encoder is used to calculate the input image from shallow features to deep features, and inputs the deep features to the connector and sends the shallow features to the decoder. Specifically, the first encoder sub-block extracts first shallow features from each input sub-image and inputs them to the second encoder sub-block and the third decoder sub-block, respectively; the second encoder sub-block extracts second shallow features from the first shallow features of each sub-image and inputs them to the third encoder sub-block and the second decoder sub-block, respectively; the third encoder sub-block extracts deep features from the second shallow features of each sub-image and inputs them to the segmentation image merging module and the first decoder sub-block, respectively; the segmentation image merging module merges the deep features of each sub-image to obtain the deep features of the input image and inputs them to the connector. The connector is used to extract features from the input deep features and input the extracted features into the first decoder sub-block of the decoder; each decoder sub-block of the decoder decodes the input feature data to obtain the image representation corresponding to different levels of each pair of sample images; the image representation output by the third decoder sub-block is restored by the segmentation image expansion module and the linear mapping calculation module in sequence and then input into the convolutional neural network for prediction to obtain the change region corresponding to each pair of sample images. The loss value of the predicted change region and the annotation information of the pair of sample images is calculated based on the selected loss function, and the selective state space model is optimized based on the loss value. 3) Input a target trademark image and similar trademark images into the similar trademark change detection model, and return the change detection result of the similar trademark image relative to the target trademark.
2. The method according to claim 1, characterized in that, For each pair of sample images, the similar image corresponding to the trademark image is an image with the trademark image as the background and other icon data as the foreground.
3. The method according to claim 1, characterized in that, Using the loss function L = L hm +λ wh L wh The loss value is calculated; where λ wh To define custom hyperparameters, the focus loss function L hm The difference between the predicted center point of the changed region and the labeled center point of the changed region is calculated using the change region length and width loss function L. wh This is used to calculate the difference between the predicted changes in the area and the labeled changes in the area.
4. The method according to claim 1, characterized in that, The first encoder sub-block includes a linear embedding encoding calculation module that processes the input data sequentially and two cascaded visual state space calculation modules. The linear embedding encoding calculation module is used to perform linear calculations on each sub-image of the input to obtain its encoding vector and input it into the visual state space calculation module. The visual state space calculation module is used to learn the feature representation of the image. The visual state space calculation modules in the two encoders of the Siamese network share model parameters.
5. The method according to claim 1, characterized in that, The second encoder sub-block has the same structure as the third encoder sub-block, both including a segmented image merging module that processes the input data sequentially and two serially connected visual state space calculation modules; wherein the segmented image merging module is used to merge the segmented images and expand the feature channels.
6. The method according to claim 1, characterized in that, The decoder sub-block includes a segmentation image expansion module that processes the input data sequentially and two cascaded visual state space calculation modules. The segmentation image expansion module is used to upsample the input features, reconstruct the feature maps of adjacent dimensions into higher resolution feature maps, and then upsample the reconstructed higher resolution feature maps by 2 times while reducing the dimension of the feature channels of the reconstructed higher resolution feature maps to half.
7. The method according to any one of claims 1 to 6, characterized in that, The visual state space calculation module contains three calculation paths. In the first calculation path, the original input data is processed sequentially through the first layer normalization module, the first linear calculation module, the depth convolution module, the selective state space calculation module, and the second layer normalization module. In the second calculation path, the calculation result of the first-layer normalization module is used as the input of the second linear calculation module. The calculation result of the second linear calculation module and the calculation result of the second-layer normalization module are respectively input into the matrix multiplication unit to perform matrix multiplication operation. The result of the matrix multiplication operation is input into the third linear calculation module layer. In the third calculation path, the original input data and the calculation result of the third linear calculation module are matrix added.
8. The method according to claim 1, characterized in that, The trademark image and its similar image in each pair of sample images are H×W×1 images, where the first encoder sub-block is used to extract from each input sub-image. The first shallow features, and the second encoder sub-blocks are used to extract from the first shallow features of each sub-graph The second shallow features, and the third encoder sub-block are used to extract from the second shallow features of each subgraph. The deep features, the segmented image merging module transforms the dimension of the deep features output by the third encoder sub-block into... First decoder sub-block output Image representation, second decoder sub-block output Image representation, third decoder sub-block output The image representation; where H is the vertical resolution of the image and W is the horizontal resolution of the image. C represents the number of feature channels in the image.
9. A server, characterized in that, It includes a memory and a processor, the memory storing a computer program configured to be executed by the processor, the computer program including instructions for performing the method of any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Trademark infringement behavior identification method based on twin network
CN115599934A
Convolutional network and graph neural network hybrid-based change detection network and method
CN116778317A