Video desensitization method, device and equipment based on continuous frame tracking and readable storage medium

By combining the video desensitization method with sensitive area positioning and tracking models, the problem of insufficient video desensitization accuracy and efficiency in the existing technology is solved, fast and accurate video desensitization is achieved, and privacy security is ensured.

CN118779899APending Publication Date: 2024-10-15AOPENG DATA TECH (SHANGHAI) CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410909416.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing video desensitization technologies have deficiencies in accuracy, efficiency, and versatility, which can easily lead to multiple detections and missed detections, affecting image quality and the security of sensitive information.

Method used

Adopting a video desensitization method based on continuous frame tracking, by combining the sensitive area positioning model and the tracking model, the video desensitization model is trained to identify and process sensitive areas in video frames, reducing multiple detections and missed detections, and achieving more accurate sensitivity Information identification and desensitization.

Benefits of technology

It achieves rapid and accurate identification and desensitization of sensitive areas in videos without affecting other information in the image, improves the stability and accuracy of the video desensitization process, and ensures privacy security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779899A_ABST
    Figure CN118779899A_ABST
Patent Text Reader

Abstract

The invention provides a video desensitization method, device and equipment based on continuous frame tracking and a readable storage medium, and the method comprises the steps: carrying out the recognition of a to-be-desensitized video through a preset video desensitization model, and obtaining sensitive regions of all frames of images of the to-be-desensitized video; and carrying out desensitization processing on the sensitive areas of all frame images of the video to be desensitized. Through the method, the effect of accurately and quickly realizing the video desensitization process can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video desensitization, and in particular, to a video desensitization method, apparatus, device and readable storage medium based on continuous frame tracking. Background Art

[0002] With the widespread application of these technologies, privacy protection issues have become increasingly prominent. Sensitive information in images may be used maliciously, threatening personal privacy and data protection. Therefore, developing effective desensitization technology to automatically detect and blur or delete this sensitive information without affecting other information in the image has become an urgent problem to be solved.

[0003] Current video desensitization technologies mainly include rule-based methods and learning-based methods. Rule-based methods usually rely on predefined features and patterns to identify sensitive information, and the application scenarios are relatively single and fixed, while learning-based methods use machine learning and deep learning technologies to automatically identify and process this information, and the application scenarios are more flexible. For example, the video is decoded into pictures, and then each frame of the picture is automatically located and coded independently through a deep learning model (such as object detection, instance segmentation, etc.), and then the processed pictures are encoded back into the video. The performance of desensitization is highly dependent on the performance of the positioning model itself. Generally, there are two error conditions: multiple detection and missed detection. The former will affect and damage other irrelevant information in the image, and the latter will cause the leakage of sensitive information. Although these methods have made progress to a certain extent, their accuracy, efficiency and versatility are not very good.

[0004] Therefore, how to accurately and quickly implement the video desensitization process is a technical problem that needs to be solved. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a video desensitization method based on continuous frame tracking. Through the technical solution of the embodiments of the present application, the effect of accurately and quickly realizing the video desensitization process can be achieved.

[0006] In a first aspect, an embodiment of the present application provides a video desensitization method based on continuous frame tracking, comprising: identifying a video to be desensitized through a preset video desensitization model to obtain sensitive areas of all frame images of the video to be desensitized, wherein the video desensitization model includes a sensitive area positioning model and a sensitive area tracking model, the sensitive area positioning model is obtained by training a basic positioning model with part of the first training data, the sensitive area tracking model is obtained by training a basic tracking model with part of the first training data and the second training data, the first training data is obtained by obtaining a first video sample containing sensitive video and sensitive area tracking coordinates, and extracting picture frames from the first video sample, the second training data is obtained by obtaining a second video sample containing ordinary video and ordinary area tracking coordinates, and extracting picture frames from the second video sample; the sensitive areas of all frame images of the video to be desensitized are desensitized.

[0007] In the above embodiments of the present application, a video desensitization model is obtained by combining a sensitive area tracking model on the basis of a sensitive area positioning model, and the sensitive area positioning model and the sensitive area tracking model are combined after being trained separately to obtain a video desensitization model. The combination of the two models can handle occasional multiple detections and missed detections in the frame-by-frame processing process, making the positioning of sensitive areas more continuous, stable and accurate. Achieve the effect of accurately and quickly realizing the video desensitization process.

[0008] In some embodiments, before the video to be desensitized is identified by a preset video desensitization model to obtain the sensitive areas of all frame images of the video to be desensitized, it also includes: obtaining a first video sample containing sensitive video and sensitive area tracking coordinates, and extracting picture frames from the first video sample as first training data; obtaining a second video sample containing ordinary video and ordinary area tracking coordinates, and extracting picture frames from the second video sample as second training data; training a basic positioning model with part of the first training data to obtain a sensitive area positioning model; training a basic tracking model with part of the first training data and the second training data to obtain a sensitive area tracking model.

[0009] In the above embodiments of the present application, training a sensitive area positioning model with samples containing sensitive videos and training a sensitive area tracking model with samples containing sensitive videos and ordinary videos can enable the model to learn to accurately identify video sensitive data.

[0010] In some embodiments, a basic positioning model is trained by partial data of the first training data to obtain a sensitive area positioning model, including: extracting multiple images from the partial data of the first training data, and taking each of the multiple images as a training sample; inputting each training sample into the basic positioning model to obtain multiple sensitive areas and corresponding categories; comparing the multiple sensitive areas and corresponding categories with preset sensitive areas and categories to obtain comparison results; adjusting the parameters of the basic positioning model according to the comparison results to obtain the sensitive area positioning model.

[0011] In the above-mentioned embodiments of the present application, by training the model through the sensitive areas and corresponding categories of sensitive videos, the model can accurately learn to determine the sensitive categories by identifying the sensitive areas of the video.

[0012] In some embodiments, a basic tracking model is trained by partial data of first training data and second training data to obtain a sensitive area tracking model, including: obtaining an image sequence in partial data of the first training data and the second training data; inputting the image sequence into the basic tracking model to obtain a sensitive area set and corresponding sensitive area position coordinates; comparing the sensitive area set and the corresponding sensitive area position coordinates with preset sensitive areas and position coordinates, respectively, to obtain a second comparison result; adjusting the parameters of the basic tracking model according to the second comparison result to obtain the sensitive area tracking model.

[0013] In the above-mentioned embodiments of the present application, by training the model through the sensitive areas of the sensitive video and the corresponding area position coordinates, the model can accurately determine the position of the sensitive area of ​​the video, thereby achieving the effect of sensitive area tracking.

[0014] In some embodiments, after the basic tracking model is trained by partial data of the first training data and the second training data to obtain the sensitive area tracking model, it also includes: encapsulating the sensitive area positioning model and the sensitive area tracking model to obtain a video desensitization model.

[0015] In the above embodiments of the present application, by encapsulating the sensitive area positioning model and the sensitive area tracking model, the final video desensitization model can have the advantages of both the encapsulated sensitive area positioning model and the sensitive area tracking model, thereby achieving the effect of accurate identification of sensitive areas.

[0016] In some embodiments, the video to be desensitized is identified by a preset video desensitization model to obtain sensitive areas of all frame images of the video to be desensitized, including: decoding the video to be desensitized to obtain a frame image set; identifying the first frame image in the frame image set by a sensitive area positioning model to obtain the sensitive area of ​​the first frame image; locating and tracking sensitive areas of non-first frame images in the frame image set by the sensitive area positioning model and the sensitive area tracking model respectively to obtain a first sensitive area set and a second sensitive area set; matching the frame images corresponding to the first sensitive area set and the second sensitive area set by a matching algorithm to obtain a matching result; and selecting multiple sensitive areas corresponding to the non-first frame image according to the matching result.

[0017] In the above embodiments of the present application, by encapsulating the sensitive area positioning model and the sensitive area tracking model to identify the sensitive areas of the video and combining them with certain algorithms, a more accurate sensitive area identification result can be finally obtained.

[0018] In some embodiments, multiple sensitive areas corresponding to the non-first frame image are selected based on the matching results, including: obtaining the sensitive areas corresponding to successful matching results and the sensitive areas corresponding to failed matching results and with confidence levels greater than or equal to a preset value as the multiple sensitive areas corresponding to the non-first frame image.

[0019] In the above-mentioned embodiments of the present application, sensitive areas and high-confidence areas can be selected as the final recognition results, so as to achieve the effect of not missing sensitive areas of the video.

[0020] In some embodiments, the sensitive areas of all frame images of the video to be desensitized are desensitized, including: blurring and coding the sensitive areas of all frame images of the video to be desensitized and then encoding them into a video.

[0021] In the above embodiments of the present application, by coding the sensitive areas, the final video desensitization effect can be accurately achieved.

[0022] In a second aspect, an embodiment of the present application provides a video desensitization device based on continuous frame tracking, comprising:

[0023] An identification module is used to identify the video to be desensitized through a preset video desensitization model to obtain sensitive areas of all frame images of the video to be desensitized, wherein the video desensitization model includes a sensitive area positioning model and a sensitive area tracking model, the sensitive area positioning model is obtained by training a basic positioning model with part of the first training data, the sensitive area tracking model is obtained by training a basic tracking model with part of the first training data and the second training data, the first training data is obtained by obtaining a first video sample containing a sensitive video and sensitive area tracking coordinates, and extracting a picture frame from the first video sample, and the second training data is obtained by obtaining a second video sample containing a normal video and normal area tracking coordinates, and extracting a picture frame from the second video sample;

[0024] The desensitization module is used to perform desensitization processing on sensitive areas of all frame images of the video to be desensitized.

[0025] Optionally, the device further comprises:

[0026] A training module, used for the recognition module to obtain a first video sample containing a sensitive video and tracking coordinates of a sensitive area before identifying the video to be desensitized through a preset video desensitization model and obtaining sensitive areas of all frame images of the video to be desensitized, and extracting a picture frame from the first video sample as first training data;

[0027] Acquire a second video sample containing a common video and common area tracking coordinates, and extract picture frames from the second video sample as second training data;

[0028] Training a basic positioning model using part of the first training data to obtain a sensitive area positioning model;

[0029] The basic tracking model is trained by using partial data of the first training data and the second training data to obtain a sensitive area tracking model.

[0030] Optionally, the training module is specifically used to:

[0031] Extracting a plurality of images from part of the first training data, and taking each of the plurality of images as a training sample;

[0032] Each training sample is input into the basic positioning model to obtain multiple sensitive areas and corresponding categories;

[0033] Compare the multiple sensitive areas and corresponding categories with the preset sensitive areas and categories respectively to obtain comparison results;

[0034] The parameters of the basic positioning model are adjusted by comparing the results to obtain the sensitive area positioning model.

[0035] Optionally, the training module is specifically used to:

[0036] Acquire partial data of the first training data and an image sequence in the second training data;

[0037] The image sequence is input into the basic tracking model to obtain a set of sensitive regions and corresponding position coordinates of the sensitive regions;

[0038] Compare the sensitive area set and the corresponding sensitive area position coordinates with the preset sensitive area and position coordinates respectively to obtain a second comparison result;

[0039] The parameters of the basic tracking model are adjusted according to the second comparison result to obtain a sensitive area tracking model.

[0040] Optionally, the device further comprises:

[0041] The encapsulation module is used for encapsulating the sensitive area positioning model and the sensitive area tracking model to obtain a video desensitization model after the training module trains the basic tracking model through partial data of the first training data and the second training data to obtain the sensitive area tracking model.

[0042] Optionally, the identification module is specifically used for:

[0043] Decoding the video to be desensitized to obtain a set of frame images;

[0044] The first frame image in the frame image set is identified by using the sensitive region positioning model to obtain the sensitive region of the first frame image;

[0045] Positioning and tracking sensitive areas of non-first frame images in the frame image set by using a sensitive area positioning model and a sensitive area tracking model respectively, to obtain a first sensitive area set and a second sensitive area set;

[0046] Matching the frame images corresponding to the first sensitive area set and the second sensitive area set by a matching algorithm to obtain a matching result;

[0047] Multiple sensitive areas corresponding to non-first frame images are selected based on the matching results.

[0048] Optionally, the identification module is specifically used for:

[0049] The sensitive areas corresponding to successful matching results and the sensitive areas corresponding to failed matching results with confidence levels greater than or equal to a preset value are obtained as multiple sensitive areas corresponding to the non-first frame image.

[0050] Optionally, the desensitization module is specifically used for:

[0051] The sensitive areas of all frames of the video to be desensitized are blurred and encoded into a video.

[0052] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method provided in the first aspect are performed.

[0053] In a fourth aspect, an embodiment of the present application provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the method provided in the first aspect are performed.

[0054] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0056] Figure 1 A flowchart of a video desensitization method based on continuous frame tracking provided in an embodiment of the present application;

[0057] Figure 2 A flowchart of a method for identifying sensitive areas of the first frame image and non-first frame images of a video to be desensitized provided in an embodiment of the present application;

[0058] Figure 3 A flowchart of a method for complete video desensitization based on continuous frame tracking provided in an embodiment of the present application;

[0059] Figure 4 A schematic block diagram of a video desensitization device based on continuous frame tracking provided in an embodiment of the present application;

[0060] Figure 5 A structural schematic block diagram of a video desensitization device based on continuous frame tracking provided in an embodiment of the present application. DETAILED DESCRIPTION

[0061] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0062] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0063] First, some terms involved in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.

[0064] The present application is applied to the scenario of video desensitization. The specific scenario is to train a sensitive area positioning model and a sensitive area tracking model, combine the sensitive area positioning model and the sensitive area tracking model to identify the sensitive areas of the video and finally desensitize the video.

[0065] With the widespread application of these technologies, privacy protection issues have become increasingly prominent. Sensitive information in images may be used maliciously, threatening personal privacy and data protection. Therefore, developing effective desensitization technology to automatically detect and blur or delete sensitive information without affecting other information in the image has become an urgent problem to be solved. Current video desensitization technologies mainly include rule-based methods and learning-based methods. Rule-based methods usually rely on predefined features and patterns to identify sensitive information, and the application scenarios are relatively single and fixed, while learning-based methods use machine learning and deep learning technologies to automatically identify and process this information, and the application scenarios are more flexible. For example, decode the video into pictures, and then automatically locate and encode each frame of the picture independently through a deep learning model (such as object detection, instance segmentation, etc.), and then encode the processed picture back into the video. The performance of desensitization is highly dependent on the performance of the positioning model itself. Generally, there are two error situations: multiple detection and missed detection. The former will affect and damage other irrelevant information in the image, and the latter will cause the leakage of sensitive information. Although these methods have made progress to a certain extent, their accuracy, efficiency and versatility are not very good.

[0066] For this purpose, the present application identifies the video to be desensitized by a preset video desensitization model, and obtains the sensitive areas of all the frame images of the video to be desensitized, wherein the video desensitization model includes a sensitive area positioning model and a sensitive area tracking model, the sensitive area positioning model is obtained by training the basic positioning model with part of the first training data, the sensitive area tracking model is obtained by training the basic tracking model with part of the first training data and the second training data, the first training data is obtained by obtaining a first video sample containing sensitive video and sensitive area tracking coordinates, and extracting picture frames from the first video sample, and the second training data is obtained by obtaining a second video sample containing ordinary video and ordinary area tracking coordinates, and extracting picture frames from the second video sample; the sensitive areas of all the frame images of the video to be desensitized are desensitized. On the basis of the sensitive area positioning model, the sensitive area tracking model is combined to obtain a video desensitization model, and the sensitive area positioning model and the sensitive area tracking model are combined to obtain a video desensitization model after training respectively. After the two models are combined, they can be used to deal with occasional multiple inspections and missed inspections in the frame-by-frame processing process, so that the positioning of the sensitive area is more continuous, stable and accurate. Achieve the effect of realizing the video desensitization process accurately and quickly.

[0067] In an embodiment of the present application, the execution entity may be a video desensitization device based on continuous frame tracking in a video desensitization system based on continuous frame tracking. In actual applications, the video desensitization device based on continuous frame tracking may be electronic devices such as terminal devices and servers, which are not limited here.

[0068] Combine the following Figure 1 The video desensitization method based on continuous frame tracking in an embodiment of the present application is described in detail.

