CN117994687A - Picture desensitization processing method, device, system and storage medium - Google Patents

Picture desensitization processing method, device, system and storage medium Download PDF

Info

Publication number
CN117994687A
CN117994687A CN202211316171.6A CN202211316171A CN117994687A CN 117994687 A CN117994687 A CN 117994687A CN 202211316171 A CN202211316171 A CN 202211316171A CN 117994687 A CN117994687 A CN 117994687A
Authority
CN
China
Prior art keywords
picture
desensitized
model
recognition result
training
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211316171.6A
Other languages
Chinese (zh)
Inventor
王永焱
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Rockwell Technology Co Ltd
Original Assignee
Beijing Rockwell Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Rockwell Technology Co Ltd filed Critical Beijing Rockwell Technology Co Ltd
Priority to CN202211316171.6A priority Critical patent/CN117994687A/en
Publication of CN117994687A publication Critical patent/CN117994687A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The application discloses a picture desensitization processing method, device and system and a storage medium, which are used for improving the accuracy of a target detection result and further improving the accuracy of picture desensitization. The method comprises the following steps: identifying the preprocessed picture to be desensitized through a pre-trained model; obtaining recognition results of different size ratios output by the pre-training model through a plurality of output layers, wherein the recognition results are detection frames for marking positions to be desensitized in pictures; and selecting the identification result with highest confidence from the plurality of identification results, and performing desensitization treatment on the picture to be desensitized. The scheme provided by the application is adopted: the method can output a plurality of recognition results with different size ratios, and further screen the recognition result with highest confidence from the recognition results with different size ratios, so that the accuracy of the target detection result is improved on the basis of the existing desensitization scheme, and the accuracy of picture desensitization is further improved.

Description

Picture desensitization processing method, device, system and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method, an apparatus, a system, and a storage medium for image desensitization processing.
Background
According to related laws and regulations of national video of automobile and machine, before uploading automobile transmission videos and images to an enterprise remote information service platform, automobile enterprises need to desensitize data such as human faces, license plate data and the like in the videos and the images, that is, the privacy information related to the transmission data needs to be removed. Target detection refers to finding out all interested targets (such as faces, license plate data and the like) in an image, and determining the category and the position of the targets is one of the core problems of picture desensitization processing.
In the prior art, for the same picture to be desensitized, only one identification result is output, and because the identification of a model is a prediction process based on given data, the model has a certain false identification probability, so that the false identification condition can be unavoidable, and further the picture cannot be accurately desensitized.
Disclosure of Invention
The application provides a picture desensitization processing method, device and system and a storage medium, which are used for improving the accuracy of a target detection result and further improving the accuracy of picture desensitization.
The application provides a picture desensitization processing method, which comprises the following steps:
Identifying the preprocessed picture to be desensitized through a pre-trained model;
obtaining recognition results of different size ratios output by the pre-training model through a plurality of output layers, wherein the recognition results are detection frames for marking positions to be desensitized in pictures;
And selecting the identification result with highest confidence from the plurality of identification results, and performing desensitization treatment on the picture to be desensitized.
The application has the beneficial effects that: the pre-trained model comprises a plurality of output layers, the different output layers can output recognition results with different size ratios, the recognition result with the highest confidence coefficient can be selected from the plurality of recognition results to desensitize the picture, and compared with the technical scheme of only outputting one recognition result, the method can output the plurality of recognition results with different size ratios, and the recognition result with the highest confidence coefficient can be further screened from the plurality of recognition results with different size ratios, so that the accuracy of the target detection result is improved on the basis of the existing desensitization scheme, and the accuracy of picture desensitization is improved.
In one embodiment, the identifying the preprocessed picture to be desensitized by the pre-trained model includes:
After detecting that the picture to be desensitized enters an input layer, carrying out convolution operation for a plurality of times corresponding to the picture to be desensitized;
Passing the picture to be desensitized which is subjected to multiple convolution operations through a residual error network block;
and outputting the identification results of the picture to be desensitized, which are subjected to multiple convolution operations and pass through the residual error network block, through different output layers of the pre-training model, wherein the number of convolution operations and the number of times of passing through the residual error network block of the identification results output by different output layers are different.
In one embodiment, the training process of the pre-trained model is as follows:
Acquiring training data, wherein the training data is a picture to be desensitized, and the picture to be desensitized is marked on a position to be desensitized;
Randomly selecting a part from the picture to be desensitized as a training set;
Inputting a training set into a pre-built model to train the pre-built model so as to obtain a model meeting the condition;
inputting the rest part except the training set in the picture to be desensitized as a test set into a model meeting the conditions to obtain a recognition result corresponding to the test set;
and when the accuracy of the recognition result of the model meeting the conditions to the test set reaches a specific accuracy, determining that the model meeting the conditions is trained.
In one embodiment, the inputting the training set into a pre-built model to train the pre-built model to obtain a model meeting the condition includes:
After the training set is input into a pre-built model, monitoring the function value change condition of a loss function of the pre-built model in the training process according to the training set;
Saving a model with a loss function value smaller than a preset value;
When the training times of training according to the training set reach a specific time, selecting a model with the minimum function value of the loss function from models with the function values smaller than a preset value as a model meeting the condition.
In one embodiment, the recognition result output by the pre-trained model includes a confidence level of the recognition result, and the selecting the recognition result with the highest confidence level from the plurality of recognition results to desensitize the picture to be desensitized includes:
Selecting the recognition result with the highest confidence from a plurality of recognition results, and performing de-duplication processing on the plurality of recognition results;
And after the duplicate removal processing is finished, desensitizing the picture to be desensitized according to the residual recognition result.
In one embodiment, the recognition results output by the pre-trained model include classification of the recognition results, and the selecting the recognition result with the highest confidence from the plurality of recognition results to perform the de-duplication processing on the plurality of recognition results includes:
Acquiring a recognition result with highest confidence from the recognition results classified in the same way;
Comparing the recognition result with the highest confidence with other recognition results under the same classification;
Deleting the recognition result with the highest confidence coefficient of which the coincidence degree reaches the preset coincidence degree, and reserving the recognition result with the highest confidence coefficient of which the coincidence degree does not reach the preset coincidence degree;
And selecting the recognition result with the highest confidence from the reserved recognition results, and continuing the deduplication processing until no recognition result can be continuously deleted.
In one embodiment, the preprocessing includes processing of at least one of:
removing a background area of the picture to be desensitized, carrying out contrast enhancement on the picture to be desensitized, and carrying out data standardization processing on the picture to be desensitized.
The application also provides a picture desensitization processing device, which comprises:
The identification module is used for identifying the preprocessed picture to be desensitized through the pre-trained model;
The acquisition module is used for acquiring a plurality of recognition results with different size ratios output by the pre-training model through a plurality of output layers, wherein the recognition results are detection frames marked with positions to be desensitized in the pictures;
And the desensitization module is used for selecting the identification result with the highest confidence from the plurality of identification results and carrying out desensitization treatment on the picture to be desensitized.
In one embodiment, the identification module comprises:
the convolution sub-module is used for carrying out convolution operation on the picture to be desensitized correspondingly after detecting that the picture to be desensitized enters the input layer;
The residual sub-module is used for enabling the picture to be desensitized which is subjected to multiple convolution operation to pass through a residual network block;
And the output sub-module is used for outputting the recognition results of the picture to be desensitized, which are subjected to multiple convolution operations and pass through the residual error network block, through different output layers of the pre-training model, wherein the number of convolution operations and the number of times of passing through the residual error network block of the recognition results output by the different output layers are different.
In one embodiment, the training process of the pre-trained model in the picture desensitizing processing apparatus is as follows:
Acquiring training data, wherein the training data is a picture to be desensitized, and the picture to be desensitized is marked on a position to be desensitized;
Randomly selecting a part from the picture to be desensitized as a training set;
Inputting a training set into a pre-built model to train the pre-built model so as to obtain a model meeting the condition;
inputting the rest part except the training set in the picture to be desensitized as a test set into a model meeting the conditions to obtain a recognition result corresponding to the test set;
and when the accuracy of the recognition result of the model meeting the conditions to the test set reaches a specific accuracy, determining that the model meeting the conditions is trained.
In one embodiment, the inputting the training set into a pre-built model to train the pre-built model to obtain a model meeting the condition includes:
After the training set is input into a pre-built model, monitoring the function value change condition of a loss function of the pre-built model in the training process according to the training set;
Saving a model with a loss function value smaller than a preset value;
When the training times of training according to the training set reach a specific time, selecting a model with the minimum function value of the loss function from models with the function values smaller than a preset value as a model meeting the condition.
In one embodiment, the recognition results output by the pre-trained model include confidence in the recognition results, and the desensitization module includes:
The de-duplication sub-module is used for selecting the recognition result with the highest confidence from the multiple recognition results and de-duplicating the multiple recognition results;
And the desensitization sub-module is used for carrying out desensitization treatment on the picture to be desensitized according to the residual identification result after the execution of the duplicate removal treatment is finished.
In an embodiment, the recognition result output by the pre-trained model comprises a classification of the recognition result, and the deduplication sub-module is further configured to:
Acquiring a recognition result with highest confidence from the recognition results classified in the same way;
Comparing the recognition result with the highest confidence with other recognition results under the same classification;
Deleting the recognition result with the highest confidence coefficient of which the coincidence degree reaches the preset coincidence degree, and reserving the recognition result with the highest confidence coefficient of which the coincidence degree does not reach the preset coincidence degree;
And selecting the recognition result with the highest confidence from the reserved recognition results, and continuing the deduplication processing until no recognition result can be continuously deleted.
In one embodiment, the preprocessing includes processing of at least one of:
removing a background area of the picture to be desensitized, carrying out contrast enhancement on the picture to be desensitized, and carrying out data standardization processing on the picture to be desensitized.
The application also provides a picture desensitization processing system, which comprises:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to implement the picture desensitization processing method described in any one of the above embodiments.
The application also provides a computer readable storage medium, when instructions in the storage medium are executed by a processor corresponding to the picture desensitizing processing system, the picture desensitizing processing system can implement the picture desensitizing processing method described in any one of the embodiments.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
The technical scheme of the application is further described in detail through the drawings and the embodiments.
Drawings
The accompanying drawings are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate the application and together with the embodiments of the application, serve to explain the application. In the drawings:
FIG. 1 is a flowchart of a picture desensitizing method according to an embodiment of the present application;
FIG. 2 is a flowchart of a picture desensitizing method according to another embodiment of the present application;
FIG. 3 is a flowchart of a picture desensitizing method according to another embodiment of the present application;
FIG. 4 is a schematic diagram of a pre-trained model according to an embodiment of the present application;
FIG. 5 is a flowchart of a picture desensitizing method according to a general embodiment of the present application;
FIG. 6 is a flow chart of a model training process in accordance with one embodiment of the present application;
FIG. 7 is a block diagram of a picture desensitizing apparatus according to an embodiment of the present application;
fig. 8 is a schematic hardware structure of a picture desensitizing processing system according to an embodiment of the application.
Detailed Description
The preferred embodiments of the present application will be described below with reference to the accompanying drawings, it being understood that the preferred embodiments described herein are for illustration and explanation of the present application only, and are not intended to limit the present application.
Fig. 1 is a flowchart of a picture desensitizing method according to an embodiment of the present application, where the method may be used to improve accuracy of a target detection result, and further improve accuracy of picture desensitization, as shown in fig. 1, and the method may be implemented as steps S101 to S103 below:
in step S101, the preprocessed picture to be desensitized is identified by a pre-trained model;
FIG. 4 is a schematic structural diagram of a pre-trained model according to the present application, as shown in FIG. 4, in which after detecting that a picture to be desensitized enters an input layer, a plurality of convolution operations are performed corresponding to the picture to be desensitized; before the convolution operation is performed, the image with 640 x 640 size is first divided into 4 pictures with 320 x 320 size by the data enhancement layer, and in this way, the data received by the input layer can be divided into four independent feature layers, which is equivalent to expanding the input channel by four times. The four independent feature layer pictures are sent to the convolution layer to perform convolution operation, and as can be seen from fig. 4, after passing through the two convolution layers, 128 layers of 160×160 feature data are output. The feature data is then fed into a residual network block, and it is understood that as the number of convolution layers increases, some features disappear with convolution operations, and this phenomenon is called gradient disappearance in the field of neural network training, and gradient disappearance is a very fatal problem in conventional neural network training, which is essentially due to the multiplication characteristic of the chain rule. For example, feature data with a feature value less than 1 will need to multiply by a gradient less than 1 each time an activation function is passed, and the probability of each activation layer input being around 0 during optimization will be very low each time a gradient value less than 1 is multiplied. That is, as the number of layers of the convolution layer increases, the attenuation of the gradient becomes very large and rapidly approaches 0, which is a phenomenon that the gradient disappears. The gradient explosion and the gradient disappearance are opposite, when the gradient is conducted backwards, the gradient larger than 1 is multiplied by each activation function, the gradient gradually increases with the deepening of the layer number of the convolution layers, and the gradient explosion is the phenomenon of gradient explosion. The disappearance of the gradient may lead to the disappearance of some features having reference value, resulting in a decrease in the calculation accuracy. In order to avoid the situation that the model system is unstable due to gradient explosion, too many convolution layers are not arranged in the traditional neural network training field, in the application, a residual network block is arranged every time a certain number of convolution layers are passed, and jump connection is used for the residual network block, so that the gradient disappearance problem caused by depth increase in the deep neural network can be effectively relieved, and the gradient explosion problem can be effectively relieved.
In step S102, acquiring a plurality of recognition results of different size ratios output by the pre-training model through a plurality of output layers, where the recognition results are detection frames marked with positions to be desensitized in a picture;
Specifically, in the pre-training model shown in fig. 4, there are three output layers (i.e., network output layers in fig. 4), after three convolution operations, feature data of 256 layers 80×80 are obtained, a recognition result of a first output layer (the uppermost output layer) is obtained according to the feature data of 256 layers 80×80, similarly, after feature data of 512 layers 40×40 are obtained through 4 convolution operations, a recognition result of a second output layer (the middle output layer) is obtained according to the feature data of 512 layers 40×40, after feature data of 1024 layers 20×20 is obtained through the 5 th convolution operation, and then a recognition result of a third output layer (the lowermost output layer) is obtained according to the feature data of 1024 layers 20×20.
In step S103, a picture to be desensitized is desensitized by selecting a recognition result with highest confidence from the plurality of recognition results;
Specifically, the nature of the recognition of the model is predictive, and the recognition result of the application is the location where desensitization is required; for example, the positions to be desensitized are faces and license plates, and confidence degrees can be calculated and output while the model is in progress. For example, the model considers that the prediction accuracy of a certain recognition result is 99%, that is, the probability of 99% in a detection frame marked by the model is that the target to be desensitized exists, and the confidence coefficient is marked as 0.99 after the recognition result.
The calculation process of the confidence coefficient of the model is to accumulate the execution coefficient based on the recognition result of each rule, and a final confidence coefficient can be obtained after traversing all the rules; specifically, for example, the license plate is generally rectangular in shape, blue or green in base color, and the license plate is composed of Chinese characters, letters and numbers. Secondly, the license plate number has a specific naming rule, the leftmost side of the license plate number (namely the first digit of the license plate number) is usually a Chinese character, the second digit is a letter, the third digit to the last digit are license plate number parts of the license plate number, the number parts can only contain numbers, or can contain a combination of the numbers and the letters, at most, two English letters can appear in the number parts, and English letters I and O cannot appear in the number parts.
Therefore, when the model identifies the license plate, a scoring system can be established based on the rule of the license plate, and the problem of image shooting definition is considered, so that the difficulty in identifying Chinese characters, letters and numbers on the license plate is far higher than the difficulty in identifying the color and the shape of the license plate, and therefore, the color and the shape of the license plate can be identified in many cases, but the license plate number cannot be identified, and therefore, the confidence of the license plate area can be up to 70% if only a blue or green rectangle area is identified, that is, the confidence of the license plate area can be up to 0.7 if the blue or green rectangle area corresponds to the detection frame.
For example, when the model identifies the license plate, the confidence coefficient of the blue rectangular area is 0.7, and if on this basis, the model identifies that the leftmost side of the area is a Chinese character, the confidence coefficient of 0.05 is accumulated on the basis of 0.7, that is, the confidence coefficient of the blue rectangular area for the license plate reaches 0.75, and if after traversing all rules, the blue rectangular area does not hit other rules, the final confidence coefficient is 0.75.
For example, when the model identifies the license plate, the confidence coefficient of the blue rectangular area is 0.7, if on the basis, the model identifies that the leftmost side of the area is the Chinese character, the confidence coefficient of 0.05 is accumulated on the basis of 0.7, that is, the confidence coefficient of the blue rectangular area for the license plate reaches 0.75, and if the confidence coefficient of the area adjacent to the Chinese character is identified, the confidence coefficient of 0.05 is accumulated on the basis of 0.75, that is, the confidence coefficient of the blue rectangular area for the license plate reaches 0.8, and so on.
It should be noted that, because the nature of the model for identifying the license plate is prediction, when the model identifies the license plate, all rules are hit, that is, a rectangular area is identified, the leftmost side of the rectangular area is a Chinese character, the second position is a letter, the third position to the last position are combinations of numbers and letters, english letters I and O do not appear from the third position to the last position, only one English letter from the third position to the last position can not give a confidence level of 1, but a confidence level of 0.01 needs to be subtracted, and the execution level is set to 0.99.
The desensitization processing generally refers to coding operation in a detection frame of a position to be desensitized marked in the identification result so as to make a license plate or a face of the position to be desensitized invisible, thereby protecting personal privacy of a vehicle owner.
In the target detection algorithm, the detection is two-stage or single-stage according to the process that the target frame is changed from nothing to nothing. Double-stage detection: the first stage: focusing on finding out the position of the target object to obtain a suggestion frame, and ensuring enough accuracy and recall rate; and a second stage: focusing on classifying the suggestion boxes, finding more accurate positions. Dual-stage detection is generally more accurate but slower. Single-stage detection: the final detection result can be directly obtained through single detection without obtaining a suggested frame stage and directly generating the class probability and the position coordinate value of the object, and the speed is faster than that of double-stage detection. According to the application, classification, bbox size and confidence data are output at one time in a single-stage detection mode, so that the calculation speed is improved.
The application has the beneficial effects that: the pre-trained model comprises a plurality of output layers, the different output layers can output recognition results with different size ratios, the recognition result with the highest confidence coefficient can be selected from the plurality of recognition results to desensitize the picture, and compared with the technical scheme of only outputting one recognition result, the method can output the plurality of recognition results with different size ratios, and the recognition result with the highest confidence coefficient can be further screened from the plurality of recognition results with different size ratios, so that the accuracy of the target detection result is improved on the basis of the existing desensitization scheme, and the accuracy of picture desensitization is improved.
In one embodiment, as shown in FIG. 2, the above step S101 may be implemented as the following steps S201-S203:
in step S201, after detecting that the picture to be desensitized enters the input layer, performing multiple convolution operations corresponding to the picture to be desensitized;
in step S202, the picture to be desensitized, which is subjected to convolution operation for multiple times, passes through a residual network block;
In step S203, the recognition results of the to-be-desensitized picture subjected to multiple convolution operations and the residual network block are output through different output layers of the pre-training model, where the number of convolution operations and the number of times of passing through the residual network block of the recognition results output by different output layers are different.
Specifically, as shown in fig. 4, in the pre-trained model of the present application, after detecting that a picture to be desensitized enters an input layer, performing multiple convolution operations corresponding to the picture to be desensitized; a residual network block is arranged every time a certain number of convolution layers are passed, so that the problems of gradient disappearance and gradient explosion of feature data corresponding to a picture to be desensitized in a backward transmission process are solved. In the pre-trained model shown in fig. 4, there are three output layers (i.e., network output layers in fig. 4), after three convolution operations, 256 layers of 80×80 feature data are obtained, a recognition result of a first layer of output layers (the uppermost output layer) is obtained according to the 256 layers of 80×80 feature data, similarly, after 4 convolution operations are performed to obtain 512 layers of 40×40 feature data, a recognition result of a second layer of output layers (the middle output layer) is obtained according to the 512 layers of 40×40 feature data, after 1024 layers of 20×20 feature data are obtained through the 5 th convolution operation, a recognition result of a third layer of output layers (the lowermost output layer) is obtained according to the 1024 layers of 20×20 feature data.
The beneficial effects of this embodiment lie in: after the convolution operation is carried out for a plurality of times on the picture to be desensitized, the picture to be desensitized which is carried out with the convolution operation for a plurality of times passes through a residual error network block, so that the gradient disappearance problem and the gradient explosion problem of the characteristic data corresponding to the desensitized picture in the backward transmission process can be relieved, and the final recognition result is more accurate.
In one embodiment, the training process of the pre-trained model is implemented as the following steps A1-A5:
in the step A1, training data is obtained, wherein the training data is a picture to be desensitized, which is marked on a position to be desensitized;
In the step A2, randomly selecting a part from the picture to be desensitized as a training set;
In the step A3, inputting a training set into a pre-built model to train the pre-built model so as to obtain a model meeting the condition;
In step A4, the rest part except the training set in the picture to be desensitized is used as a test set to be input into a model meeting the condition so as to obtain a recognition result corresponding to the test set;
In step A5, when the accuracy of the recognition result of the model meeting the condition to the test set reaches a specific accuracy, determining that the model meeting the condition is trained.
In this embodiment, the training data may be a plurality of pictures obtained by marking the license plate or the face in advance by manual or other recognition methods, and then the training data is data including a classification identifier, for example, the classification identifier of the picture including the license plate is the license plate, and the classification identifier of the picture including the face is the face. For example, the training data is ten thousand pictures after the license plate or the face is marked, 7000 pictures are randomly selected as training sets, 3000 pictures are taken as test sets, and the model built in advance is trained through the training sets to obtain the model meeting the conditions. And then testing the model meeting the conditions through the test set, and determining that the model meeting the conditions is trained when the accuracy of the identification result of the test set by the model meeting the conditions reaches a specific accuracy.
The beneficial effects of this embodiment lie in: after the pre-built model is trained through the training set, the rest parts except the training set in the to-be-desensitized picture are used as the test set to be input into the model meeting the conditions to obtain the identification result corresponding to the test set, so that the test set and the training set have no repeated parts, and therefore, the test set is the to-be-desensitized picture which is not identified by the model, and whether the model can accurately identify other pictures except the training set can be better verified by separating the training set and the test set, and the generalization capability of the model is verified. In one embodiment, the above step A3 may be implemented as the following steps B1-B3:
In step B1, after a training set is input into a pre-built model, monitoring the function value change condition of a loss function of the pre-built model in the training process according to the training set;
In the step B2, a model with the function value of the loss function smaller than a preset value is stored;
In step B3, when the training times of training according to the training set reach a specific number of times, selecting a model with the smallest function value of the loss function from among the models with the function values of all the loss functions smaller than the preset value as a model meeting the condition.
For example, assuming that the number of training times by the training set is preset, for example, the total training times are set to 7000 times, in the training process, the change condition of the function value of the loss function in the training process of the pre-built model according to the training set is monitored, after the training is completed 7000 times, the model that the function value of the 5 loss functions is smaller than the preset value is obtained, the 5 models are stored, then which of the 5 models has the smallest function value is compared, and the model with the smallest function value of the loss function is selected as the model meeting the condition for subsequent testing.
The beneficial effects of this embodiment lie in: the specific training times are set, and the models with the function values smaller than the preset value of the multiple loss functions can be obtained under the condition that the training times are enough, so that the model with the smallest function value of the loss functions can be selected from the models with the function values smaller than the preset value as the model meeting the condition, the model with higher optimization degree can be obtained as the model meeting the condition, and the identification accuracy is further improved.
In one embodiment, the recognition result output by the pre-trained model includes the confidence of the recognition result, as shown in fig. 3, the above step S103 may be implemented as the following steps S301-S302:
In step S301, a recognition result with the highest confidence is selected from a plurality of recognition results, and the plurality of recognition results are subjected to deduplication;
in step S302, after the execution of the de-duplication processing is completed, the picture to be de-sensitized is subjected to the de-sensitization processing according to the remaining recognition result.
In one embodiment, the above step S301 may be implemented as the following steps C1-C4:
In step C1, obtaining the recognition result with highest confidence from the recognition results classified in the same class;
in step C2, comparing the recognition result with the highest confidence with other recognition results under the same classification;
in step C3, deleting the recognition result with the highest confidence coefficient of which the coincidence degree reaches the preset coincidence degree, and reserving the recognition result with the highest confidence coefficient of which the coincidence degree does not reach the preset coincidence degree;
In step C4, the duplicate removal process is continued by selecting the recognition result with the highest confidence from the remaining recognition results until there is no recognition result that can be continuously deleted.
For example, N recognition results are included in the license plate classification, and each recognition result is labeled with a confidence coefficient, so that the recognition result with the highest confidence coefficient in the N recognition results can be extracted from the N recognition results, and the recognition result with the highest confidence coefficient is compared with other recognition results in the same classification; deleting the recognition result with the highest confidence coefficient of which the coincidence degree reaches the preset coincidence degree, and reserving the recognition result with the highest confidence coefficient of which the coincidence degree does not reach the preset coincidence degree; for example, the coincidence of the other recognition result with the highest confidence may be determined by calculating an IOU (intersection over union, cross-over ratio) value between the recognition result with the highest confidence and the other recognition result. And selecting the recognition result with the highest confidence from the reserved recognition results, and continuing the deduplication processing until no recognition result can be continuously deleted.
The beneficial effects of this embodiment lie in: the identification result with the highest confidence coefficient reaching the preset coincidence degree is deleted, and the identification result with the highest confidence coefficient not reaching the preset coincidence degree is reserved, so that at least part of redundant data can be removed, the total amount of desensitized data is reduced, and the desensitization process is simplified.
In one embodiment, the preprocessing includes processing of at least one of:
removing a background area of the picture to be desensitized, carrying out contrast enhancement on the picture to be desensitized, and carrying out data standardization processing on the picture to be desensitized.
The beneficial effects of this embodiment lie in: the background area of the picture to be desensitized is removed, the area of the identification area is reduced, the pre-trained model can be used for more focusing on the identification of the foreground area of the picture to be desensitized, the calculated amount is reduced, the picture to be desensitized can be clearer by carrying out contrast enhancement on the picture to be desensitized, the probability of correct identification of the model is improved, the picture to be desensitized is subjected to data standardization processing, the format of the picture to be desensitized can be unified, and the picture to be desensitized can be attached to the format requirement of the pre-trained model.
In one embodiment of the present application, as shown in FIG. 5, the method may also be implemented as the following steps S501-S504:
In step S501, a picture to be desensitized is preprocessed, wherein the preprocessing includes at least one of the following:
removing a background area of the picture to be desensitized, carrying out contrast enhancement on the picture to be desensitized, and carrying out data standardization processing on the picture to be desensitized.
In step S502, the preprocessed picture to be desensitized is identified by a pre-trained model;
In step S503, obtaining recognition results of a plurality of different size ratios output by the pre-training model through a plurality of output layers, where the recognition results are detection frames marked with positions to be desensitized in a picture;
In step S504, a recognition result with the highest confidence is selected from the plurality of recognition results, and the picture to be desensitized is desensitized.
In one embodiment of the present application, as shown in fig. 6, the training process of the pre-trained model may also be implemented as the following steps S601-S605:
In step S601, training data is obtained, where the training data is a picture to be desensitized, which has been marked at a position to be desensitized;
in step S602, randomly selecting a portion from the picture to be desensitized as a training set;
In step S603, inputting a training set into a pre-built model to train the pre-built model, so as to obtain a model meeting the condition;
In step S604, a specific number of pictures are randomly selected from the pictures to be desensitized, and are input as a test set into a model meeting the conditions, so as to obtain a recognition result corresponding to the test set;
In step S605, when the accuracy of the recognition result of the test set by the model satisfying the condition reaches a specific accuracy, it is determined that the training of the model satisfying the condition is completed.
In this embodiment, the training data may be a plurality of pictures obtained by marking the license plate or the face in advance by manual or other recognition methods, and then the training data is data including a classification identifier, for example, the classification identifier of the picture including the license plate is the license plate, and the classification identifier of the picture including the face is the face. For example, the training data is ten thousand pictures after the license plate or the face is marked, 7000 pictures are randomly selected as a training set, and a model built in advance is trained through the training set to obtain a model meeting the condition. And then randomly selecting 3000 pictures from ten thousand pictures comprising the training set as a testing set, testing the models meeting the conditions through the testing set, and determining that the models meeting the conditions are trained when the accuracy of the models meeting the conditions on the identification results of the testing set reaches a specific accuracy.
Fig. 7 is a block diagram of a picture desensitizing apparatus according to the present application, as shown in fig. 7, including:
The identifying module 701 is configured to identify the preprocessed picture to be desensitized through a pre-trained model;
The obtaining module 702 is configured to obtain recognition results of a plurality of different size ratios output by the pre-training model through a plurality of output layers, where the recognition results are detection frames marked with positions to be desensitized in a picture;
the desensitization module 703 is configured to select an identification result with the highest confidence from the plurality of identification results, and perform desensitization processing on the picture to be desensitized.
In one embodiment, the identification module comprises:
the convolution sub-module is used for carrying out convolution operation on the picture to be desensitized correspondingly after detecting that the picture to be desensitized enters the input layer;
The residual sub-module is used for enabling the picture to be desensitized which is subjected to multiple convolution operation to pass through a residual network block;
And the output sub-module is used for outputting the recognition results of the picture to be desensitized, which are subjected to multiple convolution operations and pass through the residual error network block, through different output layers of the pre-training model, wherein the number of convolution operations and the number of times of passing through the residual error network block of the recognition results output by the different output layers are different.
In one embodiment, the training process of the pre-trained model in the picture desensitizing processing apparatus is as follows:
Acquiring training data, wherein the training data is a picture to be desensitized, and the picture to be desensitized is marked on a position to be desensitized;
Randomly selecting a part from the picture to be desensitized as a training set;
Inputting a training set into a pre-built model to train the pre-built model so as to obtain a model meeting the condition;
inputting the rest part except the training set in the picture to be desensitized as a test set into a model meeting the conditions to obtain a recognition result corresponding to the test set;
and when the accuracy of the recognition result of the model meeting the conditions to the test set reaches a specific accuracy, determining that the model meeting the conditions is trained.
In one embodiment, the inputting the training set into a pre-built model to train the pre-built model to obtain a model meeting the condition includes:
After the training set is input into a pre-built model, monitoring the function value change condition of a loss function of the pre-built model in the training process according to the training set;
Saving a model with a loss function value smaller than a preset value;
When the training times of training according to the training set reach a specific time, selecting a model with the minimum function value of the loss function from models with the function values smaller than a preset value as a model meeting the condition.
In one embodiment, the recognition results output by the pre-trained model include confidence in the recognition results, and the desensitization module includes:
The de-duplication sub-module is used for selecting the recognition result with the highest confidence from the multiple recognition results and de-duplicating the multiple recognition results;
And the desensitization sub-module is used for carrying out desensitization treatment on the picture to be desensitized according to the residual identification result after the execution of the duplicate removal treatment is finished.
In an embodiment, the recognition result output by the pre-trained model comprises a classification of the recognition result, and the deduplication sub-module is further configured to:
Acquiring a recognition result with highest confidence from the recognition results classified in the same way;
Comparing the recognition result with the highest confidence with other recognition results under the same classification;
Deleting the recognition result with the highest confidence coefficient of which the coincidence degree reaches the preset coincidence degree, and reserving the recognition result with the highest confidence coefficient of which the coincidence degree does not reach the preset coincidence degree;
And selecting the recognition result with the highest confidence from the reserved recognition results, and continuing the deduplication processing until no recognition result can be continuously deleted.
In one embodiment, the preprocessing includes processing of at least one of:
removing a background area of the picture to be desensitized, carrying out contrast enhancement on the picture to be desensitized, and carrying out data standardization processing on the picture to be desensitized.
Fig. 8 is a schematic hardware structure of a picture desensitizing processing system according to the present application, as shown in fig. 8, including:
at least one processor 820; and
A memory 804 communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor 820 to implement the picture desensitization processing method described in any one of the above embodiments.
Referring to fig. 8, the picture desensitization processing system 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
Processing component 802 generally controls the overall operation of picture desensitization processing system 800. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interactions between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
Memory 804 is configured to store various types of data to support the operation of picture desensitization processing system 800. Examples of such data include instructions for any application or method operating on picture desensitization processing system 800, such as text, pictures, video, and the like. The memory 804 may be implemented by any type or combination of volatile or nonvolatile memory devices 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 or optical disk.
The power supply component 806 provides power to the various components of the picture desensitization processing system 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the in-vehicle control system 800.
The multimedia component 808 includes a screen that provides an output interface between the picture desensitization processing system 800 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or sliding action, but also the duration and pressure associated with the touch or sliding operation. In some embodiments, the multimedia component 808 can also include a front-facing camera and/or a rear-facing camera. When the picture desensitization processing system 800 is in an operation mode, such as a photographing mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 810 is configured to output and/or input audio signals. For example, audio component 810 includes a Microphone (MIC) configured to receive external audio signals when picture desensitizing processing system 800 is in an operational mode, such as an alarm mode, a recording mode, a voice recognition mode, and a voice output mode. The received audio signals may be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 further includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
Sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of picture desensitization processing system 800. For example, the sensor assembly 814 may include a sound sensor. In addition, the sensor assembly 814 may detect the on/off status of the picture desensitizing treatment system 800, the relative positioning of the components, such as the display and keypad of the picture desensitizing treatment system 800, the sensor assembly 814 may also detect the operational status of the picture desensitizing treatment system 800 or one of the components of the picture desensitizing treatment system 800, such as the operational status of the air distribution plate, the structural status, the operational status of the discharge flights, etc., the orientation or acceleration/deceleration of the picture desensitizing treatment system 800, and the temperature changes of the picture desensitizing treatment system 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, a material bulk thickness sensor, or a temperature sensor.
The communication component 816 is configured to enable the picture desensitization processing system 800 to provide communication capabilities in a wired or wireless manner with other devices and cloud platforms. The picture desensitization processing system 800 may access a wireless network based on a communication standard, such as WiFi,2G, or 3G, or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the picture desensitizing processing system 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for performing the picture desensitizing processing method described in any of the embodiments above.
The application also provides a computer readable storage medium, when instructions in the storage medium are executed by a processor corresponding to the picture desensitizing processing system, the picture desensitizing processing system can implement the picture desensitizing processing method described in any one of the embodiments.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. A picture desensitization processing method, characterized by comprising:
Identifying the preprocessed picture to be desensitized through a pre-trained model;
obtaining recognition results of different size ratios output by the pre-training model through a plurality of output layers, wherein the recognition results are detection frames for marking positions to be desensitized in pictures;
And selecting the identification result with highest confidence from the plurality of identification results, and performing desensitization treatment on the picture to be desensitized.
2. The method of claim 1, wherein the identifying the preprocessed picture to be desensitized by the pre-trained model comprises:
After detecting that the picture to be desensitized enters an input layer, carrying out convolution operation for a plurality of times corresponding to the picture to be desensitized;
Passing the picture to be desensitized which is subjected to multiple convolution operations through a residual error network block;
and outputting the identification results of the picture to be desensitized, which are subjected to multiple convolution operations and pass through the residual error network block, through different output layers of the pre-training model, wherein the number of convolution operations and the number of times of passing through the residual error network block of the identification results output by different output layers are different.
3. The method of claim 1, wherein the training process of the pre-trained model is as follows:
Acquiring training data, wherein the training data is a picture to be desensitized, and the picture to be desensitized is marked on a position to be desensitized;
Randomly selecting a part from the picture to be desensitized as a training set;
Inputting a training set into a pre-built model to train the pre-built model so as to obtain a model meeting the condition;
inputting the rest part except the training set in the picture to be desensitized as a test set into a model meeting the conditions to obtain a recognition result corresponding to the test set;
and when the accuracy of the recognition result of the model meeting the conditions to the test set reaches a specific accuracy, determining that the model meeting the conditions is trained.
4. A method according to claim 3, wherein said inputting the training set into a pre-built model trains the pre-built model to obtain a model satisfying the condition, comprising:
After the training set is input into a pre-built model, monitoring the function value change condition of a loss function of the pre-built model in the training process according to the training set;
Saving a model with a loss function value smaller than a preset value;
When the training times of training according to the training set reach a specific time, selecting a model with the minimum function value of the loss function from models with the function values smaller than a preset value as a model meeting the condition.
5. The method of claim 1, wherein the recognition result output by the pre-trained model includes a confidence level of the recognition result, and the selecting the recognition result with the highest confidence level from the plurality of recognition results to desensitize the picture to be desensitized includes:
Selecting the recognition result with the highest confidence from a plurality of recognition results, and performing de-duplication processing on the plurality of recognition results;
And after the duplicate removal processing is finished, desensitizing the picture to be desensitized according to the residual recognition result.
6. The method of claim 5, wherein the recognition results output by the pre-trained model comprise a classification of recognition results, wherein selecting the recognition result with the highest confidence from the plurality of recognition results for deduplication processing comprises:
Acquiring a recognition result with highest confidence from the recognition results classified in the same way;
Comparing the recognition result with the highest confidence with other recognition results under the same classification;
Deleting the recognition result with the highest confidence coefficient of which the coincidence degree reaches the preset coincidence degree, and reserving the recognition result with the highest confidence coefficient of which the coincidence degree does not reach the preset coincidence degree;
And selecting the recognition result with the highest confidence from the reserved recognition results, and continuing the deduplication processing until no recognition result can be continuously deleted.
7. The method of any of claims 1-6, wherein the pre-treatment comprises a treatment of at least one of:
removing a background area of the picture to be desensitized, carrying out contrast enhancement on the picture to be desensitized, and carrying out data standardization processing on the picture to be desensitized.
8. A picture desensitizing apparatus, comprising:
The identification module is used for identifying the preprocessed picture to be desensitized through the pre-trained model;
The acquisition module is used for acquiring a plurality of recognition results with different size ratios output by the pre-training model through a plurality of output layers, wherein the recognition results are detection frames marked with positions to be desensitized in the pictures;
And the desensitization module is used for selecting the identification result with the highest confidence from the plurality of identification results and carrying out desensitization treatment on the picture to be desensitized.
9. A picture desensitization processing system, comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to implement the picture desensitization processing method according to any one of claims 1-7.
10. A computer readable storage medium, wherein instructions in the storage medium, when executed by a processor corresponding to a picture desensitization processing system, enable the picture desensitization processing system to implement a picture desensitization processing method according to any one of claims 1-7.
CN202211316171.6A 2022-10-26 2022-10-26 Picture desensitization processing method, device, system and storage medium Pending CN117994687A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211316171.6A CN117994687A (en) 2022-10-26 2022-10-26 Picture desensitization processing method, device, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211316171.6A CN117994687A (en) 2022-10-26 2022-10-26 Picture desensitization processing method, device, system and storage medium

Publications (1)

Publication Number Publication Date
CN117994687A true CN117994687A (en) 2024-05-07

Family

ID=90887445

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211316171.6A Pending CN117994687A (en) 2022-10-26 2022-10-26 Picture desensitization processing method, device, system and storage medium

Country Status (1)

Country Link
CN (1) CN117994687A (en)

Similar Documents

Publication Publication Date Title
US11455491B2 (en) Method and device for training image recognition model, and storage medium
US11122237B2 (en) Systems and methods for redaction of screens
US11443438B2 (en) Network module and distribution method and apparatus, electronic device, and storage medium
CN107909113A (en) Traffic-accident image processing method, device and storage medium
CN109165738B (en) Neural network model optimization method and device, electronic device and storage medium
CN115100472B (en) Training method and device for display object recognition model and electronic equipment
CN115641518B (en) View perception network model for unmanned aerial vehicle and target detection method
TW202044068A (en) Information processing method and device, electronic device and storage medium
CN116109866A (en) Fine tuning model construction method, image classification processing device and electronic equipment
CN111435422B (en) Action recognition method, control method and device, electronic equipment and storage medium
CN114168734A (en) Client event list classification method, device, equipment and storage medium
CN107844494B (en) Entry auditing method and terminal, entry processing method and server
CN112259122A (en) Audio type identification method and device and storage medium
CN116912478A (en) Object detection model construction, image classification method and electronic equipment
CN117994687A (en) Picture desensitization processing method, device, system and storage medium
CN114118278A (en) Image processing method and device, electronic equipment and storage medium
CN114358097A (en) Intrusion detection method and device based on deep neural network DNN and readable storage medium
CN111428806B (en) Image tag determining method and device, electronic equipment and storage medium
CN113761275A (en) Video preview moving picture generation method, device and equipment and readable storage medium
CN117034094B (en) Account type prediction method and account type prediction device
CN115034368B (en) Vehicle model training method and device, electronic equipment, storage medium and chip
CN112784701B (en) Video semantic segmentation method, device and storage medium
CN116703874A (en) Target detection method, device and storage medium
CN114973291B (en) Text line image character segmentation method and device
CN116030551B (en) Method, device, equipment and storage medium for testing vehicle autopilot software

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination