Image similarity comparison method, device, computer equipment and storage medium

Through target detection and text feature extraction, combined with feature extraction and comparison of classification models, the problem of low accuracy of image similarity comparison in traditional technology is solved, and more accurate similarity judgments are achieved.

CN114004983BActive Publication Date: 2024-10-01SF TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010735588.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-28
Publication Date
2024-10-01
Estimated Expiration
2040-07-28

AI Technical Summary

Technical Problem

The accuracy of traditional image similarity comparison technology is low, making it difficult to effectively verify whether two sets of images taken at different times are of the same scene.

Method used

Through target detection and text feature extraction, target logo images are cropped, and the trained classification model is used for feature extraction and comparison. The similarity between the images is calculated by combining feature vectors and text feature information.

Benefits of technology

It improves the accuracy of image similarity comparison, can more accurately determine whether the images to be compared are of the same scene, and reduces the interference of irrelevant feature comparison results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114004983B_ABST
    Figure CN114004983B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, computer equipment and storage medium for image similarity comparison. The method comprises: obtaining images to be compared; performing target detection and text feature extraction on the images to be compared respectively, and obtaining target identification text feature information and target identification position information corresponding to the images to be compared; cropping the images to be compared according to the target identification position information, and obtaining target identification images corresponding to the images to be compared; inputting the target identification images into the trained classification models respectively, and performing feature extraction on the target identification images through the trained classification models, and obtaining feature vectors of the target identification images; obtaining similarity comparison results of the images to be compared according to the feature vectors and the target identification text feature information. The present method can accurately obtain similarity comparison results of the images to be compared.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method, device, computer equipment and storage medium for comparing image similarity. Background Art

[0002] With the development of computer technology, image similarity comparison technology has emerged. Image similarity comparison technology can be used to compare two sets of pictures taken at different times to verify whether the two sets of pictures are of the same scene. For example, when conducting a similarity audit of storefronts, the storefront photos taken by two groups of people can be compared for similarity audit to verify whether they are at the same location. The similarity audit of storefronts is mainly used to audit whether advertisements and materials are accurately placed.

[0003] In traditional technology, features of two groups of images are extracted respectively through algorithms such as SIFT (Scale-invariant feature transform), SURF (Speeded Up Robust Features) or ORB (Oriented Fast and Rotated Brief) to obtain feature maps of the two groups of images, and then the image similarity is compared by comparing the similarity of the feature maps of the two groups of images.

[0004] However, traditional technologies have the problem of low accuracy in image similarity comparison. Summary of the invention

[0005] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for image similarity comparison that can improve the accuracy of image similarity comparison in order to solve the above technical problems.

[0006] A method for comparing image similarity, the method comprising:

[0007] Get the image to be compared;

[0008] Perform target detection and text feature extraction on the images to be compared respectively, and obtain target identification text feature information and target identification position information corresponding to the images to be compared;

[0009] According to the target identification position information, the image to be compared is cropped to obtain the target identification image corresponding to the image to be compared;

[0010] Input the target identification pictures into the trained classification model respectively, extract features of the target identification pictures through the trained classification model, and obtain feature vectors of the target identification pictures;

[0011] According to the feature vector and the target identification text feature information, the similarity comparison result of the image to be compared is obtained.

[0012] In one embodiment, target detection and text feature extraction are performed on the image to be compared respectively, and target identification text feature information and target identification position information corresponding to the image to be compared are obtained, including:

[0013] Perform rotation correction detection on the images to be compared respectively to obtain the images to be compared after angle correction;

[0014] Perform feature extraction on the angle-corrected image to be compared, and obtain a feature extraction graph corresponding to the angle-corrected image to be compared;

[0015] According to the feature extraction map, target detection is performed on the angle-corrected image to be compared to obtain the target identification position information corresponding to the image to be compared, and text feature extraction is performed on the angle-corrected image to be compared to obtain the target identification text feature information corresponding to the image to be compared.

[0016] In one embodiment, the target identification pictures are respectively input into the trained classification model, and the feature vectors of the target identification pictures are obtained by extracting features of the target identification pictures through the trained classification model, including:

[0017] Input the target identification images into the trained classification model respectively, and convolve the target identification images through the convolution layer in the trained classification model to obtain the convolved target identification images;

[0018] The convolution target identification image is normalized by the normalization layer in the trained classification model to obtain a normalized target identification image;

[0019] The normalized target logo image is subjected to multiple moving flip bottleneck convolutions through the moving flip bottleneck convolution network in the trained classification model to obtain the feature vector of the target logo image.

[0020] In one embodiment, before inputting the target identification images into the trained classification models respectively and convolving the target identification images through the convolutional layers in the trained classification models to obtain the convolved target identification images, the method further includes:

[0021] Obtain a historical identification picture corresponding to the target identification picture, and obtain training data based on the historical identification picture;

[0022] The efficientnet_b0 network is used to classify the training data and obtain the trained classification model.

[0023] In one embodiment, obtaining the similarity comparison result of the to-be-compared pictures according to the feature vector and the target identification text feature information includes:

[0024] Calculate the feature distance between target identification images based on the feature vector;

[0025] When the feature distance is less than the preset first distance threshold, the similarity comparison result is obtained that the images to be compared represent the same scene;

[0026] When the feature distance is greater than a preset second distance threshold, the image-text relationship between the images to be compared is determined based on the target identification text feature information, and a similarity comparison result is obtained based on the image-text relationship.

[0027] In one embodiment, according to the target identification text feature information, the image-text relationship between the images to be compared is determined, and according to the image-text relationship, the similarity comparison result is obtained, including:

[0028] Compare the target logo text feature information to obtain the text relationship between the target logo images, where the text relationship is a containment relationship or a non-containment relationship;

[0029] According to the text relationship between the target identification pictures, the picture-text relationship between the pictures to be compared is obtained;

[0030] When the image-text relationship is a non-containment relationship, light and dark detection is performed on the images to be compared respectively, and a similarity comparison result is obtained based on the light and dark detection results.

[0031] In one embodiment, when the image-text relationship is a non-containment relationship, light and dark detection is performed on the images to be compared respectively, and the similarity comparison results obtained according to the light and dark detection results include:

[0032] When the image-text relationship is a non-containment relationship, the brightness of the image to be compared is detected by calculating the average brightness of the image to be compared or by using a trained brightness detection model to obtain a brightness detection result of the image to be compared;

[0033] When the brightness and darkness detection results of the images to be compared are all not taken at night, the similarity comparison results are obtained for the images to be compared to represent different scenes.

[0034] A device for comparing image similarity, comprising:

[0035] An acquisition module is used to acquire the image to be compared;

[0036] A processing module is used to perform target detection and text feature extraction on the image to be compared, and obtain target identification text feature information and target identification position information corresponding to the image to be compared;

[0037] A cropping module is used to crop the image to be compared according to the target identification position information to obtain a target identification image corresponding to the image to be compared;

[0038] A feature extraction module is used to input the target identification pictures into the trained classification model respectively, extract features of the target identification pictures through the trained classification model, and obtain feature vectors of the target identification pictures;

[0039] The comparison module is used to obtain the similarity comparison result of the image to be compared based on the feature vector and the target identification text feature information.

[0040] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0041] Get the image to be compared;

[0042] Perform target detection and text feature extraction on the images to be compared respectively, and obtain target identification text feature information and target identification position information corresponding to the images to be compared;

[0043] According to the target identification position information, the image to be compared is cropped to obtain the target identification image corresponding to the image to be compared;

[0044] Input the target identification pictures into the trained classification model respectively, extract features of the target identification pictures through the trained classification model, and obtain feature vectors of the target identification pictures;

[0045] According to the feature vector and the target identification text feature information, the similarity comparison result of the image to be compared is obtained.

[0046] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0047] Get the image to be compared;

[0048] Perform target detection and text feature extraction on the images to be compared respectively, and obtain target identification text feature information and target identification position information corresponding to the images to be compared;

[0049] According to the target identification position information, the image to be compared is cropped to obtain the target identification image corresponding to the image to be compared;

[0050] Input the target identification pictures into the trained classification model respectively, extract features of the target identification pictures through the trained classification model, and obtain feature vectors of the target identification pictures;

[0051] According to the feature vector and the target identification text feature information, the similarity comparison result of the image to be compared is obtained.

[0052] The above-mentioned image similarity comparison method, device, computer equipment and storage medium respectively perform target detection and text feature extraction on the image to be compared to obtain target identification text feature information and target identification position information corresponding to the image to be compared, crop the image to be compared according to the target identification position information, crop the target identification image from the image to be compared, perform feature extraction on the target identification image to obtain a feature vector of the target identification image, and on the basis of extracting the target identification text feature information, use the feature vector of the target identification image and the target identification text feature information to determine the similarity comparison result of the image to be compared, and obtain an accurate similarity comparison result of the image to be compared. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 1 is a flow chart of a method for comparing image similarity in one embodiment;

[0054] Figure 2 is a schematic diagram of a flow chart of a method for comparing image similarity in another embodiment;

[0055] Figure 3 is a structural block diagram of a picture similarity comparison device in one embodiment;

[0056] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] In one embodiment, Figure 1 As shown, a method for comparing image similarity is provided. This embodiment uses the method applied to a terminal as an example for illustration. It is understandable that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0059] Step 102, obtaining the image to be compared.

[0060] The pictures to be compared refer to a group of pictures to be compared to see if they are of the same scene. For example, when conducting a storefront similarity audit, the pictures to be compared can specifically refer to storefront pictures taken by two groups of people to verify whether they are of the same location.

[0061] Specifically, when image similarity comparison is required, the server will obtain the image to be compared. The method of obtaining the image to be compared can be that the user uploads the image to be compared to the server through the terminal, or the server directly obtains the pre-stored image to be compared.

[0062] Step 104 , performing target detection and text feature extraction on the image to be compared, respectively, to obtain target identification text feature information and target identification position information corresponding to the image to be compared.

[0063] Among them, target detection refers to identifying the target logo in the image and the location of the target logo. The target logo can be pre-set according to the business scenario, and specifically refers to the object that needs to be compared for similarity. For example, when conducting a door head similarity audit, target detection can specifically refer to identifying the door head in the image and the location of the door head. Door heads refer to the plaques and related facilities set up at the door by enterprises, institutions and individual industrial and commercial households. It is a form of decoration outside the door of a shop. For another example, when conducting a person similarity audit, target detection can specifically refer to identifying the person in the image and the location of the person. For example, commonly used target detection frameworks include region proposal + CNN (convolutional neural network) extraction and classification target detection frameworks and end-to-end target detection frameworks.

[0064] Among them, text feature extraction refers to identifying text feature information in the image. For example, when conducting a doorhead similarity audit, text feature extraction can specifically refer to identifying the doorhead text in the image. For example, a commonly used text feature extraction method can be to use OCR (Optical Character Recognition) to extract text features. Target logo text feature information refers to the text information extracted from the image to be compared using text feature extraction. Target logo position information refers to the position of the target logo identified from the image to be compared through target detection. For example, the target logo position information can specifically refer to the coordinate information of the target logo in the image to be compared.

[0065] Specifically, the server will first perform angle correction on the image to be compared to obtain the angle-corrected image to be compared, and then perform target detection and text feature extraction on the angle-corrected image to be compared. By performing target detection, the target logo is detected from the image to be compared, and the target logo position information is obtained. By performing text feature extraction, the target logo text feature information is identified from the image to be compared.

[0066] Step 106 , cropping the image to be compared according to the target identification position information to obtain a target identification image corresponding to the image to be compared.

[0067] Specifically, after obtaining the target identification position information, the server will mark the target identification image in the image to be compared according to the target identification position information, crop the image to be compared, and crop the accurate target identification image from the image to be compared. For example, when performing a door head similarity audit, after obtaining the door head position information, the server will crop the image to be compared according to the door head position information, and crop the door head photo from the image to be compared. In this way, the accurate target identification image can be cropped from the image to be compared, so that the similarity comparison can be achieved based on the accurate target identification image, reducing the interference of other image features in the image to be compared that are not related to the target identification image on the similarity comparison, which is conducive to obtaining accurate similarity comparison results.

[0068] Step 108, input the target identification pictures into the trained classification models respectively, extract features of the target identification pictures through the trained classification models, and obtain feature vectors of the target identification pictures.

[0069] The trained classification model is used to extract features from the target identification image to obtain a feature vector, and the target identification image is classified according to the feature vector. In the process of classifying the target identification image, the trained classification model first extracts features from the target identification image multiple times through a multi-layer network to obtain a feature vector of the target identification image, and then classifies the target identification image according to the feature vector. The feature vector of the target identification image refers to a vector used to represent the image features of the target identification image.

[0070] Specifically, the server will input the target identification images into the trained classification model respectively, and extract features of the target identification images through multiple moving flip bottleneck convolutional networks in the trained classification model to obtain feature vectors of the target identification images.

[0071] Step 110, obtaining a similarity comparison result of the to-be-compared pictures according to the feature vector and the target identification text feature information.

[0072] The similarity comparison result is used to indicate whether the compared pictures are of the same scene. For example, the similarity comparison result may specifically indicate that the compared pictures represent the same scene. For another example, the similarity comparison result may specifically indicate that the compared pictures represent different scenes.

[0073] Specifically, the server will first calculate the feature distance between the target identification images based on the feature vector, and determine whether a similarity comparison result can be obtained by comparing the feature distance with a preset first distance threshold and a preset second distance threshold. When the feature distance is less than the preset first distance threshold, the similarity comparison result can be obtained directly. When the feature distance is greater than the preset second distance threshold, the server will further obtain the similarity comparison result of the image to be compared based on the target identification text feature information. When the feature distance is greater than the preset first distance threshold and less than the preset second distance threshold, the server will push the image to be compared to the manual terminal, and the staff of the manual terminal will compare the image to be compared.

[0074] The above-mentioned image similarity comparison method obtains target identification text feature information and target identification position information corresponding to the image to be compared by performing target detection and text feature extraction on the image to be compared respectively, and crops the image to be compared according to the target identification position information, crops the target identification image from the image to be compared, performs feature extraction on the target identification image to obtain a feature vector of the target identification image, and on the basis of extracting the target identification text feature information, uses the feature vector of the target identification image and the target identification text feature information to determine the similarity comparison result of the image to be compared, and obtains an accurate similarity comparison result of the image to be compared.

[0075] In one embodiment, target detection and text feature extraction are performed on the image to be compared respectively, and target identification text feature information and target identification position information corresponding to the image to be compared are obtained, including:

[0076] Perform rotation correction detection on the images to be compared respectively to obtain the images to be compared after angle correction;

[0077] Perform feature extraction on the angle-corrected image to be compared, and obtain a feature extraction graph corresponding to the angle-corrected image to be compared;

[0078] According to the feature extraction map, target detection is performed on the angle-corrected image to be compared to obtain the target identification position information corresponding to the image to be compared, and text feature extraction is performed on the angle-corrected image to be compared to obtain the target identification text feature information corresponding to the image to be compared.

[0079] Among them, rotation correction detection refers to detecting whether the image to be compared is at a preset normal angle. When the image to be compared is not at the preset normal angle, the image to be compared needs to be angle corrected. For example, rotation correction detection can detect the situations where the image to be compared is at a preset normal angle, rotated 90 degrees, rotated 180 degrees, and rotated 270 degrees. When it is detected that the image to be compared is rotated 90 degrees, 180 degrees, or 270 degrees, it is necessary to perform angle correction on the image to be compared to correct it to the preset normal angle. The feature extraction map refers to the feature map obtained by extracting features from the image to be compared after angle correction, which is used to characterize the image features of the image to be compared after angle correction.

[0080] Specifically, when performing rotation correction detection on the images to be compared, the server will first perform rotation detection on the images to be compared through the trained image rotation angle classification model. When it is detected that the images to be compared are rotated, the image to be compared is then angle corrected to rotate the images to a preset normal angle. The trained image rotation angle classification model can be a training model obtained using the mobilenet_v2 network. The training samples of the image rotation angle classification model can be divided into four categories. The first category is preset normal angle data, the second category is 90 degree rotation data, the third category is 180 degree rotation data, and the fourth category is 270 degree rotation data. By training according to the training samples, the image rotation angle classification model can be obtained. The output of the rotation angle classification model is the image category, that is, the image to be compared is the first category, the second category, the third category, or the fourth category. When the image to be compared is the first category, no processing is performed. When the image to be compared is the second category, the third category, or the fourth category, the image to be compared is rotated to the preset normal angle according to the specific category to perform angle correction.

[0081] Specifically, the server can use the mobilenetv2 network as a feature extractor to perform feature extraction, and obtain a feature extraction map corresponding to the image to be compared after angle correction. After obtaining the feature extraction map, the server will perform target detection through a preset target detection network to obtain the target identification position information corresponding to the image to be compared. Among them, the preset target detection network can be specifically a network composed of multiple convolutional layers and average pooling layers, each convolutional layer can perform feature extraction on the feature extraction map, output feature maps of different sizes of receptive fields, and predict the target position and category on the feature maps of these different sizes of receptive fields, The target identification position information corresponding to the image to be compared can be obtained. When extracting text features from the image to be compared after angle correction, the server will first input the image to be compared after angle correction into the ResNet network for convolution, extract the feature map of the image to be compared after angle correction, and then input the feature map into the preset text line detection module and the text line recognition bidirectional LSTM (Long Short-Term Memory, Long Short-Term Memory Network) network to obtain the target identification text feature information corresponding to the image to be compared.

[0082] In this embodiment, by performing rotation correction detection on the pictures to be compared respectively, the pictures to be compared after angle correction are obtained, and target detection and text feature extraction are performed on the pictures to be compared after angle correction respectively, to obtain the target identification text feature information and target identification position information corresponding to the pictures to be compared, the acquisition of the target identification position information and the target identification text feature information can be realized.

[0083] In one embodiment, the target identification pictures are respectively input into the trained classification model, and the feature vectors of the target identification pictures are obtained by extracting features of the target identification pictures through the trained classification model, including:

[0084] Input the target identification images into the trained classification model respectively, and convolve the target identification images through the convolution layer in the trained classification model to obtain the convolved target identification images;

