+

CN113222983A - Image processing method, image processing device, readable medium and electronic equipment - Google Patents

Image processing method, image processing device, readable medium and electronic equipment Download PDF

Info

Publication number
CN113222983A
CN113222983A CN202110621440.9A CN202110621440A CN113222983A CN 113222983 A CN113222983 A CN 113222983A CN 202110621440 A CN202110621440 A CN 202110621440A CN 113222983 A CN113222983 A CN 113222983A
Authority
CN
China
Prior art keywords
image
target
encoder
preset
layer
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
CN202110621440.9A
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 Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network 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 Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Priority to CN202110621440.9A priority Critical patent/CN113222983A/en
Publication of CN113222983A publication Critical patent/CN113222983A/en
Priority to PCT/CN2022/089240 priority patent/WO2022252881A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

本公开涉及一种图像处理方法、装置、可读介质和电子设备,涉及图像处理技术领域,该方法包括:获取待处理视频中的目标图像,根据目标图像,通过预先训练的图像检测模型,确定目标图像对应的图像检测信息,其中,图像检测模型包括目标卷积层和处理层,目标卷积层用于提取目标图像的特征,处理层用于根据目标图像的特征确定图像检测信息,图像检测信息用于指示目标图像是否为异常图像,目标卷积层为第一编码器中的卷积层,第一编码器为利用无标注样本集对预设网络进行训练得到的,处理层为利用标注样本集对预设神经网络层进行训练得到的,在图像检测信息指示目标图像为异常图像的情况下,对目标图像进行异常图像处理。

Figure 202110621440

The present disclosure relates to an image processing method, device, readable medium and electronic device, and relates to the technical field of image processing. The method includes: acquiring a target image in a video to be processed, and determining a pre-trained image detection model according to the target image. The image detection information corresponding to the target image, wherein the image detection model includes a target convolution layer and a processing layer, the target convolution layer is used to extract the features of the target image, and the processing layer is used to determine the image detection information according to the characteristics of the target image. The information is used to indicate whether the target image is an abnormal image. The target convolutional layer is the convolutional layer in the first encoder. The first encoder is obtained by training the preset network using the unlabeled sample set, and the processing layer uses the annotation. The sample set is obtained by training the preset neural network layer, and when the image detection information indicates that the target image is an abnormal image, the abnormal image processing is performed on the target image.

Figure 202110621440

Description

Image processing method, image processing device, readable medium and electronic equipment
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image processing method, an image processing apparatus, a readable medium, and an electronic device.
Background
With the continuous development of internet technology, visual information uploaded by users on a network is more and more, and a large number of high-risk videos uploaded by malicious users exist, such as videos containing pornography, drug abuse, violence, evil education and various customs. In order to avoid the adverse effect caused by the streaming of the videos on the internet, video content security detection needs to be performed on the videos.
Currently, whether an image in a video contains high-risk information is mainly judged by inputting the image into a neural classification network. However, the neural classification network needs to be trained by relying on a large amount of labeled data, but in practical situations, due to the high acquisition cost and labeling cost of data, it is often difficult to acquire a large amount of labeled data for training the neural classification network. Under the condition of less labeled data, the accuracy of judging whether the image contains high-risk information or not can be reduced.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a method of image processing, the method comprising:
acquiring a target image in a video to be processed;
determining image detection information corresponding to the target image through a pre-trained image detection model according to the target image;
the image detection model comprises a target convolution layer and a processing layer, wherein the target convolution layer is used for extracting the characteristics of the target image, the processing layer is used for determining the image detection information according to the characteristics of the target image, and the image detection information is used for indicating whether the target image is an abnormal image or not; the target convolutional layer is a convolutional layer in a first encoder, the first encoder is obtained by training a preset network by using a label-free sample set, and the processing layer is obtained by training a preset neural network layer by using a label sample set;
and performing abnormal image processing on the target image under the condition that the image detection information indicates that the target image is an abnormal image.
In a second aspect, the present disclosure provides an image processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring a target image in a video to be processed;
the determining module is used for determining image detection information corresponding to the target image through a pre-trained image detection model according to the target image;
the image detection model comprises a target convolution layer and a processing layer, wherein the target convolution layer is used for extracting the characteristics of the target image, the processing layer is used for determining the image detection information according to the characteristics of the target image, and the image detection information is used for indicating whether the target image is an abnormal image or not; the target convolutional layer is a convolutional layer in a first encoder, the first encoder is obtained by training a preset network by using a label-free sample set, and the processing layer is obtained by training a preset neural network layer by using a label sample set;
and the processing module is used for performing abnormal image processing on the target image under the condition that the image detection information indicates that the target image is an abnormal image.
In a third aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which, when executed by a processing apparatus, performs the steps of the method of the first aspect of the present disclosure.
In a fourth aspect, the present disclosure provides an electronic device comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to implement the steps of the method of the first aspect of the present disclosure.
By the technical scheme, the method firstly acquires the target image in the video to be processed and then, according to the target image, determining image detection information corresponding to the target image through a pre-trained image detection model, wherein the image detection model comprises a target convolution layer and a processing layer, the target convolution layer is used for extracting the characteristics of the target image, the processing layer is used for determining the image detection information according to the characteristics of the target image, the image detection information is used for indicating whether the target image is an abnormal image or not, the target convolutional layer is a convolutional layer in a first encoder, the first encoder is obtained by utilizing a label-free sample set to train a preset network, the processing layer is obtained by utilizing a label sample set to train a preset neural network layer, and then, in the case that the image detection information indicates that the target image is an abnormal image, performing abnormal image processing on the target image. The image detection model is obtained by training the marked sample set on the basis of the unmarked sample set, the image detection model does not need to be trained by relying on a large amount of marked data, the accurate image detection model can be obtained even under the condition of no large amount of marked data, the accuracy of the image detection information determined by the image detection model is improved, and the target image detected as the abnormal image is processed in time.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale. In the drawings:
FIG. 1 is a flow diagram illustrating an image processing method according to an exemplary embodiment;
FIG. 2 is a flow chart illustrating one step 102 according to the embodiment shown in FIG. 1;
FIG. 3 is a flow diagram illustrating a method of training an image detection model according to an exemplary embodiment;
FIG. 4 is a flowchart illustrating a step 202 according to the embodiment shown in FIG. 3;
FIG. 5 is a flow diagram illustrating another method of training an image detection model in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating an image processing apparatus according to an exemplary embodiment;
FIG. 7 is a block diagram of a determination module according to the embodiment shown in FIG. 1;
FIG. 8 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Before introducing the image processing method, the image processing apparatus, the readable medium, and the electronic device provided by the present disclosure, an application scenario related to various embodiments of the present disclosure is first introduced. The application scene may be any scene that needs to detect whether an image is an abnormal image, for example, the scene may be a scene that performs video content security detection on a video by detecting whether an image in the video is an abnormal image. The abnormal image may be an image containing high-risk information such as pornography, drug addiction, violence, evil education, various customs and the like, and the image may be a single image (for example, a head portrait of a user on a network) or a video frame in a video (for example, a short video platform, a video uploaded by a user in social media), which is not particularly limited in this disclosure.
FIG. 1 is a flow diagram illustrating an image processing method according to an exemplary embodiment. As shown in fig. 1, the method may include the steps of:
step 101, acquiring a target image in a video to be processed.
For example, to avoid adverse effects caused by the flow of high-risk videos on the network, content detection may be performed on the videos on the network in a video content security detection manner to determine whether high-risk information exists in the videos. Firstly, a video needing content detection can be used as a video to be processed, and a target image is selected from the video to be processed. The way of selecting the target image may be: and according to a preset rule, performing frame extraction on the video to be processed, and taking the extracted video frame in the video to be processed as a target image. Wherein the preset rule may include at least one of the following:
1) selecting a video frame corresponding to a designated time in a video to be processed, wherein the designated time can be a certain time point in the preset video to be processed or a time point corresponding to each division point after the video to be processed is uniformly divided, which is equivalent to performing uniform frame extraction on the video to be processed, and taking the video frame obtained by uniform frame extraction as a target image.
2) And selecting a key frame in the video to be processed, wherein the key frame is a video frame (namely the most complete frame picture in the video to be processed) containing most information in the video to be processed. For example, an I-frame (english: Intra-coded picture, chinese: Intra-coded picture frame) in the video to be processed may be selected as the key frame.
3) Selecting a scene conversion frame in a video to be processed, wherein the similarity between the scene conversion frame and an adjacent video frame is smaller than or equal to a preset similarity threshold value, the adjacent video frame is a video frame which is adjacent to the scene conversion frame and is positioned before the scene conversion frame in the video to be processed, and the scene conversion frame is used for indicating that the video enters a new scene. For example, a video scene extraction algorithm may be adopted to select a scene change frame according to the similarity between video frames in the video to be processed, and if the similarity between a previous video frame and a next video frame in the video to be processed is less than or equal to a preset similarity threshold, the next video frame is used as the scene change frame.
And 102, determining image detection information corresponding to the target image through a pre-trained image detection model according to the target image.
The image detection model comprises a target convolutional layer and a processing layer, the target convolutional layer is used for extracting the characteristics of a target image, the processing layer is used for determining image detection information according to the characteristics of the target image, the image detection information is used for indicating whether the target image is an abnormal image or not, the target convolutional layer is a convolutional layer in a first encoder, the first encoder is obtained by utilizing an unmarked sample set to train a preset network, and the processing layer is obtained by utilizing an marked sample set to train a preset neural network layer.
In an example, after the target image is acquired, it is necessary to determine whether the video to be processed is a high-risk video by judging whether the target image is an abnormal image. In order to reduce the dependence on the annotation data in the process of judging whether the target image is an abnormal image, a model for detecting whether the image is an abnormal image can be trained in a mode of combining unsupervised (or semi-supervised) and supervision in advance. Specifically, a preset network including the first encoder may be trained by using a large amount of label-free data (i.e., a large amount of images of various types) on the network as a label-free sample set, and after the preset network is trained, the convolutional layer (which may be all or part of the convolutional layer in the first encoder) in the first encoder is used as a target convolutional layer. The first encoder is configured to perform feature extraction on an image in a label-free sample set, and the preset network may be obtained by training the label-free sample set in a contrast learning (english: contrast learning) manner, for example.
Then, the manually labeled labeling data can be used as a labeling sample set, and supervised fine tuning is performed on the target convolutional layer on the labeling sample set, so as to obtain an image detection model. The image detection model may output, based on the input image, image detection information corresponding to the image and indicating whether the image is an abnormal image. For example, the labeled sample set may be used to train the preset neural network layer, and after the training of the preset neural network layer is completed, the trained preset neural network layer may be used as the processing layer. And splicing the target convolution layer and the processing layer, and taking the neural network obtained after splicing as an image detection model. The processing layer is used for outputting image detection information corresponding to an input certain image according to the image characteristics of the image. By training the image detection model in a mode of combining unsupervised (or semi-supervised) and supervised, a large amount of label-free data on a network can be efficiently utilized, so that an accurate image detection model is obtained on the premise of not increasing the labeling cost, the performance of the image detection model is improved, and the accuracy of the image detection information determined by the image detection model is further improved.
Further, after obtaining the image detection model, the target image may be input into the image detection model to obtain the image detection information output by the image detection model. The image detection information may be any information that can indicate that the target image is an abnormal image. For example, the image detection information may be an image type of the target image, and the image type may include a normal image type and an abnormal image type, and when the image type of the target image is the abnormal image type, the image detection information indicates that the target image is the abnormal image. The abnormal image types may include pornography, drug abuse, violence, evil education, darkness, and vulgar, where the processing layer is used to perform classification tasks for the image types. For another example, the image detection information may be an abnormal object image in the target image, which can reflect that the target image is an abnormal image, and when the image detection information includes the abnormal object image, the image detection information indicates that the target image is the abnormal image, and the processing layer is configured to perform a task of detecting the abnormal object image or perform a task of dividing the abnormal object image.
And 103, performing abnormal image processing on the target image when the image detection information indicates that the target image is an abnormal image.
In this step, in a case where the image detection information indicates that the target image is an abnormal image, abnormal image processing may be performed on the target image. The abnormal image processing may include any one of deleting the target image, blurring the target image, and marking the target image. In addition, the target image can be combined with text information and audio information in the video to be processed to further judge whether the target image is an abnormal image, so that the accuracy of judging whether the target image is an abnormal image is improved.
In summary, the present disclosure first obtains a target image in a video to be processed, and determines image detection information corresponding to the target image according to the target image through a pre-trained image detection model, where the image detection model includes a target convolution layer and a processing layer, the target convolution layer is used to extract features of the target image, the processing layer is used to determine the image detection information according to the features of the target image, the image detection information is used to indicate whether the target image is an abnormal image, the target convolution layer is a convolution layer in a first encoder, the first encoder is obtained by training a preset network using a non-labeled sample set, the processing layer is obtained by training a preset neural network layer using a labeled sample set, and then, when the image detection information indicates that the target image is an abnormal image, the target image is subjected to abnormal image processing. The image detection model is obtained by training the marked sample set on the basis of the unmarked sample set, the image detection model does not need to be trained by relying on a large amount of marked data, the accurate image detection model can be obtained even under the condition of no large amount of marked data, the accuracy of the image detection information determined by the image detection model is improved, and the target image detected as the abnormal image is processed in time.
Fig. 2 is a flow chart illustrating one step 102 according to the embodiment shown in fig. 1. As shown in fig. 2, step 102 may include the steps of:
step 1021, preprocessing the target image to obtain a processed target image, wherein the preprocessing includes at least one of graying processing, geometric transformation processing and image enhancement processing.
Step 1022, using the processed target image as the input of the image detection model, to obtain the image detection information output by the image detection model.
For example, after the target image is acquired, the target image may be preprocessed to obtain a processed target image. For example, the graying process, the geometric transformation process, and the image enhancement process may be sequentially performed on the target image to obtain a processed target image. The preprocessing can eliminate irrelevant information in the target image, recover the relevant information, enhance the detectability of the relevant information and simplify the data to the maximum extent, thereby ensuring the accuracy of determining the image detection information through the image detection model. Then, the processed target image may be input into the image detection model, so as to obtain the image detection information output by the image detection model.
FIG. 3 is a flow diagram illustrating training an image detection model according to an exemplary embodiment. As shown in fig. 3, the predetermined network includes a first encoder and a second encoder, and the image detection model is trained by:
step 201, obtaining a non-labeled sample set and a labeled sample set.
The annotated sample set comprises annotated image samples and image detection information samples corresponding to the annotated image samples.
In one scenario, an unlabeled sample set including unlabeled image samples may first be obtained. For example, a large number of videos may be collected from a network (e.g., on a short video platform), 5 frames of video may be sampled at equal intervals for each video, and a set of unlabeled samples may be constructed using the 5 frames of video sampled for each video. Furthermore, the unlabeled sample set can be packed into an Arnold _ dataset format and uploaded to an HDFS (Hadoop Distributed File System, Chinese) so as to facilitate access and reading on the Arnold cluster. Then, an annotated sample set comprising annotated image samples, image detection information samples corresponding to the annotated image samples, may be obtained. For example, when a certain annotated image sample is an image that includes violence information, if the processing layer is used to perform a classification task for an image type, the image detection information sample (i.e., the image type) corresponding to the annotated image sample may be the violence type.
Step 202, training the preset network according to the unmarked sample set, and determining a target convolutional layer from the convolutional layers of the first encoder included in the trained preset network.
And 203, training the preset neural network layer according to the labeled sample set, and taking the trained preset neural network layer as a processing layer.
For example, if the preset network is trained in a contrast learning manner, when the first encoder is trained, a second encoder having the same structure as the first encoder needs to be maintained, that is, the preset network includes the first encoder and the second encoder. After the label-free sample set is obtained, the preset network can be trained according to the label-free sample set, and after the preset network is trained, the convolutional layer in the first encoder is used as a target convolutional layer. Then, the preset neural network layer can be trained according to the labeled sample set, and after the training of the preset neural network layer is completed, the trained preset neural network layer is used as a processing layer. The preset neural network Layer may be any decoder (chinese: encoder) structure, or may be an MLP (english: Muti-Layer persistence, chinese: multilayer perceptron), and the disclosure does not specifically limit this. Finally, the processing layer can be spliced after the target convolution layer to obtain the image detection model.
Fig. 4 is a flow chart illustrating one step 202 according to the embodiment shown in fig. 3. As shown in fig. 4, the unlabeled image sample is plural, and step 202 may include the following steps:
step 2021, select a first number of unlabeled image samples from the plurality of unlabeled image samples.
Step 2022, for each unlabeled image sample in the first number of unlabeled image samples, performing data amplification on the unlabeled image sample, and inputting the unlabeled image sample into the first encoder and the second encoder respectively to obtain a first feature vector output by the first encoder and a second feature vector output by the second encoder.
For example, in training the preset network, a first number of unlabeled image samples (the first number may be 256, for example) may be selected from a plurality of unlabeled image samples included in the unlabeled sample set to form a Batch (chinese: Batch). Then, each unmarked image sample x in the first number of unmarked image samples can be sequentially aimed atiUsing random data augmentation transform to the unlabeled image sample xiCarrying out data amplification processing to obtain xiCorresponding positive sample pair
Figure BDA0003100068880000101
And
Figure BDA0003100068880000102
and will be
Figure BDA0003100068880000103
And
Figure BDA0003100068880000104
respectively inputting the first characteristic vector q and the second characteristic vector q into a first coder and a second coder to obtain a first characteristic vector q output by the first coderiAnd a second eigenvector k output by the second encoderi
Step 2023, updating the first encoder and the second encoder according to the first feature vector and the second feature vector corresponding to each unlabeled image sample.
And circularly executing the steps 2021 to 2023 until the number of times of circularly executing reaches a preset number.
Illustratively, the first feature vector q corresponding to each sample of the label-free image is obtainediAnd a second feature vector kiThen, the second feature vector k corresponding to each unlabeled image sample can be obtainediAnd sequentially inputting the data into a preset queue, and updating the preset queue. The number of the elements of the preset queue is a second number, the second number is smaller than or equal to the First number, the preset queue may be a Memory queue (english: Memory Bank) with a fixed size of 65536, and the preset queue is updated in an FIFO (english: First in First out) updating manner. The first encoder may then be updated according to the first feature vector corresponding to each unlabeled image sample and the preset queue, for example, the first feature vector q corresponding to each unlabeled image sample may be usediAnd calculating a contrast loss function (English) according to the second number of elements in the preset queue, calculating the gradient of the first encoder, and updating the first encoder according to a random gradient descent method. After the first encoder is updated, the first encoder can be updated according to the updated first encoderAnd the coder updates the second coder (namely, the second coder does not calculate the gradient in the training process, but the second coder is updated after the first coder is updated every time). After the second encoder is updated, a round of iterative training on the preset network is equivalently completed, and then the process can be repeatedly executed until the iterative training on the preset network reaches the preset times, so as to complete the training on the preset network.
FIG. 5 is a flow diagram illustrating another method of training an image detection model according to an example embodiment. As shown in fig. 5, the predetermined network includes a first encoder and a second encoder, and the image detection model is trained by:
step 201, obtaining a non-labeled sample set and a labeled sample set.
The annotated sample set comprises annotated image samples and image detection information samples corresponding to the annotated image samples.
Step 202, training the preset network according to the unmarked sample set, and determining a target convolutional layer from the convolutional layers of the first encoder included in the trained preset network.
And 204, training a preset model according to the labeled sample set, wherein the preset model comprises a target convolution layer and a preset neural network layer, and the preset neural network layer included in the trained preset model is used as a processing layer.
In another scenario, an unlabeled sample set including unlabeled image samples may be obtained first, and an labeled sample set including labeled image samples and image detection information samples corresponding to the labeled image samples may be obtained. If the preset network is trained in a contrast learning manner, after the label-free sample set is obtained, the preset network can be trained according to the label-free sample set, and after the preset network is trained, the convolutional layer in the first encoder is used as a target convolutional layer. Then, the target convolution layer and the preset neural network layer may be used as an integrated preset model, the preset model is trained according to the labeled sample set (that is, the whole neural network formed by the target convolution layer and the preset neural network layer is jointly trained), and after the preset model is trained, the preset neural network layer included in the trained preset model is used as a processing layer.
In summary, the present disclosure first obtains a target image in a video to be processed, and determines image detection information corresponding to the target image according to the target image through a pre-trained image detection model, where the image detection model includes a target convolution layer and a processing layer, the target convolution layer is used to extract features of the target image, the processing layer is used to determine the image detection information according to the features of the target image, the image detection information is used to indicate whether the target image is an abnormal image, the target convolution layer is a convolution layer in a first encoder, the first encoder is obtained by training a preset network using a non-labeled sample set, the processing layer is obtained by training a preset neural network layer using a labeled sample set, and then, when the image detection information indicates that the target image is an abnormal image, the target image is subjected to abnormal image processing. The image detection model is obtained by training the marked sample set on the basis of the unmarked sample set, the image detection model does not need to be trained by relying on a large amount of marked data, the accurate image detection model can be obtained even under the condition of no large amount of marked data, the accuracy of the image detection information determined by the image detection model is improved, and the target image detected as the abnormal image is processed in time.
Fig. 6 is a block diagram illustrating an image processing apparatus according to an exemplary embodiment. As shown in fig. 5, the apparatus 300 includes:
an obtaining module 301, configured to obtain a target image in a video to be processed.
The determining module 302 is configured to determine, according to the target image, image detection information corresponding to the target image through a pre-trained image detection model.
The image detection model comprises a target convolutional layer and a processing layer, the target convolutional layer is used for extracting the characteristics of a target image, the processing layer is used for determining image detection information according to the characteristics of the target image, the image detection information is used for indicating whether the target image is an abnormal image or not, the target convolutional layer is a convolutional layer in a first encoder, the first encoder is obtained by utilizing an unmarked sample set to train a preset network, and the processing layer is obtained by utilizing an marked sample set to train a preset neural network layer.
And the processing module 303 is configured to perform abnormal image processing on the target image when the image detection information indicates that the target image is an abnormal image.
Optionally, the obtaining module 301 is configured to:
and according to a preset rule, performing frame extraction on the video to be processed, and taking the extracted video frame in the video to be processed as a target image.
Wherein the preset rule comprises at least one of the following:
and selecting a video frame corresponding to the specified time in the video to be processed.
And selecting a key frame in the video to be processed, wherein the key frame is a video frame containing most information in the video to be processed.
And selecting a scene conversion frame in the video to be processed, wherein the similarity between the scene conversion frame and an adjacent video frame is less than or equal to a preset similarity threshold, and the adjacent video frame is a video frame which is adjacent to the scene conversion frame and is positioned before the scene conversion frame in the video to be processed.
FIG. 7 is a block diagram illustrating a determination module according to the embodiment shown in FIG. 1. As shown in fig. 7, the determining module 302 includes:
the preprocessing submodule 3021 is configured to preprocess the target image to obtain a processed target image, where the preprocessing includes at least one of graying processing, geometric transformation processing, and image enhancement processing.
The determining submodule 3022 is configured to use the processed target image as an input of the image detection model, and obtain image detection information output by the image detection model.
Optionally, the preset network includes a first encoder and a second encoder, and the determining module 302 is configured to train to obtain the image detection model by:
and acquiring a non-labeled sample set and a labeled sample set. The label-free sample set comprises label-free image samples, and the label sample set comprises label image samples and image detection information samples corresponding to the label image samples.
And training the preset network according to the unmarked sample set, and determining a target convolutional layer from the convolutional layers of the first encoder included in the trained preset network.
And training the preset neural network layer according to the labeled sample set, and taking the trained preset neural network layer as a processing layer.
Optionally, the preset network includes a first encoder and a second encoder, and the determining module 302 is configured to train to obtain the image detection model by:
and acquiring a non-labeled sample set and a labeled sample set. The label-free sample set comprises label-free image samples, and the label sample set comprises label image samples and image detection information samples corresponding to the label image samples.
And training the preset network according to the unmarked sample set, and determining a target convolutional layer from the convolutional layers of the first encoder included in the trained preset network.
And training a preset model according to the labeled sample set, wherein the preset model comprises a target convolution layer and a preset neural network layer, and the preset neural network layer included in the trained preset model is used as a processing layer.
Optionally, the determining module 302 is configured to:
a first number of unlabeled image samples are selected from the plurality of unlabeled image samples.
And for each unmarked image sample in the first quantity of unmarked image samples, performing data amplification processing on the unmarked image sample, and respectively inputting the unmarked image sample into the first encoder and the second encoder to obtain a first feature vector output by the first encoder and a second feature vector output by the second encoder.
And updating the first encoder and the second encoder according to the first characteristic vector and the second characteristic vector corresponding to each unmarked image sample.
And circularly executing the steps of selecting a first number of unmarked image samples from the unmarked image samples, and updating the first encoder and the second encoder according to the first eigenvector and the second eigenvector corresponding to each unmarked image sample until the number of times of circularly executing reaches the preset number.
Optionally, the determining module 302 is configured to:
and sequentially inputting the second feature vectors corresponding to each unmarked image sample into a preset queue, and updating the preset queue, wherein the number of elements of the preset queue is a second number, and the second number is less than or equal to the first number.
And updating the first encoder according to the first feature vector corresponding to each unmarked image sample and the preset queue.
And after the first encoder is updated, updating the second encoder according to the updated first encoder.
In summary, the present disclosure first obtains a target image in a video to be processed, and determines image detection information corresponding to the target image according to the target image through a pre-trained image detection model, where the image detection model includes a target convolution layer and a processing layer, the target convolution layer is used to extract features of the target image, the processing layer is used to determine the image detection information according to the features of the target image, the image detection information is used to indicate whether the target image is an abnormal image, the target convolution layer is a convolution layer in a first encoder, the first encoder is obtained by training a preset network using a non-labeled sample set, the processing layer is obtained by training a preset neural network layer using a labeled sample set, and then, when the image detection information indicates that the target image is an abnormal image, the target image is subjected to abnormal image processing. The image detection model is obtained by training the marked sample set on the basis of the unmarked sample set, the image detection model does not need to be trained by relying on a large amount of marked data, the accurate image detection model can be obtained even under the condition of no large amount of marked data, the accuracy of the image detection information determined by the image detection model is improved, and the target image detected as the abnormal image is processed in time.
Referring now to fig. 8, a schematic diagram of an electronic device (e.g., the terminal device or the server of fig. 1) 400 suitable for implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 8, electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 8 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a target image in a video to be processed; determining image detection information corresponding to the target image through a pre-trained image detection model according to the target image; the image detection model comprises a target convolution layer and a processing layer, wherein the target convolution layer is used for extracting the characteristics of the target image, the processing layer is used for determining the image detection information according to the characteristics of the target image, and the image detection information is used for indicating whether the target image is an abnormal image or not; the target convolutional layer is a convolutional layer in a first encoder, the first encoder is obtained by training a preset network by using a label-free sample set, and the processing layer is obtained by training a preset neural network layer by using a label sample set; and performing abnormal image processing on the target image under the condition that the image detection information indicates that the target image is an abnormal image.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. The name of the module does not in some cases constitute a limitation of the module itself, and for example, the acquiring module may also be described as a "module that acquires a target image in a video to be processed".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Example 1 provides an image processing method according to one or more embodiments of the present disclosure, including: acquiring a target image in a video to be processed; determining image detection information corresponding to the target image through a pre-trained image detection model according to the target image; the image detection model comprises a target convolution layer and a processing layer, wherein the target convolution layer is used for extracting the characteristics of the target image, the processing layer is used for determining the image detection information according to the characteristics of the target image, and the image detection information is used for indicating whether the target image is an abnormal image or not; the target convolutional layer is a convolutional layer in a first encoder, the first encoder is obtained by training a preset network by using a label-free sample set, and the processing layer is obtained by training a preset neural network layer by using a label sample set; and performing abnormal image processing on the target image under the condition that the image detection information indicates that the target image is an abnormal image.
Example 2 provides the method of example 1, in accordance with one or more embodiments of the present disclosure, the acquiring a target image in a video to be processed, including: according to a preset rule, performing frame extraction on the video to be processed, and taking the extracted video frame in the video to be processed as the target image; wherein the preset rule comprises at least one of: selecting a video frame corresponding to a designated moment in the video to be processed; selecting a key frame in the video to be processed, wherein the key frame is a video frame containing most information in the video to be processed; and selecting a scene change frame in the video to be processed, wherein the similarity between the scene change frame and an adjacent video frame is less than or equal to a preset similarity threshold, and the adjacent video frame is a video frame which is adjacent to the scene change frame and is positioned before the scene change frame in the video to be processed.
Example 3 provides the method of example 1, wherein determining, according to the target image and through a pre-trained image detection model, image detection information corresponding to the target image includes: preprocessing the target image to obtain a processed target image, wherein the preprocessing comprises at least one of graying processing, geometric transformation processing and image enhancement processing; and taking the processed target image as the input of the image detection model to obtain the image detection information output by the image detection model.
Example 4 provides the method of example 1, the preset network including a first encoder and a second encoder, the image detection model being trained by: acquiring the label-free sample set and the label sample set; the annotated sample set comprises annotated image samples, and the annotated sample set comprises annotated image samples and image detection information samples corresponding to the annotated image samples; training the preset network according to the label-free sample set, and determining the target convolutional layer from the convolutional layers of the first encoder included in the trained preset network; and training the preset neural network layer according to the labeled sample set, and taking the trained preset neural network layer as the processing layer.
Example 5 provides the method of example 1, the preset network including a first encoder and a second encoder, the image detection model being trained by: acquiring the label-free sample set and the label sample set; the annotated sample set comprises annotated image samples, and the annotated sample set comprises annotated image samples and image detection information samples corresponding to the annotated image samples; training the preset network according to the label-free sample set, and determining the target convolutional layer from the convolutional layers of the first encoder included in the trained preset network; and training a preset model according to the labeled sample set, wherein the preset model comprises the target convolution layer and the preset neural network layer, and the preset neural network layer included in the trained preset model is used as the processing layer.
Example 6 provides the method of example 4 or 5, wherein the unlabeled image sample is a plurality of samples, and the training the preset network according to the unlabeled sample set includes: selecting a first number of unlabeled image samples from the unlabeled image samples; for each unmarked image sample in a first number of unmarked image samples, performing data amplification processing on the unmarked image sample, and respectively inputting the unmarked image sample into the first encoder and the second encoder to obtain a first feature vector output by the first encoder and a second feature vector output by the second encoder; updating the first encoder and the second encoder according to the first feature vector and the second feature vector corresponding to each label-free image sample; and circularly executing the step of selecting a first number of unmarked image samples from the plurality of unmarked image samples, and updating the first encoder and the second encoder according to the first feature vector and the second feature vector corresponding to each unmarked image sample until the number of times of circularly executing reaches a preset number.
Example 7 provides the method of example 6, wherein updating the first encoder and the second encoder according to the first feature vector and the second feature vector corresponding to each of the unlabeled image samples, includes: sequentially inputting the second feature vectors corresponding to each unmarked image sample into a preset queue, and updating the preset queue, wherein the number of elements of the preset queue is a second number, and the second number is less than or equal to the first number; updating the first encoder according to the first feature vector corresponding to each unmarked image sample and the preset queue; and after the first encoder is updated, updating the second encoder according to the updated first encoder.
Example 8 provides an image processing apparatus according to one or more embodiments of the present disclosure, the apparatus including: the acquisition module is used for acquiring a target image in a video to be processed; the determining module is used for determining image detection information corresponding to the target image through a pre-trained image detection model according to the target image; the image detection model comprises a target convolution layer and a processing layer, wherein the target convolution layer is used for extracting the characteristics of the target image, the processing layer is used for determining the image detection information according to the characteristics of the target image, and the image detection information is used for indicating whether the target image is an abnormal image or not; the target convolutional layer is a convolutional layer in a first encoder, the first encoder is obtained by training a preset network by using a label-free sample set, and the processing layer is obtained by training a preset neural network layer by using a label sample set; and the processing module is used for performing abnormal image processing on the target image under the condition that the image detection information indicates that the target image is an abnormal image.
Example 9 provides a computer-readable medium having stored thereon a computer program that, when executed by a processing apparatus, implements the steps of the methods of examples 1-7, in accordance with one or more embodiments of the present disclosure.
Example 10 provides, in accordance with one or more embodiments of the present disclosure, an electronic device comprising: a storage device having a computer program stored thereon; processing means for executing the computer program in the storage means to implement the steps of the methods of examples 1-7.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims (10)

1.一种图像处理方法,其特征在于,所述方法包括:1. an image processing method, is characterized in that, described method comprises: 获取待处理视频中的目标图像;Get the target image in the video to be processed; 根据所述目标图像,通过预先训练的图像检测模型,确定所述目标图像对应的图像检测信息;According to the target image, through a pre-trained image detection model, determine the image detection information corresponding to the target image; 其中,所述图像检测模型包括目标卷积层和处理层,所述目标卷积层用于提取所述目标图像的特征,所述处理层用于根据所述目标图像的特征确定所述图像检测信息,所述图像检测信息用于指示所述目标图像是否为异常图像;所述目标卷积层为第一编码器中的卷积层,所述第一编码器为利用无标注样本集对预设网络进行训练得到的,所述处理层为利用标注样本集对预设神经网络层进行训练得到的;Wherein, the image detection model includes a target convolution layer and a processing layer, the target convolution layer is used to extract the feature of the target image, and the processing layer is used to determine the image detection according to the feature of the target image information, the image detection information is used to indicate whether the target image is an abnormal image; the target convolutional layer is the convolutional layer in the first encoder, and the first encoder uses an unlabeled sample set to Suppose that the network is obtained by training, and the processing layer is obtained by training the preset neural network layer by using the labeled sample set; 在所述图像检测信息指示所述目标图像为异常图像的情况下,对所述目标图像进行异常图像处理。When the image detection information indicates that the target image is an abnormal image, abnormal image processing is performed on the target image. 2.根据权利要求1所述的方法,其特征在于,所述获取待处理视频中的目标图像,包括:2. The method according to claim 1, wherein the acquiring the target image in the video to be processed comprises: 按照预设规则,对所述待处理视频进行抽帧,并将抽取到的所述待处理视频中的视频帧作为所述目标图像;According to a preset rule, extract frames from the video to be processed, and use the extracted video frames in the video to be processed as the target image; 其中,所述预设规则包括以下至少一种:Wherein, the preset rules include at least one of the following: 选取所述待处理视频中指定时刻对应的视频帧;Select the video frame corresponding to the specified moment in the video to be processed; 选取所述待处理视频中的关键帧,所述关键帧为所述待处理视频中包含信息最多的视频帧;Selecting the key frame in the video to be processed, the key frame is the video frame containing the most information in the video to be processed; 选取所述待处理视频中的场景转换帧,所述场景转换帧与相邻视频帧的相似度小于或等于预设相似度阈值,所述相邻视频帧为所述待处理视频中与所述场景转换帧相邻,且位于所述场景转换帧之前的视频帧。Select the scene transition frame in the video to be processed, the similarity between the scene transition frame and the adjacent video frame is less than or equal to the preset similarity threshold, and the adjacent video frame is the same as the video in the video to be processed. A scene transition frame is adjacent to and is a video frame preceding the scene transition frame. 3.根据权利要求1所述的方法,其特征在于,所述根据所述目标图像,通过预先训练的图像检测模型,确定所述目标图像对应的图像检测信息,包括:3. The method according to claim 1, wherein, according to the target image, determining the image detection information corresponding to the target image through a pre-trained image detection model, comprising: 对所述目标图像进行预处理,得到处理后的所述目标图像,所述预处理包括灰度化处理、几何变换处理和图像增强处理中的至少一种;Preprocessing the target image to obtain the processed target image, where the preprocessing includes at least one of grayscale processing, geometric transformation processing, and image enhancement processing; 将处理后的所述目标图像,作为所述图像检测模型的输入,得到所述图像检测模型输出的所述图像检测信息。The processed target image is used as the input of the image detection model to obtain the image detection information output by the image detection model. 4.根据权利要求1所述的方法,其特征在于,所述预设网络包括第一编码器和第二编码器,所述图像检测模型是通过以下方式训练得到的:4. The method according to claim 1, wherein the preset network comprises a first encoder and a second encoder, and the image detection model is obtained by training in the following manner: 获取所述无标注样本集和所述标注样本集;所述无标注样本集包括无标注图像样本,所述标注样本集包括标注图像样本以及所述标注图像样本对应的图像检测信息样本;obtaining the unlabeled sample set and the labeled sample set; the unlabeled sample set includes unlabeled image samples, and the labeled sample set includes labeled image samples and image detection information samples corresponding to the labeled image samples; 根据所述无标注样本集对所述预设网络进行训练,并从训练好的所述预设网络包括的所述第一编码器的卷积层中,确定所述目标卷积层;The preset network is trained according to the unlabeled sample set, and the target convolution layer is determined from the convolution layers of the first encoder included in the trained preset network; 根据所述标注样本集对所述预设神经网络层进行训练,并将训练好的所述预设神经网络层作为所述处理层。The preset neural network layer is trained according to the labeled sample set, and the trained preset neural network layer is used as the processing layer. 5.根据权利要求1所述的方法,其特征在于,所述预设网络包括第一编码器和第二编码器,所述图像检测模型是通过以下方式训练得到的:5. The method according to claim 1, wherein the preset network comprises a first encoder and a second encoder, and the image detection model is obtained by training in the following manner: 获取所述无标注样本集和所述标注样本集;所述无标注样本集包括无标注图像样本,所述标注样本集包括标注图像样本以及所述标注图像样本对应的图像检测信息样本;obtaining the unlabeled sample set and the labeled sample set; the unlabeled sample set includes unlabeled image samples, and the labeled sample set includes labeled image samples and image detection information samples corresponding to the labeled image samples; 根据所述无标注样本集对所述预设网络进行训练,并从训练好的所述预设网络包括的所述第一编码器的卷积层中,确定所述目标卷积层;The preset network is trained according to the unlabeled sample set, and the target convolution layer is determined from the convolution layers of the first encoder included in the trained preset network; 根据所述标注样本集对预设模型进行训练,所述预设模型包括所述目标卷积层和所述预设神经网络层,并将训练好的所述预设模型包括的所述预设神经网络层作为所述处理层。A preset model is trained according to the labeled sample set, the preset model includes the target convolution layer and the preset neural network layer, and the preset model included in the trained preset model is trained A neural network layer serves as the processing layer. 6.根据权利要求4或5所述的方法,其特征在于,所述无标注图像样本为多个,所述根据所述无标注样本集对所述预设网络进行训练,包括:6. The method according to claim 4 or 5, wherein there are multiple unlabeled image samples, and the training of the preset network according to the unlabeled sample set comprises: 从多个所述无标注图像样本中选取第一数量个无标注图像样本;selecting a first number of unlabeled image samples from a plurality of the unlabeled image samples; 针对第一数量个所述无标注图像样本中的每个无标注图像样本,将该无标注图像样本进行数据增广处理后,分别输入到所述第一编码器和所述第二编码器中,得到所述第一编码器输出的第一特征向量和所述第二编码器输出的第二特征向量;For each unlabeled image sample in the first number of unlabeled image samples, the unlabeled image sample is subjected to data augmentation processing, and then input to the first encoder and the second encoder respectively , obtain the first feature vector output by the first encoder and the second feature vector output by the second encoder; 根据每个所述无标注图像样本对应的所述第一特征向量和所述第二特征向量,对所述第一编码器和所述第二编码器进行更新;updating the first encoder and the second encoder according to the first feature vector and the second feature vector corresponding to each of the unlabeled image samples; 循环执行所述从多个所述无标注图像样本中选取第一数量个无标注图像样本,至所述根据每个所述无标注图像样本对应的所述第一特征向量和所述第二特征向量,对所述第一编码器和所述第二编码器进行更新的步骤,直至循环执行的次数达到预设次数。Circularly execute the selecting a first number of unlabeled image samples from a plurality of the unlabeled image samples, until the first feature vector and the second feature corresponding to each of the unlabeled image samples vector, the step of updating the first encoder and the second encoder until the number of loop execution times reaches a preset number of times. 7.根据权利要求6所述的方法,其特征在于,所述根据每个所述无标注图像样本对应的所述第一特征向量和所述第二特征向量,对所述第一编码器和所述第二编码器进行更新,包括:7. The method according to claim 6, wherein, according to the first feature vector and the second feature vector corresponding to each of the unlabeled image samples, the first encoder and the The second encoder is updated, including: 将每个所述无标注图像样本对应的所述第二特征向量依次输入到预设队列中,并更新所述预设队列,所述预设队列的元素数量为第二数量,所述第二数量小于或等于所述第一数量;The second feature vector corresponding to each of the unlabeled image samples is sequentially input into a preset queue, and the preset queue is updated. The number of elements in the preset queue is the second number, and the second the quantity is less than or equal to said first quantity; 根据每个所述无标注图像样本对应的所述第一特征向量和所述预设队列,对所述第一编码器进行更新;updating the first encoder according to the first feature vector corresponding to each of the unlabeled image samples and the preset queue; 在所述第一编码器更新完成后,根据更新后的所述第一编码器,对所述第二编码器进行更新。After the first encoder is updated, the second encoder is updated according to the updated first encoder. 8.一种图像处理装置,其特征在于,所述装置包括:8. An image processing device, wherein the device comprises: 获取模块,用于获取待处理视频中的目标图像;an acquisition module for acquiring the target image in the video to be processed; 确定模块,用于根据所述目标图像,通过预先训练的图像检测模型,确定所述目标图像对应的图像检测信息;a determination module, configured to determine image detection information corresponding to the target image through a pre-trained image detection model according to the target image; 其中,所述图像检测模型包括目标卷积层和处理层,所述目标卷积层用于提取所述目标图像的特征,所述处理层用于根据所述目标图像的特征确定所述图像检测信息,所述图像检测信息用于指示所述目标图像是否为异常图像;所述目标卷积层为第一编码器中的卷积层,所述第一编码器为利用无标注样本集对预设网络进行训练得到的,所述处理层为利用标注样本集对预设神经网络层进行训练得到的;Wherein, the image detection model includes a target convolution layer and a processing layer, the target convolution layer is used to extract the feature of the target image, and the processing layer is used to determine the image detection according to the feature of the target image information, the image detection information is used to indicate whether the target image is an abnormal image; the target convolutional layer is the convolutional layer in the first encoder, and the first encoder uses an unlabeled sample set to Suppose that the network is obtained by training, and the processing layer is obtained by training the preset neural network layer by using the labeled sample set; 处理模块,用于在所述图像检测信息指示所述目标图像为异常图像的情况下,对所述目标图像进行异常图像处理。A processing module, configured to perform abnormal image processing on the target image when the image detection information indicates that the target image is an abnormal image. 9.一种计算机可读介质,其上存储有计算机程序,其特征在于,该程序被处理装置执行时实现权利要求1-7中任一项所述方法的步骤。9. A computer-readable medium on which a computer program is stored, characterized in that, when the program is executed by a processing device, the steps of the method according to any one of claims 1-7 are implemented. 10.一种电子设备,其特征在于,包括:10. An electronic device, comprising: 存储装置,其上存储有计算机程序;a storage device on which a computer program is stored; 处理装置,用于执行所述存储装置中的所述计算机程序,以实现权利要求1-7中任一项所述方法的步骤。A processing device, configured to execute the computer program in the storage device, to implement the steps of the method of any one of claims 1-7.
CN202110621440.9A 2021-06-03 2021-06-03 Image processing method, image processing device, readable medium and electronic equipment Pending CN113222983A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110621440.9A CN113222983A (en) 2021-06-03 2021-06-03 Image processing method, image processing device, readable medium and electronic equipment
PCT/CN2022/089240 WO2022252881A1 (en) 2021-06-03 2022-04-26 Image processing method and apparatus, and readable medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110621440.9A CN113222983A (en) 2021-06-03 2021-06-03 Image processing method, image processing device, readable medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113222983A true CN113222983A (en) 2021-08-06

Family

ID=77082817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110621440.9A Pending CN113222983A (en) 2021-06-03 2021-06-03 Image processing method, image processing device, readable medium and electronic equipment

Country Status (2)

Country Link
CN (1) CN113222983A (en)
WO (1) WO2022252881A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113723341A (en) * 2021-09-08 2021-11-30 北京有竹居网络技术有限公司 Video identification method and device, readable medium and electronic equipment
CN113723344A (en) * 2021-09-08 2021-11-30 北京有竹居网络技术有限公司 Video identification method and device, readable medium and electronic equipment
CN113849645A (en) * 2021-09-28 2021-12-28 平安科技(深圳)有限公司 Mail classification model training method, device, equipment and storage medium
CN113870845A (en) * 2021-09-26 2021-12-31 平安科技(深圳)有限公司 Speech recognition model training method, device, equipment and medium
CN114328988A (en) * 2021-11-24 2022-04-12 腾讯科技(深圳)有限公司 Multimedia data feature extraction method, multimedia data retrieval method and device
CN114627102A (en) * 2022-03-31 2022-06-14 苏州浪潮智能科技有限公司 An image abnormality detection method, device, system and readable storage medium
WO2022252881A1 (en) * 2021-06-03 2022-12-08 北京有竹居网络技术有限公司 Image processing method and apparatus, and readable medium and electronic device
CN116128818A (en) * 2022-12-21 2023-05-16 北京沃东天骏信息技术有限公司 Image online processing method, device, electronic device and computer readable medium
CN116524295A (en) * 2023-04-17 2023-08-01 上海联影智能医疗科技有限公司 Image processing method, device, equipment and readable storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118468327B (en) * 2023-05-09 2025-02-21 京东城市(北京)数字科技有限公司 Sensitive information feature extraction method, device, electronic device and medium
CN117292211B (en) * 2023-11-27 2024-02-27 潍坊市海洋发展研究院 Water quality labeling image sending method and device, electronic equipment and computer readable medium
CN118101926B (en) * 2024-02-29 2024-09-13 北京积加科技有限公司 Video generation method, device, equipment and medium based on monitoring camera adjustment
CN118675088B (en) * 2024-06-26 2025-06-24 北京积加科技有限公司 Information verification method, device, electronic device and computer readable medium
CN118644811B (en) * 2024-08-15 2024-11-29 浙江大华技术股份有限公司 A video object detection method, device, electronic device and storage medium
CN120195578B (en) * 2025-05-21 2025-08-01 苏州元脑智能科技有限公司 Indicator light detection method, program product, electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389180A (en) * 2018-10-30 2019-02-26 国网四川省电力公司广元供电公司 A power equipment image-recognizing method and inspection robot based on deep learning
CN111008643A (en) * 2019-10-29 2020-04-14 平安科技(深圳)有限公司 Image classification method and device based on semi-supervised learning and computer equipment
CN112232384A (en) * 2020-09-27 2021-01-15 北京迈格威科技有限公司 Model training method, image feature extraction method, target detection method and device
CN112580581A (en) * 2020-12-28 2021-03-30 英特灵达信息技术(深圳)有限公司 Target detection method and device and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9424494B1 (en) * 2016-01-28 2016-08-23 International Business Machines Corporation Pure convolutional neural network localization
CN108288078B (en) * 2017-12-07 2020-09-29 腾讯科技(深圳)有限公司 Method, device and medium for recognizing characters in image
CN109831392B (en) * 2019-03-04 2020-10-27 中国科学技术大学 Semi-supervised network flow classification method
CN113222983A (en) * 2021-06-03 2021-08-06 北京有竹居网络技术有限公司 Image processing method, image processing device, readable medium and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389180A (en) * 2018-10-30 2019-02-26 国网四川省电力公司广元供电公司 A power equipment image-recognizing method and inspection robot based on deep learning
CN111008643A (en) * 2019-10-29 2020-04-14 平安科技(深圳)有限公司 Image classification method and device based on semi-supervised learning and computer equipment
CN112232384A (en) * 2020-09-27 2021-01-15 北京迈格威科技有限公司 Model training method, image feature extraction method, target detection method and device
CN112580581A (en) * 2020-12-28 2021-03-30 英特灵达信息技术(深圳)有限公司 Target detection method and device and electronic equipment

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022252881A1 (en) * 2021-06-03 2022-12-08 北京有竹居网络技术有限公司 Image processing method and apparatus, and readable medium and electronic device
CN113723341A (en) * 2021-09-08 2021-11-30 北京有竹居网络技术有限公司 Video identification method and device, readable medium and electronic equipment
CN113723344A (en) * 2021-09-08 2021-11-30 北京有竹居网络技术有限公司 Video identification method and device, readable medium and electronic equipment
CN113723341B (en) * 2021-09-08 2023-09-01 北京有竹居网络技术有限公司 Video identification method and device, readable medium and electronic equipment
CN113870845A (en) * 2021-09-26 2021-12-31 平安科技(深圳)有限公司 Speech recognition model training method, device, equipment and medium
CN113849645A (en) * 2021-09-28 2021-12-28 平安科技(深圳)有限公司 Mail classification model training method, device, equipment and storage medium
CN113849645B (en) * 2021-09-28 2024-06-04 平安科技(深圳)有限公司 Mail classification model training method, device, equipment and storage medium
CN114328988A (en) * 2021-11-24 2022-04-12 腾讯科技(深圳)有限公司 Multimedia data feature extraction method, multimedia data retrieval method and device
CN114627102A (en) * 2022-03-31 2022-06-14 苏州浪潮智能科技有限公司 An image abnormality detection method, device, system and readable storage medium
CN114627102B (en) * 2022-03-31 2024-02-13 苏州浪潮智能科技有限公司 An image anomaly detection method, device, system and readable storage medium
CN116128818A (en) * 2022-12-21 2023-05-16 北京沃东天骏信息技术有限公司 Image online processing method, device, electronic device and computer readable medium
CN116524295A (en) * 2023-04-17 2023-08-01 上海联影智能医疗科技有限公司 Image processing method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
WO2022252881A1 (en) 2022-12-08

Similar Documents

Publication Publication Date Title
CN113222983A (en) Image processing method, image processing device, readable medium and electronic equipment
CN113313064A (en) Character recognition method and device, readable medium and electronic equipment
CN113449070A (en) Multimodal data retrieval method, device, medium and electronic equipment
CN114037990A (en) Character recognition method, device, equipment, medium and product
CN114494709B (en) Method for generating feature extraction model, method and device for extracting image features
CN112330788B (en) Image processing method, device, readable medium and electronic device
CN112883968A (en) Image character recognition method, device, medium and electronic equipment
CN113033682A (en) Video classification method and device, readable medium and electronic equipment
CN114067327B (en) Text recognition method, device, readable medium and electronic device
CN118071428A (en) Intelligent processing system and method for multi-mode monitoring data
CN113140012B (en) Image processing method, device, medium and electronic equipment
CN113723341A (en) Video identification method and device, readable medium and electronic equipment
CN115294501A (en) Video identification method, video identification model training method, medium and electronic device
CN113255812A (en) Video frame detection method and device and electronic equipment
CN113033680A (en) Video classification method and device, readable medium and electronic equipment
CN112990345A (en) Writing quality evaluation method and device and electronic equipment
CN113033707A (en) Video classification method and device, readable medium and electronic equipment
CN114428872B (en) Image retrieval method, device, storage medium and electronic device
CN113240027B (en) Image classification method, device, readable medium and electronic device
CN113033552B (en) Text recognition method, device and electronic device
CN110765304A (en) Image processing method, image processing device, electronic equipment and computer readable medium
CN114117127A (en) Video generation method and device, readable medium and electronic equipment
CN111898658B (en) Image classification method and device and electronic equipment
CN111311609B (en) Image segmentation method and device, electronic equipment and storage medium
CN111639198A (en) Media file identification method and device, readable medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载