WO2020258667A1 - Image recognition method and apparatus, and non-volatile readable storage medium and computer device - Google Patents

Image recognition method and apparatus, and non-volatile readable storage medium and computer device Download PDF

Info

Publication number
WO2020258667A1
WO2020258667A1 PCT/CN2019/118187 CN2019118187W WO2020258667A1 WO 2020258667 A1 WO2020258667 A1 WO 2020258667A1 CN 2019118187 W CN2019118187 W CN 2019118187W WO 2020258667 A1 WO2020258667 A1 WO 2020258667A1
Authority
WO
WIPO (PCT)
Prior art keywords
network model
image
discriminant
images
trained
Prior art date
Application number
PCT/CN2019/118187
Other languages
French (fr)
Chinese (zh)
Inventor
王健宗
赵峰
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020258667A1 publication Critical patent/WO2020258667A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • This application relates to the field of image recognition technology, in particular to image recognition methods and devices, non-volatile readable storage media and computer equipment.
  • the active forensics technology needs to add verification information to the image in advance, and the images obtained for most application scenarios do not contain a priori information, so the active forensics technology has great limitations; the existing The passive blind forensics technology mainly relies on image statistical characteristics or shallow feature information, such as gray value, gray change, etc.
  • the existing passive blind forensics technology is very dependent on the selection of shallow features, and the quality of shallow features affects the image The accuracy of the recognition result has a great influence.
  • the passive blind forensics technology requires a large number of forged samples, the establishment of the forged sample set generally needs to be completed manually, which consumes a lot of time and energy, and the labor cost is high.
  • this application provides an image recognition method and device, a non-volatile readable storage medium, and computer equipment.
  • the main purpose is to solve the existing passive blind forensics technology that relies too much on image statistical characteristics or shallow feature information, and the result of image recognition
  • an image recognition method which includes:
  • the final discriminant network model is used to identify the target image, and it is determined that the target image is a fake image or a real image.
  • an image recognition device which includes:
  • the generation module is used to use the generated network model trained in the deep convolution against the generated network model to generate fake images according to the tampered data;
  • the training module is used to train the discriminant network model trained in the deep convolutional confrontation generation network model by using the image discrimination sample set composed of the generated fake image and the preset real image to obtain the final discriminant network model;
  • the recognition module is used to recognize the target image using the final discriminant network model, and determine whether the target image is a fake image or a real image.
  • a non-volatile readable storage medium having computer readable instructions stored thereon, and the program is executed by a processor to realize the above-mentioned image recognition method.
  • a computer device including a non-volatile readable storage medium, a processor, and computer readable instructions stored on the non-volatile readable storage medium and running on the processor , When the processor executes the program, the foregoing image recognition method is implemented.
  • the image recognition method and device, non-volatile readable storage medium, and computer equipment provided in this application are compared with the existing technical solutions based on active forensics technology and passive blind forensics technology to identify the authenticity of images.
  • This application uses the trained generative network model in the deep convolution against the generative network model to generate forged images based on the tampered data, and uses the image discriminant sample set composed of the generated forged images and preset real images to generate deep convolution against The trained discriminant network model in the network model is trained to obtain the final discriminant network model, so that the final discriminant network model can be used to identify the target image and determine whether the target image is a fake image or a real image.
  • the trained generation network model is used to generate forged images that conform to the distribution of image discrimination samples, so that a large number of forged images can be generated from a small number of forged images, which can better solve the technical problem of high labor costs for establishing a forged sample set; in addition, use
  • the final discriminative network model in the deep convolutional confrontation generation network model recognizes the target image, which can better solve the technical problems of passive blind forensics technology, such as excessive reliance on the shallow feature information of the image and the poor robustness of the network model, and effectively ensure the final The accuracy of the discriminant network model to identify the authenticity of the image and the robustness of the final discriminant network model.
  • FIG. 1 shows a schematic flowchart of an image recognition method provided by an embodiment of the present application
  • FIG. 2 shows a schematic flowchart of another image recognition method provided by an embodiment of the present application
  • Fig. 3 shows a schematic structural diagram of an image recognition device provided by an embodiment of the present application.
  • the active forensics technology has the limitation that the acquired images do not contain prior information, and the passive blind forensics technology relies too much on image statistical characteristics or shallow Layer feature information has a greater impact on the accuracy of the image recognition result, and the technical problem of high labor cost for constructing the corresponding forged sample set.
  • This embodiment provides an image recognition method, which can effectively avoid the technical problems of low accuracy of image recognition results caused by the existing passive blind forensics technology in the process of recognizing images, and the high labor cost of constructing a corresponding forged sample set. , Thereby effectively improving the accuracy of image recognition.
  • the method includes:
  • Deep Convolutional Generative Adversarial Networks includes generative network model and discriminative network model, and training the generative network model and discriminant network model at the same time.
  • the generative network model generates fake and real images through training The gap between them is as small as possible to deceive the discriminative network model; on the other hand, the discriminant network model is trained to make it as accurate as possible to determine the authenticity of the input target image.
  • the generation network model in the deep convolutional confrontation generation network DCGAN is a reverse convolutional neural network model, which has 5 layers, specifically:
  • the first layer is the input layer, in order to obey the normal distribution, the number of input layer nodes is consistent with the input data dimension.
  • the input data is 100-dimensional data, and the number of input layer nodes is also 100.
  • the second layer is the deconvolution layer, and its input data is the output result of the first layer.
  • the activation function is the ReLU function.
  • the third layer is the deconvolution layer, and the input data is the output result of the second layer.
  • the fourth layer is the deconvolution layer, and its input data is the output result of the third layer.
  • the fifth layer is the deconvolution layer.
  • the output result is used to construct the image discriminant sample set of the discriminant network model.
  • the discriminant network model in the deep convolutional confrontation generation network DCGAN is a convolutional neural network model, with a total of 5 layers, specifically:
  • the first layer is the input layer, and the matrix specification of the input data vector is set to 64*64*3, the size of the convolution kernel is 4*4, and the activation function is LeakyReLU.
  • the calculation formula of the activation function LeakyReLU is specifically:
  • x i is the input data vector
  • y i is the processed data vector obtained after the activation function is calculated and output
  • a i is a fixed parameter in the interval (1, + ⁇ ).
  • the second layer is a convolutional layer, and its input data is the output result of the first layer.
  • the activation function is LeakyReLU.
  • the third layer is a convolutional layer, and its input data is the output result of the second layer.
  • the fourth layer is a convolutional layer, and its input data is the output result of the third layer.
  • the fifth layer is a convolutional layer, and the size of the convolution kernel is set to 4*4, and the filter is one, and the output result is obtained after smoothing operation.
  • the target image is input into the final discriminant network model. If the output result is infinitely close to 0, the target image is determined to be a fake image; if the output result is infinitely close to 1, the target image is determined to be a real image. In the actual application scenario, set the forgery discrimination value to a. If the output result is in the range of (0, a], the target image is determined to be a forged image; if the output result is in the range of [b, 1), then the target image is determined The target image is a real image, and the forgery discriminant value and the true discriminant value are not specifically limited here.
  • the deep convolution against the generative network model trained in the generative network model can be used to generate a forged image based on the tampered data, and an image discrimination sample composed of the generated forged image and a preset real image can be used Set to train the discriminant network model trained in the deep convolutional confrontation generation network model to obtain the final discriminant network model, so that the final discriminant network model can be used to identify the target image and determine whether the target image is a fake image or a real image
  • this embodiment enables the discriminant network model to have better discriminative ability through the early learning and training, and the generation of the network model remains unchanged
  • the discriminant network model can still be trained separately, so that the discriminant network model can adaptively learn its internal statistical laws from the image discriminant sample set, thereby improving the generalization ability of the final discriminant network model.
  • the method includes:
  • the initial discriminant network model is trained to obtain the first discriminant network model, which specifically includes: using noise variables and real images as the input data of the initial discriminant network model, and using the obtained output result as the logistic regression output function Further, use the first loss function to obtain the loss value d_loss_real of the real image, and use the gradient ascent algorithm to train the initial network parameters ⁇ d so that the output result is infinitely close to 1, thereby obtaining the first discriminant network model.
  • the first loss function is:
  • x i and z i are the real image and the noise variance
  • m is the number of samples of the first judgment
  • D (x i) is the initial network model is determined
  • D (G (z i) ) to generate an initial network model.
  • the optimized initial network parameter is used as the first network parameter.
  • the initialization of the discriminant network model is trained to obtain the first discriminant network model, which specifically includes: using noise variables and fake images as the input data of the first discriminant network model, and using the output result as the logistic regression output function Input data; further, use the second loss function to obtain the loss value d_loss_fake of the fake image, and use the gradient descent algorithm to train the first network parameter ⁇ d so that the output result is infinitely close to 0, thereby determining the second discriminant network model The second network parameter ⁇ d , and the second discriminant network model.
  • the second loss function is:
  • y i forged image m is the number of samples of the second judgment
  • D (x i) is determined as a first network model, D (G (z i) ) to generate an initial network model.
  • the calculation formula for training the first network parameter ⁇ d using the gradient descent algorithm is:
  • the obtained second discriminant network model can be used as a trained discriminant network model, so as to use the fake image generated by the trained generation network model and the preset real image to form an image discriminant sample set for this training
  • the good discriminant network model is further trained to obtain the final discriminant network model to realize the recognition of fake images and real images.
  • the third discriminant sample set can be the same as the first discriminant sample set, or it can be adjusted accordingly according to actual application needs; accordingly, the fourth discriminant sample set and the second discriminant sample set can be the same, or Adjust accordingly according to actual application needs, and the number of first discriminant samples, the number of second discriminant samples, the number of third discriminant samples, and the number of fourth discriminant samples can also be adjusted according to the needs of actual applications.
  • the discriminant sample set and the first discriminant sample set, and the fourth discriminant sample set and the second discriminant sample set, and the number of the first discriminant sample, the second discriminant sample number, the third discriminant sample number, and the fourth discriminant sample number are specifically limited .
  • training the initial generation network model to obtain a trained network model specifically includes: using the noise variable used for training the generation network model as the input data of the initial generation network model, for example, the noise variable is 100 Dimensional data, and use the output result as the input data of the logistic regression output function; further, use the loss function of the generated network model to obtain the forged image loss value d_loss, and use the gradient descent algorithm to minimize the loss of the initial generated network model Value g_loss, the network parameters ⁇ g of the trained generative network model are trained, so that the output fake image is input to the trained discriminant network model, and the output result is infinitely close to 1, so that the trained generative network model is obtained. To reduce the discriminative ability of the trained discriminant network model.
  • the loss function of the generated network model is:
  • the trained generative network model can be further optimized. For example, use tampering data to further optimize the training of the trained generative network model to obtain an optimized generative network model, so as to further generate fake images based on the tampered data, and construct image discriminant sample sets to realize the deep convolutional confrontation generation network Further optimization of the discriminative network model trained in the model.
  • the fake image generated by the trained generation network model or the optimized generation network model and the acquired real image are used to construct an image discrimination sample set.
  • the network parameter ⁇ d of the final discriminant network model is obtained, thereby obtaining the final discriminant network model.
  • the acquired image to be recognized is preprocessed, specifically, the target feature in the image to be recognized is recognized, the recognized target feature is intercepted, and the intercepted image is sized according to a certain ratio Adjust to obtain the target image used to characterize the target feature.
  • the deep image features of the target image can be contour, texture, brightness, color, and combinations thereof, as well as corresponding high-level semantics and combinations thereof.
  • the target image Recognize the target image according to the acquired deep image features, and determine that the target image is a forged image or a real image.
  • step 210 may specifically include: if the tampering data is copy-and-paste type image data, fuzzy retouch type image data, or computer-generated type image data, correspondingly,
  • the final discriminant network model is used to identify the target image, and it is determined that the target image is a forged image, and the corresponding forged image types are copy and paste type images, fuzzy retouch type images, or computer-generated type images.
  • the noise variable used to train the discriminant network model does not set the data type
  • only the trained generation network model or the tampered data input by the optimized generation network model is set to the copy and paste type, Either the fuzzy retouching type or the computer-generated type
  • the final discriminant network model is used to determine the target image is a fake image or a real image
  • the image types used to determine the target image to be a forged image are copy and paste type image and fuzzy retouch type respectively Image, or computer-generated type image.
  • the data type of the noise variable used to train the discriminant network model can also be set to copy and paste type, or fuzzy retouch type, or computer-generated type, so as to make the final discriminant network model more stable , Quickly determine the authenticity of the target image, and provide higher reliability for the image collection of public security, courts and other departments.
  • copy-and-paste type images, fuzzy retouch type images, or computer-generated type images have common deep image features, they are used to train and discriminate the type of noise variable of the network model, and the trained generation network model or the optimized generation The tampered data input by the network model does not need to set the data type.
  • the final discriminating network model can also be used to determine whether the target image is a forged image or a real image, and the image types used to determine the target image as a forged image are copy and paste types. Image, blur retouch type image, or computer generated type image. There is no specific limitation here.
  • this embodiment Compared with the existing technical solutions based on active forensics technology and passive blind forensics technology to identify the authenticity of images, this embodiment generates a large number of forged images through a small amount of forged images, which better solves the high labor cost of establishing a forged sample set.
  • an embodiment of the present application provides an image recognition device.
  • the device includes: a generation module 35, a training module 36, and a recognition module 37.
  • the generation module 35 can be used to use the generated network model trained in the deep convolution against the generation network model to generate fake images based on the tampered data; the generation module 35 is a basic module for the device to recognize whether the image to be recognized is a fake image or a real image .
  • the training module 36 can be used to train the discriminant network model trained in the deep convolutional confrontation generation network model by using the image discrimination sample set composed of the generated fake image and the preset real image to obtain the final discriminant network model
  • the training module 36 is the main functional module for the device to recognize that the image to be recognized is a fake image or a real image, and is also a core functional module of the device.
  • the recognition module 37 can be used to recognize the target image using the final discriminant network model, and determine that the target image is a forged image or a real image; the recognition module 37 is the main part of the device to recognize that the image to be recognized is a forged image or a real image.
  • the functional module is also the core functional module of the device.
  • the first discriminant training module 31 can be used to use the first discriminant sample set composed of noise variables and real images to convolve the depth Training against the initial discriminant network model in the generative network model to obtain a first discriminant network model; and, using a second discriminant sample set composed of noise variables and fake images to train the first discriminant network model, and obtain the training The discriminative network model.
  • the second discriminant training module 32 can be used to train the initial discriminant network model in the deep convolutional confrontation generation network model by using the first discriminant sample set composed of noise variables and real images to obtain the first discriminant network model; and, Use the second discriminant sample set composed of noise variables and fake images to train the first discriminant network model to obtain the second discriminant network model; and use the third discriminant sample set composed of noise variables and real images to compare the results
  • the second discriminant network model is trained to obtain a third discriminant network model; and the third discriminant network model is trained using a fourth discriminant sample set composed of noise variables and fake images to obtain a trained discriminant network model .
  • it also includes a first generation training module 33, which can be used to train the initial generation network model in the deep convolutional confrontation generation network model by using the first generation sample set composed of noise variables, and get well trained The generative network model.
  • a preprocessing module 34 is also included, which can be used to identify and intercept the target feature in the acquired image to be recognized, to obtain a target image corresponding to the target feature.
  • the final discriminant network model is used to identify the target image to determine the target image.
  • the target image is a forged image
  • the corresponding forged image types are copy and paste type images, fuzzy retouch type images, or computer-generated type images.
  • the recognition module 37 can be specifically used to obtain the deep image features of the target image; recognize the target image according to the acquired deep image features, and determine whether the target image is a fake image or a real image. image.
  • an embodiment of the present application also provides a non-volatile readable storage medium on which computer readable instructions are stored, and the program is executed when the processor is executed.
  • the technical solution of the present application can be embodied in the form of a software product, and the software product can be stored in a non-volatile non-volatile readable storage medium (can be CD-ROM, U disk, mobile hard disk) Etc.), including several instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in each implementation scenario of this application.
  • a computer device which may be a personal computer, a server, or a network device, etc.
  • the embodiments of the present application also provide a computer device, which can be a personal computer, a server, or a network.
  • the physical device includes a non-volatile readable storage medium and a processor; the non-volatile readable storage medium is used to store computer readable instructions; and the processor is used to execute computer readable instructions to achieve the above Figure 1 and Figure 2 show the image recognition method.
  • the computer device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, and so on.
  • the user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, and the like.
  • the network interface can optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), etc.
  • a computer device does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or arrange different components.
  • the non-volatile readable storage medium may also include an operating system and a network communication module.
  • the operating system is a program that manages the hardware and software resources of computer equipment, and supports the operation of information processing programs and other software and/or programs.
  • the network communication module is used to implement communication between various components in the non-volatile readable storage medium and communication with other hardware and software in the physical device.
  • this application can be implemented by means of software plus a necessary general hardware platform, or by hardware.
  • this embodiment can generate a large number of forged images from a small amount of forged images; and, use depth volume
  • the final discriminant network model in the product confrontation generation network model recognizes the target image, which can effectively ensure the accuracy of the final discriminant network model to recognize the authenticity of the image and the robustness of the final discriminant network model.

