CN-122024008-A - Image processing method and image processing model training method
Abstract
The embodiment of the application discloses an image processing method and an image processing model training method. The image processing method comprises the steps of obtaining a target image, wherein the target image comprises first privacy information, and determining a first mark area in the target image by inputting the target image into a target model, wherein the first mark area comprises the first privacy information, the target model is constructed based on a U-Net model, and the target model is obtained by knowledge distillation based on a prediction result of a teacher model. By the scheme, the hardware resource consumption can be reduced, the processing efficiency is improved, and the problems of maintenance and expansibility in the traditional method are solved.
Inventors
- MA CUICUI
Assignees
- 中移(苏州)软件技术有限公司
- 中国移动通信集团有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260122
Claims (10)
- 1. An image processing method, comprising: acquiring a target image, wherein the target image comprises first privacy information; and determining a first marked area in the target image by inputting the target image into a target model, wherein the first marked area comprises the first privacy information, the target model is constructed based on a U-Net model, and the target model is obtained by knowledge distillation based on a prediction result of a teacher model.
- 2. The method of claim 1, wherein the acquiring the target image comprises: Acquiring original image data; Denoising the original image data through a Gaussian filter to obtain the target model.
- 3. An image processing model training method, comprising: Acquiring a training image set, wherein the training image set comprises a plurality of images serving as an input training set and second privacy information included in each image of the plurality of images serving as an output training set; Training a first model to be trained according to the training image set to obtain a target model for processing privacy information, wherein the first model is constructed based on a U-Net model, the first model determines first prediction privacy information included in the images according to the training image set, the first prediction privacy information and a teacher model are used for carrying out knowledge distillation on the first model according to deviation between second prediction privacy information output by the training image set, and the first prediction privacy information and the second privacy information are used for training the first model.
- 4. A method according to claim 1 or 3, characterized in that the U-Net model comprises an encoder for compression of an image and extraction of image features by a convolutional layer and a decoder for restoration of the image features to original image size by an upsampling layer.
- 5. A method according to claim 1 or 3, wherein the teacher model is built based on a depth convolutional neural network CNN and the encoder in the target model is built based on the encoder of the MobileNet model.
- 6. A method according to claim 3, characterized in that the method further comprises: And in the training process of the first model, adjusting the super parameters and the network structure of the first model through a Bayesian optimization algorithm.
- 7. The method of claim 3, wherein the training image set comprises a first training image set and a second training image set, and wherein the acquiring the training image set comprises: Acquiring a first training image set; And performing color transformation, content transformation and size transformation on the images in the first training image set to obtain the second training image set.
- 8. An electronic device comprising one or more processors, one or more memories, the one or more memories storing one or more computer programs comprising instructions which, when executed by the one or more processors, cause the method of any of claims 1-7 to be performed.
- 9. A computer readable storage medium having stored therein computer instructions which, when run on a computer, cause the method of any of claims 1 to 7 to be performed.
- 10. A computer program product, characterized in that the computer program product, when run on a computer, causes the computer to perform the method of any of claims 1 to 7.
Description
Image processing method and image processing model training method Technical Field The present application relates to the field of artificial intelligence, and more particularly, to an image processing method and an image processing model training method. Background Image processing technology plays an increasingly important role in modern society, especially in the field of administrative management. In daily work, processing and sharing pictures related to personal privacy or sensitive information is a common task, for example, for scenes such as public announcement, file approval and the like, coding processing is required to be performed on the sensitive information in the scenes so as to ensure privacy security. At present, the processing of the privacy information of the picture is often required to be completed rapidly on the premise of guaranteeing the information security, so that the approval, sharing and release of the file are facilitated. However, the conventional picture processing method has a slow processing speed and poor recognition effect of the privacy information, thereby affecting the working progress. Disclosure of Invention Aiming at some defects related to the background technology, the embodiment of the application provides an image processing method and an image processing model training method. By the scheme, hardware resource consumption is reduced, processing efficiency is improved, the problems of maintenance and expansibility of the traditional method are solved, the compatibility problem caused by a specific platform is avoided, and picture privacy processing is more efficient and accurate and is easy to popularize and maintain. According to the first aspect, an image processing method is provided, and the image processing method comprises the steps of obtaining a target image, wherein the target image comprises first privacy information, and determining a first mark area in the target image by inputting the target image into a target model, wherein the first mark area comprises the first privacy information, the target model is constructed based on a U-Net model, and the target model is obtained by knowledge distillation based on a prediction result of a teacher model. According to the scheme, the privacy area in the target image, such as the first marking area, is automatically and accurately identified and marked by using the target model based on knowledge distillation optimization, so that the manual intervention requirement is remarkably reduced, the efficiency and accuracy of the privacy processing of the picture are improved, and meanwhile, the model architecture design based on the U-Net is beneficial to reducing the consumption of computing resources. With reference to the first aspect, in a possible implementation manner of the first aspect, the acquiring the target image includes acquiring original image data, and denoising the original image data through a gaussian filter to obtain the target model. According to the scheme, the original image is preprocessed and denoised by Gaussian filtering, so that image noise interference can be effectively removed, image quality is improved, and a clearer and more reliable input data basis is provided for accurate identification and marking of a subsequent target model. With reference to the first aspect, in a possible implementation manner of the first aspect, the U-Net model includes an encoder and a decoder, the encoder is used for compressing an image and extracting an image feature through a convolution layer, and the decoder is used for restoring the image feature to an original image size through an upsampling layer. Through the scheme, the special encoder-decoder structure of the U-Net model can efficiently extract image features and recover spatial information, so that the target model can capture key features and accurately position specific areas, such as a first marking area, in the image when privacy information is identified, and marking accuracy is improved. With reference to the first aspect, in a possible implementation manner of the first aspect, the teacher model is constructed based on a depth convolutional neural network CNN, and the encoder in the target model is constructed based on an encoder of a MobileNet model. Through the scheme, the teacher model constructed by the depth CNN can provide strong feature extraction capability and high-precision prediction knowledge, and the target model student model constructed by the lightweight MobileNet encoder inherits the knowledge of the teacher model, so that the calculation complexity and the resource requirement of the model are greatly reduced, and the balance of performance and efficiency is realized. According to the training image set, a first model to be trained is trained to obtain a target model for processing privacy information, wherein the first model is constructed based on a U-Net model, the first model determines first predicted privacy infor