Image deduplication processing method and apparatus, storage medium, and electronic device

By determining the template image in the image deduplication processing and using the spectrogram and frequency similarity calculation, the problem of large calculation amount and poor real-time performance in the prior art is solved, and an efficient and accurate image deduplication effect is achieved.

WO2025139959A1PCT designated stage expired Publication Date: 2025-07-03SUZHOU MEGAROBO TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/140300
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-26
Filing Date
2024-12-18
Publication Date
2025-07-03

AI Technical Summary

Technical Problem

The existing image deduplication processing methods have large calculations and poor real-time performance, making it difficult to efficiently screen out non-repetitive images for training learning models.

Method used

By determining the template image from multiple sample images, the similarity between the images is calculated using the spectrogram and frequency similarity, and a preset number of target images are filtered out, including high-frequency and low-frequency similarity calculations and clustering processing.

Benefits of technology

It improves the accuracy and real-timeness of image deduplication processing, simplifies the calculation amount, and is suitable for the rapid processing of large amounts of image data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024140300_03072025_PF_FP_ABST
    Figure CN2024140300_03072025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an image deduplication processing method, an image deduplication processing apparatus, a storage medium, and an electronic device. The image deduplication processing method comprises: determining a template image from among multiple sample images; for each sample image among the multiple sample images, acquiring a spectrogram of the image to be processed; based on the spectrogram of the image to be processed and a spectrogram of the template image, determining a degree of frequency similarity between the image to be processed and the template image; based on the degree of frequency similarity, determining a total degree of similarity between the sample image and the template image; on the basis of the total degree of similarity of each sample image among the multiple sample images with the template image, determining a preset number of target images among the multiple sample images. This not only ensures the accuracy of image deduplication processing, but also ensures processing speed and improves real-time performance.
Need to check novelty before this filing date? Find Prior Art

Description

Image deduplication processing method, device, storage medium and electronic device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on December 26, 2023, with application number 202311803404.X and application name "Image Deduplication Processing Method, Device, Storage Medium and Electronic Device", the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of image processing, and more specifically to an image deduplication processing method, an image deduplication processing device, a storage medium, and an electronic device. Background Art

[0003] With the advancement of computer processing power, computer vision technology is increasingly being applied to various scenarios. However, image data volumes are large and computationally complex. Furthermore, in real-world applications, a large number of images may be collected, resulting in a high degree of information duplication. Therefore, image deduplication processing is necessary. This process can filter out desired images from a large number of images for subsequent applications.

[0004] For example, in cutting-edge technologies like wafer production, the yield rate of manufactured products is extremely high. Learning models, such as neural networks, are often used to automatically measure wafer yield. However, when collecting sample images to train the learning model, these images often contain excessively rich data and a high degree of repetitive information. Therefore, image deduplication is necessary.

[0005] Existing image deduplication methods often directly compare images without any difference, and then filter out images with high duplication based on the comparison results. This image deduplication method is computationally intensive and has poor real-time performance. Summary of the Invention

[0006] The present application has been made in view of the above-mentioned problems.

[0007] In a first aspect, the present application provides a method for image deduplication processing, comprising: determining a template image from a plurality of sample images;

[0008] For each sample image among the plurality of sample images, obtaining a frequency spectrogram of the image to be processed, wherein the image to be processed includes the sample image and / or a feature image of the sample image; determining frequency similarity between the image to be processed and the template image based on the frequency spectrogram of the image to be processed and the frequency spectrogram of the template image; and determining an overall similarity between the sample image and the template image based on the frequency similarity;

[0009] According to the total similarity between each sample image in the plurality of sample images and the template image, a preset number of target images are determined from the plurality of sample images.

[0010] In a possible implementation, determining the template image from the plurality of sample images includes: calculating cosine similarities between different sample images in the plurality of sample images;

[0011] For each sample image among the multiple sample images, counting the number of first sample images, wherein the cosine similarity between the first sample image and the sample image is greater than a similarity threshold;

[0012] The number of first sample images counted for each sample image is compared, and the sample image for which the number of first sample images counted is the largest is determined as the template image.

[0013] In a possible implementation, the frequency similarity includes high-frequency similarity and / or low-frequency similarity; and obtaining the frequency spectrum of the image to be processed includes: performing Fourier transform on the image to be processed to obtain the frequency spectrum of the image to be processed;

[0014] Determining frequency similarity between the image to be processed and the template image based on the spectrogram of the image to be processed and the spectrogram of the template image, including: determining a high-pass filter area and / or a low-pass filter area in the spectrogram of the image to be processed, and determining a high-pass filter area and / or a low-pass filter area in the spectrogram of the template image; performing an inverse Fourier transform on the determined high-pass filter area and / or low-pass filter area to obtain a corresponding high-pass filter image and / or low-pass filter image;

[0015] Based on the high-pass filtered image corresponding to the image to be processed and the high-pass filtered image corresponding to the template image, the high-frequency similarity between the image to be processed and the template image is calculated, and / or based on the low-pass filtered image corresponding to the image to be processed and the low-pass filtered image corresponding to the template image, the low-frequency similarity between the image to be processed and the template image is calculated.

[0016] In one possible embodiment, determining the high-pass filter area and / or low-pass filter area in the spectrum graph of the image to be processed, and determining the high-pass filter area and / or low-pass filter area in the spectrum graph of the template image includes: for the spectrum graph of the image to be processed or the spectrum graph of the template image, in the spectrum graph, determining a reference point, wherein the reference point is the center point of the spectrum graph; in the spectrum graph, determining a rectangular area with the reference point as the center point as the low-pass filter area, and determining an area outside the determined low-pass filter area as a high-pass filter area.

[0017] In a possible implementation, calculating the high-frequency similarity between the image to be processed and the template image based on the high-pass filtered image corresponding to the image to be processed and the high-pass filtered image corresponding to the template image includes:

[0018] Calculating the structural similarity between a high-pass filtered image corresponding to the image to be processed and a high-pass filtered image corresponding to the template image as the high-frequency similarity between the image to be processed and the template image; and / or calculating the low-frequency similarity between the image to be processed and the template image based on the low-pass filtered image corresponding to the image to be processed and the low-pass filtered image corresponding to the template image, including: calculating the structural similarity between the low-pass filtered image corresponding to the image to be processed and the low-pass filtered image corresponding to the template image as the low-frequency similarity between the image to be processed and the template image.

[0019] In one possible embodiment, the frequency similarity includes high-frequency similarity and low-frequency similarity; based on the frequency similarity, determining the total similarity between the sample image and the template image includes: calculating the product of the high-frequency similarity between the feature image of the sample image and the feature image of the template image and the high-frequency similarity between the sample image and the template image as a first similarity; calculating the product of the low-frequency similarity between the feature image of the sample image and the feature image of the template image and the low-frequency similarity between the sample image and the template image as a second similarity; and calculating the sum of the first similarity and the second similarity as the total similarity between the sample image and the template image.

[0020] In one possible embodiment, determining a preset number of target images from a plurality of sample images based on the total similarity between each sample image in a plurality of sample images and a template image includes: clustering the total similarities between the plurality of sample images and the template image, wherein the clustered categories are a preset number; and selecting a target image from the sample images in each clustered category based on the clustering results.

[0021] The second aspect of the present application further provides an image deduplication processing device, the device comprising:

[0022] A selection module, used for determining a template image from a plurality of sample images;

[0023] an acquisition module, configured to acquire, for each sample image among a plurality of sample images, a frequency spectrum of an image to be processed, wherein the image to be processed includes the sample image and / or a feature image of the sample image;

[0024] a determination module, configured to determine a frequency similarity between the image to be processed and the template image based on the frequency spectrum of the image to be processed and the frequency spectrum of the template image;

[0025] A comparison module, configured to determine the overall similarity between the sample image and the template image based on the frequency similarity;

[0026] The deduplication module is used to determine a preset number of target images from the multiple sample images according to the total similarity between each sample image in the multiple sample images and the template image.

[0027] The third aspect of the present application further provides a storage medium on which program instructions are stored, and the program instructions are used to execute the above-mentioned image deduplication processing method when running.

[0028] The fourth aspect of the present application further provides an electronic device, which includes a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions are used to execute the above-mentioned image deduplication processing method when the processor is running.

[0029] In this technical solution, a template image is first determined from multiple sample images. Then, the template image is used to deduplicate the sample image set based on the frequency similarity of the sample images. This not only ensures the accuracy of the image deduplication process, but also ensures processing speed and improves real-time performance.

[0030] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The above and other purposes, features, and advantages of the present application will become more apparent through a more detailed description of the embodiments of the present application in conjunction with the accompanying drawings. The accompanying drawings are intended to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the drawings, the same reference numerals generally represent the same components or steps.

[0032] FIG1 shows a schematic flow chart of an image deduplication processing method according to an embodiment of the present application;

[0033] FIG2 shows a schematic flowchart of determining a template image according to an embodiment of the present application;

[0034] FIG3 shows a schematic block diagram of an image deduplication processing apparatus according to an embodiment of the present application;

[0035] FIG4 shows a schematic block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solutions and advantages of the present application more apparent, the following is a detailed description of example embodiments of the present application with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the example embodiments described herein. Based on the embodiments of the present application described in this application, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of this application.

[0037] In order to at least partially solve the above technical problem, according to one aspect of the present application, a method for image deduplication processing is provided.

[0038] Fig. 1 shows a schematic flow chart of an image deduplication processing method according to an embodiment of the present application. As shown in Fig. 1 , the method includes steps S110, S120, S130, S140, and S150.

[0039] Step S110: determining a template image from a plurality of sample images.

[0040] Sample images are images to be deduplicated. For example, in the wafer production field, a large number of wafer images can be collected for training artificial intelligence models. Because these large numbers of wafer images contain duplicate information, these images can be deduplicated to filter out the desired images for subsequent training of the artificial intelligence model.

[0041] The sample image can be an RGB image or a grayscale image. The sample image can be an image of any suitable size and resolution. The sample image can be the original image directly captured by the image acquisition device, or it can be an image obtained by performing preprocessing operations on the original image. The preprocessing operations may include all operations to improve the visual effect of the sample image, increase its clarity, or highlight certain features in the image (such as the above-mentioned wafer). By way of example and not limitation, the preprocessing operations may include digitization, geometric transformation, normalization, filtering, and other operations on the original image.

[0042] A template image can be determined from a plurality of sample images. Alternatively, a template image can be randomly assigned from the plurality of sample images. Furthermore, based on the similarity between the plurality of sample images, the image with the highest similarity to the other images can be determined as the template image. The template image can be used to compare similarity with each of the plurality of sample images.

[0043] Step S120: for each sample image among the plurality of sample images, obtaining a frequency spectrum of the image to be processed, wherein the image to be processed includes the sample image and / or a feature image of the sample image.

[0044] The feature image of the sample image can be a feature map extracted through the convolution operation of a convolutional neural network (CNN). The convolution operation extracts and processes the spatial information of the image by shifting the filter and multiplying each element. It can also learn the weights and biases of different features, enabling the CNN to effectively recognize and classify images. Specifically, feature extraction can be performed using a feature extraction network such as ResNet50.

[0045] In step S120, each sample image and / or feature image of the sample image is converted into a frequency spectrum represented in the frequency domain. Of course, the template image is one of the sample images, and a frequency spectrum corresponding to the template image is also obtained.

[0046] It can be understood that converting the image to be processed into its spectrum map can be implemented by using any existing or future developed algorithm.

[0047] Step S130: for each image to be processed, based on the frequency spectrum of the image to be processed and the frequency spectrum of the template image, determine the frequency similarity between the image to be processed and the template image.

[0048] The image to be processed includes a sample image and / or a feature image of the sample image, and the template image includes a template image and / or a feature image of the template image. Similarity can be calculated between the spectrogram of the sample image and the spectrogram of the template image, or between the spectrogram of the feature image of the sample image and the spectrogram of the feature image of the template image. Thus, the frequency similarity corresponding to each image to be processed can be obtained. It will be appreciated that the frequency similarity corresponding to each sample image can be determined based on the frequency similarity corresponding to each image to be processed.

[0049] It is understood that the frequency similarity between the image to be processed and the template image in different frequency bands can be calculated based on the spectrogram of the image to be processed and the spectrogram of the template image. For example, for each image to be processed, the high-frequency similarity and / or low-frequency similarity between the image to be processed and the template image are calculated. The high-frequency similarity and low-frequency similarity can be determined based on a frequency threshold. The high-frequency similarity represents the similarity of frequencies above the frequency threshold, and the low-frequency similarity represents the similarity of frequencies below the frequency threshold.

[0050] Step S140: For each image to be processed, determine the total similarity between the sample image and the template image based on the frequency similarity.

[0051] For example, in step S130, the high-frequency and low-frequency similarities between the image to be processed and the template image can be determined. Furthermore, the image to be processed can include both the sample image itself and a feature image of the sample image. In step S140, the total similarity between each sample image and the template image can be calculated based on all the frequency similarities determined in step S130. The total similarity can comprehensively reflect the overall similarity between the two images and can more accurately assess the similarity between the two images.

[0052] Step S150: determining a preset number of target images from the plurality of sample images according to the total similarity between each sample image in the plurality of sample images and the template image.

[0053] The preset number can represent the number of sample images to be retained after the image deduplication operation. It can be set based on the expected deduplication effect. The higher the expected deduplication ratio, the smaller the preset number can be set.

[0054] Based on the total similarity of each sample image and a preset number, we can filter out samples with a total similarity that meets the requirements. Based on the sample images corresponding to the filtered total similarity, we can then determine the target image. Sample images other than the target image are removed to complete the image deduplication process.

[0055] In the above embodiment, a template image is first determined from a plurality of sample images; then, the template image is used to deduplicate the sample image set based on the frequency similarity of the sample images. This not only ensures the accuracy of the image deduplication process, but also ensures processing speed and improves real-time performance.

[0056] In some embodiments, FIG2 shows a schematic flow chart of determining a template image according to an embodiment of the present application. As shown in FIG2 , step S110 of determining a template image from a plurality of sample images includes steps S111 to S113 .

[0057] Step S111: Calculating cosine similarities between different sample images in a plurality of sample images.

[0058] The cosine similarity between each pair of sample images can be calculated to determine a template image based on the cosine similarity. Each sample image, including the template image, is converted into a vector representation. The cosine similarity between each pair of vectors is calculated, which can be used to measure the similarity between the two images.

[0059] The cosine similarity value range is between -1 and 1. The closer the value is to 1, the more similar the two vectors are, that is, the higher the similarity between the two images. The closer the value is to -1, the less similar the two vectors are, that is, the lower the similarity between the two images.

[0060] Step S112: for each sample image in the plurality of sample images, counting the number of first sample images, wherein the cosine similarity between the first sample image and the sample image is greater than a similarity threshold.

[0061] The similarity threshold can be set according to the requirements of the application scenario, for example: 0.9.

[0062] Calculate the cosine similarity between each sample image and the remaining sample images. When the cosine similarity between two sample images is greater than the similarity threshold, the number of first sample images counted for both images is considered to increase by 1. In other words, the two images are considered the first sample images for each other. When the cosine similarity between two sample images is less than or equal to the similarity threshold, the number of first sample images for each image remains unchanged. After all calculations are completed for all sample images, the number of first sample images for each sample image can be obtained.

[0063] Step S113: comparing the number of first sample images counted for each sample image, and determining the sample image with the largest number of first sample images counted for it as the template image.

[0064] For example, assuming there are 200 sample images, and since each sample image will have its cosine similarity calculated 199 times with the other sample images, the minimum number of first sample images counted for that sample image can be 0 and the maximum number can be 199. If a sample image among the multiple sample images has the largest number of first sample images counted for it—in other words, it has the largest number of images with a cosine similarity greater than the similarity threshold—then that sample image is determined as the template image. If the number of first sample images counted for two or more sample images is the same, one of the two or more sample images can be randomly selected as the template image.

[0065] In the above embodiment, by calculating the cosine similarity of multiple sample images, the sample image with the highest cosine similarity greater than a similarity threshold is determined as the template image. This template image better reflects the characteristics of the multiple sample images. Using this template image in subsequent image deduplication operations effectively improves the image deduplication effect.

[0066] As mentioned above, the frequency similarity in step S130 may include high-frequency similarity and / or low-frequency similarity.

[0067] In some embodiments, step S120 of obtaining the frequency spectrum of the image to be processed includes: performing Fourier transform on the image to be processed to obtain the frequency spectrum of the image to be processed.

[0068] The Fourier transform converts an image from the spatial domain to the frequency domain. The Fourier transform transforms the grayscale distribution function of the image being processed into its frequency distribution function. The spectrum obtained by Fourier transforming the image being processed is a distribution diagram of the image's gradient. The varying brightnesses seen on the spectrum represent the difference between a pixel in the image being processed and its neighboring pixels—the magnitude of the gradient, or the frequency of that pixel. If the spectrum contains more dark pixels, the image being processed is softer; conversely, if the spectrum contains more bright pixels, the image being processed is sharper, with distinct boundaries and larger pixel differences on either side of the boundary. In short, the spectrum of the image being processed represents its characteristics from a frequency perspective.

[0069] Step S130 determines the frequency similarity between the image to be processed and the template image based on the spectrum of the image to be processed and the spectrum of the template image, which may include the following steps: first, determining the high-pass filter area and / or low-pass filter area in the spectrum of the image to be processed, and determining the high-pass filter area and / or low-pass filter area in the spectrum of the template image. Then, performing an inverse Fourier transform on the determined high-pass filter area and / or low-pass filter area to obtain the corresponding high-pass filter image and / or low-pass filter image. Finally, based on the high-pass filter image corresponding to the image to be processed and the high-pass filter image corresponding to the template image, calculate the high-frequency similarity between the image to be processed and the template image; and / or, based on the low-pass filter image corresponding to the image to be processed and the low-pass filter image corresponding to the template image, calculate the low-frequency similarity between the image to be processed and the template image.

[0070] The spectrum graph of the image to be processed may include a high-pass filter area and a low-pass filter area. The closer the area is to the center point of the spectrum graph, the lower the frequency corresponds to. Conversely, the frequency corresponds to the edge area outside the spectrum graph is higher. The center point of the spectrum graph can represent the average grayscale of the image to be processed, and the frequency of the center point is 0. From the center point of the spectrum graph outward, the frequency increases successively. That is, the center area of ​​the spectrum graph corresponds to the low-pass filter area, and the peripheral area corresponds to the high-pass filter area. According to the above principle, the high-frequency filter area and / or low-pass filter area in the spectrum graph of the image to be processed and the template image can be determined respectively. The spectrum value of the low-pass filter area of ​​the spectrum graph of the image to be processed is set to 0, and the spectrum value of the high-pass filter area remains unchanged, then the high-pass filter area can be obtained. The spectrum value of the high-pass filter area of ​​the above spectrum graph is set to 0, and the spectrum value of the low-pass filter area remains unchanged, then the low-pass filter area can be obtained.

[0071] Performing an inverse Fourier transform on the high-pass filter region and / or the low-pass filter region can obtain a corresponding high-pass filter image and / or low-pass filter image. Through the inverse Fourier transform, the frequency distribution of the image can be transformed into its grayscale distribution.

[0072] In some embodiments, the high-frequency similarity between the image to be processed and the template image can be calculated based on the high-pass filtered images corresponding to the image to be processed and the template image. Alternatively, the low-frequency similarity between the image to be processed and the template image can be calculated based on the low-pass filtered images corresponding to the image to be processed and the template image. In a preferred embodiment, both the high-frequency similarity and the low-frequency similarity can be calculated. The high-frequency details of some images are more significant, while the low-frequency parts are weakened or filtered out, so the brightness of the high-pass filtered area in the spectrum diagram of the image is greater and more meaningful. Similarly, the low-frequency components of some images are more obvious, while the high-frequency details are blurred or suppressed, so the brightness of the low-pass filtered area in the spectrum diagram of the image is greater and more meaningful. In actual application scenarios, either or both of the high-frequency similarity and the low-frequency similarity can be calculated as needed.

[0073] In the above-described embodiment, a high-pass filtered image and / or a low-pass filtered image of the image to be processed are used to calculate the corresponding high-frequency similarity and / or low-frequency similarity with the high-pass filtered image and / or the low-pass filtered image of the template image, respectively. The high-frequency similarity and the low-frequency similarity characterize the similarity relationship between the images, and based on them, the accuracy of image deduplication can be effectively improved, that is, the image removed is ensured to have a high degree of repetition with the remaining image. In particular, for embodiments that calculate both high-frequency and low-frequency similarities, the features of the images can be more comprehensively compared, further effectively improving the accuracy of image deduplication.

[0074] In some embodiments, the steps of determining the high-pass filter region and / or the low-pass filter region in the spectrum of the image to be processed and determining the high-pass filter region and / or the low-pass filter region in the spectrum of the template image may include: performing the following operations on the spectrum of the image to be processed or the spectrum of the template image: first, determining a reference point in the spectrum, wherein the reference point is the center point of the spectrum; then, determining a rectangular area in the spectrum with the reference point as the center point as the low-pass filter region, and determining the area outside the determined low-pass filter region as the high-pass filter region.

[0075] For example, the center point of the spectrum graph can be first determined based on the length and width of the spectrum graph to serve as a reference point. The rectangular area is determined with the reference point as the center point of the rectangular area. It can be understood that the determined rectangular area will be located at the center of the spectrum graph. For example, through the above operation, a 60×60 rectangular area is set at the center of the spectrum graph. The rectangular area is the low-pass filter area, and the area outside the rectangular area is the high-pass filter area. The size of the rectangular area in the spectrum graph can be adjusted according to specific actual needs. By adjusting the size of the rectangular area, the respective ranges of the low-pass filter area and the high-pass filter area in the spectrum graph can be controlled.

[0076] In the above embodiment, the low-pass filter area and the high-pass filter area are determined by setting rectangular areas in the spectrum graph. This solution can flexibly adjust the range of the low-pass filter area and the high-pass filter area, and is simple to calculate and easy to implement.

[0077] In some embodiments, the above-mentioned step of calculating the high-frequency similarity between the image to be processed and the template image based on the high-pass filtered image corresponding to the image to be processed and the high-pass filtered image corresponding to the template image may include: calculating the structural similarity (Structural Similarity Index, abbreviated as SSIM) between the high-pass filtered image corresponding to the image to be processed and the high-pass filtered image corresponding to the template image as the high-frequency similarity between the image to be processed and the template image.

[0078] Structural similarity can be used to measure the similarity between two images. Structural similarity is based on perception and is more consistent with the human eye's intuitive perception. Structural similarity primarily considers three key image characteristics: brightness, contrast, and structure. Brightness can be measured as the average grayscale value, calculated by averaging all pixel values. Contrast can be measured using the grayscale standard deviation. Structure can be measured using the correlation coefficient.

[0079] Similarly, the above-mentioned calculation of the low-frequency similarity between the image to be processed and the template image based on the low-pass filtered image corresponding to the image to be processed and the low-pass filtered image corresponding to the template image may include: calculating the structural similarity between the low-pass filtered image corresponding to the image to be processed and the low-pass filtered image corresponding to the template image as the low-frequency similarity between the image to be processed and the template image.

[0080] When the image to be processed is a sample image, the high-pass filtered image corresponding to the sample image and the high-pass filtered image corresponding to the template image are subjected to SSIM similarity calculation to obtain the image high-frequency similarity (ISH).

[0081] When the image to be processed is a sample image, the low-pass filtered image corresponding to the sample image and the low-pass filtered image corresponding to the template image are subjected to SSIM similarity calculation to obtain the image low-frequency similarity (ISL).

[0082] When the image to be processed is the feature image of the sample image, the high-pass filtered image corresponding to the feature image of the sample image and the high-pass filtered image corresponding to the feature image of the template image are subjected to SSIM similarity calculation to obtain the feature high frequency similarity (FSH).

[0083] When the image to be processed is the feature image of the sample image, the low-pass filtered image corresponding to the feature image of the sample image and the low-pass filtered image corresponding to the feature image of the template image are subjected to SSIM similarity calculation to obtain the feature low-frequency similarity (FSL).

[0084] It can be understood that since the image to be processed includes each sample image and / or its feature image in multiple sample images, the image to be processed contains the template image and / or its feature image. Therefore, when performing structural similarity calculation, when calculating the similarity between the template image and itself or calculating the similarity between the feature image of the template image and itself, its high-frequency similarity and low-frequency similarity can be 1.

[0085] In the above embodiment, image deduplication is performed by calculating structural similarity, which is more consistent with the perception of human eyes, thereby improving the accuracy of deduplication.

[0086] In some embodiments, the frequency similarity includes high frequency similarity and low frequency similarity.

[0087] The above step S140 determines the total similarity between the sample image and the template image based on the frequency similarity, and includes the following steps S141 to S143.

[0088] In step S141 , the product of the high-frequency similarity between the feature image of the sample image and the feature image of the template image and the high-frequency similarity between the sample image and the template image is calculated as the first similarity.

[0089] In step S142 , the product of the low-frequency similarity between the feature image of the sample image and the feature image of the template image and the low-frequency similarity between the sample image and the template image is calculated as the second similarity.

[0090] In step S143 , the sum of the first similarity and the second similarity is calculated as the total similarity between the sample image and the template image.

[0091] Specifically, the total similarity Y can be calculated by the following formula: Y = ISH × FSH + ISL × FSL

[0092] ISH stands for image high-frequency similarity; FSH stands for feature high-frequency similarity; ISL stands for image low-frequency similarity; and FSL stands for feature low-frequency similarity. Image high-frequency similarity is the high-frequency similarity between the sample image and the template image. Feature high-frequency similarity is the high-frequency similarity between the feature image of the sample image and the feature image of the template image. Image low-frequency similarity is the low-frequency similarity between the sample image and the template image. Feature low-frequency similarity is the low-frequency similarity between the feature image of the sample image and the feature image of the template image.

[0093] In the above embodiment, the calculation of total similarity takes into account not only the sample image itself but also its characteristic images, and not only the high-frequency similarity between images but also the low-frequency similarity between images. This ensures effective image deduplication. Furthermore, the above calculation method is simple, fast, and inexpensive, making it suitable for scenarios requiring rapid processing of large amounts of image data. Furthermore, the total similarity calculation method is applicable to a wide variety of image types, demonstrating its high universality.

[0094] In some embodiments, the above-mentioned step S150 determines a preset number of target images from a plurality of sample images based on the total similarity between each sample image in the plurality of sample images and the template image, including: first, clustering the total similarities between the plurality of sample images and the template image, wherein the clustered categories are a preset number; and then, based on the clustering results, selecting a target image from the sample images of each clustered category.

[0095] The K-Means Clustering algorithm can be used to cluster the total similarity of multiple sample images with the template image. K-Means Clustering divides data points into K clusters, where K is a pre-specified parameter. In the embodiment of the present application, K is the number of preset target images, that is, the number of images remaining after the image deduplication operation. The K-Means Clustering algorithm moves the center of the cluster through iterative calculation until the optimal cluster is found. In the embodiment of the present application, there is no limitation on the clustering method. Any method that can achieve data grouping is within the scope of protection of this application.

[0096] For example, taking the number of sample images as 200 and the deduplication ratio as 90%, the preset number is 200×(1-0.9)=20. K-means clustering is performed on the total similarity, and the total similarity of the sample images is divided into 20 clusters, and the center of each cluster is the mean of the values ​​contained in the cluster. Based on the center of the cluster, the total similarity closest to the center can be selected in each cluster. Based on the selected total similarity, the corresponding sample image can be determined. Thus, a sample image is determined in each cluster. The sample images determined in all clusters constitute the 20 images finally retained after image deduplication.

[0097] In the above embodiment, the use of clustering to perform duplicate image deduplication on sample images can simply and efficiently process a large number of sample images, effectively ensuring the processing speed and further improving the accuracy of the image deduplication method.

[0098] According to another aspect of the present application, an image deduplication processing apparatus is also provided. FIG3 shows a schematic block diagram of an image deduplication processing apparatus according to one embodiment of the present application. As shown in FIG3 , the image deduplication processing apparatus 300 includes a selection module 310, an acquisition module 320, a determination module 330, a comparison module 340, and a deduplication module 350.

[0099] The selection module 310 is used to determine a template image from a plurality of sample images. The acquisition module 320 is used to obtain a frequency spectrum of the image to be processed for each sample image in the plurality of sample images, wherein the image to be processed includes the sample image and / or the feature image of the sample image. The determination module 330 is used to determine the frequency similarity between the image to be processed and the template image based on the frequency spectrum of the image to be processed and the frequency spectrum of the template image. The comparison module 340 is used to determine the total similarity between the sample image and the template image based on the frequency similarity. The deduplication module 350 is used to determine a preset number of target images in the plurality of sample images based on the total similarity between each sample image in the plurality of sample images and the template image.

[0100] According to another aspect of the present application, an electronic device is also provided. Figure 4 shows a schematic block diagram of an electronic device 400 according to an embodiment of the present application. As shown in Figure 4, electronic device 400 includes a processor 410 and a memory 420. The memory 420 stores computer program instructions, which, when executed by the processor, are used to execute the above-described image deduplication processing method.

[0101] According to another aspect of the present application, a storage medium is also provided. Program instructions are stored on the storage medium. When the program instructions are executed by a computer or a processor, the computer or the processor executes the corresponding steps of the above-mentioned image deduplication processing method of the embodiment of the present application, and is used to implement the corresponding module of the above-mentioned image deduplication processing device according to the embodiment of the present application or the corresponding module in the above-mentioned electronic device. The storage medium may, for example, include a storage component of a tablet computer, a hard disk of a personal computer, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, or any combination of the above-mentioned storage media. The computer-readable storage medium may be any combination of one or more computer-readable storage media.

[0102] A person skilled in the art can understand the specific implementation and beneficial effects of the above-mentioned image deduplication processing device, storage medium and electronic device by reading the above-mentioned detailed description of the image deduplication processing method. For the sake of brevity, they will not be repeated here.

[0103] Example:

[0104] Embodiment 1: A method for image deduplication processing, wherein the method comprises:

[0105] determining a template image from a plurality of sample images;

[0106] For each sample image in the plurality of sample images,

[0107] Acquiring a frequency spectrum of an image to be processed, wherein the image to be processed includes the sample image and / or a feature image of the sample image;

[0108] Determining frequency similarity between the image to be processed and the template image based on the frequency spectrum of the image to be processed and the frequency spectrum of the template image;

[0109] Determining the total similarity between the sample image and the template image based on the frequency similarity;

[0110] A preset number of target images are determined from the plurality of sample images according to the total similarity between each sample image in the plurality of sample images and the template image.

[0111] Embodiment 2: The method according to embodiment 1, wherein determining the template image from the plurality of sample images comprises:

[0112] Calculating cosine similarities between different sample images in the plurality of sample images;

[0113] For each sample image of the plurality of sample images, counting the number of first sample images, wherein the cosine similarity between the first sample image and the sample image is greater than a similarity threshold;

[0114] The number of first sample images counted for each sample image is compared, and the sample image for which the number of first sample images counted is the largest is determined as the template image.

[0115] Embodiment 3: The method according to embodiment 1 or 2, wherein the frequency similarity includes high frequency similarity and / or low frequency similarity;

[0116] The step of obtaining the spectrum of the image to be processed comprises:

[0117] Performing Fourier transform on the image to be processed to obtain a frequency spectrum of the image to be processed;

[0118] The determining of the frequency similarity between the image to be processed and the template image based on the frequency spectrum of the image to be processed and the frequency spectrum of the template image includes:

[0119] Determining a high-pass filter area and / or a low-pass filter area in the frequency spectrum of the image to be processed, and determining a high-pass filter area and / or a low-pass filter area in the frequency spectrum of the template image;

[0120] Performing an inverse Fourier transform on the determined high-pass filter area and / or low-pass filter area to obtain a corresponding high-pass filter image and / or low-pass filter image;

[0121] Based on the high-pass filtered image corresponding to the image to be processed and the high-pass filtered image corresponding to the template image, the high-frequency similarity between the image to be processed and the template image is calculated, and / or based on the low-pass filtered image corresponding to the image to be processed and the low-pass filtered image corresponding to the template image, the low-frequency similarity between the image to be processed and the template image is calculated.

[0122] Embodiment 4: According to the method described in any one of Embodiments 1-3, the step of determining the high-pass filter area and / or the low-pass filter area in the spectrum graph of the image to be processed, and determining the high-pass filter area and / or the low-pass filter area in the spectrum graph of the template image, comprises:

[0123] For the spectrum of the image to be processed or the spectrum of the template image,

[0124] In the spectrum graph, determining a reference point, wherein the reference point is a center point of the spectrum graph;

[0125] In the spectrum diagram, a rectangular area with the reference point as the center point is determined as a low-pass filter area, and an area outside the determined low-pass filter area is determined as a high-pass filter area.

[0126] Embodiment 5: According to the method described in any one of Embodiments 1-4, the step of calculating the high-frequency similarity between the image to be processed and the template image based on the high-pass filtered image corresponding to the image to be processed and the high-pass filtered image corresponding to the template image includes:

[0127] Calculating the structural similarity between the high-pass filtered image corresponding to the image to be processed and the high-pass filtered image corresponding to the template image as the high-frequency similarity between the image to be processed and the template image;

[0128] and / or

[0129] The calculating the low-frequency similarity between the image to be processed and the template image based on the low-pass filtered image corresponding to the image to be processed and the low-pass filtered image corresponding to the template image includes:

[0130] The structural similarity between the low-pass filtered image corresponding to the image to be processed and the low-pass filtered image corresponding to the template image is calculated as the low-frequency similarity between the image to be processed and the template image.

[0131] Embodiment 6: The method according to any one of embodiments 1-5, wherein the frequency similarity includes high-frequency similarity and low-frequency similarity;

[0132] Determining the total similarity between the sample image and the template image based on the frequency similarity includes:

[0133] Calculating a product of a high-frequency similarity between a feature image of the sample image and a feature image of the template image and a high-frequency similarity between the sample image and the template image as a first similarity;

[0134] Calculating a product of a low-frequency similarity between a feature image of the sample image and a feature image of the template image and a low-frequency similarity between the sample image and the template image as a second similarity; and

[0135] The sum of the first similarity and the second similarity is calculated as the total similarity between the sample image and the template image.

[0136] Embodiment 7: According to the method described in any one of Embodiments 1-6, wherein determining a preset number of target images from the multiple sample images based on the total similarity between each sample image in the multiple sample images and the template image includes:

[0137] Clustering the total similarities between the plurality of sample images and the template image, wherein the clustered categories are the preset number;

[0138] According to the clustering results, a target image is selected from the sample images of each clustered category.

[0139] Embodiment 8: An image deduplication processing device, comprising:

[0140] A selection module, used for determining a template image from a plurality of sample images;

[0141] an acquisition module, configured to acquire, for each sample image among the plurality of sample images, a frequency spectrum of an image to be processed, wherein the image to be processed includes the sample image and / or a feature image of the sample image;

[0142] a determination module, configured to determine a frequency similarity between the image to be processed and the template image based on the frequency spectrum of the image to be processed and the frequency spectrum of the template image;

[0143] a comparison module, configured to determine the total similarity between the sample image and the template image based on the frequency similarity;

[0144] The deduplication module is configured to determine a preset number of target images from the plurality of sample images according to the total similarity between each sample image in the plurality of sample images and the template image.

[0145] Embodiment 9: A storage medium having program instructions stored thereon, wherein the program instructions are used to execute the image deduplication processing method described in any one of embodiments 1 to 7 when running.

[0146] Example 10: An electronic device comprises a processor and a memory, wherein the memory stores computer program instructions, and the computer program instructions are used by the processor to execute the image deduplication processing method described in any one of Examples 1 to 7 when the processor is running.

[0147] Although example embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above example embodiments are merely illustrative and are not intended to limit the scope of the present application. Various changes and modifications may be made therein by those skilled in the art without departing from the scope and spirit of the present application. All such changes and modifications are intended to be included within the scope of the present application as required by the appended claims.

[0148] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0149] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units described is merely a logical function division. In actual implementation, other division methods may be used, such as combining or integrating multiple units or components into another device, or ignoring or not performing some features.

[0150] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0151] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various inventive aspects, in the description of the exemplary embodiments of the present application, the various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this approach of the present application should not be interpreted as reflecting the intention that the application claimed for protection requires more features than those explicitly recited in each claim. More precisely, as reflected in the corresponding claims, the inventive point is that the corresponding technical problem can be solved with fewer features than all the features of a single disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present application.

[0152] It will be understood by those skilled in the art that, except where mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or apparatus disclosed herein may be combined in any combination. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature providing the same, equivalent, or similar purpose.

[0153] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of this application and to form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.

[0154] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some modules in the image deduplication processing device according to the embodiment of the present application. The present application can also be implemented as a device program (e.g., a computer program and a computer program product) for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0155] It should be noted that the above embodiments illustrate rather than limit the present application, and that a person skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbols placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0156] The above description is merely a specific embodiment or illustration of a specific embodiment of the present application, and the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. The scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. An image duplicate removal processing method, characterized in that, Including: Determining a template image from multiple sample images; For each of the multiple sample images, Obtaining a spectrogram of an image to be processed, where the image to be processed includes the sample image and / or a feature image of the sample image; Based on the spectrogram of the image to be processed and the spectrogram of the template image, determining a frequency similarity between the image to be processed and the template image; Based on the frequency similarity, determining an overall similarity between the sample image and the template image; According to the overall similarities between each of the multiple sample images and the template image, determining a preset number of target images among the multiple sample images.

2. The method according to claim 1, wherein The determining the template image from multiple sample images includes: Calculating a cosine similarity between different sample images among the multiple sample images; For each of the multiple sample images, counting the number of first sample images, where the cosine similarity between the first sample image and this sample image is greater than a similarity threshold; Comparing the counted numbers of first sample images for each sample image, and determining the sample image with the largest counted number of first sample images as the template image.

3. The method according to claim 1, characterized in that, The frequency similarity includes a high-frequency similarity and / or a low-frequency similarity; The obtaining the spectrogram of the image to be processed includes: Performing a Fourier transform on the image to be processed to obtain the spectrogram of the image to be processed; The determining the frequency similarity between the image to be processed and the template image based on the spectrogram of the image to be processed and the spectrogram of the template image includes: Determining a high-pass filtering region and / or a low-pass filtering region in the spectrogram of the image to be processed, and determining a high-pass filtering region and / or a low-pass filtering region in the spectrogram of the template image; Performing an inverse Fourier transform on the determined high-pass filtering region and / or low-pass filtering region to obtain a corresponding high-pass filtering image and / or low-pass filtering image; Based on the high-pass filtering image corresponding to the image to be processed and the high-pass filtering image corresponding to the template image, calculating the high-frequency similarity between the image to be processed and the template image, and / or, based on the low-pass filtering image corresponding to the image to be processed and the low-pass filtering image corresponding to the template image, calculating the low-frequency similarity between the image to be processed and the template image.

4. The method according to claim 3, characterized in that The determining the high-pass filtering region and / or low-pass filtering region in the spectrogram of the image to be processed, and determining the high-pass filtering region and / or low-pass filtering region in the spectrogram of the template image includes: For the spectrogram of the image to be processed or the spectrogram of the template image, In the spectrogram, determining a reference point, where the reference point is the center point of the spectrogram; In the spectrogram, determining a rectangular region centered on the reference point as the low-pass filtering region, and the region outside the determined low-pass filtering region as the high-pass filtering region.

5. The method according to claim 3, wherein The calculating the high-frequency similarity between the image to be processed and the template image based on the high-pass filtering image corresponding to the image to be processed and the high-pass filtering image corresponding to the template image includes: Calculate the structural similarity between the high-pass filtered image corresponding to the image to be processed and the high-pass filtered image corresponding to the template image, and use it as the high-frequency similarity between the image to be processed and the template image; and / or Based on the low-pass filtered image corresponding to the image to be processed and the low-pass filtered image corresponding to the template image, calculating the low-frequency similarity between the image to be processed and the template image includes: Calculate the structural similarity between the low-pass filtered image corresponding to the image to be processed and the low-pass filtered image corresponding to the template image, and use it as the low-frequency similarity between the image to be processed and the template image.

6. The method according to any one of claims 1 to 5, characterized in that, The frequency similarity includes high-frequency similarity and low-frequency similarity; Based on the frequency similarity, determining the overall similarity between the sample image and the template image includes: Calculate the product of the high-frequency similarity between the feature image of the sample image and the feature image of the template image and the high-frequency similarity between the sample image and the template image, and use it as the first similarity; Calculate the product of the low-frequency similarity between the feature image of the sample image and the feature image of the template image and the low-frequency similarity between the sample image and the template image, and use it as the second similarity; and Calculate the sum of the first similarity and the second similarity, and use it as the overall similarity between the sample image and the template image.

7. The method according to claim 1, characterized in that, According to the overall similarity between each sample image in the multiple sample images and the template image, determining a preset number of target images in the multiple sample images includes: Cluster the overall similarities between the multiple sample images and the template image, where the number of clusters is the preset number; According to the clustering result, select one target image from the sample images in each cluster.

8. An image duplicate removal processing device, comprising: A selection module for determining a template image from multiple sample images; An acquisition module for acquiring the spectrogram of the image to be processed for each sample image in the multiple sample images, where the image to be processed includes the sample image and / or the feature image of the sample image; A determination module for determining the frequency similarity between the image to be processed and the template image based on the spectrogram of the image to be processed and the spectrogram of the template image; A comparison module for determining the overall similarity between the sample image and the template image based on the frequency similarity; A duplicate removal module for determining a preset number of target images in the multiple sample images according to the overall similarity between each sample image in the multiple sample images and the template image.

9. A storage medium, on which program instructions are stored, characterized in that, The program instructions are used to execute the image duplicate removal processing method according to any one of claims 1 to 7 when running.

10. An electronic device, comprising a processor and a memory, characterized in that, The memory stores computer program instructions, and the computer program instructions are used to execute the image duplicate removal processing method according to any one of claims 1 to 7 when run by the processor.

Citation Information

Patent Citations

  • Image matching method, device and apparatus, and storage medium

    CN111369599A

  • Self-adaptive vein template registration method and device

    CN116631017A

  • Moire pattern removing method, device, equipment and medium

    CN116957971A

  • Image deduplication processing method and device, storage medium and electronic equipment

    CN117456316A

  • Image processing apparatus, image processing method, and program

    US20150116662A1