[0069] Please see Figure 1 , Figure 1 A flowchart of a video desensitization method based on continuous frame tracking provided in an embodiment of the present application is shown in FIG. Figure 1 The video desensitization method based on continuous frame tracking shown includes:

[0070] Step 110: The video to be desensitized is identified by a preset video desensitization model to obtain sensitive areas of all frame images of the video to be desensitized.

[0071] Among them, the video desensitization model includes a sensitive area positioning model and a sensitive area tracking model. The sensitive area positioning model is obtained by training a basic positioning model with part of the first training data, and the sensitive area tracking model is obtained by training a basic tracking model with part of the first training data and the second training data. The first training data is obtained by obtaining a first video sample containing sensitive video and sensitive area tracking coordinates, and extracting picture frames from the first video sample. The second training data is obtained by obtaining a second video sample containing ordinary video and ordinary area tracking coordinates, and extracting picture frames from the second video sample. The video to be desensitized may be a video containing or not containing sensitive data. The sensitive area represents a data set such as image frames in which sensitive data appears in the video and the corresponding video time.

[0072] In some embodiments of the present application, before the video to be desensitized is identified by a preset video desensitization model to obtain sensitive areas of all frame images of the video to be desensitized, Figure 1 The method shown also includes: obtaining a first video sample containing sensitive video and sensitive area tracking coordinates, and extracting picture frames from the first video sample as first training data; obtaining a second video sample containing ordinary video and ordinary area tracking coordinates, and extracting picture frames from the second video sample as second training data; training a basic positioning model with part of the first training data to obtain a sensitive area positioning model; training a basic tracking model with part of the first training data and the second training data to obtain a sensitive area tracking model.

[0073] In the above process, the present application enables the model to learn to accurately identify video sensitive data by training the sensitive area positioning model with samples containing sensitive videos and training the sensitive area tracking model with samples containing sensitive videos and ordinary videos. The sensitive area tracking coordinates of the sample are the true value of the training data, which generally include the category of the area (such as face, license plate, certificate, etc.), location information (such as rectangular box, rotated rectangular box, polygonal box, segmentation mask, etc.), and tracking ID (used to distinguish whether the areas in different image frames are the same area). The area coordinates of ordinary videos are actually the true value of the training data, which generally include the category of the area (such as cat, dog, car, ship, etc.), location information (such as rectangular box, rotated rectangular box, polygonal box, segmentation mask, etc.), and tracking ID (used to distinguish whether the areas in different image frames belong to the same instance).

[0074] Among them, sensitive videos refer to videos containing sensitive data, which can be confidential data of relevant units or departments. Basic tracking models include but are not limited to single (multiple) target tracking models based on various types and data structures. Training sensitive area positioning models, such as target detection and instance segmentation, the specific model selection is determined according to the definition of the region (such as rectangular box, rotated rectangular box, polygonal box, segmentation mask, etc.). Here, taking the target detection (rectangular box) model as an example, based on the data obtained in step 1, multiple images are extracted from each video, and each image is independently used as a training data (without using the ID information in the data). Train n types of pre-defined sensitive area classes (such as faces, license plates, and certificates). After the training is completed, a new picture is input, and the model will locate these n types of sensitive areas and output their types and rectangular box areas. n is a positive integer greater than or equal to 1. Training sensitive area tracking models, such as single and multi-target tracking models, the specific model selection is determined according to the definition of the region (such as rectangular box, rotated rectangular box, polygonal box, segmentation mask, etc.). Here, we take multi-target tracking (rectangular frame) as an example. Based on the data obtained in steps 1 and 2, we extract the image sequence from each video to train the model. The category tracking ID is used to ensure that the instances or regions in different images in the sequence can correspond to each other during training. After the training is completed, the i-th and i+1-th frames are input. Given the position information of n sensitive regions in the i-th frame, the model will output the corresponding position information of these n regions in the i+1-th frame. n and i are positive integers greater than or equal to 1.

[0075] In some embodiments of the present application, a basic positioning model is trained by partial data of the first training data to obtain a sensitive area positioning model, including: extracting multiple images from partial data of the first training data, and taking each of the multiple images as a training sample; inputting each training sample into the basic positioning model to obtain multiple sensitive areas and corresponding categories; comparing the multiple sensitive areas and corresponding categories with preset sensitive areas and categories to obtain comparison results; adjusting the parameters of the basic positioning model according to the comparison results to obtain the sensitive area positioning model.

[0076] In the above process, the present application trains the model through the sensitive areas and corresponding categories of sensitive videos, so that the model can accurately learn to determine the sensitive categories by identifying the sensitive areas of the video.

[0077] Among them, the category corresponding to the sensitive area can be the category of sensitive data, such as medical information or personal privacy information, etc. The category can also be one category or multiple categories, such as license plates, faces, certificates, etc.

[0078] In some embodiments of the present application, a basic tracking model is trained by partial data of first training data and second training data to obtain a sensitive area tracking model, including: obtaining an image sequence in partial data of the first training data and the second training data; inputting the image sequence into the basic tracking model to obtain a sensitive area set and corresponding sensitive area position coordinates; comparing the sensitive area set and the corresponding sensitive area position coordinates with preset sensitive areas and position coordinates, respectively, to obtain a second comparison result; adjusting the parameters of the basic tracking model according to the second comparison result to obtain the sensitive area tracking model.

[0079] In the above process, the present application trains the model through the sensitive areas of the sensitive video and the corresponding area position coordinates, so that the model can accurately determine the position of the sensitive area of ​​the video and achieve the effect of sensitive area tracking.