[0085] The convolution target identification image is normalized by the normalization layer in the trained classification model to obtain a normalized target identification image;

[0086] The normalized target logo image is subjected to multiple moving flip bottleneck convolutions through the moving flip bottleneck convolution network in the trained classification model to obtain the feature vector of the target logo image.

[0087] Among them, the trained classification model consists of multiple mobile flip bottleneck convolutional networks, convolutional layers, global average pooling layers and classification layers, and the loss function is the cross entropy loss function.

[0088] Specifically, after the target identification image is input into the trained classification model respectively, the processing of the target identification image by the trained classification model can be divided into three stages. The first stage is to convolve the target identification image through the convolution layer to obtain the convolved target identification image, and to normalize the convolved target identification image through the normalization layer to obtain the normalized target identification image. Among them, the convolution layer can be a 3*3*3 convolution layer, and the activation function used by the normalization layer can be a Swish activation function. The second stage is to perform multiple moving flip bottleneck convolutions on the normalized target identification image through the moving flip bottleneck convolution network to obtain the feature vector of the target identification image. Among them, the moving flip bottleneck convolution network includes multiple moving flip bottleneck convolutions. The third stage is to classify the target identification image according to the feature vector of the target identification image through the global average pooling layer and the classification layer.

[0089] For example, the mobile flip bottleneck convolution network may include 16 mobile flip bottleneck convolutions. The mobile flip bottleneck convolution network performs multiple mobile flip bottleneck convolutions on the normalized target logo image to obtain the feature vector of the target logo image. The method can be specifically divided into the following seven stages: 1) Perform mobile flip convolution on the normalized target logo image (expansion ratio is 1, depth convolution kernel size is 3x3, kernel step size is 1x1, including compression and excitation operations, no connection inactivation and connection skipping) to obtain the first stage feature map; 2) Perform two mobile flip bottleneck convolutions on the first stage feature map, the first time (expansion ratio is 1, the depth convolution kernel size is 3x3, the kernel step size is 1x1, including compression and excitation operations, no connection inactivation and connection skipping) to obtain the first stage feature map. For example, the first time (the expansion ratio is 6, the depth convolution kernel size is 3x3, the kernel step size is 2x2, including compression and excitation operations, no connection deactivation kernel connection skipping), the second time (the expansion ratio is 6, the depth convolution kernel size is 3x3, the kernel step size is 1x1, including compression and excitation operations, with connection deactivation and connection skipping), the second stage feature map is obtained; 3) the second stage feature map is subjected to two moving flip bottleneck convolutions, the first time (the expansion ratio is 6, the depth convolution kernel size is 5x5, the kernel step size is 2x2, including compression and excitation operations, no connection deactivation kernel connection skipping), the second time (the expansion ratio is 6, the depth convolution kernel size is 5x5, the kernel step size is is 1x1, including compression and excitation operations, with connection deactivation and connection skipping), and obtain the third stage feature map; 4) perform three moving flip bottleneck convolutions on the third stage feature map, the first time (expansion ratio is 6, depth convolution kernel size is 3x3, kernel step size is 2x2, including compression and excitation operations, without connection deactivation kernel connection skipping), the second time (expansion ratio is 6, depth convolution kernel size is 3x3, kernel step size is 1x1, including compression and excitation operations, with connection deactivation kernel connection skipping), the third time (expansion ratio is 6, depth convolution kernel size is 3x3, kernel step size is 1x1, including compression and excitation operations, with connection deactivation kernel connection skipping), 5) Perform three moving flip bottleneck convolutions on the fourth stage feature map, the first one (expansion ratio is 6, depth convolution kernel size is 5x5, kernel step size is 1x1, including compression and excitation operations, no connection deactivation kernel connection jump), the second one (expansion ratio is 6, depth convolution kernel size is 5x5, kernel step size is 1x1, including compression and excitation operations, with connection deactivation kernel connection jump), the third one (expansion ratio is 6, depth convolution kernel size is 5x5, kernel step size is 1x1, including compression and excitation operations, with connection deactivation kernel connection jump), and the fifth stage feature map is obtained;6) Perform four moving flip bottleneck convolutions on the fifth stage feature map, the first one (expansion ratio is 6, depth convolution kernel size is 5x5, kernel step size is 2x2, including compression and excitation operations, no connection loss kernel connection jump), the second one (expansion ratio is 6, depth convolution kernel size is 5x5, kernel step size is 1x1, including compression and excitation operations, with connection loss kernel connection jump), the third one (expansion ratio is 6, depth convolution kernel size is 5x5, kernel step size is 1x1, including compression and 7) Perform a moving flip bottleneck convolution on the sixth stage feature map (expansion ratio of 6, depth convolution kernel size of 3x3, kernel step size of 1x1, including compression and excitation operations, without connection deactivation kernel connection skipping) to obtain the feature vector of the target identification image. ;

[0090] In this embodiment, the feature vector of the target identification image is obtained by extracting features of the target identification image through the convolution layer, normalization layer and moving flip bottleneck convolution network in the trained classification model, thereby realizing the acquisition of the feature vector of the target identification image.

[0091] In one embodiment, before inputting the target identification images into the trained classification models respectively and convolving the target identification images through the convolutional layers in the trained classification models to obtain the convolved target identification images, the method further includes:

[0092] Obtain a historical identification picture corresponding to the target identification picture, and obtain training data based on the historical identification picture;

[0093] The efficientnet_b0 network is used to classify the training data and obtain the trained classification model.

[0094] Among them, historical sign pictures refer to sign pictures that can be used for training. For example, when conducting a door head similarity audit, the historical sign pictures can specifically be multiple groups of door head photos that have been taken, and each group of door head photos includes two comparable door head photos. Training data refers to data used for classification training. For example, training data can specifically include historical sign pictures. For another example, training data can specifically include a set of pictures obtained after image enhancement of historical sign pictures. The efficientnet_b0 network can specifically be composed of multiple mobile flip bottleneck convolution modules, convolution layers, global average pooling layers, and classification layers. It can improve the accuracy of the model by dynamically adjusting the width, depth, and resolution of the network.

[0095] Specifically, the server can obtain the historical identification pictures corresponding to the target identification pictures from the preset picture database, obtain training data by classifying and arranging the historical identification pictures and enhancing the images, and then use the efficientnet_b0 network to classify and train the training data to obtain a trained classification model. Among them, obtaining training data by classifying and arranging the historical identification pictures and enhancing the images means that according to the application scenarios, the historical identification pictures are divided into four categories: regular scenes, light and dark scenes, blurred scenes, and angle difference scenes, and Gaussian blur, mean blur, median blur, Gaussian noise, edge sharpening, image relief, changing the brightness of the picture, changing the color saturation of the picture, changing the contrast of the picture, randomly dropping 10% of the pixels, etc. are introduced for image enhancement. Among them, the light and dark scenes represent that the brightness of the group of historical identification pictures is inconsistent, the blurred scenes represent that there are blurred pictures in the group of historical identification pictures, and the angle difference scenes represent that the shooting angles of the pictures in the group of historical identification pictures are different. The historical identification pictures other than the above scenes belong to regular scenes.

[0096] In this embodiment, by acquiring a historical identification picture corresponding to a target identification picture, obtaining training data according to the historical identification picture, and using an efficientnet_b0 network to perform classification training on the training data to obtain a trained classification model, the acquisition of the trained classification model can be achieved.

[0097] In one embodiment, obtaining the similarity comparison result of the to-be-compared pictures according to the feature vector and the target identification text feature information includes:

[0098] Calculate the feature distance between target identification images based on the feature vector;

[0099] When the feature distance is less than the preset first distance threshold, the similarity comparison result is obtained that the images to be compared represent the same scene;

[0100] When the feature distance is greater than a preset second distance threshold, the image-text relationship between the images to be compared is determined based on the target identification text feature information, and a similarity comparison result is obtained based on the image-text relationship.

[0101] The characteristic distance may specifically refer to the Euclidean distance between characteristic vectors. The preset first distance threshold and the preset second distance threshold may be set as needed. For example, the first distance threshold may specifically be 0.75, and the second distance threshold may specifically be 0.99.

[0102] Specifically, the server will calculate the Euclidean distance between the feature vectors, use the Euclidean distance between the feature vectors as the feature distance between the target identification images, compare the feature distance with the preset first distance threshold and the preset second distance threshold, when the feature distance is less than the preset first distance threshold, it indicates that the target identification images are relatively similar, and the server will obtain the similarity comparison result that the images to be compared represent the same scene, when the feature distance is greater than the preset second distance threshold, it indicates that the similarity comparison result cannot be obtained only through the feature distance, the server will determine the image-text relationship between the images to be compared based on the target identification text feature information, and further obtain the similarity comparison result through the image-text relationship, when the feature distance is greater than the preset first distance threshold and less than the preset second distance threshold, the server will believe that the similarity comparison result cannot be obtained through the machine at this time, and will push the images to be compared to the manual terminal, and the staff of the manual terminal will compare the images to be compared.

[0103] In this embodiment, by calculating the feature distance between the target identification pictures based on the feature vector, comparing the feature distance with the preset first distance threshold and the preset second distance threshold, when the feature distance is less than the preset first distance threshold, the similarity comparison result is obtained that the pictures to be compared represent the same scene, and when the feature distance is greater than the preset second distance threshold, the picture-text relationship between the pictures to be compared is determined based on the target identification text feature information, and based on the picture-text relationship, the similarity comparison result is obtained, thereby realizing the acquisition of the similarity comparison result.

[0104] In one embodiment, according to the target identification text feature information, the image-text relationship between the images to be compared is determined, and according to the image-text relationship, the similarity comparison result is obtained, including:

[0105] Compare the target logo text feature information to obtain the text relationship between the target logo images, where the text relationship is a containment relationship or a non-containment relationship;

[0106] According to the text relationship between the target identification pictures, the picture-text relationship between the pictures to be compared is obtained;

[0107] When the image-text relationship is a non-containment relationship, light and dark detection is performed on the images to be compared respectively, and a similarity comparison result is obtained based on the light and dark detection results.

[0108] Specifically, the server will obtain the text relationship between the target identification images by comparing the target identification text feature information. When the two target identification text feature information are exactly the same, the text relationship can be obtained as a containment relationship. When one target identification text feature information appears completely in the other target identification text feature information in sequence, the text relationship can also be obtained as a containment relationship. Except for the above two cases, the text relationship will be obtained as a non-containment relationship. After obtaining the text relationship between the target identification images, the server will use the text relationship between the target identification images as the image-text relationship between the images to be compared. When the image-text relationship is a non-containment relationship, it means that the target identification text feature information of the images to be compared is not the same. The server can further perform light and dark detection on the images to be compared, and obtain the similarity comparison result according to the light and dark detection result. When the image-text relationship is a containment relationship, it means that the target identification text feature information of the images to be compared is the same or similar. The server will think that the similarity comparison result cannot be obtained through the machine at this time, and will push the images to be compared to the manual terminal, and the staff of the manual terminal will compare the images to be compared.

[0109] In this embodiment, by comparing the target identification text feature information, the text relationship between the target identification pictures is obtained, and the text relationship is a containment relationship or a non-containment relationship. According to the text relationship between the target identification pictures, the picture-text relationship between the pictures to be compared is obtained. When the picture-text relationship is a non-containment relationship, light and dark detection is performed on the pictures to be compared respectively, and the similarity comparison result is obtained according to the light and dark detection results, thereby realizing the acquisition of the similarity comparison result.

[0110] In one embodiment, when the image-text relationship is a non-containment relationship, light and dark detection is performed on the images to be compared respectively, and the similarity comparison results obtained according to the light and dark detection results include:

[0111] When the image-text relationship is a non-containment relationship, the brightness of the image to be compared is detected by calculating the average brightness of the image to be compared or by using a trained brightness detection model to obtain a brightness detection result of the image to be compared;

[0112] When the brightness and darkness detection results of the images to be compared are all not taken at night, the similarity comparison results are obtained for the images to be compared to represent different scenes.

[0113] Specifically, by calculating the average brightness of the image to be compared, performing light and dark detection on the image to be compared, the method for obtaining the light and dark detection result of the image to be compared can be: calculating the average brightness of the image to be compared, comparing the average brightness of the image and the preset brightness threshold, when the average brightness of the image is greater than the preset brightness threshold, the light and dark detection result can be obtained as non-night shooting, when the average brightness of the image is less than the preset brightness threshold, the light and dark detection result can be obtained as night shooting, the brightness threshold can be set as needed, usually set to 80. If the light and dark detection is performed on the image to be compared through a trained light and dark detection model, it is only necessary to input the image to be compared into the trained light and dark detection model to obtain the light and dark detection result. The light and dark detection model is not limited here, as long as it can achieve light and dark detection. After obtaining the light and dark detection result of the image to be compared, if the light and dark detection results of the image to be compared are all non-night shooting, the server will obtain the similarity comparison result that the image to be compared represents different scenes.

[0114] In this embodiment, by calculating the average brightness of the pictures to be compared or the trained light and dark detection model, light and dark detection is performed on the pictures to be compared to obtain the light and dark detection results of the pictures to be compared. When the light and dark detection results of the pictures to be compared are all non-night-time shots, the similarity comparison results are obtained for the pictures to be compared to represent different scenes, thereby realizing the acquisition of similarity comparison results.

[0115] like Figure 2 As shown, an embodiment is used to illustrate the image similarity comparison method of the present application, and the image similarity comparison method includes the following steps:

[0116] Step 202, obtaining the image to be compared;

[0117] Step 204, performing rotation correction detection on the images to be compared respectively to obtain the images to be compared after angle correction;

[0118] Step 206, performing feature extraction on the angle-corrected image to be compared, and obtaining a feature extraction graph corresponding to the angle-corrected image to be compared;

[0119] Step 208, performing target detection on the angle-corrected image to be compared according to the feature extraction graph to obtain target identification position information corresponding to the image to be compared, and performing text feature extraction on the angle-corrected image to be compared to obtain target identification text feature information corresponding to the image to be compared;

[0120] Step 210, cropping the image to be compared according to the target identification position information to obtain a target identification image corresponding to the image to be compared;

[0121] Step 212, obtaining a historical identification picture corresponding to the target identification picture, and obtaining training data according to the historical identification picture;

[0122] Step 214, using the efficientnet_b0 network to perform classification training on the training data to obtain a trained classification model;

[0123] Step 216, input the target identification images into the trained classification model respectively, and convolve the target identification images through the convolution layer in the trained classification model to obtain the convolved target identification images;

[0124] Step 218, normalizing the convolved target identification image through a normalization layer in the trained classification model to obtain a normalized target identification image;

[0125] Step 220, performing multiple moving flip bottleneck convolutions on the normalized target identification image through the moving flip bottleneck convolution network in the trained classification model to obtain a feature vector of the target identification image;

[0126] Step 222, calculating the feature distance between target identification images according to the feature vector;

[0127] Step 224, comparing the feature distance with a preset first distance threshold and a preset second distance threshold. When the feature distance is less than the preset first distance threshold, the similarity comparison result is obtained as that the compared images represent the same scene. When the feature distance is greater than the preset second distance threshold, jump to step 226.

[0128] Step 226, comparing the target logo text feature information to obtain the text relationship between the target logo images, where the text relationship is a containment relationship or a non-containment relationship;

[0129] Step 228, obtaining the image-text relationship between the images to be compared according to the text relationship between the target identification images;

[0130] Step 230, when the image-text relationship is a non-containment relationship, performing a brightness detection on the image to be compared by calculating the average brightness of the image to be compared or a trained brightness detection model, and obtaining a brightness detection result of the image to be compared;

[0131] Step 232, when the brightness and darkness detection results of the to-be-compared pictures are all not taken at night, the similarity comparison results are obtained as the to-be-compared pictures representing different scenes.

[0132] It should be understood that although Figure 1-2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-2At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.

[0133] In one embodiment, Figure 3 As shown, a device for comparing image similarity is provided, including: an acquisition module 302, a processing module 304, a cropping module 306, a feature extraction module 308 and a comparison module 310, wherein:

[0134] An acquisition module 302 is used to acquire a picture to be compared;

[0135] The processing module 304 is used to perform target detection and text feature extraction on the image to be compared, and obtain target identification text feature information and target identification position information corresponding to the image to be compared;

[0136] A cropping module 306 is used to crop the image to be compared according to the target identification position information to obtain a target identification image corresponding to the image to be compared;

[0137] The feature extraction module 308 is used to input the target identification pictures into the trained classification model respectively, extract the features of the target identification pictures through the trained classification model, and obtain the feature vectors of the target identification pictures;

[0138] The comparison module 310 is used to obtain the similarity comparison result of the to-be-compared pictures according to the feature vector and the target identification text feature information.

[0139] In one embodiment, the processing module is also used to perform rotation correction detection on the pictures to be compared respectively to obtain the pictures to be compared after angle correction, perform feature extraction on the pictures to be compared after angle correction to obtain a feature extraction map corresponding to the pictures to be compared after angle correction, perform target detection on the pictures to be compared after angle correction according to the feature extraction map to obtain target identification position information corresponding to the pictures to be compared, and perform text feature extraction on the pictures to be compared after angle correction to obtain target identification text feature information corresponding to the pictures to be compared.

[0140] In one embodiment, the feature extraction module is also used to input the target identification image into the trained classification model respectively, convolve the target identification image through the convolution layer in the trained classification model to obtain the convolved target identification image, normalize the convolved target identification image through the normalization layer in the trained classification model to obtain the normalized target identification image, and perform multiple moving flip bottleneck convolutions on the normalized target identification image through the moving flip bottleneck convolution network in the trained classification model to obtain a feature vector of the target identification image.

[0141] In one embodiment, the image similarity comparison device also includes a training module, which is used to obtain a historical identification image corresponding to the target identification image, obtain training data based on the historical identification image, and use the efficientnet_b0 network to perform classification training on the training data to obtain a trained classification model.

[0142] In one embodiment, the comparison module is also used to calculate the feature distance between the target identification pictures based on the feature vector. When the feature distance is less than a preset first distance threshold, the similarity comparison result is obtained that the pictures to be compared represent the same scene. When the feature distance is greater than a preset second distance threshold, the picture-text relationship between the pictures to be compared is determined based on the target identification text feature information, and the similarity comparison result is obtained based on the picture-text relationship.

[0143] In one embodiment, the comparison module is also used to compare the target identification text feature information to obtain the text relationship between the target identification pictures, where the text relationship is a containment relationship or a non-containment relationship. Based on the text relationship between the target identification pictures, the picture-text relationship between the pictures to be compared is obtained. When the picture-text relationship is a non-containment relationship, light and dark detection is performed on the pictures to be compared respectively, and the similarity comparison result is obtained based on the light and dark detection results.

[0144] In one embodiment, the comparison module is also used to perform light and dark detection on the picture to be compared when the image-text relationship is a non-containment relationship by calculating the average brightness of the picture to be compared or a trained light and dark detection model to obtain the light and dark detection results of the picture to be compared. When the light and dark detection results of the pictures to be compared are all non-night-time shots, the similarity comparison results obtained are that the pictures to be compared represent different scenes.

[0145] For the specific definition of the image similarity comparison device, please refer to the definition of the image similarity comparison method above, which will not be repeated here. Each module in the above-mentioned image similarity comparison device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0146] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store historical identification image data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for comparing image similarity is implemented.

[0147] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0148] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0149] Get the image to be compared;

[0150] Perform target detection and text feature extraction on the images to be compared respectively, and obtain target identification text feature information and target identification position information corresponding to the images to be compared;

[0151] According to the target identification position information, the image to be compared is cropped to obtain the target identification image corresponding to the image to be compared;

[0152] Input the target identification pictures into the trained classification model respectively, extract features of the target identification pictures through the trained classification model, and obtain feature vectors of the target identification pictures;

[0153] According to the feature vector and the target identification text feature information, the similarity comparison result of the image to be compared is obtained.

[0154] In one embodiment, when the processor executes the computer program, the following steps are also implemented: performing rotation correction detection on the pictures to be compared respectively to obtain the pictures to be compared after angle correction; performing feature extraction on the pictures to be compared after angle correction to obtain a feature extraction map corresponding to the pictures to be compared after angle correction; performing target detection on the pictures to be compared after angle correction according to the feature extraction map to obtain target identification position information corresponding to the pictures to be compared, and performing text feature extraction on the pictures to be compared after angle correction to obtain target identification text feature information corresponding to the pictures to be compared.

[0155] In one embodiment, when the processor executes the computer program, the following steps are also implemented: inputting the target identification images into the trained classification models respectively, convolving the target identification images through the convolution layer in the trained classification model to obtain the convolved target identification images; normalizing the convolved target identification images through the normalization layer in the trained classification model to obtain the normalized target identification images; performing multiple moving flip bottleneck convolutions on the normalized target identification images through the moving flip bottleneck convolution network in the trained classification model to obtain the feature vector of the target identification images.

[0156] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining a historical identification picture corresponding to the target identification picture, and obtaining training data based on the historical identification picture; and using the efficientnet_b0 network to perform classification training on the training data to obtain a trained classification model.

[0157] In one embodiment, when the processor executes the computer program, the following steps are also implemented: the feature distance between the target identification pictures is calculated based on the feature vector; when the feature distance is less than a preset first distance threshold, the similarity comparison result is obtained that the pictures to be compared represent the same scene; when the feature distance is greater than a preset second distance threshold, the picture-text relationship between the pictures to be compared is determined based on the target identification text feature information, and the similarity comparison result is obtained based on the picture-text relationship.

[0158] In one embodiment, when the processor executes the computer program, the following steps are also implemented: comparing the target identification text feature information to obtain the text relationship between the target identification pictures, where the text relationship is a containment relationship or a non-containment relationship; based on the text relationship between the target identification pictures, obtaining the picture-text relationship between the pictures to be compared; when the picture-text relationship is a non-containment relationship, performing light and dark detection on the pictures to be compared, and obtaining a similarity comparison result based on the light and dark detection results.

[0159] In one embodiment, the processor further implements the following steps when executing the computer program: when the image-text relationship is a non-containment relationship, light and dark detection is performed on the image to be compared by calculating the average brightness of the image to be compared or a trained light and dark detection model to obtain a light and dark detection result of the image to be compared; when the light and dark detection results of the images to be compared are all non-nighttime shots, the similarity comparison results are obtained as the images to be compared representing different scenes.

[0160] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0161] Get the image to be compared;

[0162] Perform target detection and text feature extraction on the images to be compared respectively, and obtain target identification text feature information and target identification position information corresponding to the images to be compared;

[0163] According to the target identification position information, the image to be compared is cropped to obtain the target identification image corresponding to the image to be compared;

[0164] Input the target identification pictures into the trained classification model respectively, extract features of the target identification pictures through the trained classification model, and obtain feature vectors of the target identification pictures;

[0165] According to the feature vector and the target identification text feature information, the similarity comparison result of the image to be compared is obtained.

[0166] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: performing rotation correction detection on the pictures to be compared respectively to obtain the pictures to be compared after angle correction; performing feature extraction on the pictures to be compared after angle correction to obtain a feature extraction map corresponding to the pictures to be compared after angle correction; performing target detection on the pictures to be compared after angle correction according to the feature extraction map to obtain target identification position information corresponding to the pictures to be compared, and performing text feature extraction on the pictures to be compared after angle correction to obtain target identification text feature information corresponding to the pictures to be compared.

[0167] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: inputting the target identification images into the trained classification models respectively, convolving the target identification images through the convolution layer in the trained classification model to obtain the convolved target identification images; normalizing the convolved target identification images through the normalization layer in the trained classification model to obtain the normalized target identification images; performing multiple moving flip bottleneck convolutions on the normalized target identification images through the moving flip bottleneck convolution network in the trained classification model to obtain the feature vector of the target identification images.

[0168] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining a historical identification picture corresponding to the target identification picture, and obtaining training data based on the historical identification picture; and using the efficientnet_b0 network to perform classification training on the training data to obtain a trained classification model.

[0169] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the feature distance between the target identification pictures is calculated based on the feature vector; when the feature distance is less than a preset first distance threshold, the similarity comparison result is obtained that the pictures to be compared represent the same scene; when the feature distance is greater than a preset second distance threshold, the picture-text relationship between the pictures to be compared is determined based on the target identification text feature information, and the similarity comparison result is obtained based on the picture-text relationship.

[0170] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: comparing the target identification text feature information to obtain the text relationship between the target identification pictures, where the text relationship is a containment relationship or a non-containment relationship; based on the text relationship between the target identification pictures, obtaining the picture-text relationship between the pictures to be compared; when the picture-text relationship is a non-containment relationship, performing light and dark detection on the pictures to be compared, and obtaining a similarity comparison result based on the light and dark detection results.

[0171] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the image-text relationship is a non-containment relationship, light and dark detection is performed on the image to be compared by calculating the average brightness of the image to be compared or a trained light and dark detection model to obtain a light and dark detection result of the image to be compared; when the light and dark detection results of the images to be compared are all non-nighttime shots, the similarity comparison results are obtained as the images to be compared representing different scenes.

[0172] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0173] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0174] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for comparing image similarity, characterized in that: The method comprises: Get the image to be compared; Performing target detection and text feature extraction on the to-be-compared pictures respectively, to obtain target identification text feature information and target identification position information corresponding to the to-be-compared pictures; According to the target identification position information, the image to be compared is cropped to obtain a target identification image corresponding to the image to be compared; Inputting the target identification pictures into the trained classification models respectively, performing feature extraction on the target identification pictures through the trained classification models, and obtaining feature vectors of the target identification pictures; Calculate the feature distance between the target identification pictures according to the feature vector; When the feature distance is less than a preset first distance threshold, the similarity comparison result is obtained as the to-be-compared pictures represent the same scene; When the feature distance is greater than a preset second distance threshold, the image-text relationship between the images to be compared is determined based on the target identification text feature information, and a similarity comparison result is obtained based on the image-text relationship; the preset second distance threshold is greater than the preset first distance threshold.

2. The method according to claim 1, characterized in that The target detection and text feature extraction are respectively performed on the to-be-compared pictures to obtain target identification text feature information and target identification position information corresponding to the to-be-compared pictures, including: Performing rotation correction detection on the pictures to be compared respectively to obtain pictures to be compared after angle correction; Performing feature extraction on the angle-corrected image to be compared to obtain a feature extraction graph corresponding to the angle-corrected image to be compared; According to the feature extraction map, target detection is performed on the angle-corrected image to be compared to obtain target identification position information corresponding to the image to be compared, and text feature extraction is performed on the angle-corrected image to be compared to obtain target identification text feature information corresponding to the image to be compared.

3. The method according to claim 1, characterized in that: The step of inputting the target identification pictures into the trained classification models respectively, extracting features of the target identification pictures by the trained classification models, and obtaining feature vectors of the target identification pictures comprises: Inputting the target identification pictures into the trained classification models respectively, and convolving the target identification pictures through the convolutional layers in the trained classification models to obtain the convolved target identification pictures; Normalizing the convolved target identification image through a normalization layer in the trained classification model to obtain a normalized target identification image; The normalized target identification image is subjected to multiple moving and flipping bottleneck convolutions through the moving and flipping bottleneck convolution network in the trained classification model to obtain a feature vector of the target identification image.

4. The method according to claim 1, characterized in that: Before the target identification images are input into the trained classification models respectively and the target identification images are convolved by the convolution layer in the trained classification models to obtain the convolved target identification images, the method further includes: Obtaining a historical identification picture corresponding to the target identification picture, and obtaining training data according to the historical identification picture; The efficientnet_b0 network is used to perform classification training on the training data to obtain a trained classification model.

5. The method according to claim 1, characterized in that Determining the image-text relationship between the images to be compared based on the target identification text feature information, and obtaining the similarity comparison result based on the image-text relationship includes: Compare the target identification text feature information to obtain the text relationship between the target identification images, where the text relationship is a containment relationship or a non-containment relationship; According to the text relationship between the target identification pictures, the picture-text relationship between the pictures to be compared is obtained; When the image-text relationship is a non-containment relationship, light and dark detection is performed on the images to be compared respectively, and a similarity comparison result is obtained based on the light and dark detection results.

6. The method according to claim 5, characterized in that When the image-text relationship is a non-containment relationship, performing light and dark detection on the images to be compared respectively, and obtaining similarity comparison results according to the light and dark detection results includes: When the image-text relationship is a non-containment relationship, performing brightness detection on the image to be compared by calculating the average brightness of the image to be compared or a trained brightness detection model to obtain a brightness detection result of the image to be compared; When the brightness and darkness detection results of the pictures to be compared are all not taken at night, the similarity comparison results are obtained as the pictures to be compared representing different scenes.

7. A device for comparing image similarity, characterized in that: The device comprises: An acquisition module is used to acquire the image to be compared; A processing module, used to perform target detection and text feature extraction on the image to be compared, respectively, to obtain target identification text feature information and target identification position information corresponding to the image to be compared; A cropping module, used to crop the image to be compared according to the target identification position information to obtain a target identification image corresponding to the image to be compared; A feature extraction module, used to input the target identification pictures into the trained classification models respectively, perform feature extraction on the target identification pictures through the trained classification models, and obtain feature vectors of the target identification pictures; A comparison module is used to calculate the feature distance between the target identification pictures according to the feature vector. When the feature distance is less than a preset first distance threshold, the similarity comparison result is obtained that the pictures to be compared represent the same scene. When the feature distance is greater than a preset second distance threshold, the picture-text relationship between the pictures to be compared is determined according to the target identification text feature information, and the similarity comparison result is obtained according to the picture-text relationship; the preset second distance threshold is greater than the preset first distance threshold.

8. The device according to claim 7, characterized in that The processing module is also used to perform rotation correction detection on the pictures to be compared respectively to obtain the pictures to be compared after angle correction, perform feature extraction on the pictures to be compared after angle correction to obtain a feature extraction map corresponding to the pictures to be compared after angle correction, perform target detection on the pictures to be compared after angle correction according to the feature extraction map to obtain target identification position information corresponding to the pictures to be compared, and perform text feature extraction on the pictures to be compared after angle correction to obtain target identification text feature information corresponding to the pictures to be compared.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.