A desensitization image matching method, device and equipment based on color block coverage restoration and a medium
Patent Information
- Application Number
- CN202611090874.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-22
- Publication Date
- 2026-09-11
AI Technical Summary
[0004]当脱敏对象(人脸、号牌)距摄像头较近、目标矩形像素尺寸较大时,脱敏色块在整幅图像中占比高,脱敏后图片与原图在SSIM或SIFT度量下差异被显著放大,导致错误匹配或无法匹配
[0010]根据本申请提供的具体实施例,本申请具有了以下技术效果:通过创新的“色块覆盖还原”机制,在完全不触及原始敏感信息的前提下,实现了脱敏图片与原始图片的高精度匹配。具体而言,本申请摒弃了传统方法中对脱敏区域进行逆向还原或特征修复的危险路径,转而利用脱敏后图片中保留的色块区域像素作为“已知锚点”,并将其精准覆盖至候选原图的对应空间位置,从而构建出用于比对的结构载体——伪脱敏图。这一处理逻辑巧妙地将图像匹配问题转化为脱敏后图片与伪脱敏图之间的结构相似度计算问题,不仅从根本上杜绝了隐私泄露风险,还确保了匹配过程对原始图片内容、色彩分布及纹理细节的高度保真,显著提升了匹配结果的可靠性与鲁棒性。同时,由于本申请无需复杂的深度学习模型训练或大规模特征库检索,仅依赖图像自身像素的空间位置对应关系与结构相似性度量,因此具有计算开销低、处理效率高、易于工程化部署的突出优势,尤其适用于涉及医疗影像、安防监控、身份认证等对数据安全与实时性均有严苛要求的应用场景。此外,本申请支持对任意候选原图进行独立、并行的匹配处理,具备良好的可扩展性,为大规模脱敏图像检索与溯源提供了高效、安全且合规的技术支撑。
Smart Images

Figure CN122736891A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of computer vision and image processing, and in particular to a method, apparatus, device and medium for desensitized image matching based on color block coverage restoration. Background Technology
[0002] According to GB / T 44464-2024 "General Requirements for Automotive Data" and other relevant requirements, when a vehicle provides data to the outside world, personal information collected without the individual's consent should be anonymized. This includes deleting images that can identify natural persons, or partially outlining faces and license plates. During vehicle certification and other processes, testing agencies use an anonymized detection system to examine the anonymized images provided by the vehicle manufacturer. The anonymized images are compared with the original, unanonymized images to determine whether faces or license plates should be anonymized, thus ensuring the reliability of evaluation indicators such as detection rate and false detection rate.
[0003] There are two main ways to associate desensitized images with original images: (1) File name suffix matching: By agreeing on rules, the desensitized image and the original image share the basic file name, only the suffix or extended mark is different, and a pairing relationship is established accordingly. This method is simple to implement, but not all manufacturers in the desensitization processing chain can guarantee that the file name is strictly consistent, and the pairing failure rate is high. (2) Block content matching: It does not depend on the file name. In the candidate original image set, the original image that best matches the desensitized image is found based on the image content similarity. Commonly used algorithms include Structural Similarity Index (SSIM) and Scale-Invariant Feature Transform (SIFT). Among them, SSIM converts the color image to grayscale and calculates the structural similarity index. The closer the value is to 1, the more similar it is. SSIM focuses on structural information and is closer to subjective feeling than the traditional MSE, but it is sensitive to local large-area content replacement. SIFT constructs scale space to extract key points and 128-dimensional descriptors, and calculates feature distance through KD tree or brute force matching. It is highly robust, but has a large computational cost.
[0004] When the anonymized object (face, license plate) is close to the camera and the target rectangle has a large pixel size, the anonymized color block occupies a high proportion of the entire image. This significantly amplifies the differences between the anonymized image and the original image under SSIM or SIFT metrics, leading to incorrect or no matches. In such scenarios, the retrieval accuracy of direct comparison is approximately 70%–80%, lower than the ≥95% typically required by detection systems. The shortfall necessitates manual review, increasing detection costs and time. Summary of the Invention
[0005] The purpose of this application is to provide a method, apparatus, device, and medium for matching desensitized images based on color block coverage restoration, which can achieve high-precision matching between desensitized images and original images without touching the original sensitive information.
[0006] To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides a desensitized image matching method based on color patch coverage restoration, including: Obtain the desensitized image and the corresponding color block annotation information of the desensitized image; the color block annotation information is used to indicate the spatial position of the color block area in the desensitized image. Extract the pixels of the color block region from the desensitized image based on the color block annotation information; For any candidate un-de-identified original image, the candidate un-de-identified original image is copied to obtain an original image copy, and the pixels of the color block region are covered to the corresponding spatial positions in the original image copy according to the color block annotation information to obtain the pseudo-de-identified image corresponding to the candidate un-de-identified original image; Calculate the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image; Based on the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image, the target original image that matches the desensitized image is determined.
[0007] Secondly, this application provides a desensitized image matching device based on color block coverage restoration, comprising: The annotation acquisition module is used to acquire the desensitized image and the corresponding color block annotation information of the desensitized image; the color block annotation information is used to indicate the spatial position of the color block area in the desensitized image. The pixel extraction module is used to extract pixels of color block regions from the desensitized image based on the color block annotation information; The pseudo-desensitization reconstruction module is used to copy any candidate undesensitized original image to obtain a copy of the original image, and to cover the corresponding spatial position of the color block region pixels in the original image copy according to the color block annotation information, so as to obtain the pseudo-desensitized image corresponding to the candidate undesensitized original image. The similarity calculation module is used to calculate the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image; The matching and determination module is used to determine the target original image that matches the desensitized image based on the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image.
[0008] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described desensitized image matching method based on color block coverage restoration.
[0009] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described desensitized image matching method based on color block coverage restoration.
[0010] According to the specific embodiments provided in this application, this application achieves the following technical effects: Through an innovative "color block overlay restoration" mechanism, high-precision matching between desensitized images and original images is achieved without touching any original sensitive information. Specifically, this application abandons the dangerous path of reverse restoration or feature repair of desensitized areas in traditional methods. Instead, it utilizes the pixels of the color block areas retained in the desensitized image as "known anchor points" and precisely overlays them onto the corresponding spatial positions of the candidate original image, thereby constructing a structural carrier for comparison—a pseudo-desensitized image. This processing logic cleverly transforms the image matching problem into a structural similarity calculation problem between the desensitized image and the pseudo-desensitized image. This not only fundamentally eliminates the risk of privacy leakage but also ensures high fidelity in the matching process regarding the content, color distribution, and texture details of the original image, significantly improving the reliability and robustness of the matching results. Meanwhile, since this application does not require complex deep learning model training or large-scale feature library retrieval, but only relies on the spatial correspondence and structural similarity measurement of the image's own pixels, it has outstanding advantages such as low computational overhead, high processing efficiency, and ease of engineering deployment. It is particularly suitable for application scenarios involving medical imaging, security monitoring, and identity authentication, where both data security and real-time performance are stringent. Furthermore, this application supports independent and parallel matching processing of any candidate original image, possessing good scalability and providing efficient, secure, and compliant technical support for large-scale de-identified image retrieval and source tracing. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is an application environment diagram of a desensitized image matching method based on color block coverage restoration in one embodiment of this application.
[0013] Figure 2This is a schematic flowchart of a desensitized image matching method based on color block coverage restoration, provided in an embodiment of this application.
[0014] Figure 3 This is another schematic diagram of a desensitized image matching method based on color block coverage restoration provided in an embodiment of this application.
[0015] Figure 4 This is a schematic diagram showing the desensitized image, the original image, the pseudo-desensitized image, and the comparison relationship in one embodiment of this application.
[0016] Figure 5 This is a schematic diagram of the functional modules of a desensitized image matching device based on color block coverage restoration, provided in an embodiment of this application.
[0017] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0019] The technical problem this application aims to solve is: to overcome the interference of large color blocks on content similarity algorithms without forcibly relying on filename consistency, improve the retrieval success rate of de-identified images and correct original images, and meet the requirements of de-identification detection systems for high automatic matching rates.
[0020] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0021] First, some technical terms involved in the embodiments of this application will be introduced.
[0022] (1) Desensitized images / desensitized images: Images after local contouring (mosaic, blurring, solid color block, etc.) of information such as identifiable natural persons or vehicle license plates.
[0023] (2) Original image / Unsensitized original image: Images that are from the same acquisition time or the same data source as the desensitized images and have not yet undergone the above-mentioned local desensitization processing.
[0024] (3) Color blocks: Local replacement areas formed on the image during desensitization processing, which are visually represented as mosaic, Gaussian blur, solid color blocks, etc.
[0025] (4) Automatic color block labeling: Information that represents the position and size of rectangular color blocks in the image plane, output by the model or algorithm in the detection system. One main implementation method is to use an axis-aligned rectangle (x1, y1, x2, y2) to represent it, where (x1, y1) is the upper left pixel coordinate of the axis-aligned rectangle and (x2, y2) is the lower right pixel coordinate of the axis-aligned rectangle.
[0026] (5) Pseudo-desensitized image: An intermediate image is formed by copying the original image without desensitization and covering the corresponding area with the color block pixels of the desensitized image according to the color block label.
[0027] (6) Retrieval success rate / retrieval accuracy rate: On a given test set, the proportion of the number of desensitized images that are successfully matched with their correct original images out of the total number of possible matches.
[0028] (7) SSIM: used to measure the structural similarity between two images.
[0029] (8) SIFT: Used to extract key points and descriptors and perform matching.
[0030] The desensitized image matching method based on color block coverage restoration provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 101 communicates with server 102 via a network. A data storage system can store the data that server 102 needs to process. The data storage system can be set up independently, integrated into server 102, or placed in the cloud or on another server. Terminal 101 can send candidate un-anonymized original images, anonymized images, and corresponding color block annotation information to server 102. After receiving the candidate un-anonymized original images, anonymized images, and corresponding color block annotation information, server 102 determines the target original image that matches the anonymized image and can then send the obtained target original image back to terminal 101.
[0031] The terminal 101 can be, but is not limited to, various desktop computers, laptops, smartphones, and tablets. The server 102 can be implemented using a standalone server or a server cluster consisting of multiple servers, or it can be a cloud server.
[0032] In an exemplary embodiment, a method for matching desensitized images based on color block overlay restoration is provided, particularly relating to an automatic association retrieval method between desensitized images and un-desensitized original images in a vehicle data desensitization (anonymization) compliance inspection scenario. This method is executed by a computer device, specifically a terminal or server, or both. In this embodiment, the method is applied to... Figure 1 Taking server 102 as an example, the explanation is as follows: Figures 2 to 4 As shown, the method includes steps 201 to 205.
[0033] Step 201: Obtain the desensitized image and the corresponding color block annotation information. The color block annotation information is used to indicate the spatial location of the color block area in the desensitized image.
[0034] Specifically, an anonymized image is obtained, and an automatic color block annotation model is used to annotate the color blocks (mosaic / Gaussian blur / solid color) in the anonymized image to obtain the color block annotation information corresponding to the anonymized image. The color block annotation information includes the number of color blocks and the bounding box parameters corresponding to each color block. The bounding box parameters include the pixel coordinates of the top left corner of the rectangle, the width of the rectangle, and the height of the rectangle.
[0035] In a specific application example, for each anonymized image to be retrieved, it is input into the automatic color patch annotation model to obtain the position and size information of one or more rectangular color patches. The annotation uses axis-aligned rectangles, denoted as (x1, y1, x2, y2); where (x1, y1) are the top-left pixel coordinates of the axis-aligned rectangle, and (x2, y2) are the bottom-right pixel coordinates of the axis-aligned rectangle; the origin of the coordinate system is located at the top-left corner of the image, with the x-axis extending to the right and the y-axis extending downwards, consistent with common OpenCV conventions. The output of the automatic color patch annotation model includes at least: the number of color patches and the parameters of the rectangles for each color patch.
[0036] Step 202: Extract the pixels of the color block region from the desensitized image based on the color block annotation information.
[0037] Specifically, when the color block annotation information indicates the existence of a single color block region in the desensitized image, the pixel data of the color block region is extracted from the desensitized image and cached to obtain the color block region pixels. When the color block annotation information indicates the existence of multiple color block regions in the desensitized image, the pixel data of each color block region is extracted from the desensitized image and cached to obtain the color block region pixels.
[0038] In a specific application example, for each rectangular color block annotation, pixel data within the rectangular area is cropped or indexed from the anonymized image according to (x1, y1, x2, y2) and written to the memory cache structure. If there are multiple color blocks, the above operation is repeated for each rectangular color block until all color block data has been cached. A single color block cache can be associated one-to-one with its rectangular annotation index.
[0039] Step 203: For any candidate un-de-identified original image, copy the candidate un-de-identified original image to obtain an original image copy, and cover the corresponding spatial position of the color block region pixels in the original image copy according to the color block annotation information to obtain the pseudo-de-identified image corresponding to the candidate un-de-identified original image.
[0040] Specifically, for any candidate un-de-identified original image, the pixel data (including BGR three-channel or equivalent color representation) of the candidate un-de-identified original image is copied in memory to obtain a copy of the original image. Then, according to the color block annotation information (the origin of the coordinate system is located at the upper left corner of the image, the x-axis extends to the right and the y-axis extends downward, consistent with the common OpenCV convention; the annotation coordinate system is aligned with the same size as the candidate un-de-identified original image and the de-identified image), the pixels of the color block region are overlaid to the corresponding spatial positions of the original image copy to generate a pseudo-de-identified image.
[0041] In this application, the overlay is pixel-level and channel-to-channel replacement, without changing pixels outside the color block area. For multiple color blocks, each color block area is covered sequentially, and the later overlaid element overlaps with the former, with the later written element taking precedence (overlapping is rare in submitted data, and can also be set as a non-overlap constraint). The pseudo-desensitized image overlaps with candidate undesensitized elements in non-color block areas. Figure 1 The color blocks in the image are consistent with the color blocks in the desensitized image.
[0042] In a specific application example, the number of candidate un-anonymized original images is 3000. The resolution of the anonymized images and the candidate un-anonymized original images is always consistent, with the same width and height, eliminating the need for resolution alignment operations such as scaling, cropping, or affine transformations.
[0043] Step 204: Calculate the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image.
[0044] This application can use SSIM, SIFT, or a combination of SSIM and SIFT to calculate the structural similarity between the pseudo-de-identified image and the de-identified image. Thus, without changing the SSIM comparison engine, it can significantly reduce the interference of large target color blocks on the similarity score, and make the retrieval accuracy reach or exceed 95%.
[0045] The process of calculating the structural similarity between the pseudo-desensitized image and the desensitized image using SSIM is as follows: For any candidate undesensitized original image, the pseudo-desensitized image corresponding to the candidate undesensitized original image and the desensitized image are converted into grayscale images respectively, resulting in a candidate grayscale image and a desensitized grayscale image. The structural similarity index between the candidate grayscale image and the desensitized grayscale image is calculated to determine the structural similarity between the pseudo-desensitized image corresponding to the candidate undesensitized original image and the desensitized image.
[0046] Specifically, by calling the structural_similarity function in the skimage library (or an equivalent implementation in OpenCV), the SSIM of the candidate grayscale image and the desensitized grayscale image is calculated. The value is usually between 0 and 1, with the closer to 1 indicating greater similarity.
[0047] The process of calculating the structural similarity between the pseudo-desensitized image and the desensitized image using SIFT is as follows: For any candidate undesensitized original image, extract the key points and descriptors of the pseudo-desensitized image and the desensitized image corresponding to the candidate undesensitized original image, and obtain the matching score through KD tree or brute-force matching to determine the structural similarity between the pseudo-desensitized image and the desensitized image corresponding to each candidate undesensitized original image.
[0048] The process of calculating the structural similarity between the pseudo-anonymized image and the anonymized image using a combination of SSIM and SIFT is as follows: First, SSIM is used to calculate the structural similarity between the pseudo-anonymized image and the anonymized image. When the SSIM score is low, SIFT is used to verify the low-confidence SSIM results. Alternatively, the SSIM and SIFT scores can be weighted and fused to calculate the structural similarity between the pseudo-anonymized image and the anonymized image.
[0049] Step 205: Based on the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image, determine the target original image that matches the desensitized image.
[0050] Specifically, the candidate un-de-sensitized original image with the highest structural similarity to the de-sensitized image is selected as the target original image.
[0051] This application further determines the maximum similarity value based on the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image. When the maximum similarity value is less than a preset similarity threshold, the matching is deemed to have failed, and the desensitized image is marked as awaiting manual review and enters the manual review queue. The preset similarity threshold is configured by the desensitization detection system based on a calibration set, with a typical value range of 0.75 to 0.85.
[0052] In addition, this application includes the following four methods for handling multiple color blocks and anomalies: (1) For the case of multiple color blocks, they are cached separately and then overwritten to the pseudo-de-identified image in sequence; (2) For the case of no color block label, the process is to fall back to direct SSIM comparison or manual review of the label; (3) For the case of low confidence level of the label, a confidence level threshold can be set, and if it is lower than the confidence level threshold, the process is to fall back or perform manual review; (4) For the case of multiple de-identified images corresponding to the same candidate unde-identified original image, they are to be calculated independently, and the candidate unde-identified original image with the highest score and exceeding the threshold is to be paired.
[0053] The desensitized image matching method based on color block coverage restoration provided in this application can be extended to video frame-level retrieval. The process is as follows: (1) Decode the desensitized video and the original undesensitized video separately to obtain a sequence of frame images arranged in chronological order.
[0054] (2) Each frame of the desensitized video is regarded as a desensitized image, and each frame of the unsensitized original video is regarded as an unsensitized original image.
[0055] (3) For each frame of the desensitized video, execute steps 201 to 205 to retrieve matching frames in the corresponding candidate original video frame set (or all frames of the original video in the same batch) to obtain the target original image corresponding to each frame of the desensitized video.
[0056] Frame-level pairing can be combined with frame sequence number, timestamp, or decoding order as auxiliary constraints to improve pairing efficiency within the same video segment. Color block annotations remain rectangular boxes (x1, y1, x2, y2), and the resolution of the desensitized frames remains consistent with that of the original candidate frames.
[0057] This application does not replace the final determination of desensitization compliance by the desensitization detection system, but rather provides it with reliable desensitized image-original image pairing, ensuring that subsequent statistics on the detection rate and false detection rate of whether desensitization is needed are based on correct pairing. The automatic color block annotation model can be shared with the AI color block annotation function within the desensitization detection system.
[0058] In this application, there are 3,000 anonymized images and 3,000 unanonymized original images. The pairing relationship consists of 3,000 one-to-one standard pairs for evaluation. The size of the candidate original image library is such that for each anonymized image to be searched, a match is searched in the candidate library consisting of 3,000 unanonymized original images. The resolution of each pair of anonymized images and the corresponding original images is always consistent, without the need for scaling or cropping alignment.
[0059] Search accuracy is defined as: Search accuracy = N correct / N total ×100%; where N total N represents the total number of anonymized images used in the evaluation. total =3000, N correct The method described in this application is used to determine the number of standard matching original images that each de-identified image successfully matches among 3000 candidate original images.
[0060] Under the above test conditions, the retrieval accuracy of direct SSIM matching (original image vs. desensitized image) is about 70%~80%, and its Top-1 hit rate is low in large color block scenarios. The retrieval accuracy of this application (pseudo-desensitized image vs. desensitized image) is ≥95%.
[0061] When using the SSIM algorithm alone, the retrieval accuracy is 81.2% in a test of 3000 pairs. When the method of this application is applied and the SSIM algorithm is superimposed, the retrieval accuracy is 98.1%. SSIM has a certain robustness to slight image translation and scaling, but the cost of calculating local mean, variance and covariance is higher than that of MSE. However, it still has acceptable performance in batch evaluation scenarios (such as retrieval of 3000 candidate images).
[0062] This application does not search for identical images, but rather reproduces the anonymized appearance on the original image before comparison, transforming large color block differences into a similarity problem under the alignment of the same color blocks. Compared to image inpainting schemes, this application does not aim for visual restoration, but rather copies the color block pixels of the anonymized image to the original image for alignment and comparison input, serving pairing retrieval rather than content generation. Compared to template matching / feature point registration schemes, this application does not estimate global geometric transformations, but uses known color block annotations to cover the original image at fixed coordinates, pairing before and after anonymization within the same scene. Compared to pure filename matching schemes, this application can still complete pairing through content similarity even when filenames are unreliable. Compared to direct SSIM schemes, this application changes the comparison object to pseudo-anonymized images and anonymized images, rather than the original image and anonymized images.
[0063] This application also provides an application scenario in which the above-described desensitized image matching method based on color block coverage restoration is applied. Specifically, the desensitized image matching method based on color block coverage restoration provided in this embodiment can be applied to the scenario of vehicle data desensitization compliance detection. The desensitized image is an image obtained by anonymizing the collected vehicle exterior image. The anonymization process includes at least local contouring of the face or vehicle license plate.
[0064] Based on the same inventive concept, this application also provides an apparatus for implementing the method described above. The solution provided by this apparatus is similar to the solution described in the above method; therefore, specific limitations in one or more apparatus embodiments provided below can be found in the limitations of the method described above, and will not be repeated here.
[0065] In one exemplary embodiment, such as Figure 5 As shown, a desensitized image matching device based on color block coverage restoration is provided, including the following functional modules: The annotation acquisition module 501 is used to acquire the desensitized image and the corresponding color block annotation information of the desensitized image; the color block annotation information is used to indicate the spatial position of the color block area in the desensitized image.
[0066] The pixel extraction module 502 is used to extract pixels of the color block region from the desensitized image based on the color block annotation information.
[0067] The pseudo-desensitization reconstruction module 503 is used to copy any candidate undesensitized original image to obtain a copy of the original image, and to cover the corresponding spatial position of the color block region pixels in the original image copy according to the color block annotation information, so as to obtain the pseudo-desensitized image corresponding to the candidate undesensitized original image.
[0068] The similarity calculation module 504 is used to calculate the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image.
[0069] The matching determination module 505 is used to determine the target original image that matches the desensitized image based on the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image.
[0070] The above modules can be deployed as software units within the original image retrieval service process of the desensitization detection system; the color block automatic annotation model can share GPU / CPU inference resources with the detection process.
[0071] The implementation environment for this application is as follows: Hardware: General-purpose CPU server or detection system workstation; memory must be able to hold at least one original image and color block pixel cache.
[0072] Software: Python environment, OpenCV (cv2), skimage (SSIM), etc.; the automatic color block annotation model is a built-in module of the desensitization detection system.
[0073] Input image format: color image, BGR format is acceptable (consistent with OpenCV default); it can be converted to grayscale (SSIM path) before comparison.
[0074] In summary, the beneficial effects of this application include at least the following: (1) Reduced interference from large color blocks: Before comparison, the color block appearance is reconstructed on the candidate un-desensitized original image to be consistent with the desensitized image, so that the SSIM comparison objects are aligned in the desensitized area, which alleviates the problem of abnormally low SSIM caused by the original image being clear and the desensitized image having a large area of occlusion.
[0075] (2) Improved retrieval accuracy: Under the test conditions of 3,000 standard pairs, 3,000 original images in the candidate library, and the main embodiment using SSIM, the retrieval accuracy of this application reached or exceeded 95% (i.e. at least 2,850 / 3,000 correct pairs), which is better than the 70%~80% of direct SSIM matching.
[0076] (3) Compatible with existing desensitization detection systems: Reuse the existing automatic color block labeling capability of the desensitization detection system without modifying the vehicle-side desensitization link; SSIM can be implemented through Skimage and SIFT can be implemented through OpenCV-python, resulting in low implementation cost.
[0077] (4) Reduced manual verification: The matching success rate is improved, reducing the workload of manually searching for the original image.
[0078] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 6 As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs in the non-volatile storage media to run. The database stores candidate un-de-sensitized original images, de-sensitized images, and corresponding color block annotation information for the de-sensitized images. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a de-sensitized image matching method based on color block overlay restoration.
[0079] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer equipment to which the present application is applied. Specific computer equipment may include, for example, [the following is a list of possible additional structures]. Figure 6 The diagram shows more or fewer components, or combinations of certain components, or different component arrangements.
[0080] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0081] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0082] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0083] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, 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, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0084] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, etc., and are not limited to these.
[0085] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.
[0086] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A desensitized image matching method based on color block coverage restoration, characterized in that, include: Obtain the anonymized image and the corresponding color block annotation information of the anonymized image; The color block annotation information is used to indicate the spatial location of the color block area in the desensitized image; Extract the pixels of the color block region from the desensitized image based on the color block annotation information; For any candidate un-de-identified original image, the candidate un-de-identified original image is copied to obtain an original image copy, and the pixels of the color block region are covered to the corresponding spatial positions in the original image copy according to the color block annotation information to obtain the pseudo-de-identified image corresponding to the candidate un-de-identified original image; Calculate the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image; Based on the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image, the target original image that matches the desensitized image is determined.
2. The desensitized image matching method based on color block coverage restoration according to claim 1, characterized in that, Obtain the anonymized image and the corresponding color block annotation information of the anonymized image, including: Obtain the anonymized image and use an automatic color block annotation model to annotate the color blocks in the anonymized image to obtain the color block annotation information corresponding to the anonymized image; the color block annotation information includes the number of color blocks and the rectangular frame parameters corresponding to each color block; the rectangular frame parameters include the pixel coordinates of the upper left corner of the rectangle, the width of the rectangle, and the height of the rectangle.
3. The desensitized image matching method based on color block coverage restoration according to claim 1, characterized in that, Extracting color block region pixels from the desensitized image based on the color block annotation information includes: When the color block annotation information indicates that there is a color block region in the desensitized image, the pixel data of the color block region is extracted from the desensitized image to obtain the color block region pixels; When the color block annotation information indicates that there are multiple color block regions in the desensitized image, the pixel data of each color block region is extracted from the desensitized image to obtain the color block region pixels.
4. The desensitized image matching method based on color block coverage restoration according to claim 1, characterized in that, Calculate the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image, including: For any candidate un-de-identified original image, the pseudo-de-identified image corresponding to the candidate un-de-identified original image and the de-identified image are converted into grayscale images respectively to obtain the candidate grayscale image and the de-identified grayscale image; Calculate the structural similarity index between the candidate grayscale image and the desensitized grayscale image to determine the structural similarity between the pseudo-desensitized image corresponding to the candidate undesensitized original image and the desensitized image.
5. The desensitized image matching method based on color block coverage restoration according to claim 1, characterized in that, Based on the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image, a target original image matching the desensitized image is determined, including: The candidate un-de-identified original image with the highest structural similarity to the de-identified image is selected as the target original image.
6. The desensitized image matching method based on color block coverage restoration according to claim 1, characterized in that, The method further includes: The maximum similarity value is determined based on the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image. When the maximum similarity value is less than a preset similarity threshold, the matching is deemed to have failed, and the anonymized image is marked as awaiting manual review.
7. The desensitized image matching method based on color block coverage restoration according to claim 1, characterized in that, The method is applied to the scenario of vehicle data anonymization compliance detection. The anonymized image is an image obtained by anonymizing the collected external images of the vehicle. The anonymization process includes at least local contouring of the face or vehicle license plate.
8. A desensitized image matching device based on color block coverage restoration, applied to the desensitized image matching method based on color block coverage restoration as described in any one of claims 1-7, characterized in that, The device includes: The annotation acquisition module is used to acquire the desensitized image and the corresponding color block annotation information of the desensitized image; the color block annotation information is used to indicate the spatial position of the color block area in the desensitized image. The pixel extraction module is used to extract pixels of color block regions from the desensitized image based on the color block annotation information; The pseudo-desensitization reconstruction module is used to copy any candidate undesensitized original image to obtain a copy of the original image, and to cover the corresponding spatial position of the color block region pixels in the original image copy according to the color block annotation information, so as to obtain the pseudo-desensitized image corresponding to the candidate undesensitized original image. The similarity calculation module is used to calculate the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image; The matching and determination module is used to determine the target original image that matches the desensitized image based on the structural similarity between the pseudo-desensitized image corresponding to each candidate undesensitized original image and the desensitized image.
9. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the desensitized image matching method based on color block overlay restoration as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the desensitized image matching method based on color block coverage restoration as described in any one of claims 1-7.