Landscapes

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

Abstract

Disclosed are an image recognition method and an apparatus, and a non-volatile readable storage medium and a computer device, relating to the technical field of image recognition and able to improve the accuracy of image recognition. The method comprises: using a trained generative network model in a deep convolutional generative adversarial network model to generate counterfeit images on the basis of tampering data; using an image determination sample set formed from the generated counterfeit images and preset real images to train a trained determination network model in the convolutional generative adversarial network model in order to obtain a final determination network model; and using the final determination network model to perform recognition on a target image, and determine whether the target image is a counterfeit image or a real image. The present application is suitable for providing higher reliability in image evidence collection in governmental departments such as public security and courts.

Description

图像识别方法及装置、非易失性可读存储介质、计算机设备Image recognition method and device, non-volatile readable storage medium, and computer equipment
本申请要求与2019年6月26日提交中国专利局、申请号为2019105590703、申请名称为“文本数据类别的识别方法及装置、存储介质及计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims the priority of a Chinese patent application filed on June 26, 2019 with the Chinese Patent Office, the application number is 2019105590703, and the application name is "Methods and devices for identifying text data types, storage media, and computer equipment", and the entire content Incorporated in the application by reference.
技术领域Technical field
本申请涉及图像识别技术领域,尤其是涉及到图像识别方法及装置、非易失性可读存储介质及计算机设备。This application relates to the field of image recognition technology, in particular to image recognition methods and devices, non-volatile readable storage media and computer equipment.
背景技术Background technique
随着计算机技术的快速发展,计算机软件可以制作或拼接出细节栩栩如生、层次分明的伪造图像,其与数码相机拍摄得到的真实图像极其相似,肉眼很难分辨出来。而伪造图像逐渐出现在社会的政治、军事、新闻等各个领域,给社会带来极大的危害。因此,对图像的真伪取证研究十分重要。With the rapid development of computer technology, computer software can produce or splice forged images with vivid details and distinct levels, which are very similar to real images captured by digital cameras and are difficult to distinguish with the naked eye. Forged images are gradually appearing in the political, military, news and other fields of society, bringing great harm to society. Therefore, the forensic research on the authenticity of images is very important.
在传统的图像取证技术中,主动取证技术需要事先在图像中加入验证信息,而对于大多数应用场景获取到的图像均不含有先验信息,因此主动取证技术具有较大的局限性;现有的被动盲取证技术,主要依赖图像统计特性或浅层特征信息,如灰度值、灰度变化等,现有的被动盲取证技术十分依赖于浅层特征的选取,浅层特征的质量对图像识别结果的准确度影响较大,此外由于被动盲取证技术需要大量的伪造样本,而伪造样本集的建立一般需要人工完成,耗费大量的时间与精力,人工成本较高。In the traditional image forensics technology, the active forensics technology needs to add verification information to the image in advance, and the images obtained for most application scenarios do not contain a priori information, so the active forensics technology has great limitations; the existing The passive blind forensics technology mainly relies on image statistical characteristics or shallow feature information, such as gray value, gray change, etc. The existing passive blind forensics technology is very dependent on the selection of shallow features, and the quality of shallow features affects the image The accuracy of the recognition result has a great influence. In addition, because the passive blind forensics technology requires a large number of forged samples, the establishment of the forged sample set generally needs to be completed manually, which consumes a lot of time and energy, and the labor cost is high.
发明内容Summary of the invention
有鉴于此,本申请提供了图像识别方法及装置、非易失性可读存储介质、计算机设备,主要目的在于解决现有被动盲取证技术过于依赖图像统计特性或浅层特征信息,图像识别结果的准确度较低,且构建相应的伪造样本集的人工成本较高的技术问题。In view of this, this application provides an image recognition method and device, a non-volatile readable storage medium, and computer equipment. The main purpose is to solve the existing passive blind forensics technology that relies too much on image statistical characteristics or shallow feature information, and the result of image recognition The technical problems of low accuracy and high labor cost for constructing corresponding forged sample sets.
根据本申请的一个方面,提供了一种图像识别方法,该方法包括:According to an aspect of the present application, there is provided an image recognition method, which includes:
利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像;Use deep convolution to fight against the generative network model trained in the generative network model to generate fake images based on the tampered data;
利用由所生成的伪造图像和预设的真实图像构成的图像判别样本集对深度卷积对抗生成网络模型中训练好的判别网络模型进行训练,得到最终的判别网络模型;Use the image discrimination sample set composed of the generated fake image and the preset real image to train the discriminant network model trained in the deep convolutional confrontation generation network model to obtain the final discriminant network model;
利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像或者真实图像。The final discriminant network model is used to identify the target image, and it is determined that the target image is a fake image or a real image.
根据本申请的另一方面,提供了一种图像识别装置,该装置包括:According to another aspect of the present application, there is provided an image recognition device, which includes:
生成模块,用于利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像;The generation module is used to use the generated network model trained in the deep convolution against the generated network model to generate fake images according to the tampered data;
训练模块,用于利用由所生成的伪造图像和预设的真实图像构成的图像判别样本集对深度卷积对抗生成网络模型中训练好的判别网络模型进行训练,得到最终的判别网络模型;The training module is used to train the discriminant network model trained in the deep convolutional confrontation generation network model by using the image discrimination sample set composed of the generated fake image and the preset real image to obtain the final discriminant network model;
识别模块,用于利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像或者真 实图像。The recognition module is used to recognize the target image using the final discriminant network model, and determine whether the target image is a fake image or a real image.
依据本申请又一个方面,提供了一种非易失性可读存储介质,其上存储有计算机可读指令,所述程序被处理器执行时实现上述图像识别方法。According to another aspect of the present application, there is provided a non-volatile readable storage medium having computer readable instructions stored thereon, and the program is executed by a processor to realize the above-mentioned image recognition method.
依据本申请再一个方面,提供了一种计算机设备,包括非易失性可读存储介质、处理器及存储在非易失性可读存储介质上并可在处理器上运行的计算机可读指令,所述处理器执行所述程序时实现上述图像识别方法。According to another aspect of the present application, a computer device is provided, including a non-volatile readable storage medium, a processor, and computer readable instructions stored on the non-volatile readable storage medium and running on the processor , When the processor executes the program, the foregoing image recognition method is implemented.
借由上述技术方案,本申请提供的图像识别方法及装置、非易失性可读存储介质、计算机设备,与现有基于主动取证技术、被动盲取证技术识别图像真伪的技术方案相比,本申请利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像,利用由所生成的伪造图像和预设的真实图像构成的图像判别样本集对深度卷积对抗生成网络模型中训练好的判别网络模型进行训练,得到最终的判别网络模型,以便利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像或者真实图像。可见,通过训练好的生成网络模型生成符合图像判别样本分布的伪造图像,以便通过少量的伪造图像生成大量的伪造图像,更好地解决建立伪造样本集人工成本较高的技术问题;此外,利用深度卷积对抗生成网络模型中最终的判别网络模型识别目标图像,能够更好地解决被动盲取证技术过于依赖图像浅层特征信息以及网络模型的鲁棒性较差等技术问题,有效保证最终的判别网络模型识别图像真伪的准确性以及最终的判别网络模型的鲁棒性。With the above technical solutions, the image recognition method and device, non-volatile readable storage medium, and computer equipment provided in this application are compared with the existing technical solutions based on active forensics technology and passive blind forensics technology to identify the authenticity of images. This application uses the trained generative network model in the deep convolution against the generative network model to generate forged images based on the tampered data, and uses the image discriminant sample set composed of the generated forged images and preset real images to generate deep convolution against The trained discriminant network model in the network model is trained to obtain the final discriminant network model, so that the final discriminant network model can be used to identify the target image and determine whether the target image is a fake image or a real image. It can be seen that the trained generation network model is used to generate forged images that conform to the distribution of image discrimination samples, so that a large number of forged images can be generated from a small number of forged images, which can better solve the technical problem of high labor costs for establishing a forged sample set; in addition, use The final discriminative network model in the deep convolutional confrontation generation network model recognizes the target image, which can better solve the technical problems of passive blind forensics technology, such as excessive reliance on the shallow feature information of the image and the poor robustness of the network model, and effectively ensure the final The accuracy of the discriminant network model to identify the authenticity of the image and the robustness of the final discriminant network model.
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。The above description is only an overview of the technical solution of this application. In order to understand the technical means of this application more clearly, it can be implemented in accordance with the content of the specification, and to make the above and other purposes, features and advantages of this application more obvious and understandable. , The following specifically cite the specific implementation of this application.
附图说明Description of the drawings
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the application and constitute a part of the application. The exemplary embodiments and descriptions of the application are used to explain the application and do not constitute an improper limitation of the application. In the attached picture:
图1示出了本申请实施例提供的一种图像识别方法的流程示意图;FIG. 1 shows a schematic flowchart of an image recognition method provided by an embodiment of the present application;
图2示出了本申请实施例提供的另一种图像识别方法的流程示意图;FIG. 2 shows a schematic flowchart of another image recognition method provided by an embodiment of the present application;
图3示出了本申请实施例提供的一种图像识别装置的结构示意图。Fig. 3 shows a schematic structural diagram of an image recognition device provided by an embodiment of the present application.
具体实施方式Detailed ways
下文中将参考附图并结合实施例来详细说明本申请。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the application will be described in detail with reference to the drawings and in conjunction with embodiments. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other if there is no conflict.
针对现有基于主动取证技术、被动盲取证技术识别图像真伪的过程中,主动取证技术存在获取到的图像不含有先验信息的局限性,以及被动盲取证技术,过于依赖图像统计特性或浅层特征信息,对图像识别结果的准确度影响较大,且构建相应的伪造样本集的人工成本较高的技术问题。本实施例提供了一种图像 识别方法,能够有效避免现有被动盲取证技术识别图像的过程中造成图像识别结果的准确度较低,且构建相应的伪造样本集的人工成本较高的技术问题,从而有效提升图像识别真伪的准确度,如图1所示,该方法包括:In the current process of identifying the authenticity of images based on active forensic technology and passive blind forensics technology, the active forensics technology has the limitation that the acquired images do not contain prior information, and the passive blind forensics technology relies too much on image statistical characteristics or shallow Layer feature information has a greater impact on the accuracy of the image recognition result, and the technical problem of high labor cost for constructing the corresponding forged sample set. This embodiment provides an image recognition method, which can effectively avoid the technical problems of low accuracy of image recognition results caused by the existing passive blind forensics technology in the process of recognizing images, and the high labor cost of constructing a corresponding forged sample set. , Thereby effectively improving the accuracy of image recognition. As shown in Figure 1, the method includes:
101、利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像。101. Use the generative network model trained in the deep convolution against the generative network model to generate forged images according to the tampered data.
深度卷积对抗生成网络(DCGAN:Deep Convolutional Generative Adversarial Networks)包括生成网络模型和判别网络模型,同时训练生成网络模型和判别网络模型,一方面生成网络模型通过训练使其生成的伪造图像与真实图像之间的差距尽可能小,从而欺骗判别网络模型;另一方面,判别网络模型通过训练使其尽可能地精确判别输入的目标图像的真伪。Deep Convolutional Generative Adversarial Networks (DCGAN: Deep Convolutional Generative Adversarial Networks) includes generative network model and discriminative network model, and training the generative network model and discriminant network model at the same time. On the one hand, the generative network model generates fake and real images through training The gap between them is as small as possible to deceive the discriminative network model; on the other hand, the discriminant network model is trained to make it as accurate as possible to determine the authenticity of the input target image.
在本实施例中,深度卷积对抗生成网络DCGAN中生成网络模型为反向的卷积神经网络模型,共5层,具体为:In this embodiment, the generation network model in the deep convolutional confrontation generation network DCGAN is a reverse convolutional neural network model, which has 5 layers, specifically:
1)第一层为输入层,为服从正态分布,输入层节点数量与输入的数据维度保持一致。例如,输入数据为100维数据,输入层节点数量也为100个。1) The first layer is the input layer, in order to obey the normal distribution, the number of input layer nodes is consistent with the input data dimension. For example, the input data is 100-dimensional data, and the number of input layer nodes is also 100.
2)第二层为反卷积层,其输入数据为第一层的输出结果,设定其卷积核大小为4*4,滤波器为64*8个,进行批量正则化后输入到激活函数中,激活函数为ReLU函数。2) The second layer is the deconvolution layer, and its input data is the output result of the first layer. Set the convolution kernel size to 4*4 and the filter to 64*8. After batch regularization, input to the activation In the function, the activation function is the ReLU function.
3)第三层为反卷积层,其输入数据为第二层的输出结果,设定其卷积核大小为4*4,步长为2*2,滤波器为64*4个,进行批量正则化后输入到激活函数中,激活函数为ReLU函数。3) The third layer is the deconvolution layer, and the input data is the output result of the second layer. Set the convolution kernel size to 4*4, the step size to 2*2, and the filter to 64*4. After batch regularization, it is input into the activation function, which is the ReLU function.
4)第四层为反卷积层,其输入数据为第三层的输出结果,设定其卷积核大小为4*4,步长为2*2,滤波器为64个,进行批量正则化后输入到激活函数中,激活函数为ReLU函数。4) The fourth layer is the deconvolution layer, and its input data is the output result of the third layer. Set its convolution kernel size to 4*4, step size to 2*2, and 64 filters to perform batch regularization After conversion, it is input into the activation function, which is the ReLU function.
5)第五层为反卷积层,其输出结果用于构建判别网络模型的图像判别样本集,设定其卷积核大小为4*4,步长为2*2,滤波器为64个,输入到激活函数中,激活函数为Tanh函数。5) The fifth layer is the deconvolution layer. The output result is used to construct the image discriminant sample set of the discriminant network model. Set the convolution kernel size to 4*4, the step size to 2*2, and the filter to 64 , Input into the activation function, which is the Tanh function.
102、利用由所生成的伪造图像和预设的真实图像构成的图像判别样本集对深度卷积对抗生成网络模型中训练好的判别网络模型进行训练,得到最终的判别网络模型。102. Use the image discrimination sample set composed of the generated fake images and preset real images to train the discriminant network model trained in the deep convolutional confrontation generation network model to obtain a final discriminant network model.
在本实施例中,深度卷积对抗生成网络DCGAN中判别网络模型为卷积神经网络模型,共5层,具体为:In this embodiment, the discriminant network model in the deep convolutional confrontation generation network DCGAN is a convolutional neural network model, with a total of 5 layers, specifically:
1)第一层为输入层,设定其输入的数据向量的矩阵规格为64*64*3,卷积核大小为4*4,激活函数为LeakyReLU。其中,激活函数LeakyReLU的计算公式具体为:1) The first layer is the input layer, and the matrix specification of the input data vector is set to 64*64*3, the size of the convolution kernel is 4*4, and the activation function is LeakyReLU. Among them, the calculation formula of the activation function LeakyReLU is specifically:
Figure PCTCN2019118187-appb-000001
Figure PCTCN2019118187-appb-000001
其中,x i为输入的数据向量,y i为经由激活函数计算后输出得到的处理后的数据向量,a i是(1,+∞)区间内的固定参数。 Among them, x i is the input data vector, y i is the processed data vector obtained after the activation function is calculated and output, and a i is a fixed parameter in the interval (1, +∞).
2)第二层为卷积层,其输入数据为第一层的输出结果,设定其卷积核大小为4*4,滤波器为64*2个,进行批量标准化后输入到激活函数中,激活函数为LeakyReLU。2) The second layer is a convolutional layer, and its input data is the output result of the first layer. Set its convolution kernel size to 4*4 and filter to 64*2. After batch normalization, input into the activation function , The activation function is LeakyReLU.
3)第三层为卷积层,其输入数据为第二层的输出结果,设定其卷积核大小为4*4,步长为2*2,滤波器为64*4个,进行批量标准化后输入到激活函数中,激活函数为LeakyReLU。3) The third layer is a convolutional layer, and its input data is the output result of the second layer. Set its convolution kernel size to 4*4, step size to 2*2, filter to 64*4, batch After normalization, it is input into the activation function, which is LeakyReLU.
4)第四层为卷积层,其输入数据为第三层的输出结果,设定其卷积核大小为4*4,步长为2*2,滤波器为64*8个,进行批量标准化后输入到激活函数中,激活函数为LeakyReLU。4) The fourth layer is a convolutional layer, and its input data is the output result of the third layer. Set its convolution kernel size to 4*4, step size to 2*2, filter to 64*8, batch After normalization, it is input into the activation function, which is LeakyReLU.
5)第五层为卷积层,设定其卷积核大小为4*4,滤波器为1个,进行平滑操作后得到输出结果。5) The fifth layer is a convolutional layer, and the size of the convolution kernel is set to 4*4, and the filter is one, and the output result is obtained after smoothing operation.
103、利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像或者真实图像。103. Use the final discriminant network model to recognize the target image, and determine whether the target image is a fake image or a real image.
在本实施例中,将目标图像输入最终的判别网络模型,若输出结果无限接近于0,则判别该目标图像为伪造图像;若输出结果无限接近于1,则判别该目标图像为真实图像。在实际应用的场景中,设定伪造判别值为a,若输出结果在(0,a]范围内,则判别该目标图像为伪造图像;若输出结果在[b,1)范围内,则判别该目标图像为真实图像,此处不对伪造判别值和真实判别值的进行具体限定。In this embodiment, the target image is input into the final discriminant network model. If the output result is infinitely close to 0, the target image is determined to be a fake image; if the output result is infinitely close to 1, the target image is determined to be a real image. In the actual application scenario, set the forgery discrimination value to a. If the output result is in the range of (0, a], the target image is determined to be a forged image; if the output result is in the range of [b, 1), then the target image is determined The target image is a real image, and the forgery discriminant value and the true discriminant value are not specifically limited here.
对于本实施例可以按照上述方案,利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像,利用由所生成的伪造图像和预设的真实图像构成的图像判别样本集对深度卷积对抗生成网络模型中训练好的判别网络模型进行训练,得到最终的判别网络模型,以便利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像或者真实图像,与现有的基于主动取证技术、被动盲取证技术识别图像真伪的技术方案相比,本实施例通过前期的学习训练使得判别网络模型具有较好的判别能力,在生成网络模型保持不变的情况下,仍然可以单独对判别网络模型进行训练,以便判别网络模型自适应地从图像判别样本集中学习其内部统计规律,从而提高最终的判别网络模型的泛化能力。For this embodiment, according to the above scheme, the deep convolution against the generative network model trained in the generative network model can be used to generate a forged image based on the tampered data, and an image discrimination sample composed of the generated forged image and a preset real image can be used Set to train the discriminant network model trained in the deep convolutional confrontation generation network model to obtain the final discriminant network model, so that the final discriminant network model can be used to identify the target image and determine whether the target image is a fake image or a real image Compared with the existing technical solutions based on active forensics technology and passive blind forensics technology to identify the authenticity of images, this embodiment enables the discriminant network model to have better discriminative ability through the early learning and training, and the generation of the network model remains unchanged In the case of, the discriminant network model can still be trained separately, so that the discriminant network model can adaptively learn its internal statistical laws from the image discriminant sample set, thereby improving the generalization ability of the final discriminant network model.
进一步的,作为上述实施例具体实施方式的细化和扩展,为了完整说明本实施例的具体实施过程,提供了另一种图像识别方法,如图2所示,该方法包括:Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully explain the specific implementation process of this embodiment, another image recognition method is provided. As shown in FIG. 2, the method includes:
201、利用由噪声变量和真实图像构成的第一判别样本集对深度卷积对抗生成网络模型中的初始判别网络模型进行训练,得到第一判别网络模型。201. Use the first discriminant sample set composed of noise variables and real images to train the initial discriminant network model in the deep convolutional confrontation generation network model to obtain the first discriminant network model.
在本实施例中,对初始判别网络模型进行训练,得到第一判别网络模型,具体包括:将噪声变量和真实图像作为初始判别网络模型的输入数据,并将得到的输出结果作为逻辑回归输出函数的输入数据;进一步地,利用第一损失函数得到真实图像的损失值d_loss_real,并利用梯度上升算法训练初始网络参数θ d,以使输出结果无限接近于1,从而得到第一判别网络模型。 In this embodiment, the initial discriminant network model is trained to obtain the first discriminant network model, which specifically includes: using noise variables and real images as the input data of the initial discriminant network model, and using the obtained output result as the logistic regression output function Further, use the first loss function to obtain the loss value d_loss_real of the real image, and use the gradient ascent algorithm to train the initial network parameters θ d so that the output result is infinitely close to 1, thereby obtaining the first discriminant network model.
其中,第一损失函数为:Among them, the first loss function is:
Figure PCTCN2019118187-appb-000002
Figure PCTCN2019118187-appb-000002
其中,x i和z i分别为真实图像和噪声变量,m为第一判别样本数量,D(x i)为初始判别网络模型,D(G(z i))为初始生成网络模型。 Wherein, x i and z i are the real image and the noise variance, m is the number of samples of the first judgment, D (x i) is the initial network model is determined, D (G (z i) ) to generate an initial network model.
利用梯度上升算法训练初始网络参数θ d的计算公式为: The calculation formula of using the gradient ascent algorithm to train the initial network parameters θ d is:
Figure PCTCN2019118187-appb-000003
Figure PCTCN2019118187-appb-000003
当输出结果无限接近于1时,将优化后的初始网络参数作为第一网络参数。When the output result is infinitely close to 1, the optimized initial network parameter is used as the first network parameter.
202、利用由噪声变量和伪造图像构成的第二判别样本集对所述第一判别网络模型进行训练,得到第二判别网络模型。202. Train the first discriminant network model by using a second discriminant sample set composed of noise variables and fake images to obtain a second discriminant network model.
在本实施例中,对初始化判别网络模型进行训练,得到第一判别网络模型,具体包括:将噪声变量和伪造图像作为第一判别网络模型的输入数据,并将输出结果作为逻辑回归输出函数的输入数据;进一步地,利用第二损失函数得到伪造图像的损失值d_loss_fake,并利用梯度下降算法训练第一网络参数θ d,以使输出结果无限接近于0,从而确定第二判别网络模型的第二网络参数θ d,以及第二判别网络模型。 In this embodiment, the initialization of the discriminant network model is trained to obtain the first discriminant network model, which specifically includes: using noise variables and fake images as the input data of the first discriminant network model, and using the output result as the logistic regression output function Input data; further, use the second loss function to obtain the loss value d_loss_fake of the fake image, and use the gradient descent algorithm to train the first network parameter θ d so that the output result is infinitely close to 0, thereby determining the second discriminant network model The second network parameter θ d , and the second discriminant network model.
其中,第二损失函数为:Among them, the second loss function is:
Figure PCTCN2019118187-appb-000004
Figure PCTCN2019118187-appb-000004
其中,y i为伪造图像,m为第二判别样本数量,D(x i)为第一判别网络模型,D(G(z i))为初始生成网络模型。 Wherein, y i forged image, m is the number of samples of the second judgment, D (x i) is determined as a first network model, D (G (z i) ) to generate an initial network model.
利用梯度下降算法训练第一网络参数θ d的计算公式为: The calculation formula for training the first network parameter θ d using the gradient descent algorithm is:
Figure PCTCN2019118187-appb-000005
Figure PCTCN2019118187-appb-000005
在实际应用的场景中,得到的第二判别网络模型可以作为训练好的判别网络模型,以便利用训练好的生成网络模型生成的伪造图像和预设的真实图像构成的图像判别样本集对该训练好的判别网络模型进行进一步地训练,从而得到最终的判别网络模型,以实现对伪造图像和真实图像的识别。In practical application scenarios, the obtained second discriminant network model can be used as a trained discriminant network model, so as to use the fake image generated by the trained generation network model and the preset real image to form an image discriminant sample set for this training The good discriminant network model is further trained to obtain the final discriminant network model to realize the recognition of fake images and real images.
203、利用由噪声变量和真实图像构成的第三判别样本集对所述第二判别网络模型进行训练,得到第三判别网络模型。203. Use a third discriminant sample set composed of noise variables and real images to train the second discriminant network model to obtain a third discriminant network model.
204、利用由噪声变量和伪造图像构成的第四判别样本集对所述第三判别网络模型进行训练,得到训练好的判别网络模型。204. Use a fourth discriminant sample set composed of noise variables and fake images to train the third discriminant network model to obtain a trained discriminant network model.
在本实施例中,第三判别样本集与第一判别样本集可以相同,也可以根据实际应用的需要进行相应调整;相应地,第四判别样本集与第二判别样本集可以相同,也可以根据实际应用的需要进行相应调整,以及,第一判别样本数量、第二判别样本数量、第三判别样本数量、第四判别样本数量也可以根据实际应用的需要进行相应调整,此处不对第三判别样本集与第一判别样本集,以及第四判别样本集与第二判别样本集,以及第一判别样本数量、第二判别样本数量、第三判别样本数量、第四判别样本数量进行具体限定。In this embodiment, the third discriminant sample set can be the same as the first discriminant sample set, or it can be adjusted accordingly according to actual application needs; accordingly, the fourth discriminant sample set and the second discriminant sample set can be the same, or Adjust accordingly according to actual application needs, and the number of first discriminant samples, the number of second discriminant samples, the number of third discriminant samples, and the number of fourth discriminant samples can also be adjusted according to the needs of actual applications. The discriminant sample set and the first discriminant sample set, and the fourth discriminant sample set and the second discriminant sample set, and the number of the first discriminant sample, the second discriminant sample number, the third discriminant sample number, and the fourth discriminant sample number are specifically limited .
205、利用由噪声变量构成的第一生成样本集对深度卷积对抗生成网络模型中的初始生成网络模型进行训练,得到训练好的生成网络模型。205. Use the first generated sample set composed of noise variables to train the initial generation network model in the deep convolutional confrontation generation network model to obtain a trained generation network model.
在本实施例中,对初始生成网络模型进行训练,得到训练好的成网络模型,具体包括:将用于训练生成网络模型的噪声变量作为初始生成网络模型的输入数据,例如,噪声变量为100维数据,并将得到的输出结果作为逻辑回归输出函数的输入数据;进一步地,利用生成网络模型的损失函数得到伪造图像损失值d_loss,并利用梯度下降算法,通过最小化初始生成网络模型的损失值g_loss,训练得到训练好的生成网络模型的网络参数θ g,以便输出的伪造图像输入到训练好的判别网络模型,得到的输出结果无限接近于1,从而得到训练好的生成网络模型,用于降低训练好的判别网络模型的判别能力。 In this embodiment, training the initial generation network model to obtain a trained network model specifically includes: using the noise variable used for training the generation network model as the input data of the initial generation network model, for example, the noise variable is 100 Dimensional data, and use the output result as the input data of the logistic regression output function; further, use the loss function of the generated network model to obtain the forged image loss value d_loss, and use the gradient descent algorithm to minimize the loss of the initial generated network model Value g_loss, the network parameters θ g of the trained generative network model are trained, so that the output fake image is input to the trained discriminant network model, and the output result is infinitely close to 1, so that the trained generative network model is obtained. To reduce the discriminative ability of the trained discriminant network model.
其中,生成网络模型的损失函数为:Among them, the loss function of the generated network model is:
Figure PCTCN2019118187-appb-000006
Figure PCTCN2019118187-appb-000006
利用梯度下降算法训练网络参数θ g的公式为: The formula for training network parameters θ g using the gradient descent algorithm is:
Figure PCTCN2019118187-appb-000007
Figure PCTCN2019118187-appb-000007
206、利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像。206. Use the deep convolution against the generative network model trained in the generative network model to generate a forged image according to the tampered data.
在实际应用的场景中,为了使判别网络模型的判别能力达到更好的效果,可以对训练好的生成网络模型进行进一步地优化。例如,利用篡改数据对训练好的生成网络模型进行进一步地优化训练,得到优化好的生成网络模型,从而进一步根据篡改数据生成伪造图像,构建图像判别样本集,以实现对深度卷积对抗生成网络模型中训练好的判别网络模型的进一步优化。In actual application scenarios, in order to achieve better results for the discriminative ability of the discriminant network model, the trained generative network model can be further optimized. For example, use tampering data to further optimize the training of the trained generative network model to obtain an optimized generative network model, so as to further generate fake images based on the tampered data, and construct image discriminant sample sets to realize the deep convolutional confrontation generation network Further optimization of the discriminative network model trained in the model.
207、利用由所生成的伪造图像和预设的真实图像构成的图像判别样本集对深度卷积对抗生成网络模型中训练好的判别网络模型进行训练,得到最终的判别网络模型。207. Use the image discrimination sample set composed of the generated fake images and preset real images to train the discriminant network model trained in the deep convolutional confrontation generation network model to obtain a final discriminant network model.
在本实施例中,利用训练好的生成网络模型或者优化好的生成网络模型生成的伪造图像,以及获取到的真实图像,构建图像判别样本集。利用所构建的图像判别样本集对训练好的判别网络模型进行训练,通过最小化训练好的判别网络模型的损失值d_loss,得到最终的判别网络模型的网络参数θ d,从而得到最终的判别网络模型。 In this embodiment, the fake image generated by the trained generation network model or the optimized generation network model and the acquired real image are used to construct an image discrimination sample set. Use the constructed image discriminant sample set to train the trained discriminant network model. By minimizing the loss value d_loss of the trained discriminant network model, the network parameter θ d of the final discriminant network model is obtained, thereby obtaining the final discriminant network model.
208、对获取到的待识别图像中的目标特征进行识别并截取,得到对应所述目标特征的目标图像。208. Recognize and intercept the acquired target feature in the image to be recognized to obtain a target image corresponding to the target feature.
209、获取所述目标图像的图像深层特征。209. Acquire image deep features of the target image.
在本实施例中,对获取到的待识别图像进行预处理,具体为,对待识别图像中的目标特征进行识别,对识别到的目标特征进行截取,并对截取到的图像按照一定比例进行尺寸调整,得到用于表征目标特征的目标图像。其中,根据实际应用场景的需要,目标图像的图像深层特征可以为轮廓、纹理、明暗、色彩及其组合,以及所对应的高层语义及其组合。In this embodiment, the acquired image to be recognized is preprocessed, specifically, the target feature in the image to be recognized is recognized, the recognized target feature is intercepted, and the intercepted image is sized according to a certain ratio Adjust to obtain the target image used to characterize the target feature. Among them, according to the needs of actual application scenarios, the deep image features of the target image can be contour, texture, brightness, color, and combinations thereof, as well as corresponding high-level semantics and combinations thereof.
210、根据获取到的深层图像特征对所述目标图像进行识别,确定所述目标图像是伪造图像或者真实图像。210. Recognize the target image according to the acquired deep image features, and determine that the target image is a forged image or a real image.
为了说明步骤210的具体实施方式,作为一种优选实施例,步骤210具体可以包括:若所述篡改数据为复制粘贴类型图像数据、模糊润饰类型图像数据、或者计算机生成类型图像数据,相应地,利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像,则对应的伪造图像类型分别为复制粘贴类型图像、模糊润饰类型图像、或者计算机生成类型图像。In order to illustrate the specific implementation of step 210, as a preferred embodiment, step 210 may specifically include: if the tampering data is copy-and-paste type image data, fuzzy retouch type image data, or computer-generated type image data, correspondingly, The final discriminant network model is used to identify the target image, and it is determined that the target image is a forged image, and the corresponding forged image types are copy and paste type images, fuzzy retouch type images, or computer-generated type images.
在本实施例中,若用于训练判别网络模型的噪声变量不设定数据类型,仅对训练好的生成网络模型或者优化好的生成网络模型输入的篡改数据设定数据类型为复制粘贴类型、或者模糊润饰类型、或者计算机 生成类型,则最终的判别网络模型用于确定目标图像为伪造图像或者真实图像,以及用于确定目标图像为伪造图像的图像类型分别为复制粘贴类型图像、模糊润饰类型图像、或者计算机生成类型图像。In this embodiment, if the noise variable used to train the discriminant network model does not set the data type, only the trained generation network model or the tampered data input by the optimized generation network model is set to the copy and paste type, Either the fuzzy retouching type or the computer-generated type, the final discriminant network model is used to determine the target image is a fake image or a real image, and the image types used to determine the target image to be a forged image are copy and paste type image and fuzzy retouch type respectively Image, or computer-generated type image.
根据实际应用场景的需要,也可以将用于训练判别网络模型的噪声变量的数据类型设定为复制粘贴类型、或者模糊润饰类型、或者计算机生成类型,从而使得到的最终的判别网络模型更加稳定、快速地对目标图像进行真伪判别,为公安,法庭等部门的图像取证提供更高的可靠性。According to the needs of actual application scenarios, the data type of the noise variable used to train the discriminant network model can also be set to copy and paste type, or fuzzy retouch type, or computer-generated type, so as to make the final discriminant network model more stable , Quickly determine the authenticity of the target image, and provide higher reliability for the image collection of public security, courts and other departments.
此外,由于复制粘贴类型图像、模糊润饰类型图像、或者计算机生成类型图像存在共有的深层图像特征,因此,用于训练判别网络模型的噪声变量类型,以及训练好的生成网络模型或者优化好的生成网络模型输入的篡改数据也可以不设定数据类型,最终的判别网络模型也能够用于确定目标图像为伪造图像或者真实图像,以及用于确定目标图像为伪造图像的图像类型分别为复制粘贴类型图像、模糊润饰类型图像、或者计算机生成类型图像。此处不进行具体限定。In addition, because copy-and-paste type images, fuzzy retouch type images, or computer-generated type images have common deep image features, they are used to train and discriminate the type of noise variable of the network model, and the trained generation network model or the optimized generation The tampered data input by the network model does not need to set the data type. The final discriminating network model can also be used to determine whether the target image is a forged image or a real image, and the image types used to determine the target image as a forged image are copy and paste types. Image, blur retouch type image, or computer generated type image. There is no specific limitation here.
通过应用本实施例的技术方案,利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像,利用由所生成的伪造图像和预设的真实图像构成的图像判别样本集对深度卷积对抗生成网络模型中训练好的判别网络模型进行训练,得到最终的判别网络模型,以便利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像或者真实图像。与现有基于主动取证技术、被动盲取证技术识别图像真伪的技术方案相比,本实施例通过少量的伪造图像生成大量的伪造图像,更好地解决建立伪造样本集人工成本较高的技术问题,以及利用深度卷积对抗生成网络模型中最终的判别网络模型识别目标图像,能够有效保证最终的判别网络模型识别图像真伪的准确性以及最终的判别网络模型的鲁棒性。By applying the technical solution of this embodiment, using the deep convolution against the generative network model trained in the generative network model, generating a forged image based on the tampered data, and using the image discrimination sample composed of the generated forged image and the preset real image Set to train the discriminant network model trained in the deep convolutional confrontation generation network model to obtain the final discriminant network model, so that the final discriminant network model can be used to identify the target image and determine whether the target image is a fake image or a real image . Compared with the existing technical solutions based on active forensics technology and passive blind forensics technology to identify the authenticity of images, this embodiment generates a large number of forged images through a small amount of forged images, which better solves the high labor cost of establishing a forged sample set. The problem, as well as the use of the final discriminant network model in the deep convolutional generation network model to identify the target image, can effectively ensure the accuracy of the final discriminant network model to identify the authenticity of the image and the robustness of the final discriminant network model.
进一步的,作为图1方法的具体实现,本申请实施例提供了一种图像识别装置,如图3所示,该装置包括:生成模块35、训练模块36、识别模块37。Further, as a specific implementation of the method in FIG. 1, an embodiment of the present application provides an image recognition device. As shown in FIG. 3, the device includes: a generation module 35, a training module 36, and a recognition module 37.
生成模块35,可以用于利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像;该生成模块35为本装置识别待识别图像是伪造图像或者真实图像的基础模块。The generation module 35 can be used to use the generated network model trained in the deep convolution against the generation network model to generate fake images based on the tampered data; the generation module 35 is a basic module for the device to recognize whether the image to be recognized is a fake image or a real image .
训练模块36,可以用于利用由所生成的伪造图像和预设的真实图像构成的图像判别样本集对深度卷积对抗生成网络模型中训练好的判别网络模型进行训练,得到最终的判别网络模型;该训练模块36为本装置识别待识别图像是伪造图像或者真实图像的主要功能模块,也是本装置的核心功能模块。The training module 36 can be used to train the discriminant network model trained in the deep convolutional confrontation generation network model by using the image discrimination sample set composed of the generated fake image and the preset real image to obtain the final discriminant network model The training module 36 is the main functional module for the device to recognize that the image to be recognized is a fake image or a real image, and is also a core functional module of the device.
识别模块37,可以用于利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像或者真实图像;该识别模块37为本装置识别待识别图像是伪造图像或者真实图像的主要功能模块,也是本装置的核心功能模块。The recognition module 37 can be used to recognize the target image using the final discriminant network model, and determine that the target image is a forged image or a real image; the recognition module 37 is the main part of the device to recognize that the image to be recognized is a forged image or a real image. The functional module is also the core functional module of the device.
在具体的应用场景中,还包括第一判别训练模块31或者第二判别训练模块32,第一判别训练模块31 可以用于利用由噪声变量和真实图像构成的第一判别样本集对深度卷积对抗生成网络模型中的初始判别网络模型进行训练,得到第一判别网络模型;以及,利用由噪声变量和伪造图像构成的第二判别样本集对所述第一判别网络模型进行训练,得到训练好的判别网络模型。In a specific application scenario, it also includes a first discriminant training module 31 or a second discriminant training module 32. The first discriminant training module 31 can be used to use the first discriminant sample set composed of noise variables and real images to convolve the depth Training against the initial discriminant network model in the generative network model to obtain a first discriminant network model; and, using a second discriminant sample set composed of noise variables and fake images to train the first discriminant network model, and obtain the training The discriminative network model.
第二判别训练模块32,可以用于利用由噪声变量和真实图像构成的第一判别样本集对深度卷积对抗生成网络模型中的初始判别网络模型进行训练,得到第一判别网络模型;以及,利用由噪声变量和伪造图像构成的第二判别样本集对所述第一判别网络模型进行训练,得到第二判别网络模型;以及,利用由噪声变量和真实图像构成的第三判别样本集对所述第二判别网络模型进行训练,得到第三判别网络模型;以及,利用由噪声变量和伪造图像构成的第四判别样本集对所述第三判别网络模型进行训练,得到训练好的判别网络模型。The second discriminant training module 32 can be used to train the initial discriminant network model in the deep convolutional confrontation generation network model by using the first discriminant sample set composed of noise variables and real images to obtain the first discriminant network model; and, Use the second discriminant sample set composed of noise variables and fake images to train the first discriminant network model to obtain the second discriminant network model; and use the third discriminant sample set composed of noise variables and real images to compare the results The second discriminant network model is trained to obtain a third discriminant network model; and the third discriminant network model is trained using a fourth discriminant sample set composed of noise variables and fake images to obtain a trained discriminant network model .
在具体的应用场景中,还包括第一生成训练模块33,可以用于利用由噪声变量构成的第一生成样本集对深度卷积对抗生成网络模型中的初始生成网络模型进行训练,得到训练好的生成网络模型。In specific application scenarios, it also includes a first generation training module 33, which can be used to train the initial generation network model in the deep convolutional confrontation generation network model by using the first generation sample set composed of noise variables, and get well trained The generative network model.
在具体的应用场景中,还包括预处理模块34,可以用于对获取到的待识别图像中的目标特征进行识别并截取,得到对应所述目标特征的目标图像。In a specific application scenario, a preprocessing module 34 is also included, which can be used to identify and intercept the target feature in the acquired image to be recognized, to obtain a target image corresponding to the target feature.
在具体的应用场景中,若所述篡改数据为复制粘贴类型图像数据、模糊润饰类型图像数据、或者计算机生成类型图像数据,对应地,利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像,则对应的伪造图像类型分别为复制粘贴类型图像、模糊润饰类型图像、或者计算机生成类型图像。In a specific application scenario, if the tampering data is copy and paste type image data, fuzzy retouch type image data, or computer-generated type image data, correspondingly, the final discriminant network model is used to identify the target image to determine the The target image is a forged image, and the corresponding forged image types are copy and paste type images, fuzzy retouch type images, or computer-generated type images.
在具体的应用场景中,识别模块37,具体可以用于获取所述目标图像的图像深层特征;根据获取到的深层图像特征对所述目标图像进行识别,确定所述目标图像是伪造图像或者真实图像。In a specific application scenario, the recognition module 37 can be specifically used to obtain the deep image features of the target image; recognize the target image according to the acquired deep image features, and determine whether the target image is a fake image or a real image. image.
需要说明的是,本申请实施例提供的一种图像识别装置所涉及各功能单元的其他相应描述,可以参考图1和图2中的对应描述,在此不再赘述。It should be noted that, for other corresponding descriptions of the functional units involved in the image recognition device provided in the embodiment of the present application, reference may be made to the corresponding descriptions in FIG. 1 and FIG. 2, and details are not repeated here.
基于上述如图1和图2所示方法,相应的,本申请实施例还提供了一种非易失性可读存储介质,其上存储有计算机可读指令,该程序被处理器执行时实现上述如图1和图2所示的图像识别方法。Based on the above-mentioned method shown in Figure 1 and Figure 2, correspondingly, an embodiment of the present application also provides a non-volatile readable storage medium on which computer readable instructions are stored, and the program is executed when the processor is executed. The image recognition method shown in Figure 1 and Figure 2 described above.
基于这样的理解,本申请的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性非易失性可读存储介质(可以是CD-ROM,U盘,移动硬盘等)中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施场景所述的方法。Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, and the software product can be stored in a non-volatile non-volatile readable storage medium (can be CD-ROM, U disk, mobile hard disk) Etc.), including several instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in each implementation scenario of this application.
基于上述如图1、图2所示的方法,以及图3所示的虚拟装置实施例,为了实现上述目的,本申请实施例还提供了一种计算机设备,具体可以为个人计算机、服务器、网络设备等,该实体设备包括非易失性 可读存储介质和处理器;非易失性可读存储介质,用于存储计算机可读指令;处理器,用于执行计算机可读指令以实现上述如图1和图2所示的图像识别方法。Based on the methods shown in Figures 1 and 2 and the virtual device embodiment shown in Figure 3, in order to achieve the above objectives, the embodiments of the present application also provide a computer device, which can be a personal computer, a server, or a network. The physical device includes a non-volatile readable storage medium and a processor; the non-volatile readable storage medium is used to store computer readable instructions; and the processor is used to execute computer readable instructions to achieve the above Figure 1 and Figure 2 show the image recognition method.
可选的,该计算机设备还可以包括用户接口、网络接口、摄像头、射频(Radio Frequency,RF)电路,传感器、音频电路、WI-FI模块等等。用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard)等,可选用户接口还可以包括USB接口、读卡器接口等。网络接口可选的可以包括标准的有线接口、无线接口(如蓝牙接口、WI-FI接口)等。Optionally, the computer device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, and so on. The user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, and the like. The network interface can optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), etc.
本领域技术人员可以理解,本实施例提供的一种计算机设备结构并不构成对该实体设备的限定,可以包括更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the structure of a computer device provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or arrange different components.
非易失性可读存储介质中还可以包括操作系统、网络通信模块。操作系统是管理计算机设备硬件和软件资源的程序,支持信息处理程序以及其它软件和/或程序的运行。网络通信模块用于实现非易失性可读存储介质内部各组件之间的通信,以及与该实体设备中其它硬件和软件之间通信。The non-volatile readable storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of computer equipment, and supports the operation of information processing programs and other software and/or programs. The network communication module is used to implement communication between various components in the non-volatile readable storage medium and communication with other hardware and software in the physical device.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到本申请可以借助软件加必要的通用硬件平台的方式来实现,也可以通过硬件实现。通过应用本申请的技术方案,与现有基于主动取证技术、被动盲取证技术识别图像真伪的技术方案相比,本实施例能够通过少量的伪造图像生成大量的伪造图像;以及,利用深度卷积对抗生成网络模型中最终的判别网络模型识别目标图像,能够有效保证最终的判别网络模型识别图像真伪的准确性以及最终的判别网络模型的鲁棒性。Through the description of the foregoing implementation manners, those skilled in the art can clearly understand that this application can be implemented by means of software plus a necessary general hardware platform, or by hardware. By applying the technical solution of the present application, compared with the existing technical solutions based on active forensics technology and passive blind forensics technology to identify the authenticity of images, this embodiment can generate a large number of forged images from a small amount of forged images; and, use depth volume The final discriminant network model in the product confrontation generation network model recognizes the target image, which can effectively ensure the accuracy of the final discriminant network model to recognize the authenticity of the image and the robustness of the final discriminant network model.
本领域技术人员可以理解附图只是一个优选实施场景的示意图,附图中的模块或流程并不一定是实施本申请所必须的。本领域技术人员可以理解实施场景中的装置中的模块可以按照实施场景描述进行分布于实施场景的装置中,也可以进行相应变化位于不同于本实施场景的一个或多个装置中。上述实施场景的模块可以合并为一个模块,也可以进一步拆分成多个子模块。Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of preferred implementation scenarios, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing this application. Those skilled in the art can understand that the modules in the device in the implementation scenario can be distributed in the device in the implementation scenario according to the description of the implementation scenario, or can be changed to be located in one or more devices different from the implementation scenario. The modules of the above implementation scenarios can be combined into one module or further divided into multiple sub-modules.
上述本申请序号仅仅为了描述,不代表实施场景的优劣。以上公开的仅为本申请的几个具体实施场景,但是,本申请并非局限于此,任何本领域的技术人员能思之的变化都应落入本申请的保护范围。The above serial number of this application is only for description, and does not represent the merits of implementation scenarios. The above disclosures are only a few specific implementation scenarios of the application, but the application is not limited to these, and any changes that can be thought of by those skilled in the art should fall into the protection scope of the application.

Claims (20)

  1. 一种图像识别方法,其特征在于,包括:An image recognition method, characterized in that it comprises:
    利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像;Use deep convolution to fight against the generative network model trained in the generative network model to generate fake images based on the tampered data;
    利用由所生成的伪造图像和预设的真实图像构成的图像判别样本集对深度卷积对抗生成网络模型中训练好的判别网络模型进行训练,得到最终的判别网络模型;Use the image discrimination sample set composed of the generated fake image and the preset real image to train the discriminant network model trained in the deep convolutional confrontation generation network model to obtain the final discriminant network model;
    利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像或者真实图像。The final discriminant network model is used to identify the target image, and it is determined that the target image is a fake image or a real image.
  2. 根据权利要求1所述的方法,其特征在于,所述利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像之前,所述方法具体还包括:The method according to claim 1, characterized in that, before the generating network model trained in the deep convolution confrontation generating network model is used to generate the forged image according to the tampered data, the method specifically further comprises:
    利用由噪声变量和真实图像构成的第一判别样本集对深度卷积对抗生成网络模型中的初始判别网络模型进行训练,得到第一判别网络模型;Use the first discriminant sample set composed of noise variables and real images to train the initial discriminant network model in the deep convolutional confrontation generation network model to obtain the first discriminant network model;
    利用由噪声变量和伪造图像构成的第二判别样本集对所述第一判别网络模型进行训练,得到训练好的判别网络模型。The first discriminant network model is trained by using a second discriminant sample set composed of noise variables and fake images to obtain a trained discriminant network model.
  3. 根据权利要求1所述的方法,其特征在于,所述利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像之前,所述方法具体还包括:The method according to claim 1, characterized in that, before the generating network model trained in the deep convolution confrontation generating network model is used to generate the forged image according to the tampered data, the method specifically further comprises:
    利用由噪声变量和真实图像构成的第一判别样本集对深度卷积对抗生成网络模型中的初始判别网络模型进行训练,得到第一判别网络模型;Use the first discriminant sample set composed of noise variables and real images to train the initial discriminant network model in the deep convolutional confrontation generation network model to obtain the first discriminant network model;
    利用由噪声变量和伪造图像构成的第二判别样本集对所述第一判别网络模型进行训练,得到第二判别网络模型;Training the first discriminant network model by using a second discriminant sample set composed of noise variables and fake images to obtain a second discriminant network model;
    利用由噪声变量和真实图像构成的第三判别样本集对所述第二判别网络模型进行训练,得到第三判别网络模型;Training the second discriminant network model by using a third discriminant sample set composed of noise variables and real images to obtain a third discriminant network model;
    利用由噪声变量和伪造图像构成的第四判别样本集对所述第三判别网络模型进行训练,得到训练好的判别网络模型。The third discriminant network model is trained by using a fourth discriminant sample set composed of noise variables and fake images to obtain a trained discriminant network model.
  4. 根据权利要求1所述的方法,其特征在于,所述利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像之前,所述方法具体还包括:The method according to claim 1, characterized in that, before the generating network model trained in the deep convolution confrontation generating network model is used to generate the forged image according to the tampered data, the method specifically further comprises:
    利用由噪声变量构成的第一生成样本集对深度卷积对抗生成网络模型中的初始生成网络模型进行训练,得到训练好的生成网络模型。The first generation sample set composed of noise variables is used to train the initial generation network model in the deep convolutional confrontation generation network model to obtain the trained generation network model.
  5. 根据权利要求1所述的方法,其特征在于,所述利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像或者真实图像之前,具体还包括:The method according to claim 1, wherein the step of using the final discriminant network model to identify the target image, and before determining that the target image is a forged image or a real image, specifically further comprises:
    对获取到的待识别图像中的目标特征进行识别并截取,得到对应所述目标特征的目标图像。The target feature in the acquired image to be recognized is recognized and intercepted to obtain a target image corresponding to the target feature.
  6. 根据权利要求1所述的方法,其特征在于,若所述篡改数据为复制粘贴类型图像数据、模糊润 饰类型图像数据、或者计算机生成类型图像数据,对应地,利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像,则对应的伪造图像类型分别为复制粘贴类型图像、模糊润饰类型图像、或者计算机生成类型图像。The method according to claim 1, wherein if the tampering data is copy and paste type image data, fuzzy retouch type image data, or computer-generated type image data, correspondingly, use the final discriminant network model to compare the target image Recognition is performed, and it is determined that the target image is a forged image, and the corresponding forged image types are copy and paste type images, fuzzy retouch type images, or computer-generated type images.
  7. 根据权利要求1-6任一所述的方法,其特征在于,所述利用最终的判别网络模型,对目标图像进行识别,确定所述目标图像是伪造图像或者真实图像,具体包括:The method according to any one of claims 1 to 6, wherein said using the final discriminant network model to recognize the target image and determine whether the target image is a fake image or a real image specifically comprises:
    获取所述目标图像的图像深层特征;Acquiring image deep features of the target image;
    根据获取到的深层图像特征对所述目标图像进行识别,确定所述目标图像是伪造图像或者真实图像。The target image is identified according to the acquired deep image features, and it is determined that the target image is a fake image or a real image.
  8. 一种图像识别装置,其特征在于,包括:An image recognition device, characterized by comprising:
    生成模块,用于利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像;The generation module is used to use the generated network model trained in the deep convolution against the generated network model to generate fake images according to the tampered data;
    训练模块,用于利用由所生成的伪造图像和预设的真实图像构成的图像判别样本集对深度卷积对抗生成网络模型中训练好的判别网络模型进行训练,得到最终的判别网络模型;The training module is used to train the discriminant network model trained in the deep convolutional confrontation generation network model by using the image discrimination sample set composed of the generated fake image and the preset real image to obtain the final discriminant network model;
    识别模块,用于利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像或者真实图像。The recognition module is used to recognize the target image using the final discriminant network model, and determine whether the target image is a fake image or a real image.
  9. 根据权利要求8所述的装置,其特征在于,还包括第一判别训练模块,具体包括:The device according to claim 8, further comprising a first discriminant training module, which specifically comprises:
    利用由噪声变量和真实图像构成的第一判别样本集对深度卷积对抗生成网络模型中的初始判别网络模型进行训练,得到第一判别网络模型;Use the first discriminant sample set composed of noise variables and real images to train the initial discriminant network model in the deep convolutional confrontation generation network model to obtain the first discriminant network model;
    利用由噪声变量和伪造图像构成的第二判别样本集对所述第一判别网络模型进行训练,得到训练好的判别网络模型。The first discriminant network model is trained by using a second discriminant sample set composed of noise variables and fake images to obtain a trained discriminant network model.
  10. 根据权利要求8所述的装置,其特征在于,还包括第二判别训练模块,具体包括:The device according to claim 8, further comprising a second discriminant training module, specifically comprising:
    利用由噪声变量和真实图像构成的第一判别样本集对深度卷积对抗生成网络模型中的初始判别网络模型进行训练,得到第一判别网络模型;Use the first discriminant sample set composed of noise variables and real images to train the initial discriminant network model in the deep convolutional confrontation generation network model to obtain the first discriminant network model;
    利用由噪声变量和伪造图像构成的第二判别样本集对所述第一判别网络模型进行训练,得到第二判别网络模型;Training the first discriminant network model by using a second discriminant sample set composed of noise variables and fake images to obtain a second discriminant network model;
    利用由噪声变量和真实图像构成的第三判别样本集对所述第二判别网络模型进行训练,得到第三判别网络模型;Training the second discriminant network model by using a third discriminant sample set composed of noise variables and real images to obtain a third discriminant network model;
    利用由噪声变量和伪造图像构成的第四判别样本集对所述第三判别网络模型进行训练,得到训练好的判别网络模型。The third discriminant network model is trained by using a fourth discriminant sample set composed of noise variables and fake images to obtain a trained discriminant network model.
  11. 根据权利要求8所述的装置,其特征在于,还包括第一生成训练模块,具体包括:The device according to claim 8, further comprising a first generating training module, which specifically comprises:
    利用由噪声变量构成的第一生成样本集对深度卷积对抗生成网络模型中的初始生成网络模型进行训练,得到训练好的生成网络模型。The first generation sample set composed of noise variables is used to train the initial generation network model in the deep convolutional confrontation generation network model to obtain the trained generation network model.
  12. 根据权利要求8所述的装置,其特征在于,还包括预处理模块,具体包括:The device according to claim 8, further comprising a pre-processing module, specifically comprising:
    对获取到的待识别图像中的目标特征进行识别并截取,得到对应所述目标特征的目标图像。The target feature in the acquired image to be recognized is recognized and intercepted to obtain a target image corresponding to the target feature.
  13. 根据权利要求8所述的装置,其特征在于,若所述篡改数据为复制粘贴类型图像数据、模糊润饰类型图像数据、或者计算机生成类型图像数据,对应地,利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像,则对应的伪造图像类型分别为复制粘贴类型图像、模糊润饰类型图像、或者计算机生成类型图像。The device according to claim 8, wherein if the tampering data is copy and paste type image data, fuzzy retouch type image data, or computer-generated type image data, correspondingly, the final discriminant network model is used to compare the target image Recognition is performed, and it is determined that the target image is a forged image, and the corresponding forged image types are copy and paste type images, fuzzy retouch type images, or computer-generated type images.
  14. 根据权利要求8-13任一所述的装置,其特征在于,所述识别模块,具体包括:The device according to any one of claims 8-13, wherein the identification module specifically comprises:
    获取所述目标图像的图像深层特征;Acquiring image deep features of the target image;
    根据获取到的深层图像特征对所述目标图像进行识别,确定所述目标图像是伪造图像或者真实图像。The target image is identified according to the acquired deep image features, and it is determined that the target image is a fake image or a real image.
  15. 一种非易失性可读存储介质,其上存储有计算机可读指令,其特征在于,所述程序被处理器执行时实现图像识别方法,包括:A non-volatile readable storage medium, on which computer readable instructions are stored, characterized in that, when the program is executed by a processor, an image recognition method is realized, including:
    利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像;Use deep convolution to fight against the generative network model trained in the generative network model to generate fake images based on the tampered data;
    利用由所生成的伪造图像和预设的真实图像构成的图像判别样本集对深度卷积对抗生成网络模型中训练好的判别网络模型进行训练,得到最终的判别网络模型;Use the image discrimination sample set composed of the generated fake image and the preset real image to train the discriminant network model trained in the deep convolutional confrontation generation network model to obtain the final discriminant network model;
    利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像或者真实图像。The final discriminant network model is used to identify the target image, and it is determined that the target image is a fake image or a real image.
  16. 根据权利要求15所述的非易失性可读存储介质,其特征在于,所述利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像之前,具体还包括:The non-volatile readable storage medium according to claim 15, characterized in that, before the generating network model trained in the generating network model using the deep convolution confrontation, before generating the forged image according to the tampered data, it specifically further comprises:
    利用由噪声变量和真实图像构成的第一判别样本集对深度卷积对抗生成网络模型中的初始判别网络模型进行训练,得到第一判别网络模型;Use the first discriminant sample set composed of noise variables and real images to train the initial discriminant network model in the deep convolutional confrontation generation network model to obtain the first discriminant network model;
    利用由噪声变量和伪造图像构成的第二判别样本集对所述第一判别网络模型进行训练,得到第二判别网络模型;Training the first discriminant network model by using a second discriminant sample set composed of noise variables and fake images to obtain a second discriminant network model;
    利用由噪声变量和真实图像构成的第三判别样本集对所述第二判别网络模型进行训练,得到第三判别网络模型;Training the second discriminant network model by using a third discriminant sample set composed of noise variables and real images to obtain a third discriminant network model;
    利用由噪声变量和伪造图像构成的第四判别样本集对所述第三判别网络模型进行训练,得到训练好的判别网络模型。The third discriminant network model is trained by using a fourth discriminant sample set composed of noise variables and fake images to obtain a trained discriminant network model.
  17. 根据权利要求15所述的非易失性可读存储介质,其特征在于,若所述篡改数据为复制粘贴类型图像数据、模糊润饰类型图像数据、或者计算机生成类型图像数据,对应地,利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像,则对应的伪造图像类型分别为复制粘贴类型图像、模糊润饰类型图像、或者计算机生成类型图像。The non-volatile readable storage medium according to claim 15, wherein if the tampering data is copy and paste type image data, blur retouch type image data, or computer-generated type image data, correspondingly, use the final The discriminant network model of, recognizes the target image, and determines that the target image is a forged image, and the corresponding forged image types are copy and paste type images, fuzzy retouch type images, or computer-generated type images.
  18. 一种计算机设备,包括非易失性可读存储介质、处理器及存储在非易失性可读存储介质上并可在处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述程序时实现图像识别方法,包括:A computer device, including a non-volatile readable storage medium, a processor, and computer readable instructions stored on the non-volatile readable storage medium and running on the processor, characterized in that the processor The method for realizing image recognition when executing the program includes:
    利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像;Use deep convolution to fight against the generative network model trained in the generative network model to generate fake images based on the tampered data;
    利用由所生成的伪造图像和预设的真实图像构成的图像判别样本集对深度卷积对抗生成网络模型 中训练好的判别网络模型进行训练,得到最终的判别网络模型;Use the image discrimination sample set composed of the generated fake images and preset real images to train the discriminant network model trained in the deep convolutional confrontation generation network model to obtain the final discriminant network model;
    利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像或者真实图像。The final discriminant network model is used to identify the target image, and it is determined that the target image is a fake image or a real image.
  19. 根据权利要求18所述的计算机设备,其特征在于,所述利用深度卷积对抗生成网络模型中训练好的生成网络模型,根据篡改数据生成伪造图像之前,具体还包括:18. The computer device according to claim 18, wherein the generating network model trained in the deep convolution confrontation generating network model, before generating the forged image according to the tampered data, specifically further comprises:
    利用由噪声变量和真实图像构成的第一判别样本集对深度卷积对抗生成网络模型中的初始判别网络模型进行训练,得到第一判别网络模型;Use the first discriminant sample set composed of noise variables and real images to train the initial discriminant network model in the deep convolutional confrontation generation network model to obtain the first discriminant network model;
    利用由噪声变量和伪造图像构成的第二判别样本集对所述第一判别网络模型进行训练,得到第二判别网络模型;Training the first discriminant network model by using a second discriminant sample set composed of noise variables and fake images to obtain a second discriminant network model;
    利用由噪声变量和真实图像构成的第三判别样本集对所述第二判别网络模型进行训练,得到第三判别网络模型;Training the second discriminant network model by using a third discriminant sample set composed of noise variables and real images to obtain a third discriminant network model;
    利用由噪声变量和伪造图像构成的第四判别样本集对所述第三判别网络模型进行训练,得到训练好的判别网络模型。The third discriminant network model is trained by using a fourth discriminant sample set composed of noise variables and fake images to obtain a trained discriminant network model.
  20. 根据权利要求18所述的计算机设备,其特征在于,若所述篡改数据为复制粘贴类型图像数据、模糊润饰类型图像数据、或者计算机生成类型图像数据,对应地,利用最终的判别网络模型对目标图像进行识别,确定所述目标图像是伪造图像,则对应的伪造图像类型分别为复制粘贴类型图像、模糊润饰类型图像、或者计算机生成类型图像。The computer device according to claim 18, wherein if the tampering data is copy-and-paste type image data, fuzzy retouch type image data, or computer-generated type image data, correspondingly, the final discriminating network model is used to target the target The image is recognized, and it is determined that the target image is a forged image, and the corresponding forged image type is a copy and paste type image, a fuzzy retouch type image, or a computer-generated type image.
PCT/CN2019/118187 2019-06-26 2019-11-13 Image recognition method and apparatus, and non-volatile readable storage medium and computer device WO2020258667A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910559070.3 2019-06-26
CN201910559070.3A CN110458185A (en) 2019-06-26 2019-06-26 Image-recognizing method and device, storage medium, computer equipment

Publications (1)

Publication Number Publication Date
WO2020258667A1 true WO2020258667A1 (en) 2020-12-30

Family

ID=68481088

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/118187 WO2020258667A1 (en) 2019-06-26 2019-11-13 Image recognition method and apparatus, and non-volatile readable storage medium and computer device

Country Status (2)

Country Link
CN (1) CN110458185A (en)
WO (1) WO2020258667A1 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686331A (en) * 2021-01-11 2021-04-20 中国科学技术大学 Forged image recognition model training method and forged image recognition method
CN113052203A (en) * 2021-02-09 2021-06-29 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) Anomaly detection method and device for multiple types of data
CN113379600A (en) * 2021-05-26 2021-09-10 北京邮电大学 Short video super-resolution conversion method, device and medium based on deep learning
CN113822160A (en) * 2021-08-20 2021-12-21 西安交通大学 Evaluation method, system and equipment of deep forgery detection model
CN114841236A (en) * 2022-03-28 2022-08-02 中国科学院宁波材料技术与工程研究所 Flexible pressure sensing array diagram identification method based on deep learning
CN115270614A (en) * 2022-07-18 2022-11-01 郑州轻工业大学 Visual generation method for multi-physical-field digital twin organisms of muddy water circulation system
CN115308799A (en) * 2022-09-05 2022-11-08 中国地质科学院地质力学研究所 Seismic imaging free gas structure identification method and system
CN117593311A (en) * 2024-01-19 2024-02-23 浙江大学 Depth synthetic image detection enhancement method and device based on countermeasure generation network

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581671B (en) * 2020-05-11 2021-05-25 笵成科技南京有限公司 Digital passport protection method combining deep neural network and block chain
CN112132133B (en) * 2020-06-16 2023-11-17 中国科学院计算技术研究所数字经济产业研究院 Identification image data enhancement method and true-false intelligent identification method
CN112001785A (en) * 2020-07-21 2020-11-27 小花网络科技(深圳)有限公司 Network credit fraud identification method and system based on image identification
CN112149608A (en) * 2020-10-09 2020-12-29 腾讯科技(深圳)有限公司 Image recognition method, device and storage medium
CN112116592B (en) * 2020-11-19 2021-04-02 北京瑞莱智慧科技有限公司 Image detection method, training method, device and medium of image detection model
CN112818767B (en) * 2021-01-18 2023-07-25 深圳市商汤科技有限公司 Data set generation and forgery detection methods and devices, electronic equipment and storage medium
CN112766189B (en) * 2021-01-25 2023-08-08 北京有竹居网络技术有限公司 Deep forgery detection method and device, storage medium and electronic equipment
CN112801281A (en) * 2021-03-22 2021-05-14 东南大学 Countermeasure generation network construction method based on quantization generation model and neural network
CN113542221B (en) * 2021-06-15 2023-11-03 四川英得赛克科技有限公司 Method and system for judging falsification of sensor data of intelligent substation, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180107858A1 (en) * 2014-08-26 2018-04-19 Gingy Technology Inc. Fingerprint identification method and fingerprint identification device
CN108197700A (en) * 2018-01-12 2018-06-22 广州视声智能科技有限公司 A kind of production confrontation network modeling method and device
CN109033940A (en) * 2018-06-04 2018-12-18 上海依图网络科技有限公司 A kind of image-recognizing method, calculates equipment and storage medium at device
CN109543740A (en) * 2018-11-14 2019-03-29 哈尔滨工程大学 A kind of object detection method based on generation confrontation network
CN109784384A (en) * 2018-12-28 2019-05-21 佛山科学技术学院 A kind of method and device of the automatic discrimination trade mark true and false

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107016406A (en) * 2017-02-24 2017-08-04 中国科学院合肥物质科学研究院 The pest and disease damage image generating method of network is resisted based on production
CN107491771A (en) * 2017-09-21 2017-12-19 百度在线网络技术(北京)有限公司 Method for detecting human face and device
CN108921220A (en) * 2018-06-29 2018-11-30 国信优易数据有限公司 Image restoration model training method, device and image recovery method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180107858A1 (en) * 2014-08-26 2018-04-19 Gingy Technology Inc. Fingerprint identification method and fingerprint identification device
CN108197700A (en) * 2018-01-12 2018-06-22 广州视声智能科技有限公司 A kind of production confrontation network modeling method and device
CN109033940A (en) * 2018-06-04 2018-12-18 上海依图网络科技有限公司 A kind of image-recognizing method, calculates equipment and storage medium at device
CN109543740A (en) * 2018-11-14 2019-03-29 哈尔滨工程大学 A kind of object detection method based on generation confrontation network
CN109784384A (en) * 2018-12-28 2019-05-21 佛山科学技术学院 A kind of method and device of the automatic discrimination trade mark true and false

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112686331A (en) * 2021-01-11 2021-04-20 中国科学技术大学 Forged image recognition model training method and forged image recognition method
CN112686331B (en) * 2021-01-11 2022-09-09 中国科学技术大学 Forged image recognition model training method and forged image recognition method
CN113052203A (en) * 2021-02-09 2021-06-29 哈尔滨工业大学(深圳)(哈尔滨工业大学深圳科技创新研究院) Anomaly detection method and device for multiple types of data
CN113379600A (en) * 2021-05-26 2021-09-10 北京邮电大学 Short video super-resolution conversion method, device and medium based on deep learning
CN113822160A (en) * 2021-08-20 2021-12-21 西安交通大学 Evaluation method, system and equipment of deep forgery detection model
CN113822160B (en) * 2021-08-20 2023-09-19 西安交通大学 Evaluation method, system and equipment of depth counterfeiting detection model
CN114841236A (en) * 2022-03-28 2022-08-02 中国科学院宁波材料技术与工程研究所 Flexible pressure sensing array diagram identification method based on deep learning
CN114841236B (en) * 2022-03-28 2024-04-23 中国科学院宁波材料技术与工程研究所 Method for identifying flexible pressure sensing array map based on deep learning
CN115270614A (en) * 2022-07-18 2022-11-01 郑州轻工业大学 Visual generation method for multi-physical-field digital twin organisms of muddy water circulation system
CN115270614B (en) * 2022-07-18 2024-05-28 郑州轻工业大学 Visual generation method for digital twin bodies of multiple physical fields of muddy water circulating system
CN115308799A (en) * 2022-09-05 2022-11-08 中国地质科学院地质力学研究所 Seismic imaging free gas structure identification method and system
CN117593311A (en) * 2024-01-19 2024-02-23 浙江大学 Depth synthetic image detection enhancement method and device based on countermeasure generation network

Also Published As

Publication number Publication date
CN110458185A (en) 2019-11-15

Similar Documents

Publication Publication Date Title
WO2020258667A1 (en) Image recognition method and apparatus, and non-volatile readable storage medium and computer device
EP3916627A1 (en) Living body detection method based on facial recognition, and electronic device and storage medium
Rao et al. Deep learning local descriptor for image splicing detection and localization
WO2020000908A1 (en) Method and device for face liveness detection
WO2022161286A1 (en) Image detection method, model training method, device, medium, and program product
Ferrara et al. Face morphing detection in the presence of printing/scanning and heterogeneous image sources
Raghavendra et al. Robust scheme for iris presentation attack detection using multiscale binarized statistical image features
Zhang et al. A face antispoofing database with diverse attacks
WO2019134536A1 (en) Neural network model-based human face living body detection
KR101309889B1 (en) Texture features for biometric authentication
US11354917B2 (en) Detection of fraudulently generated and photocopied credential documents
US11354797B2 (en) Method, device, and system for testing an image
Fourati et al. Anti-spoofing in face recognition-based biometric authentication using image quality assessment
CN109871845B (en) Certificate image extraction method and terminal equipment
CN109086723B (en) Method, device and equipment for detecting human face based on transfer learning
CN109948566B (en) Double-flow face anti-fraud detection method based on weight fusion and feature selection
DE112019000334T5 (en) VALIDATE THE IDENTITY OF A REMOTE USER BY COMPARISON ON THE BASIS OF THRESHOLD VALUES
CN110569756A (en) face recognition model construction method, recognition method, device and storage medium
CN107633485A (en) Face's luminance regulating method, device, equipment and storage medium
CN110489659A (en) Data matching method and device
CN112651333A (en) Silence living body detection method and device, terminal equipment and storage medium
CN116229528A (en) Living body palm vein detection method, device, equipment and storage medium
CN112200075B (en) Human face anti-counterfeiting method based on anomaly detection
CN112818774A (en) Living body detection method and device
WO2023071180A1 (en) Authenticity identification method and apparatus, electronic device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19935496

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19935496

Country of ref document: EP

Kind code of ref document: A1