CN109902617B - Picture identification method and device, computer equipment and medium - Google Patents
Picture identification method and device, computer equipment and medium Download PDFInfo
- Publication number
- CN109902617B CN109902617B CN201910138706.7A CN201910138706A CN109902617B CN 109902617 B CN109902617 B CN 109902617B CN 201910138706 A CN201910138706 A CN 201910138706A CN 109902617 B CN109902617 B CN 109902617B
- Authority
- CN
- China
- Prior art keywords
- picture
- interference
- disturbance
- encoder
- sample
- 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.)
- Active
Links
Images
Landscapes
- Image Processing (AREA)
Abstract
The embodiment of the invention discloses a picture identification method, a picture identification device, computer equipment and a medium. The method comprises the following steps: inputting a first picture uploaded by a user into an interference removal self-encoder for preprocessing so as to filter interference in the first picture and output a second picture, wherein the interference removal self-encoder is obtained by training at least two types of interference sample sets, and the interference modes added in the different types of interference sample sets comprise at least two of the following modes: noise, affine transformation, filtering fuzzification, brightness change and monochromatization; and inputting the second picture into a picture yellow identification model for identification. The embodiment of the invention carries out interference-removing pretreatment on the picture uploaded by the user by using the pre-trained interference-removing self-encoder, thereby solving the problem that the obscene pornographic picture is successfully uploaded to the network through the identification of the picture yellow identification model by the countercheck sample technology; the method can realize the recognition of the picture processed by the countermeasure sample technology, improve the filtering capacity of the countermeasure sample and purify the network environment.
Description
Technical Field
The embodiment of the invention relates to the internet technology, in particular to a picture identification method, a picture identification device, computer equipment and a medium.
Background
Most internet applications allow users to upload avatars, pictures, etc., the content of which is all the way around. However, countries have strict regulations on the contents of pictures uploaded to the network, and yellow pictures, i.e., obscene pornographic pictures, are prohibited from being uploaded and shared. Therefore, before the pictures are successfully uploaded to the network, the pictures are detected to determine whether the pictures are pictures which cannot be transmitted on the network, such as obscene pornography pictures.
At present, some mainstream AI companies, cloud service manufacturers and business safety manufacturers provide API services for detecting whether pictures and head portraits are obscene pornographic pictures, which are referred to as "yellow identification services" for short. Generally, the yellow-identification service extracts features in a picture based on a deep learning model, and judges whether the content of the picture is yellow-associated according to the extracted features.
However, when the yellow-identified service model used by the yellow-identified service is uncertain, some illegal users (network black products) generate an interference picture by adding disturbance on an uploaded picture, carry out black box attack on the yellow-identified service model, try to bypass yellow-identified filtering, enable the obscene pornographic picture not to be normally identified, and release the obscene pornographic picture on the network, thereby disturbing the network order.
Disclosure of Invention
The embodiment of the invention provides a picture identification method, a picture identification device, computer equipment and a medium, which are used for identifying pictures processed by a countermeasure sample technology and improving the filtering capacity of the countermeasure samples.
In a first aspect, an embodiment of the present invention provides a picture identification method, where the method includes:
inputting a first picture uploaded by a user into an interference removal self-encoder for preprocessing so as to filter interference in the first picture and output a second picture, wherein the interference removal self-encoder is obtained by training at least two types of interference sample sets, and the interference modes added in the different types of interference sample sets comprise at least two of the following modes: noise, affine transformation, filtering fuzzification, brightness change and monochromatization;
and inputting the second picture into a picture yellow identification model for identification.
In a second aspect, an embodiment of the present invention further provides an image recognition apparatus, where the apparatus includes:
the image preprocessing module is used for inputting a first image uploaded by a user into an interference-free self-encoder for preprocessing so as to filter interference in the first image and output a second image, wherein the interference-free self-encoder is obtained by training at least two types of interference sample sets, and the interference modes added in the different types of interference sample sets include at least two of the following: noise, affine transformation, filtering fuzzification, brightness change and monochromatization;
and the picture identification module is used for inputting the second picture into the picture yellow identification model for identification.
In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:
one or more processors;
storage means for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the picture recognition method according to any of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the picture identification method according to any one of the embodiments of the present invention.
According to the embodiment of the invention, the pre-trained interference-removing self-encoder is used for carrying out interference-removing pretreatment on the picture uploaded by the user to obtain the picture with the interference being filtered out, and then the picture after the pretreatment is input into the picture yellow identification model for identification, so that the problem that the obscene pornographic picture is successfully uploaded to a network through the identification of the picture yellow identification model by the countermeasure sample technology is solved; the method can realize the recognition of the picture processed by the countermeasure sample technology, improve the filtering capacity of the countermeasure sample and purify the network environment.
Drawings
FIG. 1 is a flowchart illustrating a method for identifying pictures according to a first embodiment of the present invention;
FIG. 2a is a flowchart of a picture recognition method according to a second embodiment of the present invention;
FIG. 2b is a schematic diagram of a neural network structure of a self-encoder according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a picture recognition apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a picture identification method according to an embodiment of the present invention, where the embodiment is applicable to a case of performing yellow-identification filtering on a picture uploaded to a network by a user, and the method may be implemented by a picture identification device, which may be implemented by software and/or hardware in a device, and the device may be configured in a computer device that performs yellow-identification processing, for example, a server that a third-party service provider provides a service for the user. As shown in fig. 1, the image recognition method specifically includes:
s110, inputting a first picture uploaded by a user into an interference-free self-encoder for preprocessing, so as to filter interference in the first picture, and outputting a second picture, wherein the interference-free self-encoder is obtained by training at least two types of interference sample sets, and the interference modes added in the different types of interference sample sets include at least two of the following: noise, affine transformation, filtering blurring, brightness variation and monochromatization.
The content of the first picture is very extensive, and can be an avatar or a content picture uploaded by an internet user in a network or network application. However, according to the related laws and regulations of the national internet security management, the head portrait or the picture uploaded by the user cannot relate to the contents causing adverse social effects such as obscene pornography, violent murder and the like. Therefore, the first picture needs to be filtered, and the first picture can be successfully published to the network only if the first picture is determined not to contain sensitive content. In some cases, the first picture may be subjected to picture interference processing by the illegal user through a countercheck sample technology, so that the picture containing the obscency, violence and the like bypasses the identification of the picture yellow identification model and is released to the network.
Further, the first picture is input into an interference-free self-encoder to be preprocessed, so that the interference of the first picture can be filtered out, and a second picture is obtained. For the first picture to which no interference information is added, the pre-processing of the de-interfering self-encoder has no effect on this picture. The interference-removing self-encoder is obtained by training at least two types of interference sample sets, not only can filter interference of single image interference processing, but also can filter interference of a combination of multiple interference processing methods, and the effect of filtering interference in an anti-sample image is improved.
Specifically, each type of anti-interference sample set includes at least one sample pair, and each sample pair includes an original picture and a countermeasure sample corresponding to the original picture. In a type of anti-interference sample set, each anti-interference sample is subjected to the same type of disturbance processing relative to the corresponding original picture. The same type means that the combination of the disturbance modes used is the same. The combination of perturbation modes may comprise a single perturbation mode or may also comprise a combination of two or more perturbation modes. In a type of anti-interference sample set, the adopted disturbance mode combinations are the same, but the specific parameters adopted by each disturbance mode can be the same or different. The disturbance modes adopted in the embodiment of the invention may be various, and optionally, the disturbance modes include at least two of noise, affine transformation, filtering blurring, brightness change and monochromatization.
And S120, inputting the second picture into a picture yellow identification model for identification.
The yellow identification model is usually a network model based on deep learning.
And the second picture has no interference information and can be input into the picture yellow identification model to extract and identify the picture content. When the second picture is judged to contain the contents of obscene pornography, violence murder and the like, the first picture can be shielded, and a user who uploads the picture is prompted or warned. If the second picture does not contain the contents of obscene pornography, violence murder and the like, the second picture can be successfully issued to a network or related network applications through identification so as to be browsed by more users.
According to the technical scheme, the interference removing preprocessing is carried out on the picture uploaded by the user by using the pre-trained interference removing self-encoder to obtain the picture with the interference being filtered, and then the preprocessed picture is input into the picture yellow identification model for identification, so that the problem that the obscene pornographic picture is successfully uploaded to a network through the identification of the picture yellow identification model by the countermeasure sample technology is solved; the method can realize the recognition of the picture processed by the countermeasure sample technology, improve the filtering capacity of the countermeasure sample and purify the network environment.
The technical scheme of the embodiment of the invention is particularly suitable for the black box attack initiated by illegal users (network black products) when the deep learning model used by the yellow identification service is uncertain. This black box attack is different from the white box attack. The white-box attack is usually carried out by using a targeted countermeasure sample algorithm such as FGSM, CW and JSMA when a deep learning model of the yellow identification service is known. And when the black box attack is not determined, the complicated and changeable black box attack can be initiated through disturbance modes such as noise, affine transformation, filtering fuzzification, brightness change, monochromization and the like. The embodiment of the invention effectively solves the problem that the user does not launch the black box attack, filters the disturbance increased in the black box attack, and enables the deep learning model of the yellow identification service to effectively perform identification and filtration.
Example two
Fig. 2a is a flowchart of a picture identification method according to a second embodiment of the present invention. The present embodiment provides a training procedure for a de-interference self-encoder based on the alternatives of the above embodiments. As shown in fig. 2a, the picture identification method provided in the embodiment of the present invention includes the following steps:
s210, adding at least two kinds of interference on the basis of the original picture to form at least two kinds of interference sample sets.
The original pictures are pictures without interference, the contents of the pictures can be contents of people, landscapes, characters, articles and the like, and if the user head portrait is used for yellow identification service, various types of original head portraits are preferably adopted as the original pictures for training. The way of acquiring the original picture can be obtained by shooting through a terminal with a camera function, and can also be obtained by intercepting a certain video. After the original picture is acquired, the generation of the sample set is started. Firstly, processing an original picture through one or more disturbance modes of noise addition, affine transformation addition, filtering fuzzification change superposition, brightness change superposition and monochromization change superposition to form an interference picture. Then, the original picture and the interference picture are used as a sample pair, and at least two types of sample pair sets are selected as the interference sample set. And determining to adopt the same perturbation mode combination for each type of interference sample set.
For example, affine transformation and filtering blurring change are added to a first original picture to generate a first interference picture, where the first original picture and the first interference picture are a sample pair. Similarly, affine transformation and filtering blurring change are added to other original pictures to generate corresponding interference pictures, so that a plurality of sample pairs are obtained, and the sample pairs obtained through the same change belong to the same sample pair set, namely the first sample pair set. If filtering fuzzification change, brightness change and monochromization change are superposed in the first original picture, corresponding interference pictures are also generated to form corresponding sample pairs, and the obtained sample pair set is a second type sample pair set different from the first type sample pair set. Similarly, after different types and amounts of interference information are selected to be superimposed on the original picture, more sample pair sets of different types can be obtained. Therefore, at least two types of sample pair sets are selected as the interference sample set, so that the training samples are more comprehensive, more disturbance modes can be covered, and the filtering rate of the confrontation samples can be improved.
In another embodiment, before the original picture is processed by one or more disturbance modes of adding noise, increasing affine transformation, superimposing filtering blurring change, superimposing brightness change and superimposing monochromatization change, at least one disturbance parameter value in any type of disturbance mode can be adjusted to form at least two kinds of disturbances, so that the number of generated disturbance pictures for the same original picture is increased, and the number of sample pair sets is increased. For example, adjusting the value of the at least one perturbation parameter in any type of perturbation mode to form the at least two perturbations may include at least one of:
adjusting scaling parameters in affine transformation to form perturbations of different scaling; adjusting input parameters of a fuzzy controller in filtering fuzzification to form disturbance with different fuzzy degrees; adjusting the brightness value in the brightness change to form disturbance of different brightness; and adjusting the pixel value of the pixel point in the monochromatization change to form the disturbance of different colors. When one of the disturbance modes comprises a plurality of disturbance parameters, a plurality of parameter values can be changed simultaneously to form different interference pictures, such as a turning angle parameter and a shearing angle parameter in affine transformation and a brightness value in brightness change.
And S220, respectively taking the sample pairs in each interference sample set as an input picture and an output picture, and inputting the input pictures and the output pictures into an auto-encoder to be trained to obtain the interference-free auto-encoder.
Auto Encoders (Auto Encoders) is a common model in deep learning, and its structure is a three-layer neural network structure, which includes an input layer, a hidden layer and an output layer, wherein the output layer and the input layer have the same dimension, and refer to fig. 2b specifically. Specifically, the input layer and the output layer represent an input layer and an output layer of a neural network respectively, the hidden layer bears the work of an encoder and a decoder, the encoding process is the process of converting from a high-dimensional input layer to a low-dimensional hidden layer, and conversely, the decoding process is the process of converting from the low-dimensional hidden layer to the high-dimensional output layer, so that the self-encoder is a lossy conversion process, and a loss function is defined by comparing the difference between the input and the output. The training process does not need to mark data, and the whole process is a process of continuously solving the minimization of the loss function.
In this embodiment, an interference picture superimposed with noise in any sample pair is input to an input layer, then, a picture restored by a hidden layer of a self-encoder is obtained at an output layer, then, an original picture and the restored picture are simultaneously input to a loss function, whether the automatic encoder needs to be optimized is judged according to an output result of the loss function, when the output result of the loss function meets a preset condition, a training process can be stopped, and finally, the interference-free self-encoder is obtained.
And S230, inputting the first picture uploaded by the user into an interference-free self-encoder for preprocessing so as to filter interference in the first picture and output a second picture.
The interference-free self-encoder is obtained by training at least two types of interference sample sets through S210 and S220, and the interference-free self-encoder includes at least two types of interference sample sets: noise, affine transformation, filtering blurring, brightness variation and monochromatization.
Before the first picture is input into the picture yellow identification model, the first picture can be input into an interference elimination self-encoder to be preprocessed so as to filter out possible interference.
S240, inputting the second picture into a picture yellow identification model for identification.
According to the technical scheme, interference noise is added to an original picture through different disturbance modes to form different interference sample sets, a self-encoder is trained to obtain an interference-removing self-encoder capable of filtering various interferences, then the interference-removing self-encoder is used for carrying out interference-removing preprocessing on the picture uploaded by a user to obtain the image with the interference removed, the preprocessed picture is input to a picture yellow-identification model for identification, and the problem that the picture with the obscene pornography is successfully uploaded to a network through identification of the picture yellow-identification model by a confrontation sample technology is solved; the method can realize the recognition of the picture processed by the countermeasure sample technology, improve the filtering capacity of the countermeasure sample and purify the network environment.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a picture identification device according to a third embodiment of the present disclosure, where the third embodiment of the present disclosure is applicable to a case where a picture uploaded to a network by a user is subjected to yellow identification filtering.
As shown in fig. 3, the image recognition apparatus in the embodiment of the present disclosure includes: a picture preprocessing module 310 and a picture recognition module 320.
The image preprocessing module 310 is configured to input a first image uploaded by a user to an interference-free self-encoder for preprocessing, so as to filter interference in the first image and output a second image, where the interference-free self-encoder is obtained by training at least two types of interference sample sets, and the interference modes added in the different types of interference sample sets include at least two of the following: noise, affine transformation, filtering fuzzification, brightness change and monochromatization; and the picture identification module 320 is configured to input the second picture to a picture yellow identification model for identification.
According to the technical scheme, the interference removing preprocessing is carried out on the picture uploaded by the user by using the pre-trained interference removing self-encoder to obtain the picture with the interference being filtered, and then the preprocessed picture is input into the picture yellow identification model for identification, so that the problem that the obscene pornographic picture is successfully uploaded to a network through the identification of the picture yellow identification model by the countermeasure sample technology is solved; the method can realize the recognition of the picture processed by the countermeasure sample technology, improve the filtering capacity of the countermeasure sample and purify the network environment.
Further, the picture recognition apparatus further includes:
the sample set generating module is used for increasing at least two types of interference on the basis of the original picture to form at least two types of interference sample sets;
and the self-encoder training module is used for respectively taking the sample pairs in each interference sample set as input pictures and output pictures and inputting the input pictures and the output pictures into a self-encoder for training.
Optionally, the sample set generating module is specifically configured to:
acquiring an original picture;
processing the original picture by one or more disturbance modes of noise addition, affine transformation addition, filtering fuzzification change superposition, brightness change superposition and monochromatization change superposition to form an interference picture;
and taking the original picture and the interference picture as a sample pair, and selecting at least two types of sample pair sets as the interference sample set.
Optionally, the sample set generating module is further configured to, before processing the original picture through one or more disturbance modes of adding noise, increasing affine transformation, superimposing filtering blurring change, superimposing brightness change, and superimposing monochromatization change, adjust at least one disturbance parameter value in any type of disturbance mode to form at least two kinds of disturbances.
Optionally, the sample set generating module is further configured to:
adjusting scaling parameters in affine transformation to form perturbations of different scaling; and/or
Adjusting input parameters of a fuzzy controller in filtering fuzzification to form disturbance with different fuzzy degrees; and/or
Adjusting the brightness value in the brightness change to form disturbance of different brightness; and/or
And adjusting the pixel value of the pixel point in the monochromatization change to form the disturbance of different colors.
Optionally, the input layer and the output layer of the self-encoder have the same structure, so that the output picture has the same resolution as the original picture.
The picture identification device provided by the embodiment of the invention can execute the picture identification method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 is a schematic structural diagram of a computer device in the fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary computer device 412 suitable for use in implementing embodiments of the present invention. The computer device 412 shown in FIG. 4 is only one example and should not impose any limitations on the functionality or scope of use of embodiments of the present invention.
As shown in FIG. 4, computer device 412 is in the form of a general purpose computing device. Components of computer device 412 may include, but are not limited to: one or more processors or processing units 416, a system memory 428, and a bus 418 that couples the various system components including the system memory 428 and the processing unit 416.
The system memory 428 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)430 and/or cache memory 432. The computer device 412 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 434 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 418 by one or more data media interfaces. Memory 428 can include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 440 having a set (at least one) of program modules 442 may be stored, for instance, in memory 428, such program modules 442 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 442 generally perform the functions and/or methodologies of the described embodiments of the invention.
The computer device 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing device, display 424, etc.), with one or more devices that enable a user to interact with the computer device 412, and/or with any devices (e.g., network card, modem, etc.) that enable the computer device 412 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 422. Also, computer device 412 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) through network adapter 420. As shown, network adapter 420 communicates with the other modules of computer device 412 over bus 418. It should be appreciated that although not shown in FIG. 4, other hardware and/or software modules may be used in conjunction with the computer device 412, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 416 executes various functional applications and data processing by running the program stored in the system memory 428, for example, implementing the picture recognition method provided by the embodiment of the present invention, the method mainly includes:
inputting a first picture uploaded by a user into an interference removal self-encoder for preprocessing so as to filter interference in the first picture and output a second picture, wherein the interference removal self-encoder is obtained by training at least two types of interference sample sets, and the interference modes added in the different types of interference sample sets comprise at least two of the following modes: noise, affine transformation, filtering fuzzification, brightness change and monochromatization;
and inputting the second picture into a picture yellow identification model for identification.
EXAMPLE five
The fifth embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored thereon, and when the computer program is executed by a processor, the method for recognizing an image according to the fifth embodiment of the present invention is implemented, where the method mainly includes:
inputting a first picture uploaded by a user into an interference removal self-encoder for preprocessing so as to filter interference in the first picture and output a second picture, wherein the interference removal self-encoder is obtained by training at least two types of interference sample sets, and the interference modes added in the different types of interference sample sets comprise at least two of the following modes: noise, affine transformation, filtering fuzzification, brightness change and monochromatization;
and inputting the second picture into a picture yellow identification model for identification.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. 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 (a non-exhaustive list) of the computer readable storage medium would include the following: 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 context of this document, 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.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, 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 wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like 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).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (8)
1. A picture recognition method is characterized by comprising the following steps:
inputting a first picture uploaded by a user into an interference-free self-encoder for preprocessing so as to filter interference in the first picture and output a second picture; the interference-free self-encoder is obtained by training at least two types of interference sample sets, wherein the at least two types of interference sample sets are obtained by adding at least two interference modes on the basis of an original picture; the disturbance modes added to the different types of interference sample sets include at least two of the following: noise, affine transformation, filtering fuzzification, brightness change and monochromatization;
inputting the second picture into a picture yellow identification model for identification;
before adding at least two disturbance modes on the basis of the original picture, the method includes: adjusting at least one disturbance parameter value in any type of disturbance mode to form at least two kinds of disturbances;
wherein the adjusting at least one disturbance parameter value in any type of disturbance mode to form at least two kinds of disturbances comprises at least one of the following:
adjusting scaling parameters in affine transformation to form perturbations of different scaling;
adjusting input parameters of a fuzzy controller in filtering fuzzification to form disturbance with different fuzzy degrees;
adjusting the brightness value in the brightness change to form disturbance of different brightness;
adjusting the pixel value of the pixel point in the monochromatization change to form disturbance of different colors;
when one perturbation mode comprises a plurality of perturbation parameters, a plurality of parameter values are changed simultaneously to form different interference pictures.
2. The method of claim 1, further comprising:
adding at least two kinds of interference on the basis of an original picture to form at least two kinds of interference sample sets;
and respectively taking the sample pairs in each interference sample set as an input picture and an output picture, and inputting the input pictures and the output pictures to a self-encoder for training.
3. The method of claim 2, wherein adding at least two types of interference on the basis of the original picture to form at least two types of interference sample sets comprises:
acquiring an original picture;
processing the original picture by one or more disturbance modes of noise addition, affine transformation addition, filtering fuzzification change superposition, brightness change superposition and monochromatization change superposition to form an interference picture;
and taking the original picture and the interference picture as a sample pair, and selecting at least two types of sample pair sets as the interference sample set.
4. The method according to any of claims 1-3, wherein the input and output layer structures of the self-encoder are the same, so that the output picture has the same resolution as the original picture.
5. An image recognition apparatus, comprising:
the image preprocessing module is used for inputting a first image uploaded by a user into an interference-free self-encoder for preprocessing so as to filter interference in the first image and output a second image; the interference-free self-encoder is obtained by training at least two types of interference sample sets, wherein the at least two types of interference sample sets are obtained by adding at least two interference modes on the basis of an original picture; the disturbance modes added to the different types of interference sample sets include at least two of the following: noise, affine transformation, filtering fuzzification, brightness change and monochromatization;
the picture identification module is used for inputting the second picture into a picture yellow identification model for identification;
the sample set generation module is used for adjusting at least one disturbance parameter value in any type of disturbance mode to form at least two disturbances before adding at least two disturbance modes on the basis of the original picture;
wherein the sample set generating module is further configured to perform at least one of: adjusting scaling parameters in affine transformation to form perturbations of different scaling; adjusting input parameters of a fuzzy controller in filtering fuzzification to form disturbance with different fuzzy degrees; adjusting the brightness value in the brightness change to form disturbance of different brightness; adjusting the pixel value of the pixel point in the monochromatization change to form disturbance of different colors;
when one perturbation mode comprises a plurality of perturbation parameters, a plurality of parameter values are changed simultaneously to form different interference pictures.
6. The apparatus of claim 5, further comprising:
the sample set generating module is used for increasing at least two types of interference on the basis of the original picture to form at least two types of interference sample sets;
and the self-encoder training module is used for respectively taking the sample pairs in each interference sample set as input pictures and output pictures and inputting the input pictures and the output pictures into a self-encoder for training.
7. A computer device, characterized in that the computer device comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the picture recognition method as claimed in any one of claims 1-4.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the picture recognition method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910138706.7A CN109902617B (en) | 2019-02-25 | 2019-02-25 | Picture identification method and device, computer equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910138706.7A CN109902617B (en) | 2019-02-25 | 2019-02-25 | Picture identification method and device, computer equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109902617A CN109902617A (en) | 2019-06-18 |
CN109902617B true CN109902617B (en) | 2022-04-12 |
Family
ID=66945583
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910138706.7A Active CN109902617B (en) | 2019-02-25 | 2019-02-25 | Picture identification method and device, computer equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109902617B (en) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110717028B (en) * | 2019-10-18 | 2022-02-15 | 支付宝(杭州)信息技术有限公司 | Method and system for eliminating interference problem pairs |
CN110990795A (en) * | 2019-11-22 | 2020-04-10 | 支付宝(杭州)信息技术有限公司 | Privacy information protection method and device based on countermeasure sample and electronic equipment |
CN113408558B (en) * | 2020-03-17 | 2024-03-08 | 百度在线网络技术(北京)有限公司 | Method, apparatus, device and medium for model verification |
CN111460930A (en) * | 2020-03-17 | 2020-07-28 | 深圳市创维群欣安防科技股份有限公司 | Method, storage medium and equipment for safely auditing media file |
CN113542724B (en) * | 2020-04-16 | 2023-09-15 | 福建天泉教育科技有限公司 | Automatic detection method and system for video resources |
CN111600851B (en) * | 2020-04-27 | 2022-03-08 | 浙江工业大学 | Feature filtering defense method for deep reinforcement learning model |
CN112215227B (en) * | 2020-12-09 | 2021-04-09 | 鹏城实验室 | Image target detection model attack method and device, terminal equipment and storage medium |
CN112686289A (en) * | 2020-12-24 | 2021-04-20 | 微梦创科网络科技(中国)有限公司 | Picture classification method and device |
CN113420326B (en) * | 2021-06-08 | 2022-06-21 | 浙江工业大学之江学院 | Deep reinforcement learning-oriented model privacy protection method and system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104992177A (en) * | 2015-06-12 | 2015-10-21 | 安徽大学 | Network pornographic image detection method based on deep convolutional neural network |
CN107229946A (en) * | 2017-05-11 | 2017-10-03 | 宸盛科华(北京)科技有限公司 | Porny detection method and device based on artificial neural network |
CN108154134A (en) * | 2018-01-11 | 2018-06-12 | 天格科技(杭州)有限公司 | Internet live streaming pornographic image detection method based on depth convolutional neural networks |
CN108491837A (en) * | 2018-03-07 | 2018-09-04 | 浙江工业大学 | A kind of confrontation attack method improving car plate attack robust |
CN108537271A (en) * | 2018-04-04 | 2018-09-14 | 重庆大学 | A method of resisting sample is attacked based on convolution denoising self-editing ink recorder defence |
CN108615048A (en) * | 2018-04-04 | 2018-10-02 | 浙江工业大学 | It is evolved based on disturbance and fights the defence method of sexual assault to Image Classifier |
CN108961217A (en) * | 2018-06-08 | 2018-12-07 | 南京大学 | A kind of detection method of surface flaw based on positive example training |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106971378A (en) * | 2016-08-23 | 2017-07-21 | 上海海洋大学 | A kind of removing rain based on single image method based on depth denoising self-encoding encoder |
CN106384093B (en) * | 2016-09-13 | 2018-01-02 | 东北电力大学 | A kind of human motion recognition method based on noise reduction autocoder and particle filter |
US10990677B2 (en) * | 2017-06-05 | 2021-04-27 | Microsoft Technology Licensing, Llc | Adversarial quantum machine learning |
CN107609648B (en) * | 2017-07-21 | 2021-02-12 | 哈尔滨工程大学 | Genetic algorithm combined with stacking noise reduction sparse automatic encoder |
CN108459955B (en) * | 2017-09-29 | 2020-12-22 | 重庆大学 | Software defect prediction method based on deep self-coding network |
CN107884475A (en) * | 2017-10-18 | 2018-04-06 | 常州大学 | A kind of city gas pipeline method for diagnosing faults based on deep learning neutral net |
CN108062572B (en) * | 2017-12-28 | 2021-04-06 | 华中科技大学 | Hydroelectric generating set fault diagnosis method and system based on DdAE deep learning model |
CN108304810B (en) * | 2018-02-07 | 2021-05-28 | 西安交通大学 | Underwater bionic lateral line water pressure and water flow field information detection method based on neural network |
CN108846410A (en) * | 2018-05-02 | 2018-11-20 | 湘潭大学 | Power Quality Disturbance Classification Method based on sparse autocoding deep neural network |
-
2019
- 2019-02-25 CN CN201910138706.7A patent/CN109902617B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104992177A (en) * | 2015-06-12 | 2015-10-21 | 安徽大学 | Network pornographic image detection method based on deep convolutional neural network |
CN107229946A (en) * | 2017-05-11 | 2017-10-03 | 宸盛科华(北京)科技有限公司 | Porny detection method and device based on artificial neural network |
CN108154134A (en) * | 2018-01-11 | 2018-06-12 | 天格科技(杭州)有限公司 | Internet live streaming pornographic image detection method based on depth convolutional neural networks |
CN108491837A (en) * | 2018-03-07 | 2018-09-04 | 浙江工业大学 | A kind of confrontation attack method improving car plate attack robust |
CN108537271A (en) * | 2018-04-04 | 2018-09-14 | 重庆大学 | A method of resisting sample is attacked based on convolution denoising self-editing ink recorder defence |
CN108615048A (en) * | 2018-04-04 | 2018-10-02 | 浙江工业大学 | It is evolved based on disturbance and fights the defence method of sexual assault to Image Classifier |
CN108961217A (en) * | 2018-06-08 | 2018-12-07 | 南京大学 | A kind of detection method of surface flaw based on positive example training |
Also Published As
Publication number | Publication date |
---|---|
CN109902617A (en) | 2019-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109902617B (en) | Picture identification method and device, computer equipment and medium | |
CN109886210B (en) | Traffic image recognition method and device, computer equipment and medium | |
CN113554089B (en) | Image classification countermeasure sample defense method and system and data processing terminal | |
CN110717522B (en) | Countermeasure defense method for image classification network and related device | |
CN110851835B (en) | Image model detection method and device, electronic equipment and storage medium | |
Chen et al. | Median filtering forensics based on convolutional neural networks | |
CN109961444B (en) | Image processing method and device and electronic equipment | |
CN107545241A (en) | Neural network model is trained and biopsy method, device and storage medium | |
Qureshi et al. | Bibliography of digital image anti‐forensics and anti‐anti‐forensics techniques | |
Chen et al. | Effective and adaptive algorithm for pepper‐and‐salt noise removal | |
CN113486377A (en) | Image encryption method and device, electronic equipment and readable storage medium | |
CN110991246A (en) | Video detection method and system | |
CN115358952A (en) | Image enhancement method, system, equipment and storage medium based on meta-learning | |
CN113746780A (en) | Abnormal host detection method, device, medium and equipment based on host image | |
CN114282258A (en) | Screen capture data desensitization method and device, computer equipment and storage medium | |
CN110069907A (en) | Big data source tracing method and system based on digital watermarking | |
CN117914555A (en) | Training and flow detection method and device for intelligent gateway | |
CN117710295A (en) | Image processing method, device, apparatus, medium, and program product | |
CN113378118A (en) | Method, apparatus, electronic device, and computer storage medium for processing image data | |
CN110674497A (en) | Malicious program similarity calculation method and device | |
Nataraj et al. | Holistic image manipulation detection using pixel co-occurrence matrices | |
CN112052863B (en) | Image detection method and device, computer storage medium and electronic equipment | |
CN114417397A (en) | Behavior portrait construction method and device, storage medium and computer equipment | |
CN113420293A (en) | Android malicious application detection method and system based on deep learning | |
Aumayr et al. | U Can’t (re) Touch This–A Deep Learning Approach for Detecting Image Retouching |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |