Search

CN-121982340-A - Image background similarity calculation method, device, equipment and storage medium

CN121982340ACN 121982340 ACN121982340 ACN 121982340ACN-121982340-A

Abstract

The application provides a method, a device, equipment and a storage medium for calculating image background similarity, relates to the field of images, and can be applied to insurance claim anti-fraud business scenes in the field of financial insurance or bank website monitoring scenes, and can also be applied to background recognition of background images needing foreground shielding, such as diagnosis and treatment room environment layout scenes in the medical field. The method comprises the steps of obtaining a foreground shielding target through image identification, removing the foreground shielding target from an image to obtain a first image without the foreground shielding target, extracting and enhancing the characteristics of the first image, and obtaining the background similarity of the image through similarity calculation based on the background characteristics and a comparison image. According to the application, the foreground and background features are explicitly separated, the problem of feature confusion caused by interference of the person shielding area with background similarity calculation is avoided, and the technical problem of inaccurate results when the similarity is calculated on the background image shielded by the person is solved.

Inventors

  • ZHENG XIMIN
  • SHU CHANG
  • CHEN YUANXU

Assignees

  • 平安科技(深圳)有限公司

Dates

Publication Date
20260505
Application Date
20260302

Claims (10)

  1. 1. The image background similarity calculation method is characterized by comprising the following steps of: Responding to a calculation instruction of similarity calculation, and acquiring an image to be processed, wherein a foreground shielding target exists in the image to be processed, and the foreground shielding target shields part of image background; carrying out foreground image recognition on the image to be processed to obtain the foreground shielding target; removing the identified foreground shielding target from the image to be processed to obtain a first image without the foreground shielding target; performing feature extraction enhancement processing on the first image to obtain background features with enhanced features; and carrying out similarity calculation on the image based on the background characteristics and the preset comparison, and obtaining the image background similarity.
  2. 2. The method for calculating the background similarity of the image according to claim 1, wherein the step of performing foreground image recognition on the image to be processed to obtain the foreground occlusion target includes: performing downsampling processing on the image to be processed through a preset feature extraction network to obtain a downsampled image; Performing nonlinear transformation processing on the downsampled image to obtain multi-scale features, wherein the multi-scale features retain original spatial structure information and semantic information; and determining and obtaining the foreground shielding target based on the multi-scale characteristics.
  3. 3. The method of claim 2, wherein the performing a nonlinear transformation on the downsampled image to obtain the multi-scale feature comprises: If the downsampling processing mode of the image to be processed is scaling to different sizes, independently performing feature extraction processing on each layer of downsampled image to obtain multi-scale features, wherein the features of different scales have no interaction; If the downsampling processing mode of the image to be processed is to use different depth layers, spatial structural features are extracted through an early convolution layer, and semantic features are extracted through a later convolution layer.
  4. 4. The image background similarity calculation method according to claim 2, wherein the Removing the identified foreground shielding target from the image to be processed to obtain a first image without the foreground shielding target, wherein the method comprises the following steps: generating a binarized foreground mask based on the multi-scale features; And removing the identified foreground shielding target from the image to be processed based on the foreground mask to obtain a first image which does not contain the foreground shielding target.
  5. 5. The method for computing the background similarity of images according to claim 4, wherein the performing feature extraction enhancement processing on the first image to obtain the background feature after feature enhancement comprises: extracting multi-scale region features for each spatial location in the first image; converting the multi-scale region features corresponding to the first image into embedded vectors through a shared projection head for each region of the first image; Calculating the region consistency between a local region and an adjacent region in the image to be processed based on the embedded vector; and giving attention weight to each local area in the image to be processed based on the area consistency, and carrying out feature extraction and enhancement processing on the first image to obtain background features after feature enhancement, wherein the attention weight is larger as the area consistency is higher.
  6. 6. The method of claim 4, wherein the removing the identified foreground occlusion object from the image to be processed based on the foreground mask to obtain the first image without the foreground occlusion object comprises: And removing the identified foreground shielding target from the image to be processed through a preset foreground segmentation model based on the foreground mask, so as to obtain a first image without the foreground shielding target.
  7. 7. The method for calculating the image background similarity according to claim 1, wherein the calculating the image background similarity based on the similarity between the background feature and a preset comparison image comprises: performing feature fusion processing on the background features; performing feature extraction processing on a preset comparison image to obtain comparison features; And carrying out similarity calculation based on the fused features and the contrast features to obtain the image background similarity.
  8. 8. An image background similarity calculation device, characterized in that the image background similarity calculation device comprises: the acquisition unit is used for responding to the calculation instruction of the similarity calculation and acquiring an image to be processed, wherein a foreground shielding target exists in the image to be processed and shields part of image background; The image recognition unit is used for carrying out foreground image recognition on the image to be processed to obtain the foreground shielding target; The foreground removing unit is used for removing the identified foreground shielding target from the image to be processed to obtain a first image which does not contain the foreground shielding target; The feature enhancement unit is used for carrying out feature extraction enhancement processing on the first image to obtain background features with enhanced features; And the similarity calculation unit is used for calculating the similarity of the image based on the background characteristics and a preset comparison image to obtain the background similarity of the image.
  9. 9. An image background similarity calculation device comprising a memory, a processor and an image background similarity calculation program stored on the memory and executable on the processor, the processor executing the image background similarity calculation program to implement the steps of the image background similarity calculation method of any one of claims 1 to 7.
  10. 10. A storage medium, wherein a program for realizing the image background similarity calculation method is stored on the storage medium, and the program for realizing the image background similarity calculation method is executed by a processor to realize the steps of the image background similarity calculation method according to any one of claims 1 to 7.

Description

Image background similarity calculation method, device, equipment and storage medium Technical Field The present application relates to the field of images, and in particular, to a method, an apparatus, a device, and a storage medium for computing image background similarity. Background In the scene of anti-fraud business of insurance claims in the field of financial insurance, such as the claims of car insurance and property insurance, customers need to upload photos of accident sites such as vehicle collision sites and family property loss places. There may be fraudulent use of old photos, swiping at different places, etc. Or the suspicious character wanders for a long time in the banking website and ATM monitoring scene. In addition, in the medical field, in the environment layout scene of an operating room or a sterile diagnosis and treatment room, such as an operating table, an instrument cabinet, a disinfection device and a monitoring camera position need to strictly meet medical standards, but a great deal of shielding exists for medical staff or patients in the operation or diagnosis and treatment process. Therefore, it is necessary to calculate the background similarity based on the background image in which the foreground mask exists, and to perform background recognition. When comparing whether different image backgrounds are identical, the comparison is generally performed by calculating the similarity of the image backgrounds. However, when background comparison is performed, the situation that the foreground person is blocked often exists in the compared images, for example, a bank counter monitoring picture in the financial field, a medical field consulting room monitoring picture and the like, and at this time, similarity calculation of the partially blocked background is inaccurate, and the indoor environment background comparison effect under the interference of the foreground person is poor. Therefore, in the prior art, there is a technical problem that the result is inaccurate when the similarity is calculated for the background image having the person shielding. The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present application and is not intended to represent an admission that the foregoing is prior art. Disclosure of Invention The application mainly aims to provide an image background similarity calculation method, which aims to solve the technical problem that in the prior art, when similarity is calculated on a background image with person shielding, the result is inaccurate. In a first aspect, an image background similarity calculation method is provided, including: Responding to a calculation instruction of similarity calculation, and acquiring an image to be processed, wherein a foreground shielding target exists in the image to be processed, and the foreground shielding target shields part of image background; carrying out foreground image recognition on the image to be processed to obtain the foreground shielding target; removing the identified foreground shielding target from the image to be processed to obtain a first image without the foreground shielding target; performing feature extraction enhancement processing on the first image to obtain background features with enhanced features; and carrying out similarity calculation on the image based on the background characteristics and the preset comparison, and obtaining the image background similarity. In a possible implementation manner of the present application, the performing foreground image recognition on the image to be processed to obtain the foreground occlusion target includes: performing downsampling processing on the image to be processed through a preset feature extraction network to obtain a downsampled image; Performing nonlinear transformation processing on the downsampled image to obtain multi-scale features, wherein the multi-scale features retain original spatial structure information and semantic information; and determining and obtaining the foreground shielding target based on the multi-scale characteristics. In a possible embodiment of the present application, the performing a nonlinear transformation on the downsampled image to obtain a multi-scale feature includes: If the downsampling processing mode of the image to be processed is scaling to different sizes, independently performing feature extraction processing on each layer of downsampled image to obtain multi-scale features, wherein the features of different scales have no interaction; If the downsampling processing mode of the image to be processed is to use different depth layers, spatial structural features are extracted through an early convolution layer, and semantic features are extracted through a later convolution layer. In one possible embodiment of the application, the Removing the identified foreground shielding target from the image to be processed to obtain a first image