Image data desensitization method and device, electronic equipment and storage medium
The object detection model dynamically adjusts the detection window size to perform image data desensitization processing, which solves the problems of intricate detection and high calculation cost in the prior art, and achieves a more efficient and accurate image data desensitization effect.
Patent Information
- Application Number
- CN202411996789.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-06
AI Technical Summary
The existing image data desensitization technology has the problem of manual labeling time-consuming and labor-intensive, fixed-sized fuzzy filters cannot adapt to complex and changeable scenarios, and is prone to missed detection and missed detection. The detection results based on a single model are not fine enough, and the detection methods based on multiple models are high in calculation cost and slow in processing speed.
The object detection model detects the target object in the image based on the initial detection window size, determines the target density of the image area based on the detection results, and dynamically adjusts the detection window size for accurate detection, and finally blurs the target object in the image area.
It improves detection accuracy, reduces missed detection and missed detection, realizes more accurate blurring processing, and adapts to image processing in various scenarios.
Smart Images

Figure CN119941554A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to an image data desensitization method, device, electronic device and storage medium. Background Art
[0002] With the popularity of video surveillance, social media, and online content sharing platforms, the amount of video and other image data has increased dramatically. These image data often contain a large amount of personal privacy information, such as faces and license plate numbers. If not processed, this sensitive information may lead to privacy leakage. Therefore, image data desensitization has become an important means to protect personal privacy. Image data desensitization technology mainly masks sensitive information in images through blurring, mosaics, etc. to ensure that this information cannot be easily identified.
[0003] In the related art, the image data desensitization method mainly relies on manual labeling or simple image processing technology, such as fixed-size blur filters. However, these methods have many shortcomings, such as time-consuming and labor-intensive manual labeling, fixed-size blur filters that cannot adapt to complex and changing scenes, and prone to missed detections and false detections. In recent years, with the development of deep learning technology, target detection and image processing methods based on a single model or multiple models have gradually become the mainstream in the field of video desensitization. However, the detection results of a single model are not fine enough, resulting in inaccurate blurring, which affects the desensitization effect. The detection method based on a combination of multiple models has a high computational cost and a relatively slow processing speed, and missed detections and false detections may still occur in complex scenes. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides an image data desensitization method, device, electronic device and storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided an image data desensitization method, comprising:
[0006] Detecting a target object in a first image based on an initial detection window size using a target detection model to obtain a first detection result corresponding to the first image, wherein the first image includes a plurality of image regions;
[0007] Perform the following steps for each of the image regions:
[0008] Based on the first detection result, determining the number of target objects contained in the image area to obtain the number of targets;
[0009] Determining a target density of the image region based on the number of targets and the area of the image region;
[0010] Adjusting the initial detection window size based on the target density to obtain the target detection window size corresponding to the image area;
[0011] Detecting the target object in the image area based on the target detection window size using the target detection model to obtain a second detection result corresponding to the image area;
[0012] Based on the second detection result, blurring processing is performed on the target object in the image area.
[0013] According to a second aspect of an embodiment of the present disclosure, there is provided an image data desensitization device, comprising:
[0014] A target detection module, configured to detect a target object in a first image based on an initial detection window size through a target detection model, and obtain a first detection result corresponding to the first image, wherein the first image includes a plurality of image regions;
[0015] A target quantity determination module, configured to determine the quantity of target objects contained in the image area based on the first detection result, so as to obtain the target quantity;
[0016] A target density determination module, used to determine the target density of the image area based on the number of targets and the area of the image area;
[0017] A window size adjustment module, used to adjust the initial detection window size based on the target density to obtain the target detection window size corresponding to the image area;
[0018] The target detection module is further configured to detect the target object in the image area based on the target detection window size through the target detection model, and obtain a second detection result corresponding to the image area;
[0019] A fuzzification module, configured to perform fuzzy processing on the target object in the image area based on the second detection result;
[0020] According to a third aspect of an embodiment of the present disclosure, a vehicle is provided, storing a set of instruction sets, wherein the instruction sets are executed by the vehicle to implement the image data desensitization method provided by the first aspect of the present disclosure.
[0021] According to a fourth aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the image data desensitization method provided in the first aspect of the present disclosure.
[0022] According to a fifth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the image data desensitization method provided in the first aspect of the present disclosure are implemented.
[0023] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: first, using the target detection model to detect the target object on the entire first image based on the initial detection window size to obtain a rough first detection result; based on the first detection result, determine the target density of each image area; adjust the initial detection window size based on the target density to obtain the target detection window size corresponding to each image area; accurately detect each image area based on the target detection window size corresponding to each image area to obtain a more accurate second detection result corresponding to each image area; and perform fuzzification on the image area based on the second detection result. According to the present disclosure, by dynamically adjusting the detection window size, the detection window of the target object can be intelligently reduced or expanded, thereby improving the detection accuracy and reducing missed detections, thereby making the fuzzification process more accurate. Moreover, the present disclosure can process images of various scenes and is more adaptable.
[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0026] Figure 1 is a flow chart of an image data desensitization method according to an exemplary embodiment;
[0027] Figure 2 is a schematic diagram showing a target detection result according to an exemplary embodiment;
[0028] Figure 3 is a schematic diagram showing a fuzzy processing result according to an exemplary embodiment;
[0029] Figure 4 is a flow chart of an image data desensitization method according to an exemplary embodiment;
[0030] Figure 5 is a flow chart of an image data desensitization method according to an exemplary embodiment;
[0031] Figure 6 is a flow chart of an image data desensitization method according to an exemplary embodiment;
[0032] Figure 7 is a block diagram of an image data desensitization device according to an exemplary embodiment;
[0033] Figure 8 is a block diagram of a vehicle according to an exemplary embodiment;
[0034] Fig. 9 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail below with reference to the accompanying drawings.
[0036] It should be pointed out that the relevant embodiments and drawings are only for describing exemplary embodiments provided by the present disclosure, rather than all embodiments of the present disclosure, and it should not be understood that the present disclosure is limited to the relevant exemplary embodiments.
[0037] It should be noted that the terms "first", "second", etc. used in the present disclosure are only used to distinguish different steps, devices or modules, etc. The related terms neither represent any specific technical meanings nor indicate the order or interdependence between them.
[0038] It should be noted that the modifications of the terms "one", "multiple", and "at least one" used in the present disclosure are illustrative rather than restrictive. Unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0039] It should be noted that the term "and / or" used in this disclosure is used to describe the association relationship between associated objects, and generally indicates that there are at least three association relationships. For example, A and / or B can at least indicate the existence of three association relationships: A exists alone, A and B exist at the same time, and B exists alone.
[0040] It should be noted that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. Unless otherwise specified, the scope of the present disclosure is not limited by the order of description of the steps in the relevant embodiments.
[0041] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.
[0042] Technical terminology
[0043] Sensitive information: refers to information that, if leaked, lost or improperly used, may cause damage to individuals, organizations or national security.
[0044] Image data desensitization: refers to the processing of images containing sensitive information to protect the privacy, confidential information or sensitive content involved.
[0045] Blurring: It is a data processing technology. In the field of images, it mainly uses a specific algorithm to blur the details of certain areas in the image (usually the parts containing sensitive information). Its purpose is to reduce the recognition of these areas, thereby protecting the privacy information or sensitive content therein.
[0046] Detection window: A detection window is a rectangular area that slides on an image (or video frame). This rectangular area is used to scan the image to determine whether it contains a target object and the coordinates, bounding box coordinates, bounding box size, and other information of the target object. The bounding box coordinates may include the coordinates of the upper left corner and / or the lower right corner of the detection window, and the bounding box size may include the length, width, and height of the detection window.
[0047] Before describing the technical solutions provided by the embodiments of the present disclosure, in order to facilitate understanding of the embodiments of the present disclosure, the present disclosure first specifically describes the problems existing in the prior art:
[0048] As mentioned above, in the related art, the schemes used to achieve image data desensitization are mainly the following: fixed area detection and blurring, single model detection and blurring, and multi-model combination detection and blurring. Among them, fixed area detection and blurring usually use a fixed detection area size and position. For example, a preset rectangular frame is used to detect a face or license plate, and then a fixed-size blur filter is applied to the detected area. Single model detection and blurring mainly use a single deep learning model (such as YOLO, SSD, etc.) for target detection, and then apply blur processing to the detected area. Multi-model combination detection and blurring combines multiple deep learning models (such as YOLOv8s and YOLOv8s trained based on the COCO dataset) for target detection. For example, one model is first used for preliminary detection, and then another model is used for re-detection to improve detection accuracy.
[0049] However, the inventors of the present disclosure have found that although these methods can achieve certain effects in simple scenarios, their limitations are revealed when faced with complex and changeable video content. For example, the fixed area detection method uses a preset rectangular frame to detect faces or license plates, and then applies a fixed-size blur filter to the detected area. This method is prone to missed detection and false detection when the size and position of the target change. The reason is that the setting of the fixed area cannot adapt to the actual size and position changes of different targets, resulting in inaccurate detection. Although the single model detection method improves the detection accuracy through deep learning, it performs poorly in certain specific scenarios (such as dense crowds, poor lighting conditions or fast-moving targets). This is because a single model lacks sufficient flexibility and adaptability when facing complex and changeable scenes. A single model may not cover certain special cases in the training data, resulting in the inability to accurately detect the target in actual applications. In addition, the detection results of a single model may not be fine enough, resulting in inaccurate blurring processing, thereby affecting the desensitization effect. The detection method based on multi-model combination attempts to improve detection accuracy by combining multiple deep learning models. However, this method has high computational cost and slow processing speed, which may cause delays, especially in real-time processing scenarios. In addition, although the combination of multiple models improves the robustness of detection, it may still cause missed detections and false detections when the target density is uneven or changes rapidly. This is because the multi-model combination method may not be able to adjust the detection strategy in time when processing complex scenes, resulting in inaccurate detection results.
[0050] In response to the above-mentioned technical deficiencies, the present disclosure aims to improve the accuracy, adaptability and efficiency of image data desensitization processing through a series of innovative technologies.
[0051] The image data desensitization method, device, equipment, medium and vehicle provided by the embodiments of the present disclosure are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0052] Exemplary Methods
[0053] Figure 1 is a flow chart of an image data desensitization method according to an exemplary embodiment. The image data desensitization method is used in an image data desensitization device. Figure 1 As shown, the method includes the following steps S110-S160, which are described in detail below.
[0054] S110. Detect the target object in the first image based on the initial detection window size through the target detection model, and obtain a first detection result corresponding to the first image, wherein the first image includes multiple image areas.
[0055] In some embodiments of the present disclosure, the first image is an image that needs to be desensitized, that is, an image that needs to blur sensitive information. The first image can be an image captured by an image acquisition device, or an image frame in a video. In practical applications, different images can be selected as the first image according to actual conditions, and this embodiment does not specifically limit this.
[0056] In some embodiments of the present disclosure, the target object refers to sensitive information in the image that needs to be blurred. For example, the target object includes but is not limited to a face, identity information, mobile phone number, license plate, etc. In actual applications, different objects can be set as target objects according to actual application scenarios, and this embodiment does not specifically limit this.
[0057] In some embodiments of the present disclosure, the target detection model is a pre-trained model that can identify the target object in the first image. Exemplarily, the target model includes but is not limited to a YOLOv8s deep learning model, an EfficientDet model, an SSD model, a multimodal model, a custom model, etc. Before the above step S110, the target detection model can be trained using supervised learning methods using training data such as an open source image database to optimize the target detection model's ability to recognize the target object, so that the target detection model learns to accurately distinguish and locate the target object in the image.
[0058] In some embodiments of the present disclosure, the detection window refers to a rectangular area that slides on an image (or video frame). This rectangular area is used to scan the image to determine whether it contains a target object and information such as the location of the target object. The initial detection window size is the default size of the detection window used when the target detection model identifies the target object. The initial detection window sizes corresponding to different types of target objects may be different. The size of the initial detection window size is proportional to the size of the target object itself, that is, the larger the target object, the larger the corresponding initial detection window size. For example, the target objects include faces and license plates. The size of the license plate is larger than the size of the face, so the initial detection window size corresponding to the license plate is larger than the initial detection window size corresponding to the face.
[0059] In some embodiments of the present disclosure, in the above step S110, the first image is input into the target detection model, and the target detection model slides a detection window with a size equal to the initial detection window size on the first image to scan the entire first image to determine whether it contains a target object and information such as the location of the target object, and outputs a first detection result corresponding to the first image based on the scanning result. The first detection result includes the target object in the first image, as well as information such as the coordinates, bounding box coordinates, and bounding box size of the target object.
[0060] In some embodiments of the present disclosure, before or after the above step S110, the first image is divided into regions to divide the entire first image into a plurality of image regions, each of which has a specific coordinate range and area.
[0061] In some embodiments of the present disclosure, in order to facilitate processing and reduce the amount of calculation, the first image may be divided into a plurality of non-overlapping image regions by means of a grid.
[0062] After obtaining the first detection result, the following steps S120-S160 are performed on each image area in the first image:
[0063] S120. Based on the first detection result, determine the number of target objects contained in the image area to obtain the target number.
[0064] In some embodiments of the present disclosure, the first detection result includes information such as coordinates and border size of all target objects in the first image. When the first image is divided, the coordinate range of each image area is determined. Based on this, according to the coordinate information of the target object and the coordinate range of the image area, the target object located in the image area can be determined, and then the number of target objects in the image area can be determined, thereby obtaining the number of targets in the image area.
[0065] S130. Determine the target density of the image area based on the number of targets and the area of the image area.
[0066] In some embodiments of the present disclosure, the target density of an image region refers to the distribution density of target objects in the image region, which is the ratio of the number of targets to the area of the image region. The area of the image region has been determined when the first image is divided into regions. Therefore, after obtaining the number of targets in the image region, the target density of the image region can be obtained by dividing the number of targets by the area of the image region. Based on this, the target density of the image region is calculated according to the following formula (1):
[0067]
[0068] In the above formula (1), D i represents the target density of image region i, N i represents the number of objects in image region i, S i Represents the area of image region i.
[0069] S140. Adjust the initial detection window size based on the target density to obtain the target detection window size corresponding to the image area.
[0070] In some embodiments of the present disclosure, in order to improve the detection accuracy of the target object and reduce missed detection, after obtaining the target density of the image area, the initial detection window size is adjusted based on the target density to obtain a target detection window size that is more consistent with the image area. As can be seen from the foregoing, the initial detection window sizes of different types of target objects may be different, and therefore, the adjusted target detection window sizes of different types of target objects may also be different.
[0071] S150. Using the target detection model, detect the target object in the image area based on the target detection window size, and obtain a second detection result corresponding to the image area.
[0072] In some embodiments of the present disclosure, after obtaining the target detection window size corresponding to the image area, the image area is scanned by a target detection model based on the target detection window size to identify the target object contained in the image area and information such as the coordinates, bounding box coordinates, and bounding box size of the target object, thereby obtaining a second detection result corresponding to the image area output by the target detection model.
[0073] In some embodiments of the present disclosure, after the second detection result is obtained, the second detection result may be saved in a historical database or list so as to be accessed and utilized by subsequent processing modules.
[0074] Since the second detection result is obtained by scanning the image area in a targeted manner based on the adjusted target detection window size, the second detection result is more accurate than the detection result corresponding to the image area in the first detection result.
[0075] S160. Based on the second detection result, blur the target object in the image area.
[0076] In some embodiments of the present disclosure, the second detection result includes the coordinates, bounding box coordinates, and bounding box size of the target object in the image area. The position of the target object in the image area can be determined based on the coordinates, bounding box coordinates, and bounding box size of the target object. Based on this, after obtaining the second detection result, the position of the target object can be blurred based on the coordinates, bounding box coordinates, and bounding box size of each target object in the image area.
[0077] For example, taking the target object as a human face, see Figure 2 , the image region 200 contains four target objects. According to the second detection result corresponding to the image region 200, it is determined that the positions corresponding to the four target objects are respectively positions 210, 220, 230 and 240. When blurring the image region 200, the positions 210, 220, 230 and 240 are blurred respectively, so as to obtain the following: Figure 3 The blurred image region 200 is shown.
[0078] In some embodiments of the present disclosure, an adaptive blur intensity method can be used to blur the target object in the image area. According to the specific context of the target object, such as background complexity, lighting conditions, etc., the blur intensity is dynamically adjusted to ensure the best privacy protection effect. Adaptive blur intensity can automatically adjust the degree of blur processing according to the size of the target object, background complexity, and the confidence of the detection result, ensuring that privacy can be effectively protected while maintaining the clarity and watchability of the video content.
[0079] In some embodiments of the present disclosure, a non-local mean (NLM) blur algorithm may be used to blur the target object in the image area. Compared with traditional Gaussian blur, non-local mean blur can achieve better privacy protection while maintaining edge clarity.
[0080] In some embodiments of the present disclosure, a Generative Adversarial Network (GAN) blur algorithm can be used to blur the target object in the image area. Using a Generative Adversarial Network to generate a realistic blur effect can effectively hide sensitive information without affecting the overall visual quality.
[0081] In some embodiments of the present disclosure, user-defined fuzzy rules can be used to fuzzify the target object in the image area. Allowing users to customize fuzzy rules according to specific needs, such as selecting a specific area to be blurred or setting the degree of blur, improves the flexibility and personalized service of the system.
[0082] In addition, the target object in the image area may be blurred by using methods such as mosaic blur, Gaussian blur, and virtual blur, which is not specifically limited in the embodiments of the present disclosure.
[0083] The image data desensitization method provided by the embodiment of the present disclosure first uses the target detection model to detect the target object on the entire first image based on the initial detection window size to obtain a rough first detection result, and based on the first detection result, determines the target density of each image area, and adjusts the initial detection window size based on the target density to obtain the target detection window size corresponding to each image area, and accurately detects each image area based on the target detection window size corresponding to each image area to obtain a more accurate second detection result corresponding to each image area, and performs fuzzy processing on the image area based on the second detection result. According to the present disclosure, by dynamically adjusting the detection window size, the detection window of the target object can be intelligently reduced or expanded, thereby improving the detection accuracy and reducing missed detections, thereby making the fuzzy processing more accurate. Moreover, the present disclosure can process images of various scenes and is more adaptable.
[0084] In some embodiments, see Figure 4 In order to more accurately reflect the complexity of the actual scene and make the target density of the image area more accurate, before the above step S130, the number of targets in the image area can be corrected through the following steps S410-S430.
[0085] S410. Based on the first detection result, determine the average area of the target objects contained in the image area.
[0086] Considering that the size of the target object has a certain influence on the target density, a larger target object occupies more space than a smaller target, therefore, the number of targets in the image area is corrected based on the size of the target object in the image area. The size of the target object can be represented by the area of the target object, therefore, in this embodiment, the number of targets in the image area is corrected based on the area of the target object in the image area.
[0087] In some embodiments of the present disclosure, the first detection result includes information such as the coordinates and bounding box coordinates, bounding box size, etc. of each target object in the entire first image. According to the coordinates of the image area, the target object located in the image area can be determined from the first detection result, and then the coordinates and bounding box coordinates, bounding box size, etc. of the target object located in the image area can be determined. After obtaining the coordinates and bounding box coordinates and bounding box size of the target object in the image area, each target object in the image area can be located according to the coordinates and bounding box coordinates and bounding box size of the target object, and then the area of each target object can be determined. After obtaining the area of each target object in the image area, the average of the areas of all target objects in the image area is calculated to obtain the average area of the target objects. Based on this, the average area of the target objects in the image area can be calculated by the following formula (2):
[0088]
[0089] In the above formula (2), A avg represents the average area of the target object in image region i, A j represents the area of target object j in image region i, N i represents the number of targets in the image area i determined based on the first detection result, that is, the number of targets before correction.
[0090] S420. Determine a weighting factor for each target object in the image region based on the average area and the area of each target object in the image region.
[0091] In some embodiments of the present disclosure, the weighting factor of the target object is used to reflect the effect of the size of the target object on the target density of the image region in which it is located. The ratio of the area of the target object to the average area is determined as the weighting factor of the target object. Based on this, the weighting factor of each target object in the image region can be calculated according to the following formula (3):
[0092]
[0093] In the above formula (3), W j represents the weighting factor of target object j in image region i.
[0094] S430. Correct the number of targets based on the weighting factor of each target object in the image area.
[0095] In some embodiments of the present disclosure, the sum of the weighted factors of all target objects in the image area is determined as the corrected number of target objects. Based on this, the corrected number of targets is calculated according to the following formula (4):
[0096]
[0097] In the above formula (4), N i ′ represents the corrected number of targets in the image region i. Accordingly, in the above step S130, the target density of the image region is determined based on the corrected number of target objects and the area of the image region. Specifically, the target density of the image region is calculated based on the following formula (5):
[0098]
[0099] By means of the above method, the number of targets in the image area is corrected based on the size of the target object in the image area, so that the target density determined based on the corrected number of targets can more accurately reflect the actual scene complexity.
[0100] In some embodiments, in the above step S140, the initial detection window size may be adjusted based on the following principles:
[0101] For image areas with high target density, the initial detection window size is reduced to avoid excessive overlap and improve detection resolution. A smaller detection window helps to locate the target object more accurately and reduce the false detection rate. For image areas with low target density, the initial detection window size is increased to ensure coverage, thereby reducing the possibility of missed detection. A larger detection window can quickly scan a larger area and save computing resources.
[0102] Based on the above principle, in the above step S140, any one of the following two methods can be used to adjust the initial detection window size.
[0103] The first method includes: determining the target density level of the image area based on the size relationship between the target density and the density threshold; adjusting the initial detection window size based on the target density level to obtain the target detection window size corresponding to the image area.
[0104] In some embodiments of the present disclosure, the density threshold may include one or more thresholds, and the target density level may be divided into two or more levels according to the number of thresholds.
[0105] In some embodiments of the present disclosure, the density threshold includes a first threshold and a second threshold, and the first threshold is greater than the second threshold. Based on this, the above-mentioned determination of the target density level of the image area based on the magnitude relationship between the target density and the density threshold includes:
[0106] Comparing the target density with the first threshold and the second threshold to obtain a comparison result;
[0107] In response to the object density being greater than a first threshold, determining that the object density level of the image area is a first level;
[0108] In response to the object density being less than or equal to the first threshold and greater than or equal to the second threshold, determining that the object density level of the image area is the second level;
[0109] In response to the object density being less than the second threshold, determining the object density level of the image area to be a third level.
[0110] In some embodiments of the present disclosure, the first level is higher than the second level, the second level is higher than the third level, and the higher the target density level of the image area, the greater the target density of the image area and the denser the distribution of target objects in the image area.
[0111] In some embodiments of the present disclosure, the first threshold and the second threshold are dynamically set using an adaptive method, and change as the overall scene changes to better adapt to different environmental conditions. For example, the first threshold and the second threshold are determined based on the average value of the target density of all image areas in the first image, and the first threshold is obtained by multiplying the average value of the target density by the first coefficient, and the second threshold is obtained by multiplying the average value of the target density by the second coefficient. Among them, the first coefficient is a set value greater than 1, and the second coefficient is a set value less than 1 and greater than 0. The specific values of the first coefficient and the second coefficient can be set according to actual conditions.
[0112] In some embodiments of the present disclosure, different methods are used to adjust the initial detection window size based on different target density levels. Based on this, after determining the target density level of the image area, the initial detection window size can be adjusted based on the target density level in the following manner to obtain the target detection window size corresponding to the image area:
[0113] In response to the target density level being the first level, reducing the initial detection window size to obtain the target detection window size corresponding to the image area;
[0114] In response to the target density level being the third level, the initial detection window size is increased to obtain the target detection window size corresponding to the image area.
[0115] In some embodiments of the present disclosure, when the target density level of an image area is the first level, it can be determined that the target density of the image area is high, and the distribution of target objects in the image area is dense. Therefore, the image area can be determined to be a target dense area. At this time, the target detection window size corresponding to the image area is obtained by reducing the initial detection window size. Among them, when reducing the initial detection window size, the initial detection window size can be reduced by a specified ratio. The instruction ratio can be pre-set or calculated according to a certain calculation rule based on the target density of the image area. This embodiment does not specifically limit this. When the target density is large, reducing the initial detection window size can avoid excessive overlap of target objects, improve the detection resolution, and help to locate the target more accurately and reduce the false detection rate.
[0116] In some embodiments of the present disclosure, when the target density level of the image area is the third level, it can be determined that the target density of the image area is low, and the distribution of the target objects in the image area is relatively sparse. Therefore, the image area can be determined to be a target sparse area. At this time, the target detection window size corresponding to the image area is obtained by increasing the initial detection window size. Among them, when increasing the initial detection window size, the initial detection window size can be increased by a specified ratio. The instruction ratio can be pre-set or calculated according to a certain calculation rule based on the target density of the image area. This embodiment does not specifically limit this. When the target density is small, by increasing the initial detection window size, it can be ensured that the detection window covers a larger range, thereby reducing the possibility of missed detection. At the same time, using a larger detection window can quickly scan a larger area and save computing resources.
[0117] In some embodiments of the present disclosure, when the target density level of an image region is the second level, it can be determined that the target density of the image region is within a reasonable range, and the distribution of target objects in the image region is relatively normal, so the image region can be determined to be a normal target region. At this time, the initial detection window size can be directly determined as the target detection window size corresponding to the image region.
[0118] The second method includes: determining an average target density of multiple image areas in the first image; determining a scale factor corresponding to the image area based on the average target density and the target density of the image area; and adjusting an initial detection window size based on the scale factor to obtain a target detection window size corresponding to the image area.
[0119] In some embodiments of the present disclosure, a default scaling factor may be preset, and the default scaling factor may be adjusted according to the target density average value and the target density of the image area to determine the scaling factor corresponding to the image area. For example, the scaling factor corresponding to the image area may be determined according to the following formula (6):
[0120] R i =R×[1+α*(D i -D avg )] (6)
[0121] In the above formula (6), R i Indicates the scale factor corresponding to image region i, R indicates the preset default scale factor, and the value of R can be set according to the actual situation. For example, R can be 1. α indicates the sensitivity coefficient, which is used to control the speed at which the scale factor changes with density. The value range of α is (0,1). The value of α determines the response speed of the system to changes in target density. A higher α makes the detection window size more sensitive to changes in target density, while a lower α provides a more stable detection window size adjustment. In practical applications, the most suitable α value for a specific task can be found through multiple tests. avg Indicates the average value of target density of multiple image regions in the first image.
[0122] In some embodiments of the present disclosure, after obtaining the scale factor corresponding to the image area, the scale factor is multiplied by the initial detection window size to obtain the target detection window size corresponding to the image area. Based on this, the target detection window size corresponding to the image area is determined according to the following formula (7):
[0123]
[0124] In the above formula (7), k i represents the target detection window size corresponding to image region i, represents the initial detection window size of the target object in image region i.
[0125] Based on the above scheme, when the target density in a certain image area is higher than the average level, the scale factor increases, resulting in a reduction in the detection window size and improving the detection accuracy of the image area. Conversely, when the target density in the image area is lower than the average level, the scale factor decreases and the detection window size increases to ensure sufficient coverage.
[0126] Through the above method, the proportional factor of the detection window size change can be flexibly adjusted according to the actual application scenario, and the detection window size can be automatically optimized according to the real-time situation to achieve the best performance.
[0127] In some embodiments, see Figure 5 In order to deal with possible missed detection problems, especially those caused by occlusion or other complex factors, before the above step S160, the following steps S510-S540 can also be performed. This process is intended to ensure the integrity of the detection and reduce misjudgments caused by factors such as environmental complexity or target occlusion.
[0128] S510. Based on the second detection result, determine whether there is any potential target object that has been missed in the image area.
[0129] In some embodiments of the present disclosure, density anomaly detection or multi-frame target continuity detection may be used to determine whether there are potential target objects that have been missed in the image area.
[0130] In some embodiments of the present disclosure, determining whether there is a potential target object that is missed in an image region by density anomaly detection includes the following steps:
[0131] Based on the second detection result, updating the number of objects in the image area;
[0132] In response to the updated target quantity being less than the expected quantity value corresponding to the image region, and the difference between the updated target quantity and the expected quantity value meeting a preset condition, it is determined that there is a potential target object that has been missed in the image region.
[0133] Here, updating the target number in the image area based on the second detection result means determining the number of target objects contained in the image area according to the second detection result, and then updating the target number in the image area from the number determined in the above step S120 to the number determined based on the second detection result.
[0134] In some embodiments of the present disclosure, the expected value of the number corresponding to the image region can be determined based on the average target number of the image region and the image regions adjacent to the image region. For example, the average value of the target number of the image region and the P image regions adjacent to the image region is calculated, and the average value is determined as the expected value of the number corresponding to the image region. Wherein P is a positive integer greater than or equal to 1.
[0135] Through density anomaly detection, it is possible to quickly determine whether there are potential target objects that have been missed in the image area, and this method is applicable to the first image in any scenario, including but not limited to a single image or an image frame in a video.
[0136] In some embodiments of the present disclosure, when the first image is an image frame in the first video, the following steps may be used to determine whether there is a potential target object that has been missed in the image region by performing multi-frame target continuity detection:
[0137] Determine a moving path of the target object based on a detection result of each image in the first image group and / or a detection result of each image in the second image group, wherein the first image group includes N frames of images before the first image in the first video, and the second image group includes M frames of images after the first image in the first video, and determine whether there is a potential target object that is missed in the image area;
[0138] Based on the moving path, determining the potential position where the target object may appear in the image area;
[0139] In response to determining, according to the second detection result, that there is no target object at the potential position in the image region, it is determined that there is a missed potential target object in the image region.
[0140] Here, N and M are positive integers, and specific values can be set according to actual conditions.
[0141] In some embodiments of the present disclosure, the first video may be any video that needs to be desensitized. The first video is an image frame sequence, which is composed of a plurality of continuous image frames. The first image may be any image frame in the first video.
[0142] In some embodiments of the present disclosure, the detection results of each image in the first image group and the detection results of each image in the second image group include information such as the coordinates of the target object, the coordinates of the bounding box, and the size of the bounding box. According to the detection results of each image in the first image group and / or the detection results of each image in the second image group, the target object in the first video is tracked using target tracking technology to determine the moving trajectory of the target object. After obtaining the moving trajectory of the target object, the position where the target object may appear in the current image area, that is, the potential position of the target object, can be determined based on the moving trajectory of the target object. Then, based on the second detection result, it is determined whether the target object exists in the potential position of the current image area. If not, it means that there is a missed detection in the image area.
[0143] Through multi-frame target continuity detection, the motion changes of the target object between consecutive image frames can be analyzed to ensure the continuity of the moving target object and reduce the problem of missed detection caused by the rapid movement of the target object.
[0144] S520. When it is determined that there is a potential target object in the image area, determine an estimated position of the potential target object.
[0145] In some embodiments of the present disclosure, since the above-mentioned step S510 directly and roughly determines whether there is any missed detection in the image area, the judgment result is not accurate enough. Therefore, in order to improve the accuracy of the final blurring processing, after determining that there is any missed detection in the image area through the above-mentioned step S510, the accuracy of the detection result is improved by re-performing target detection on the image area.
[0146] In order to improve the accuracy of the detection results, before re-performing target detection on the image area, the position of the potential target object is first estimated to obtain the estimated position of the potential target object, so that the parameters of the target detection model can be adjusted based on the estimated position of the potential target object, so that the target detection model focuses on the estimated position, thereby improving the accuracy of the detection results.
[0147] In some embodiments of the present disclosure, a bilinear interpolation algorithm may be used to infer the estimated position of the potential target object based on position information of known target objects around the potential target object.
[0148] In some embodiments of the present disclosure, see Figure 6 In the case where the above step S510 uses the multi-frame target continuity detection method to determine that there is a potential target object in the image area, the following steps S610-S620 can be used to determine the estimated position of the potential target object:
[0149] S610. Determine the distance between the potential position and each known target object in the image area, where the known target object refers to the target object included in the second detection result.
[0150] The potential position refers to a potential position in the image region where the target object does not exist, that is, a potential position corresponding to a potential target object.
[0151] In some embodiments of the present disclosure, a distance algorithm such as Euclidean distance and Manhattan distance may be used to calculate the distance between the potential position and each known target object in the image region.
[0152] S620. Determine the weight corresponding to each known target object based on the distance.
[0153] In some embodiments of the present disclosure, after obtaining the distance between the potential position and each known target object in the image area, the weight corresponding to each known target object can be calculated according to the following formula (8):
[0154]
[0155] In the above formula (8), ω j represents the weight corresponding to the known target object j, d j Represents the distance between the known target object j and the potential position. ε is a small constant to prevent the denominator from being zero. The value of ε can be set according to the actual situation.
[0156] S630. Perform weighted average calculation on the positions of known target objects in the image area based on the weights to obtain the estimated position of the potential target.
[0157] In some embodiments of the present disclosure, the weight corresponding to each known target object is obtained, and the positions of all known target objects can be weighted averaged according to the following formula (9), thereby obtaining the estimated position of the potential target:
[0158]
[0159] In the above formula (9), P est represents the estimated position of the potential target, P j represents the location of the known target object j.
[0160] In other embodiments of the present disclosure, when any method is used to determine that there is a potential target object in the image area in the above step S510, the following steps can be used to determine the potential position of the potential target object. After the potential position is determined, the above steps S610-S630 are used to determine the estimated position based on the potential position:
[0161] Based on the second detection result, determine H known target objects in the image region that are closest to the center of the image region, where H is a positive integer and the known target objects refer to the target objects included in the second detection result;
[0162] Based on the positions of the H known target objects, determining the geometric center positions of the H known target objects;
[0163] The geometric center position is determined as the potential position of the potential target object.
[0164] In this way, when the potential position of the potential target object cannot be directly determined through step S510, the potential position can be determined, thereby facilitating determination of the estimated position of the potential target object.
[0165] In some embodiments of the present disclosure, after the estimated position of the potential target object is determined through the above steps S610-S630, the estimated position can be further fine-tuned to make it more consistent with the target distribution pattern in the actual scene, for example, so that the estimated position of the potential target object does not intersect with the positions of other target objects in the image area, or so that the estimated position of the potential target object satisfies other specified constraints. The constraints can be set according to actual conditions, and this embodiment does not specifically limit this.
[0166] S530. Adjust parameters of the target detection model based on the estimated position so that the target detection model focuses on the estimated position.
[0167] In some embodiments of the present disclosure, when detecting a target object in an image area, the target detection model divides the image area into multiple detection areas, assigns a corresponding detection weight to each detection area, scans each detection area based on the detection weight, and outputs a detection result. Based on this, after obtaining the estimated position of the potential target object, in order to facilitate the target detection model to detect the missed potential target object, when adjusting the parameters of the target detection model based on the estimated position of the potential target object, the detection weight of the detection area to which the estimated position belongs can be increased, so that the target detection model focuses on the estimated position.
[0168] S540. Using the target detection model after parameter adjustment, detect the target object in the image area again based on the target detection window size, and update the second detection result corresponding to the image area.
[0169] In some embodiments of the present disclosure, after completing the parameter adjustment of the target detection model, the image area is input into the target detection model with adjusted parameters, and the target detection model detects the target object in the image area again based on the target detection window size to obtain a new detection result, and then the second detection result corresponding to the image area is updated to the new detection result.
[0170] Since the model parameters are adjusted when the target object in the image area is detected again, the detection accuracy of the target detection model is higher, and thus the updated second detection result is more accurate.
[0171] Accordingly, in the above step S160, the target object in the image area is blurred based on the updated second detection result.
[0172] In this way, missed detections can be reduced and the accuracy of fuzzy processing can be improved.
[0173] In some embodiments, in order to further improve the accuracy of the fuzzy processing, after the above step S540, the following steps may be further performed:
[0174] Based on the updated second detection result, updating the number of objects in the image area;
[0175] Return to the step of determining the target density of the image area based on the number of targets and the area of the image area until the iteration end condition is met, and determine the second detection result of the image area obtained by the final iteration as the final detection result.
[0176] In some embodiments of the present disclosure, the iteration end condition can be set according to actual conditions. For example, the iteration end condition can be that the number of iterations is equal to a set number threshold, or that it is determined that there is no potential target object in the image area, etc. This embodiment does not make specific limitations on this.
[0177] Accordingly, in the above step S160, based on the final detection result, the target object in the image area is blurred.
[0178] Through the above method, after the image area is re-detected through the above step S540, if the target density of the image area changes, the target detection window size corresponding to the image area can be dynamically adjusted again, so that the target detection window size is more accurate, thereby improving the accuracy of the blurring processing.
[0179] In some embodiments, a closed-loop feedback system is used to automatically adjust the detection parameters of the target detection model according to the latest detection results each time the target detection of the first image or image area is completed. This process is continuous. In this way, when desensitizing multiple images continuously, the target detection model can continuously optimize itself in target detection, thereby improving the overall detection efficiency and accuracy.
[0180] Exemplary Devices
[0181] Figure 7 is a block diagram of an image data desensitization device according to an exemplary embodiment. Figure 7 The device 700 includes a target detection module 710, a target quantity determination module 720, a target density determination module 730, a window size adjustment module 740 and a fuzzification module 750.
[0182] The target detection module 710 is used to detect a target object in a first image based on an initial detection window size through a target detection model to obtain a first detection result corresponding to the first image, wherein the first image includes a plurality of image regions;
[0183] The target number determination module 720 is used to determine the number of target objects contained in the image area based on the first detection result to obtain the target number;
[0184] The target density determination module 730 is used to determine the target density of the image area based on the number of targets and the area of the image area;
[0185] The window size adjustment module 740 is used to adjust the initial detection window size based on the target density to obtain the target detection window size corresponding to the image area;
[0186] The target detection module 710 is further configured to detect a target object in an image region based on a target detection window size through a target detection model, and obtain a second detection result corresponding to the image region;
[0187] The blurring module 750 is used to perform blurring processing on the target object in the image area based on the second detection result.
[0188] The image data desensitization device provided by the embodiment of the present disclosure first uses the target detection model to detect the target object on the entire first image based on the initial detection window size to obtain a rough first detection result, determines the target density of each image area based on the first detection result, adjusts the initial detection window size based on the target density to obtain the target detection window size corresponding to each image area, accurately detects each image area based on the target detection window size corresponding to each image area, obtains a more accurate second detection result corresponding to each image area, and performs fuzzy processing on the image area based on the second detection result. According to the present disclosure, by dynamically adjusting the detection window size, the detection window of the target object can be intelligently reduced or expanded, thereby improving the detection accuracy and reducing missed detections, thereby making the fuzzy processing more accurate. Moreover, the present disclosure can process images of various scenes and is more adaptable.
[0189] In some embodiments, the apparatus 700 further includes a target quantity correction module, configured to:
[0190] Before determining the target density of the image region based on the number of targets and the area of the image region, determining an average area of the target objects contained in the image region based on the first detection result;
[0191] determining a weighting factor for each target object in the image region based on the average area and the area of each target object in the image region;
[0192] Correcting the number of targets based on a weighting factor for each target object in the image region;
[0193] Based on the number of targets and the area of the image region, determine the target density of the image region, including:
[0194] Based on the corrected number of objects and the area of the image region, the object density of the image region is determined.
[0195] In some embodiments, the window size adjustment module 740 includes:
[0196] The level determination submodule determines the target density level of the image area based on the relationship between the target density and the density threshold;
[0197] The size adjustment submodule is used to adjust the initial detection window size based on the target density level to obtain the target detection window size corresponding to the image area.
[0198] In some embodiments, the density threshold includes a first threshold and a second threshold, the first threshold is greater than the second threshold, and the level determination submodule is specifically configured to:
[0199] Comparing the target density with the first threshold and the second threshold to obtain a comparison result;
[0200] In response to the object density being greater than a first threshold, determining that the object density level of the image area is a first level;
[0201] In response to the object density being less than or equal to the first threshold and greater than or equal to the second threshold, determining that the object density level of the image area is the second level;
[0202] In response to the object density being less than the second threshold, determining the object density level of the image area to be a third level.
[0203] In some embodiments, the size adjustment submodule is specifically configured to:
[0204] In response to the target density level being the first level, reducing the initial detection window size to obtain the target detection window size corresponding to the image area;
[0205] In response to the target density level being the third level, the initial detection window size is increased to obtain the target detection window size corresponding to the image area.
[0206] In some embodiments, the window size adjustment module 740 is specifically configured to:
[0207] determining an average value of target density of a plurality of image regions in the first image;
[0208] Determine a scale factor corresponding to the image area based on the target density average value and the target density of the image area;
[0209] The initial detection window size is adjusted based on the scale factor to obtain the target detection window size corresponding to the image area.
[0210] In some embodiments, the apparatus 700 further includes: a missed detection correction module, including:
[0211] A missed detection judgment submodule, used for determining whether there is a potential missed target object in the image area based on the second detection result before performing fuzzy processing on the target object in the image area based on the second detection result;
[0212] A position estimation submodule, used to determine the estimated position of the potential target object when it is determined that there is a potential target object in the image area;
[0213] A parameter adjustment submodule, for adjusting the parameters of the target detection model based on the estimated position so that the target detection model focuses on the estimated position;
[0214] The target detection module 710 is further configured to detect the target object in the image area again based on the target detection window size by using the target detection model after parameter adjustment, and update the second detection result corresponding to the image area;
[0215] The fuzzification module 750 is specifically used for:
[0216] Based on the updated second detection result, the target object in the image area is blurred.
[0217] In some embodiments, the missed detection judgment submodule is specifically used to:
[0218] Based on the second detection result, updating the number of objects in the image area;
[0219] In response to the updated target quantity being less than the expected quantity value corresponding to the image region, and the difference between the updated target quantity and the expected quantity value meeting a preset condition, it is determined that there is a potential target object that has been missed in the image region.
[0220] In some embodiments, the missed detection judgment submodule is specifically used to:
[0221] Determine a moving path of the target object based on a detection result of each image in the first image group and / or a detection result of each image in the second image group, wherein the first image group includes N frames of images before the first image in the first video, and the second image group includes M frames of images after the first image in the first video, and determine whether there is a potential target object that is missed in the image area;
[0222] Based on the moving path, determining the potential position where the target object may appear in the image area;
[0223] In response to determining, according to the second detection result, that there is no target object at the potential position in the image region, it is determined that there is a missed potential target object in the image region.
[0224] In some embodiments, the position estimation submodule is specifically configured to:
[0225] Based on the second detection result, determine H known target objects in the image region that are closest to the center of the image region, where H is a positive integer and the known target objects refer to the target objects included in the second detection result;
[0226] Based on the positions of the H known target objects, determining the geometric center positions of the H known target objects;
[0227] Determine the geometric center position as the potential position of the potential target object;
[0228] Determine the distance between the potential location and each known target object in the image area;
[0229] Determine the weight corresponding to each known target object based on the distance;
[0230] The positions of known target objects in the image area are weighted averaged based on the weights to obtain the estimated position of the potential target in the image area.
[0231] In some embodiments, the first image is an image frame of a first video, and the position estimation submodule is specifically used to:
[0232] determining a distance between the potential position and each known target object in the image region, the known target object being a target object included in the second detection result;
[0233] Determine the weight corresponding to each known target object based on the distance;
[0234] The positions of known target objects in the image area are weighted averaged based on the weights to obtain the estimated position of the potential target.
[0235] In some embodiments, the missed detection correction module further includes: an iterative correction submodule, which is used to:
[0236] Based on the updated second detection result, updating the number of objects in the image area;
[0237] Returning to the step of determining the target density of the image area based on the number of targets and the area of the image area, until the iteration end condition is met, and determining the second detection result of the image area obtained by the final iteration as the final detection result;
[0238] The fuzzification module 750 is specifically used for:
[0239] Based on the final detection result, the target object in the image area is blurred.
[0240] The image data desensitization device provided by the embodiment of the present disclosure can achieve Figures 1 to 6 To avoid repetition, the various processes implemented in the image data desensitization method embodiment are not described here.
[0241] Example Vehicles
[0242] Figure 8 is a block diagram of a vehicle 800 according to an exemplary embodiment. The vehicle 800 may be a fuel vehicle, a hybrid vehicle, an electric vehicle, a fuel cell vehicle or other types of vehicles.
[0243] Reference Figure 8 The vehicle 800 may include multiple subsystems, for example, a driving system 810, a control system 820, a perception system 830, a communication system 840, an information display system 850, and a computing system 860. The vehicle 800 may also include more or fewer subsystems, and each subsystem may also include multiple components, which are not described one by one here.
[0244] The driving system 810 includes components that provide power movement for the vehicle 800, such as an engine, an energy source, a transmission device, etc.
[0245] The control system 820 includes components that provide control for the vehicle 800, such as vehicle control, cockpit equipment control, and driving assistance control.
[0246] The perception system 830 includes components that provide the vehicle 800 with surrounding environment perception, such as a vehicle positioning system, a laser sensor, a voice sensor, an ultrasonic sensor, a camera device, and the like.
[0247] The communication system 840 includes components that provide communication connections for the vehicle 800, such as mobile communication networks (such as 3G, 4G, 5G networks, etc.), WiFi, Bluetooth, and Internet of Vehicles.
[0248] The information display system 850 includes components that provide various information displays for the vehicle 800, such as vehicle information display, navigation information display, entertainment information display, etc.
[0249] The computing and processing system 860 includes components that provide data computing and processing capabilities for the vehicle 800. The computing and processing system 860 may include at least one processor 861 and a memory 862. The processor 861 may execute instructions stored in the memory 862.
[0250] The processor 861 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.
[0251] Memory 862 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0252] In the embodiment of the present disclosure, a set of instruction sets is stored in the memory 862, and the processor 861 can execute the instruction set to implement all or part of the steps of the image data desensitization method described in any of the above exemplary embodiments.
[0253] Exemplary Electronic Devices
[0254] Fig. 9 1 is a block diagram of an electronic device 900 according to an exemplary embodiment. The electronic device 900 may be a vehicle controller, a vehicle terminal, a vehicle computer or other types of electronic devices.
[0255] Reference Fig. 9 , the electronic device 900 may include at least one processor 910 and a memory 920. The processor 910 may execute instructions stored in the memory 920. The processor 910 is communicatively connected to the memory 920 via a data bus. In addition to the memory 920, the processor 910 may also be communicatively connected to an input device 930, an output device 940, and a communication device 950 via a data bus.
[0256] The processor 910 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.
[0257] The memory 920 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0258] In the embodiment of the present disclosure, executable instructions are stored in the memory 920, and the processor 910 can read the executable instructions from the memory 920 and execute the instructions to implement all or part of the steps of the image data desensitization method described in any of the above exemplary embodiments.
[0259] Exemplary computer-readable storage media
[0260] In addition to the above methods and devices, the exemplary embodiments of the present disclosure may also be a computer program product or a computer-readable storage medium storing the computer program product. The computer product includes computer program instructions that can be executed by a processor to implement all or part of the steps described in any of the image data desensitization methods in the above exemplary embodiments.
[0261] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., as well as conventional procedural programming languages such as "C" or similar programming languages and scripting languages (e.g., Python). The program code may be executed entirely on the user computing device, partially on the user computing device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0262] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of readable storage media include: a static random access memory (SRAM) with one or more wires electrically connected, an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic storage, a flash memory, a magnetic disk or an optical disk, or any suitable combination of the above.
[0263] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0264] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for desensitizing image data, characterized in that: include: Detecting a target object in a first image based on an initial detection window size using a target detection model to obtain a first detection result corresponding to the first image, wherein the first image includes a plurality of image regions; Perform the following steps for each image area respectively: Based on the first detection result, determining the number of target objects contained in the image area to obtain the number of targets; Determining a target density of the image region based on the number of targets and the area of the image region; Adjusting the initial detection window size based on the target density to obtain the target detection window size corresponding to the image area; Detecting the target object in the image area based on the target detection window size using the target detection model to obtain a second detection result corresponding to the image area; Based on the second detection result, blurring processing is performed on the target object in the image area.
2. The method according to claim 1, characterized in that Before determining the target density of the image area based on the number of targets and the area of the image area, the method further includes: Based on the first detection result, determining an average area of the target objects contained in the image area; determining a weighting factor for each target object in the image region based on the average area and the area of each target object in the image region; Correcting the number of targets based on a weighting factor of each target object in the image region; The determining the target density of the image area based on the target quantity and the area of the image area includes: Based on the corrected number of objects and the area of the image region, an object density of the image region is determined.
3. The method according to claim 1, characterized in that The adjusting the initial detection window size based on the target density to obtain the target detection window size corresponding to the image area includes: Determining the target density level of the image area based on the magnitude relationship between the target density and the density threshold; The initial detection window size is adjusted based on the target density level to obtain the target detection window size corresponding to the image area.
4. The method according to claim 1, characterized in that: The adjusting the initial detection window size based on the target density to obtain the target detection window size corresponding to the image area includes: determining an average value of target density of a plurality of image regions in the first image; Determining a scale factor corresponding to the image area based on the target density average value and the target density of the image area; The initial detection window size is adjusted based on the scale factor to obtain the target detection window size corresponding to the image area.
5. The method according to claim 1, characterized in that Before blurring the target object in the image area based on the second detection result, the method further includes: Based on the second detection result, determining whether there is a potential target object that has been missed in the image area; In the case where it is determined that there is a potential target object in the image area, determining an estimated position of the potential target object; Adjusting parameters of the target detection model based on the estimated position so that the target detection model focuses on the estimated position; Using the target detection model after parameter adjustment, based on the target detection window size, detect the target object in the image area again, and update the second detection result corresponding to the image area; The blurring the target object in the image area based on the second detection result includes: Based on the updated second detection result, blurring processing is performed on the target object in the image area.
6. The method according to claim 5, characterized in that The first image is an image frame of a first video, and determining whether there is a potential target object that has been missed in the image area based on the second detection result includes: Determine a moving path of the target object based on a detection result of each image in the first image group and / or a detection result of each image in the second image group, wherein the first image group includes N frames of images before the first image in the first video, and the second image group includes M frames of images after the first image in the first video, and determine whether there is a potential target object that is missed in the image area; Based on the moving path, determining a potential position where the target object may appear in the image area; In response to determining, according to the second detection result, that there is no target object at the potential position in the image area, it is determined that there is a missed potential target object in the image area.
7. The method according to claim 6, characterized in that Determining the estimated position of the potential target object includes: determining a distance between the potential position and each known target object in the image region, the known target object being a target object included in the second detection result; Determine a weight corresponding to each known target object based on the distance; The positions of the known target objects in the image area are weighted averaged based on the weights to obtain the estimated position of the potential target.
8. An image data desensitization device, characterized in that: include: A target detection module, configured to detect a target object in a first image based on an initial detection window size through a target detection model, and obtain a first detection result corresponding to the first image, wherein the first image includes a plurality of image regions; A target quantity determination module, configured to determine the quantity of target objects contained in the image area based on the first detection result, so as to obtain the target quantity; A target density determination module, used to determine the target density of the image area based on the number of targets and the area of the image area; A window size adjustment module, used to adjust the initial detection window size based on the target density to obtain the target detection window size corresponding to the image area; The target detection module is further configured to detect the target object in the image area based on the target detection window size through the target detection model, and obtain a second detection result corresponding to the image area; A blurring module is used to blur the target object in the image area based on the second detection result.
9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the image data desensitization method described in any one of claims 1-7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the image data desensitization method described in any one of claims 1-7 are implemented.
Citation Information
Cited By
Artificial intelligence science popularization display system and method based on multi-modal interaction
CN120874089A
Terminal device for image processing, image processing method, and program product
CN120894462A
Real-time multi-target detection system and method based on deep learning
CN121033386A
A real-time multi-target detection system and method based on deep learning
CN121033386B