[0080] The comparison result includes whether the comparison of the sensitive area and the corresponding position is the same or the match is successful. The data structure of the position coordinates includes but is not limited to a rectangular box, a rotated rectangular box, a quadrilateral box, a polygonal box, a segmentation mask, etc.

[0081] In some embodiments of the present application, after the basic tracking model is trained by using partial data of the first training data and the second training data to obtain the sensitive area tracking model, Figure 1 The method shown also includes: encapsulating the sensitive area positioning model and the sensitive area tracking model to obtain a video desensitization model.

[0082] In the above process, the present application encapsulates the sensitive area positioning model and the sensitive area tracking model so that the final video desensitization model can have the advantages of both the encapsulated sensitive area positioning model and the sensitive area tracking model, thereby achieving the effect of accurate identification of sensitive areas.

[0083] Among them, the trained positioning model and tracking model are encapsulated for easy reasoning deployment, including but not limited to using the original training framework and other reasoning frameworks such as onnx, openvino, tensorrRT, etc.

[0084] In some embodiments of the present application, a video to be desensitized is identified by a preset video desensitization model to obtain sensitive areas of all frame images of the video to be desensitized, including: decoding the video to be desensitized to obtain a frame image set; identifying the first frame image in the frame image set by a sensitive area positioning model to obtain the sensitive area of ​​the first frame image; locating and tracking sensitive areas of non-first frame images in the frame image set by a sensitive area positioning model and a sensitive area tracking model respectively to obtain a first sensitive area set and a second sensitive area set; matching frame images corresponding to the first sensitive area set and the second sensitive area set by a matching algorithm to obtain a matching result; and selecting multiple sensitive areas corresponding to the non-first frame image by the matching result.

[0085] In the above process, the present application encapsulates the sensitive area positioning model and the sensitive area tracking model to identify the sensitive areas of the video and combines them with certain algorithms, so as to finally obtain a more accurate sensitive area identification result.

[0086] Among them, the video to be desensitized is decoded (each frame of the video is essentially an image, but the video frames are highly similar and continuous, and the video format storage will be compressed based on the similarity of the frames. Therefore, when reading the frames in the video, it is necessary to perform the inverse operation of the compression strategy, that is, decoding), obtain each frame of the video, and obtain an image set.

[0087] In one embodiment, the sensitive areas of the first frame image and non-first frame images of the video to be desensitized can be identified by Figure 2 The method shown is implemented.

[0088] For details, please see Figure 2 , Figure 2 A flowchart of a method for identifying sensitive areas of the first frame image and non-first frame images of a video to be desensitized provided in this application includes:

[0089] The sensitive area in the first frame of the video is identified through the sensitive area positioning model.

[0090] The non-first frame of the video (the i-th video frame, i is a positive integer greater than or equal to 2) can obtain sensitive area A and sensitive area B through the sensitive area positioning model and the sensitive area tracking model respectively, and the matching result is obtained through the matching algorithm. The confidence of the area where the matching fails in A is screened according to the threshold. The confidence greater than the preset threshold can be used as the sensitive area of ​​the i-th frame. The confidence attenuation processing is performed on the area where the matching fails in B, and then the confidence is screened according to the threshold. The confidence greater than the preset threshold can be used as the sensitive area of ​​the i-th frame. The area where A and B successfully match in the matching result can be directly used as the sensitive area of ​​the i-th frame, and the preset threshold can be set according to demand.

[0091] The matching algorithm may be the Hungarian algorithm, etc., and the successfully matched area is retained, and the results of the positioning model (region coordinates, category, confidence) are retained in both the positioning and tracking model results (i.e., the positioning model detects the current frame and identifies the sensitive area, and the tracking model tracks the sensitive area of ​​the previous frame and also identifies the area in the current frame)

[0092] Optionally, for the areas in A that failed to match (i.e., there is no area in B that can match A), filter by threshold and retain the high confidence area. (Normal situation: the sensitive area did not exist in the previous frame and suddenly appeared in the current frame, so based on the sensitive information of the previous frame, the tracking model cannot identify the area; abnormal situation: the detection model has multiple inspections, that is, there is no sensitive information in the area, and the detection model gives an error. At this time, the output confidence value is generally small and can be filtered by threshold)

[0093] Optionally, for the areas in B that fail to match (i.e., there is no area in A that can match B), the confidence is attenuated (for example, the confidence of the area of ​​the input i-1 frame can be multiplied by the attenuation coefficient to obtain the confidence of the corresponding i-th frame area), and then filtered according to the threshold to retain the areas with high confidence. (Abnormal situation 1: The positioning model missed detection when detecting the current frame. A certain area with sensitive information in the figure was not identified, but the sensitive area had appeared in the previous frame. The tracking model tracked the sensitive area of ​​the previous frame and identified the area in the current frame. When saving the result, since the tracking model has no category information, the category is taken from the category of the corresponding area in the previous frame, and the confidence is taken from the confidence attenuated result of the corresponding area in the previous frame; Abnormal situation 2: There is no sensitive information in this area, and the cumulative error of the tracking model leads to prediction errors. The confidence of the model is lowered through the confidence attenuation strategy, such as the attenuation coefficient, and the threshold can be filtered). (For the purpose of attenuation processing, the output of the tracking model depends only on the input of the previous frame. When identifying frame by frame, there will be cumulative errors. If the positioning model always misses detection and only relies on the tracking model to identify frame by frame, the actual result may have a large deviation, but the output confidence will be very high).

[0094] also, Figure 2 The specific methods and steps shown can be found in Figure 1 The method shown will not be described in detail here.

[0095] In some embodiments of the present application, multiple sensitive areas corresponding to the non-first frame image are selected based on the matching results, including: obtaining the sensitive areas corresponding to successful matching results and the sensitive areas corresponding to failed matching results and with a confidence level greater than or equal to a preset value as the multiple sensitive areas corresponding to the non-first frame image.

[0096] In the above process, the present application can select sensitive areas and high-confidence areas as the final recognition results, so as to achieve the effect of not missing sensitive areas of the video.

[0097] Among them, the preset value can be set according to requirements.

[0098] Step 120: Desensitize the sensitive areas of all frames of the video to be desensitized.

[0099] In some embodiments of the present application, the sensitive areas of all frame images of the video to be desensitized are desensitized, including: blurring and coding the sensitive areas of all frame images of the video to be desensitized and then encoding them into a video.

[0100] In the above process, the present application can accurately achieve the final video desensitization effect by coding the sensitive areas.

[0101] In the above Figure 1 In the process shown, the present application identifies the video to be desensitized through a preset video desensitization model, and obtains the sensitive areas of all the frame images of the video to be desensitized, wherein the video desensitization model includes a sensitive area positioning model and a sensitive area tracking model, the sensitive area positioning model is obtained by training the basic positioning model with part of the first training data, the sensitive area tracking model is obtained by training the basic tracking model with part of the first training data and the second training data, the first training data is obtained by obtaining a first video sample containing sensitive video and sensitive area tracking coordinates, and extracting picture frames from the first video sample, and the second training data is obtained by obtaining a second video sample containing ordinary video and ordinary area tracking coordinates, and extracting picture frames from the second video sample; the sensitive areas of all the frame images of the video to be desensitized are desensitized. The video desensitization model is obtained by combining the sensitive area tracking model on the basis of the sensitive area positioning model, and the sensitive area positioning model and the sensitive area tracking model are obtained by combining them after training separately to obtain the video desensitization model. After the two models are combined, they can be used to deal with occasional multiple inspections and missed inspections in the frame-by-frame processing process, so that the positioning of the sensitive area is more continuous, stable and accurate. Achieve the effect of realizing the video desensitization process accurately and quickly.

[0102] Combine the following Figure 3 The video desensitization implementation method based on continuous frame tracking in an embodiment of the present application is described in detail.

[0103] Please see Figure 3 , Figure 3 A flowchart of a method for complete video desensitization based on continuous frame tracking provided in an embodiment of the present application is shown in FIG. Figure 3 The video desensitization implementation method based on continuous frame tracking shown includes:

[0104] Step 1: Obtain tracking coordinates of sensitive video samples and sensitive areas.

[0105] Specifically: a first video sample containing a sensitive video and tracking coordinates of a sensitive area is obtained, and a picture frame is extracted from the first video sample as first training data.

[0106] Step 2: Get other video samples and their instance tracking coordinates.

[0107] Specifically: a second video sample containing a common video and common area tracking coordinates is obtained, and picture frames are extracted from the second video sample as second training data.

[0108] Step 3: Train the sensitive area localization model.

[0109] Specifically: a basic positioning model is trained by using part of the first training data to obtain a sensitive area positioning model.

[0110] Step 4: Train the sensitive region tracking model.

[0111] Specifically: a basic tracking model is trained using partial data of the first training data and the second training data to obtain a sensitive area tracking model.

[0112] Step 5: Model packaging.

[0113] Specifically: the sensitive area positioning model and the sensitive area tracking model are encapsulated to obtain a video desensitization model.

[0114] Step 6: Video decoding of original video.

[0115] Specifically: the video to be desensitized is decoded to obtain a set of frame images.

[0116] Step 7: Desensitize the image frame by frame.

[0117] Specifically: the first frame image in the frame image set is identified through the sensitive area positioning model to obtain the sensitive area of ​​the first frame image; the sensitive area positioning model and the sensitive area tracking model are used to locate and track the sensitive areas of the non-first frame images in the frame image set to obtain the first sensitive area set and the second sensitive area set; the frame images corresponding to the first sensitive area set and the second sensitive area set are matched through the matching algorithm to obtain the matching results; and multiple sensitive areas corresponding to the non-first frame images are selected based on the matching results.

[0118] Step 8: Encode the video to obtain the desensitized video.

[0119] Specifically: desensitizing is performed on sensitive areas of all frame images of the video to be desensitized.

[0120] also, Figure 3The specific methods and steps shown can be found in Figure 1 The method shown will not be described in detail here.

[0121] Previous article Figure 1 Describes a video desensitization method based on continuous frame tracking. Figure 4-Figure 5 A video desensitization apparatus based on sequential frame tracking is described.

[0122] Please refer to Figure 4 , is a schematic block diagram of a video desensitization device 400 based on continuous frame tracking provided in an embodiment of the present application, and the device 400 may be a module, program segment or code on an electronic device. Figure 1 The method embodiment corresponds to and can be executed Figure 1 The various steps involved in the method embodiment and the specific functions of the device 400 can be found in the description below. To avoid repetition, the detailed description is appropriately omitted here.

[0123] Optionally, the device 400 includes:

[0124] The identification module 410 is used to identify the video to be desensitized by using a preset video desensitization model to obtain sensitive areas of all frame images of the video to be desensitized, wherein the video desensitization model includes a sensitive area positioning model and a sensitive area tracking model, the sensitive area positioning model is obtained by training a basic positioning model with part of the first training data, the sensitive area tracking model is obtained by training a basic tracking model with part of the first training data and the second training data, the first training data is obtained by obtaining a first video sample containing sensitive video and sensitive area tracking coordinates, and extracting picture frames from the first video sample, and the second training data is obtained by obtaining a second video sample containing ordinary video and ordinary area tracking coordinates, and extracting picture frames from the second video sample;

[0125] The desensitization module 420 is used to perform desensitization processing on sensitive areas of all frame images of the video to be desensitized.

[0126] Optionally, the device further comprises:

[0127] A training module is used for the recognition module to obtain a first video sample containing sensitive video and sensitive area tracking coordinates before obtaining sensitive areas of all frame images of the video to be desensitized through a preset video desensitization model, and extract picture frames from the first video sample as first training data; obtain a second video sample containing ordinary video and ordinary area tracking coordinates, and extract picture frames from the second video sample as second training data; train a basic positioning model through part of the first training data to obtain a sensitive area positioning model; train a basic tracking model through part of the first training data and the second training data to obtain a sensitive area tracking model.

[0128] Optionally, the training module is specifically used to:

[0129] Extract multiple images from part of the first training data, and use each of the multiple images as a training sample; input each training sample into a basic positioning model to obtain multiple sensitive areas and corresponding categories; compare the multiple sensitive areas and corresponding categories with preset sensitive areas and categories to obtain comparison results; adjust the parameters of the basic positioning model according to the comparison results to obtain a sensitive area positioning model.

[0130] Optionally, the training module is specifically used to:

[0131] Obtain partial data of the first training data and an image sequence in the second training data; input the image sequence into a basic tracking model to obtain a sensitive area set and corresponding sensitive area position coordinates; compare the sensitive area set and the corresponding sensitive area position coordinates with the preset sensitive areas and position coordinates, respectively, to obtain a second comparison result; adjust the parameters of the basic tracking model according to the second comparison result to obtain a sensitive area tracking model.

[0132] Optionally, the device further comprises:

[0133] The encapsulation module is used for encapsulating the sensitive area positioning model and the sensitive area tracking model to obtain a video desensitization model after the training module trains the basic tracking model through part of the first training data and the second training data to obtain the sensitive area tracking model.

[0134] Optionally, the identification module 410 is specifically used for:

[0135] The video to be desensitized is decoded to obtain a frame image set; the first frame image in the frame image set is identified by the sensitive area positioning model to obtain the sensitive area of ​​the first frame image; the sensitive areas of non-first frame images in the frame image set are located and tracked by the sensitive area positioning model and the sensitive area tracking model respectively to obtain a first sensitive area set and a second sensitive area set; the frame images corresponding to the first sensitive area set and the second sensitive area set are matched by a matching algorithm to obtain a matching result; and multiple sensitive areas corresponding to the non-first frame image are selected according to the matching result.

[0136] Optionally, the identification module 410 is specifically used for:

[0137] The sensitive areas corresponding to successful matching results and the sensitive areas corresponding to failed matching results with confidence levels greater than or equal to a preset value are obtained as multiple sensitive areas corresponding to the non-first frame image.

[0138] Optionally, the desensitization module 420 is specifically used for:

[0139] The sensitive areas of all frames of the video to be desensitized are blurred and encoded into a video.

[0140] Please refer to Figure 5 : is a schematic block diagram of a video desensitization device based on continuous frame tracking provided in an embodiment of the present application. The device may include a memory 510 and a processor 520. Optionally, the device may also include: a communication interface 530 and a communication bus 540. The device is similar to the above Figure 1 The method embodiment corresponds to and can be executed Figure 1 The various steps involved in the method embodiment and the specific functions of the device can be found in the description below.

[0141] Specifically, the memory 510 is used to store computer-readable instructions.

[0142] Processor 520, configured to process readable instructions stored in the memory, capable of executing Figure 1 The steps in the method.

[0143] The communication interface 530 is used for signaling or data communication with other node devices, for example, for communication with a server or a terminal, or for communication with other device nodes, but the embodiments of the present application are not limited thereto.

[0144] The communication bus 540 is used to realize direct connection and communication among the above components.

[0145] The communication interface 530 of the device in the embodiment of the present application is used to communicate signals or data with other node devices. The memory 510 can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 510 can also be at least one storage device located away from the aforementioned processor. The memory 510 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 520, the electronic device executes the aforementioned Figure 1 The method process shown. The processor 520 can be used on the device 400 and used to perform the functions in the present application. Exemplarily, the above-mentioned processor 520 can be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and the embodiments of the present application are not limited thereto.

[0146] The embodiment of the present application also provides a readable storage medium, when the computer program is executed by a processor, Figure 1 The method process in the method embodiment shown is executed by the electronic device.

[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method, and will not be described in detail here.

[0148] In summary, the embodiments of the present application provide a video desensitization method, device, electronic device and readable storage medium based on continuous frame tracking, the method comprising: identifying the video to be desensitized by a preset video desensitization model, and obtaining the sensitive areas of all frame images of the video to be desensitized, wherein the video desensitization model comprises a sensitive area positioning model and a sensitive area tracking model, the sensitive area positioning model is obtained by training a basic positioning model with part of the first training data, the sensitive area tracking model is obtained by training a basic tracking model with part of the first training data and the second training data, the first training data is obtained by obtaining a first video sample containing sensitive video and sensitive area tracking coordinates, and extracting picture frames from the first video sample, the second training data is obtained by obtaining a second video sample containing ordinary video and ordinary area tracking coordinates, and extracting picture frames from the second video sample; desensitizing the sensitive areas of all frame images of the video to be desensitized. This method can achieve the effect of accurately and quickly realizing the video desensitization process.

[0149] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0150] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0151] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0152] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0153] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0154] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A video desensitization method based on continuous frame tracking, characterized in that: include: The video to be desensitized is identified by a preset video desensitization model to obtain sensitive areas of all frame images of the video to be desensitized, wherein the video desensitization model includes a sensitive area positioning model and a sensitive area tracking model, the sensitive area positioning model is obtained by training a basic positioning model with part of the first training data, the sensitive area tracking model is obtained by training a basic tracking model with part of the first training data and the second training data, the first training data is obtained by obtaining a first video sample containing a sensitive video and sensitive area tracking coordinates, and extracting picture frames from the first video sample, and the second training data is obtained by obtaining a second video sample containing a normal video and normal area tracking coordinates, and extracting picture frames from the second video sample; Desensitization processing is performed on the sensitive areas of all frame images of the video to be desensitized.

2. The method according to claim 1, characterized in that Before identifying the video to be desensitized by using a preset video desensitization model to obtain sensitive areas of all frame images of the video to be desensitized, the method further includes: Acquire the first video sample containing the sensitive video and the tracking coordinates of the sensitive area, and extract picture frames from the first video sample as the first training data; Acquire the second video sample containing a common video and common area tracking coordinates, and extract picture frames from the second video sample as the second training data; Training the basic positioning model by using part of the first training data to obtain the sensitive area positioning model; The basic tracking model is trained by using partial data of the first training data and the second training data to obtain the sensitive area tracking model.

3. The method according to claim 2, characterized in that The step of training the basic positioning model by using part of the first training data to obtain the sensitive area positioning model includes: Extracting a plurality of images from part of the first training data, and taking each of the plurality of images as a training sample; Input each training sample into the basic positioning model to obtain multiple sensitive areas and corresponding categories; Comparing the multiple sensitive areas and corresponding categories with the preset sensitive areas and categories respectively to obtain a comparison result; The parameters of the basic positioning model are adjusted according to the comparison result to obtain the sensitive area positioning model.

4. The method according to claim 2, characterized in that: The step of training the basic tracking model by using part of the first training data and the second training data to obtain the sensitive area tracking model includes: Acquire partial data of the first training data and an image sequence in the second training data; Inputting the image sequence into the basic tracking model to obtain a sensitive area set and corresponding sensitive area position coordinates; Comparing the sensitive area set and the corresponding sensitive area position coordinates with the preset sensitive area and position coordinates respectively to obtain a second comparison result; The parameters of the basic tracking model are adjusted according to the second comparison result to obtain the sensitive area tracking model.

5. The method according to claim 2, characterized in that: After the basic tracking model is trained by using part of the first training data and the second training data to obtain the sensitive area tracking model, the method further includes: The sensitive area positioning model and the sensitive area tracking model are encapsulated to obtain the video desensitization model.

6. The method according to any one of claims 1 to 5, characterized in that: The video to be desensitized is identified by a preset video desensitization model to obtain sensitive areas of all frame images of the video to be desensitized, including: Decoding the video to be desensitized to obtain a frame image set; Identify the first frame image in the frame image set by using the sensitive area positioning model to obtain the sensitive area of ​​the first frame image; Positioning and tracking sensitive areas of non-first frame images in the frame image set by using the sensitive area positioning model and the sensitive area tracking model respectively, to obtain a first sensitive area set and a second sensitive area set; Matching the frame images corresponding to the first sensitive area set and the second sensitive area set by a matching algorithm to obtain a matching result; A plurality of sensitive areas corresponding to the non-first frame image are selected based on the matching results.

7. The method according to claim 6, characterized in that The selecting a plurality of sensitive areas corresponding to the non-first frame image through the matching result includes: The sensitive areas corresponding to successful matching results and the sensitive areas corresponding to failed matching results with a confidence level greater than or equal to a preset value are obtained as multiple sensitive areas corresponding to the non-first frame image.

8. The method according to any one of claims 1 to 5, characterized in that: The desensitizing process is performed on the sensitive areas of all the frame images of the video to be desensitized, including: The sensitive areas of all frame images of the video to be desensitized are blurred and encoded into a video.

9. A video desensitization device based on continuous frame tracking, characterized in that: include: An identification module is used to identify the video to be desensitized through a preset video desensitization model to obtain sensitive areas of all frame images of the video to be desensitized, wherein the video desensitization model includes a sensitive area positioning model and a sensitive area tracking model, the sensitive area positioning model is obtained by training a basic positioning model with part of the first training data, the sensitive area tracking model is obtained by training a basic tracking model with part of the first training data and the second training data, the first training data is obtained by obtaining a first video sample containing sensitive video and sensitive area tracking coordinates, and extracting picture frames from the first video sample, and the second training data is obtained by obtaining a second video sample containing ordinary video and ordinary area tracking coordinates, and extracting picture frames from the second video sample; The desensitization module is used to perform desensitization processing on the sensitive areas of all frame images of the video to be desensitized.

10. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the method according to any one of claims 1 to 8 are executed.

11. A computer-readable storage medium, characterized in that: include: A computer program, when the computer program is run on a computer, causes the computer to execute the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Dynamic desensitization processing method and system for sensitive information in video stream

    CN121262428A

  • Method and system for dynamic desensitization of sensitive information in video stream

    CN121262428B