WO2021164515A1 - Detection method and apparatus for tampered image - Google Patents

Detection method and apparatus for tampered image Download PDF

Info

Publication number
WO2021164515A1
WO2021164515A1 PCT/CN2021/074001 CN2021074001W WO2021164515A1 WO 2021164515 A1 WO2021164515 A1 WO 2021164515A1 CN 2021074001 W CN2021074001 W CN 2021074001W WO 2021164515 A1 WO2021164515 A1 WO 2021164515A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
feature description
similarity
feature
reviewed
Prior art date
Application number
PCT/CN2021/074001
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 WO2021164515A1 publication Critical patent/WO2021164515A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of artificial intelligence technology, and in particular to a method and device for detecting tampered images.
  • Image tampering methods mainly include image mosaic tampering, image copy-paste tampering, and image object removal tampering.
  • the existing image tampering detection methods mainly use the target detection model corresponding to the target detection method to extract the differentiated features existing at the boundary of the image tampering area and the non-tampering area. For example, the storefront image containing the owner's image is changed to another People separate the tampered area (the image of the shop owner) and the non-tampered area (the image of the storefront) based on the difference in the graphics angle, color, pixel, brightness, etc. generated at the junction of the image splicing, so as to determine whether the image is a tampered image.
  • the difference caused by image splicing can be eliminated by re-shooting. For example, if the spliced image is re-shot, some cameras can perform secondary processing on the splicing boundary. The difference of the splicing boundary is eliminated. In this way, the target detection method is invalid and the difference of the image splicing boundary cannot be obtained.
  • the embodiments of the present invention provide a detection method and device for tampered images, which are used to accurately and quickly detect tampered images based on the global characteristics of the image.
  • an embodiment of the present invention provides a method for detecting tampered images, the method including:
  • the first image is the image to be reviewed; from the feature description of the reviewed image in the first image type, determine the The feature similarity of the first feature description meets the second feature description of the first similarity requirement; for the second feature description whose feature similarity meets the first similarity requirement, determine the second image corresponding to the second feature description; If the image similarity between the first image and the second image meets the second similarity requirement, it is determined that the first image is a tampered image.
  • the first image type of the first image is used to confirm the audited image corresponding to the first image type, so as to obtain the feature description corresponding to the audited image.
  • the feature description of the reviewed image of the same image type as the first image type can be obtained first.
  • the second image with greater similarity to the first image can be preliminarily determined, that is, the reviewed image with greater similarity to the image to be reviewed can be preliminarily determined; these determined reviewed images can be basically judged to be suspected of being reviewed.
  • the image to be tampered with Further, the image similarity between the second image and the first image is confirmed. If the image similarity meets the second similarity requirement, the first image is an image tampered with based on the second image. That is to say, these determined audited images, that is, images that are suspected of being tampered with by the image to be audited, are further calculated for image similarity with the image to be audited.
  • the image that is suspected of being tampered with by the image to be audited corresponding to the image similarity required by the two similarity is confirmed as an image that has been tampered with by the image to be audited, that is, the first image is a tampered image. In this way, it is possible to accurately and quickly detect tampered images based on the global features of the image.
  • determining the image similarity between the first image and the second image in the following manner includes: determining a third feature description of the first image and a fourth feature description of the second image Feature description; wherein the dimensions of the third feature description and the fourth feature description are the same; the dimensions of the first feature description and the second feature description are the same; the number of dimensions of the third feature description is more than The number of dimensions of the first feature description; the similarity between the third feature description and the fourth feature description is calculated, so as to obtain the image similarity between the first image and the second image.
  • the image similarity between the third feature description and the fourth feature description is calculated, because the third feature description and the fourth feature description
  • the dimension of the feature description is the same, and the dimension is higher than the dimension of the first feature description and the second feature description, so the accuracy of the calculated image similarity is higher than the feature similarity. Therefore, the feature similarity between the image to be reviewed and the image to be reviewed can be calculated first through the low-dimensional feature description, and the reviewed image that is relatively similar to the image to be reviewed can be screened out to achieve preliminary screening, which can speed up the calculation.
  • determining the image similarity between the first image and the second image includes: determining the image of the first image and the second image through a two-channel image similarity calculation model Similarity; wherein, the dual-channel image similarity calculation model is obtained through training of historical sample pairs; each historical sample pair includes two images with similarity marks.
  • the dual-channel image similarity calculation model obtained through historical sample pair training because each historical sample pair includes two images with similarity marks, these two images can be used as positive samples and negative samples to train dual-channel Image similarity calculation model.
  • the image similarity between the first image and the second image is calculated by the dual-channel image similarity calculation model, the effect of tampering operations such as image rotation, scale conversion, and image stitching on detection is effectively avoided, and the accuracy of image similarity is increased. Rate.
  • determining the second feature description whose similarity with the first feature description meets the requirements of the first similarity includes: determining the feature described with the first feature by a nearest neighbor search method The similarity meets the second feature description required by the first similarity.
  • the description of each second feature in each image type is determined by the following methods, including: classifying the reviewed images to obtain the reviewed images in each image type; Feature extraction is performed on each audited image in the image types, the extracted features are reduced in dimensionality based on the product quantization method to obtain the feature description of the audited image, and the feature index of the feature description of the audited image is determined.
  • the audited images are classified, the features are extracted corresponding to the audited images in each image type, and the dimensionality reduction processing is performed on the extracted features based on the product quantization method to obtain the second feature description.
  • the dimension of the feature description of each reviewed image and the calculation of the first feature description is lower, and the determination of the second feature description is accelerated.
  • the feature index of the second feature description the feature description of the reviewed image can be quickly obtained when calculating the feature similarity, and the speed of detecting tampered images can be accelerated.
  • performing feature extraction on each reviewed image in the image type includes: performing feature extraction on each reviewed image in the image type through a set feature extraction model; determining The third feature description of the first image and the fourth feature description of the second image include: performing feature extraction on the first image through the feature extraction model to obtain the third feature description; The feature extraction model performs feature extraction on the second image to obtain the fourth feature description.
  • the third feature description of the first image is extracted by setting the feature extraction model, and the fourth feature description of the second image is extracted.
  • the high-dimensional third feature description and the fourth feature description can be extracted through the feature extraction model to realize the rapid and high-precision detection of tampered images based on the global features of the image.
  • an embodiment of the present invention provides a device for detecting tampered images, the device including:
  • the determining module is used to determine the first feature description of the first image and the first image type to which the first image belongs; the first image is an image to be reviewed;
  • the calculation module is used to determine, from the feature description of the reviewed image in the first image type, a second feature description whose feature similarity with the first feature description meets the first similarity requirement; A second feature description with similarity requirements, determine the second image corresponding to the second feature description; if the image similarity between the first image and the second image meets the second similarity requirements, determine the The first image is a tampered image.
  • determining the image similarity between the first image and the second image in the following manner includes:
  • the determining module is further configured to determine a third feature description of the first image and a fourth feature description of the second image; wherein the dimensions of the third feature description and the fourth feature description are the same; The dimensions of the first feature description and the second feature description are the same; the number of dimensions of the third feature description is more than the number of dimensions of the first feature description;
  • the calculation module is specifically configured to calculate the similarity between the third feature description and the fourth feature description, so as to obtain the image similarity between the first image and the second image.
  • an embodiment of the present application further provides a computing device, including: a memory, configured to store program instructions; a processor, configured to call the program instructions stored in the memory, and execute according to the obtained program as in the first aspect
  • a computing device including: a memory, configured to store program instructions; a processor, configured to call the program instructions stored in the memory, and execute according to the obtained program as in the first aspect
  • embodiments of the present application also provide a computer-readable non-volatile storage medium, including computer-readable instructions.
  • the computer reads and executes the computer-readable instructions, the computer executes the same as in the first aspect.
  • FIG. 1 is a schematic diagram of an architecture for detecting tampered images according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a method for detecting tampered images according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of a method for detecting tampered images according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a detection device for tampering images provided by an embodiment of the present invention.
  • the embodiment of the present invention provides a schematic diagram of the architecture of a method for detecting tampered images, as shown in FIG.
  • the feature library system 101 sets a retrieval index for the feature description of the reviewed image corresponding to each image type.
  • the image detection system 102 determines the image type of the image to be reviewed, and performs feature extraction on the image to be reviewed, that is, extracts the first feature description; the image detection system 102 obtains the image type of the image to be reviewed.
  • the retrieval index in the reviewed image feature library system 101 is called to obtain the feature description of the reviewed image of the same image type as the image type of the image to be reviewed; the image detection system 102 calculates the first feature description and the feature of the reviewed image
  • the feature similarity of the description, the feature description whose feature similarity meets the requirements of the first similarity is the second feature description, and the audited image corresponding to the second feature description is obtained from the audited image feature database system 101 according to the second feature description; image detection
  • the tampering evaluation system 103 obtains the image similarity between the image to be reviewed and the image that has been reviewed, evaluates whether the image similarity meets the second similarity requirement, and if it does, determines that the image to be reviewed is a tampered image. Otherwise, the image to be reviewed is a non-tampered image.
  • the embodiment of the present application provides a method for detecting tampered images, as shown in FIG. 2, including:
  • Step 201 Determine the first feature description of the first image and the first image type to which the first image belongs; the first image is an image to be reviewed;
  • the first image is the image to be reviewed.
  • the business license and/or storefront image are the images to be reviewed.
  • the image types can be pharmacy storefront images, supermarket storefront images, gas station storefront images, ID photo images, and so on.
  • the first feature description is the feature description data of the image to be reviewed; it can be in the form of a vector, for example, a feature vector is formed by the color, brightness, line angle, etc.
  • each point it can also be a feature set, for example, the pixel set includes each The feature set formed by the pixel data of the point and the brightness set including the brightness of each point, etc.; the specific feature description method is not limited here. In other words, determine the image type and image feature description of the image to be reviewed.
  • Step 202 From the feature description of the reviewed image in the first image type, determine a second feature description whose feature similarity with the first feature description meets the first similarity requirement;
  • the feature similarity is the similarity between the feature description of each reviewed image and the first feature description.
  • the feature description of the reviewed image corresponds to the first feature description, and is a feature description that can calculate the similarity between the feature description of the reviewed image and the feature description of the first feature description through a corresponding algorithm.
  • the first feature description is the feature vector of the image to be reviewed
  • the feature description of the reviewed image is the feature vector of the reviewed image
  • the cosine similarity between the feature vector of the image to be reviewed and the feature vector of the reviewed image is calculated as the feature similarity.
  • the feature similarity algorithm is not specifically limited.
  • the low-dimensional space is encoded with a smaller codebook, which can also reduce the data storage space.
  • the first similarity is a set threshold of feature similarity or a probability distribution of feature similarity. If the feature similarity is a value of 0-1, the threshold of feature similarity can be set to 0.8 according to industry experience.
  • the audited image corresponding to the feature similarity is determined to be an image that is suspected of being tampered with; Among them, greater than the threshold 0.8 is the first similarity requirement; another example, feature similarity is the set of similarity of each feature, if the probability distribution of the set of similarity of each feature is the same as the set probability distribution, it is determined
  • the reviewed image corresponding to the feature similarity is an image that is suspected of being tampered with; where the same probability distribution is set as the first similarity requirement; therefore, the specific existence form of the first similarity is not limited. That is to say, the feature description of the reviewed image is acquired according to the first image type, and the feature similarity between the first feature description and the feature description of each reviewed image is calculated. If the feature similarity meets the requirement of the first similarity, the second feature description corresponding to the feature similarity that meets the first similarity requirement is obtained.
  • determining the second feature description whose feature similarity with the first feature description meets the first similarity requirement includes: determining that the feature similarity with the first feature description meets the first similarity through a nearest neighbor search method The second feature description of the degree requirement. That is to say, the feature similarity between the first feature description and the feature description of the reviewed image can be calculated by the nearest neighbor search algorithm, and then the second feature description corresponding to the feature similarity that meets the first similarity requirement can be determined.
  • the description of each second feature in each image type can be determined by the following methods, including: classifying the reviewed images to obtain the reviewed images in each image type; Feature extraction is performed on each audited image in the image types, the extracted features are reduced in dimensionality based on the product quantization method to obtain the feature description of the audited image, and the feature index of the feature description of the audited image is determined.
  • classify the reviewed images for example, divide the images into ID photos, storefront images, etc.
  • the ID photos can be divided into ID cards, business licenses, driving photos, etc., storefront images It can be divided into supermarket storefront images, gas station storefront images, and so on.
  • extract the features of the audited images in each image type extract the features of the audited images in each image type, and perform dimensionality reduction processing on the extracted features of each audited image by multiplication and quantification, to obtain the features of the audited image describe.
  • performing feature extraction on each audited image in the image type includes: performing feature extraction on each audited image in the image type through a set feature extraction model; determining the value of the first image
  • the third feature description and the fourth feature description of the second image include: performing feature extraction on the first image through the feature extraction model to obtain the third feature description; Perform feature extraction on the second image to obtain the fourth feature description.
  • feature extraction is performed on each of the reviewed images in the image types, through a set feature extraction model, for example, for more than 10,000 merchant door head photos.
  • Label different types of images such as supermarket images marked as "1”, gas station images marked as "2”, training on the basis of the VGG16 network model; the fully connected layer feature parameters of the model are obtained, which can be regarded as audited
  • the fourth feature description of the image; the image to be audited is trained on the basis of the VGG16 network model; the fully connected layer feature parameters of the model are obtained, which can be used as the third feature description of the image to be audited; the middle feature layer is subsequently taken as the 512-dimensional feature output, That is, the dimensionality reduction process is performed on the third feature description to obtain the first feature description; the dimensionality reduction process is performed on the fourth feature description to obtain the feature description of the reviewed image.
  • Step 203 For a second feature description whose feature similarity meets the first similarity requirement, determine a second image corresponding to the second feature description;
  • the feature description of the reviewed image that meets the first similarity requirement is the second feature description
  • the second feature description is determined based on the second feature description The corresponding reviewed image.
  • Step 204 If the image similarity between the first image and the second image meets the second similarity requirement, determine that the first image is a tampered image.
  • the image similarity is the similarity whose accuracy is higher than the feature similarity.
  • the image similarity is obtained by calculating the similarity between the image to be audited and the audited image that meets the first similarity requirement through the corresponding algorithm. For example, the feature vector of the image to be reviewed and the feature vector of the reviewed image that meets the first similarity requirement is calculated to calculate the cosine similarity, or the feature vector of the image to be reviewed and the audited image that meets the first similarity requirement Calculate the inner product of the feature vector to calculate the image similarity; or calculate the Euclidean distance between the feature vector of the image to be reviewed and the feature vector of the reviewed image that meets the requirements of the first similarity; do image similarity, etc., image similarity
  • the algorithm is not specifically limited.
  • the second similarity is the set threshold of image similarity or the probability distribution of image similarity. If the image similarity is a value of 0-1, the threshold of image similarity can be set to 0.8 according to industry experience. If the image similarity exceeds 0.8, the audited image corresponding to the image similarity is determined to be an image that has been tampered with; Among them, greater than the threshold 0.8 is the second similarity requirement; for another example, the image similarity is the set of similarity of each feature.
  • the audited image corresponding to the image similarity is an image that has been tampered with; where the same probability distribution is set as the second similarity requirement; therefore, the specific existence form of the second similarity is not limited. That is, if the image similarity between the image to be reviewed and the image that has been reviewed meets the second similarity requirement, it is determined that the image to be reviewed is a tampered image.
  • determining the image similarity between the first image and the second image in the following manner includes: determining a third feature description of the first image and a fourth feature description of the second image; wherein The third feature description and the fourth feature description have the same dimensions; the first feature description and the second feature description have the same dimensions; the third feature description has more dimensions than the first feature description The number of dimensions; the similarity between the third feature description and the fourth feature description is calculated to obtain the image similarity between the first image and the second image.
  • the third feature description of the image to be reviewed and the fourth description feature of the reviewed image can be obtained through the VGG16 network model, or directly by determining the value of each feature of each point.
  • the third feature description and the fourth feature description stored in step 203 can be directly called, or the third feature description and the fourth feature description can be recalculated.
  • the method of determining the third feature description and the fourth feature description is not limited.
  • the above-mentioned third feature description and the fourth feature description have the same dimensions, the first feature description and the second feature description have the same dimensions, and the third feature description has a higher dimension than the first feature description. That is to say, the feature description dimension on which the calculation of image similarity is based is higher than the feature description dimension on which the calculation of feature similarity is based.
  • determining the image similarity between the first image and the second image includes: determining the image similarity between the first image and the second image through a two-channel image similarity calculation model;
  • the two-channel image similarity calculation model is obtained by training on historical sample pairs; each historical sample pair includes two images with similarity marks.
  • historical sample pairs that is, historical sample pairs containing positive sample images and negative sample images, can be used to train a two-channel image similarity calculation model, so that the audited images and images to be audited that meet the requirements of the first similarity are input
  • the two-channel image similarity calculation model can obtain more accurate image similarity.
  • the specific calculation method of image similarity is not limited .
  • the embodiment of the present application also provides a flow of a method for detecting tampered images, as shown in FIG. 3, including:
  • Step 301 Create a database of reviewed images.
  • Step 302 Classify the reviewed images in the reviewed image database.
  • Step 303 Extract the features of each reviewed image in each type of reviewed image for each type of reviewed image, and determine the fourth feature description of each reviewed image.
  • Step 304 Perform dimensionality reduction processing on the fourth feature description of each reviewed image to obtain the feature description of each reviewed image.
  • Faiss a framework for efficient similarity search and clustering for dense vectors
  • HASH a function that compresses messages of any length to a fixed-length message summary
  • other methods the characteristics of each type of audited image Describe setting search index.
  • Step 305 Obtain an image to be reviewed
  • Step 306 Determine the image type and the first feature description of the image to be reviewed
  • Step 307 According to the image type of the image to be reviewed, the feature description of the reviewed image of the same image type is determined through the index.
  • Step 308 Calculate the feature similarity between the first feature description of the image to be reviewed and the feature description of the reviewed image.
  • Step 309 Determine the feature similarity that meets the first similarity requirement, determine the second feature description corresponding to the feature similarity that meets the first similarity requirement, and obtain the reviewed image corresponding to the second feature description according to the second feature description.
  • Step 310 Determine the fourth feature description of the reviewed image corresponding to the second feature description, and determine the third feature description of the image to be reviewed.
  • Step 311 Calculate image similarity through the third feature description and the fourth feature description.
  • Step 312 Determine that there is an image similarity that meets the second similarity requirement.
  • Step 313 Determine that the image to be reviewed is a tampered image.
  • FIG. 4 is a schematic diagram of a detection device for a tampered image provided by an embodiment of the application, as shown in FIG. 4, including:
  • the determining module 401 is configured to determine the first feature description of the first image and the first image type to which the first image belongs; the first image is an image to be reviewed;
  • the calculation module 402 is used to determine, from the feature description of the reviewed image in the first image type, a second feature description whose feature similarity with the first feature description meets the first similarity requirement; The second feature description required by the first similarity is determined, and the second image corresponding to the second feature description is determined; if the image similarity between the first image and the second image meets the second similarity requirement, the second image is determined.
  • the first image is a tampered image.
  • determining the image similarity between the first image and the second image in the following manner includes: the determining module 401 is further configured to: determine the third feature description of the first image And the fourth feature description of the second image; wherein the dimensions of the third feature description and the fourth feature description are the same; the dimensions of the first feature description and the second feature description are the same; The number of dimensions of the third feature description is more than the number of dimensions of the first feature description; the calculation module 402 is specifically configured to: calculate the similarity between the third feature description and the fourth feature description, so as to obtain the The image similarity between the first image and the second image.
  • the calculation module 402 is specifically configured to: determine the image similarity between the first image and the second image through a dual-channel image similarity calculation model; wherein, the dual-channel image The similarity calculation model is obtained by training on historical sample pairs; each historical sample pair includes two images with similarity marks.
  • the calculation module 402 is specifically configured to determine a second feature description whose feature similarity with the first feature description meets the first similarity requirement through a nearest neighbor search method.
  • the determining module 401 is specifically configured to: classify the reviewed images to obtain the reviewed images in each image type; for each image type, perform feature extraction on each of the reviewed images in the image type, based on the product
  • the quantification method performs dimensionality reduction processing on the extracted features to obtain the feature description of the reviewed image, and determines the feature index of the feature description of the reviewed image.
  • the calculation module 402 is further configured to: perform feature extraction on each of the reviewed images in the image type through the set feature extraction model; determine the third feature description of the first image and the description of the second image
  • the fourth feature description includes: performing feature extraction on the first image through the feature extraction model to obtain the third feature description; performing feature extraction on the second image through the feature extraction model to obtain the The fourth feature description.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Provided are a detection method and apparatus for a tampered image. The method comprises: determining a first feature description of a first image and a first image type to which the first image belongs, wherein the first image is an image to be reviewed; from feature descriptions of reviewed images in the first image type, determining a second feature description of which the feature similarity with the first feature description meets a first similarity requirement; for the second feature description of which the feature similarity meets the first similarity requirement, determining a second image corresponding to the second feature description; and if the image similarity between the first image and the second image meets a second similarity requirement, determining that the first image is a tampered image. By using the method, a tampered image can be accurately and rapidly detected on the basis of the global features of the image.

Description

一种针对篡改图像的检测方法及装置Method and device for detecting tampered images
相关申请的交叉引用Cross-references to related applications
本申请要求在2020年02月17日提交中国专利局、申请号为202010097367.5、申请名称为“一种针对篡改图像的检测方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on February 17, 2020, the application number is 202010097367.5, and the application name is "A method and device for detecting tampered images", the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请涉及人工智能技术领域,尤其涉及一种针对篡改图像的检测方法及装置。This application relates to the field of artificial intelligence technology, and in particular to a method and device for detecting tampered images.
背景技术Background technique
目前,数字成像设备已成为现代生活不可或缺的物品,而随着各类编辑软件的快速发展,人们对数字图像的修改与编辑变的越来越便捷,这无疑会出现将图像篡改内容错认为重要信息的情况,极易误导人们,以致对社会造成不良影响。因此,图像检测取证技术作为当前研究热点之一。At present, digital imaging equipment has become an indispensable item in modern life. With the rapid development of various editing software, it is becoming more and more convenient for people to modify and edit digital images. This will undoubtedly lead to incorrect image tampering. It is easy to mislead people when they consider important information, which can cause adverse effects on society. Therefore, image detection forensics technology is one of the current research hotspots.
图像篡改方式主要包括图像拼接篡改、图像复制-粘贴篡改、图像对象移除篡改三种。现有的图像篡改检测方法主要通过目标检测方法对应的目标检测模型,提取图像篡改区域和非篡改区域边界处存在的差异化特征,如,包含店主人像的店面图像,将店主人像篡改为另一个人,根据图像拼接交界处产生的图形角度、颜色、像素、亮度等差异将篡改区域(店主人像)和非篡改区域(店面图像)分割开来,从而判断该图像是否为篡改图像。但图像拼接产生的差异可以通过翻拍来消除,如,将拼接图像重新拍摄,一些摄像机可以将拼接边界进行二次处理。将拼接边界的差异消除,如此,目标检测方法失效,无法获取图像拼接边界的差异。Image tampering methods mainly include image mosaic tampering, image copy-paste tampering, and image object removal tampering. The existing image tampering detection methods mainly use the target detection model corresponding to the target detection method to extract the differentiated features existing at the boundary of the image tampering area and the non-tampering area. For example, the storefront image containing the owner's image is changed to another People separate the tampered area (the image of the shop owner) and the non-tampered area (the image of the storefront) based on the difference in the graphics angle, color, pixel, brightness, etc. generated at the junction of the image splicing, so as to determine whether the image is a tampered image. However, the difference caused by image splicing can be eliminated by re-shooting. For example, if the spliced image is re-shot, some cameras can perform secondary processing on the splicing boundary. The difference of the splicing boundary is eliminated. In this way, the target detection method is invalid and the difference of the image splicing boundary cannot be obtained.
因此,现在亟需一种针对篡改图像的检测方法及装置,用于基于图像的全局特征,准确并快速检测篡改图像。Therefore, there is an urgent need for a method and device for detecting tampered images, which are used to accurately and quickly detect tampered images based on the global characteristics of the image.
发明内容Summary of the invention
本发明实施例提供一种针对篡改图像的检测方法及装置,用于基于图像的全局特征,准确并快速检测篡改图像。The embodiments of the present invention provide a detection method and device for tampered images, which are used to accurately and quickly detect tampered images based on the global characteristics of the image.
第一方面,本发明实施例提供一种针对篡改图像的检测方法,该方法包括:In the first aspect, an embodiment of the present invention provides a method for detecting tampered images, the method including:
确定第一图像的第一特征描述和所述第一图像所属的第一图像类型;所述第一图像为待审核图像;从所述第一图像类型中已审核图像的特征描述,确定与所述第一特征描述的特征相似度符合第一相似度要求的第二特征描述;针对特征相似度符合第一相似度要求的第二特征描述,确定所述第二特征描述对应的第二图像;若所述第一图像与所述第二图像的图像相似度符合第二相似度要求,则确定所述第一图像为篡改图像。Determine the first feature description of the first image and the first image type to which the first image belongs; the first image is the image to be reviewed; from the feature description of the reviewed image in the first image type, determine the The feature similarity of the first feature description meets the second feature description of the first similarity requirement; for the second feature description whose feature similarity meets the first similarity requirement, determine the second image corresponding to the second feature description; If the image similarity between the first image and the second image meets the second similarity requirement, it is determined that the first image is a tampered image.
采用上述方法,通过第一图像的第一图像类型,确认第一图像类型对应的已审核图像,从而获取已审核图像对应的特征描述。如此,可以先获取与第一图像类型相同图像类型的已审核图像的特征描述。进而确定第一图像的第一描述特征与已审核图像的特征描述的特征相似度,从而确定特征相似度中符合第一相似度要求的第二特征描述,确认第二特征描述对应的第二图像。如此,可以初步确定与第一图像相似度较大的第二图像,也就是,初步确定与待审核图像相似度较大的已审核图像;基本可以判断这些被确定的已审核图像,为疑似被待审核图像篡改的图像。进一步,确认第二图像与第一图像的图像相似度,若图像相似度符合第二相似度要求,则第一图像为基于第二图像篡改的图像。也就是说,将这些被确定的已审核图像,即疑似被待审核图像篡改的图像;与待审核图像进一步计算图像相似度,若有图像相似度符合第二相似度要求的,则该符合第二相似度要求的图像相似度对应的疑似被待审核图像篡改的图像,确认为被待审核图像篡改的图像,即第一图像为篡改图像。如此,可以实现基于图像的全局特征,准确并快速检测篡改图像。Using the above method, the first image type of the first image is used to confirm the audited image corresponding to the first image type, so as to obtain the feature description corresponding to the audited image. In this way, the feature description of the reviewed image of the same image type as the first image type can be obtained first. Then determine the feature similarity between the first description feature of the first image and the feature description of the reviewed image, so as to determine the second feature description that meets the first similarity requirement in the feature similarity, and confirm the second image corresponding to the second feature description . In this way, the second image with greater similarity to the first image can be preliminarily determined, that is, the reviewed image with greater similarity to the image to be reviewed can be preliminarily determined; these determined reviewed images can be basically judged to be suspected of being reviewed. The image to be tampered with. Further, the image similarity between the second image and the first image is confirmed. If the image similarity meets the second similarity requirement, the first image is an image tampered with based on the second image. That is to say, these determined audited images, that is, images that are suspected of being tampered with by the image to be audited, are further calculated for image similarity with the image to be audited. If there is an image similarity that meets the second similarity requirement, it shall meet the requirements of the second degree of similarity. The image that is suspected of being tampered with by the image to be audited corresponding to the image similarity required by the two similarity is confirmed as an image that has been tampered with by the image to be audited, that is, the first image is a tampered image. In this way, it is possible to accurately and quickly detect tampered images based on the global features of the image.
在一种可能的设计中,通过如下方式确定所述第一图像与所述第二图像的图像相似度,包括:确定所述第一图像的第三特征描述和所述第二图像的 第四特征描述;其中,所述第三特征描述和所述第四特征描述的维度相同;所述第一特征描述和所述第二特征描述的维度相同;所述第三特征描述的维度数多于所述第一特征描述的维度数;计算所述第三特征描述和所述第四特征描述的相似度,从而得到所述第一图像与所述第二图像的图像相似度。In a possible design, determining the image similarity between the first image and the second image in the following manner includes: determining a third feature description of the first image and a fourth feature description of the second image Feature description; wherein the dimensions of the third feature description and the fourth feature description are the same; the dimensions of the first feature description and the second feature description are the same; the number of dimensions of the third feature description is more than The number of dimensions of the first feature description; the similarity between the third feature description and the fourth feature description is calculated, so as to obtain the image similarity between the first image and the second image.
采用上述方法,通过确定第一图像的第三特征维度描述和所述第二图像的第四特征描述,计算第三特征描述和第四特征描述的图像相似度,因为第三特征描述和第四特征描述的维度相同,且维度高于第一特征描述和第二特征描述的维度,因此计算得到的图像相似度的准确性高于特征相似度。因此,可以先通过低维度的特征描述计算待审核图像与已审核图像的特征相似度,筛选出与待审核图像较为相似的已审核图像,实现初步筛选,可以加快计算速度。进一步将符合第一相似度的特征相似度对应的第二图像与第一图像计算图像相似度,即通过高维度特征描述计算待审核图像与已审核图像的相似度,使得图像相似度的精确度大大提高。实现了基于图像的全局特征,准确并快速检测篡改图像。Using the above method, by determining the third feature description of the first image and the fourth feature description of the second image, the image similarity between the third feature description and the fourth feature description is calculated, because the third feature description and the fourth feature description The dimension of the feature description is the same, and the dimension is higher than the dimension of the first feature description and the second feature description, so the accuracy of the calculated image similarity is higher than the feature similarity. Therefore, the feature similarity between the image to be reviewed and the image to be reviewed can be calculated first through the low-dimensional feature description, and the reviewed image that is relatively similar to the image to be reviewed can be screened out to achieve preliminary screening, which can speed up the calculation. Further calculate the image similarity between the second image corresponding to the feature similarity that meets the first similarity and the first image, that is, calculate the similarity between the image to be reviewed and the reviewed image through the high-dimensional feature description, so as to make the accuracy of the image similarity Greatly improve. Realize the image-based global features, accurately and quickly detect tampered images.
在一种可能的设计中,确定所述第一图像与所述第二图像的图像相似度,包括:通过双通道图像相似度计算模型,确定所述第一图像与所述第二图像的图像相似度;其中,所述双通道图像相似度计算模型是通过历史样本对训练得到的;每个历史样本对中包括具有相似度标记的两张图像。In a possible design, determining the image similarity between the first image and the second image includes: determining the image of the first image and the second image through a two-channel image similarity calculation model Similarity; wherein, the dual-channel image similarity calculation model is obtained through training of historical sample pairs; each historical sample pair includes two images with similarity marks.
采用上述方法,通过历史样本对训练得到的双通道图像相似度计算模型,因为每个历史样本对中包括具有相似度标记的两张图像,这两张图像可以作为正样本和反样本训练双通道图像相似度计算模型。如此,使得再通过双通道图像相似度计算模型计算第一图像与第二图像的图像相似度时,有效避免图像旋转、尺度变换、图像拼接等篡改操作对检测的影响,增加图像相似度的精确率。Using the above method, the dual-channel image similarity calculation model obtained through historical sample pair training, because each historical sample pair includes two images with similarity marks, these two images can be used as positive samples and negative samples to train dual-channel Image similarity calculation model. In this way, when the image similarity between the first image and the second image is calculated by the dual-channel image similarity calculation model, the effect of tampering operations such as image rotation, scale conversion, and image stitching on detection is effectively avoided, and the accuracy of image similarity is increased. Rate.
在一种可能的设计中,确定与所述第一特征描述的特征相似度符合第一相似度要求的第二特征描述,包括:通过最近邻搜索方法,确定与所述第一特征描述的特征相似度符合第一相似度要求的第二特征描述。In a possible design, determining the second feature description whose similarity with the first feature description meets the requirements of the first similarity includes: determining the feature described with the first feature by a nearest neighbor search method The similarity meets the second feature description required by the first similarity.
采用上述方法,通过最近邻搜索方法,可以准确快速确定与第一特征描述的特征相似度符合第一相似度要求的第二特征描述。Using the above method and the nearest neighbor search method, it is possible to accurately and quickly determine the second feature description whose similarity with the first feature description meets the requirements of the first similarity.
在一种可能的设计中,通过如下方式确定各图像类型中的各第二特征描述,包括:对已审核图像进行分类,得到各图像类型中的已审核图像;针对每个图像类型,对所述图像类型中的每个已审核图像进行特征提取,基于乘积量化方式对提取的特征进行降维处理得到已审核图像的特征描述,并确定所述已审核图像的特征描述的特征索引。In a possible design, the description of each second feature in each image type is determined by the following methods, including: classifying the reviewed images to obtain the reviewed images in each image type; Feature extraction is performed on each audited image in the image types, the extracted features are reduced in dimensionality based on the product quantization method to obtain the feature description of the audited image, and the feature index of the feature description of the audited image is determined.
采用上述方法,对已审核图像进行分类,对应各图像类型中的已审核图像进行特征提取,基于乘积量化方式对提取的特征进行降维处理得到第二特征描述。如此,使得各个已审核图像的特征描述与第一特征描述计算的维度较低,加快第二特征描述的确定。并通过设置第二特征描述的特征索引,使得在计算特征相似度时可以快速获取已审核图像的特征描述,加快检测篡改图像的速度。Using the above method, the audited images are classified, the features are extracted corresponding to the audited images in each image type, and the dimensionality reduction processing is performed on the extracted features based on the product quantization method to obtain the second feature description. In this way, the dimension of the feature description of each reviewed image and the calculation of the first feature description is lower, and the determination of the second feature description is accelerated. And by setting the feature index of the second feature description, the feature description of the reviewed image can be quickly obtained when calculating the feature similarity, and the speed of detecting tampered images can be accelerated.
在一种可能的设计中,对所述图像类型中的每个已审核图像进行特征提取,包括:通过设定的特征提取模型对所述图像类型中的每个已审核图像进行特征提取;确定所述第一图像的第三特征描述和所述第二图像的第四特征描述,包括:通过所述特征提取模型对所述第一图像进行特征提取,得到所述第三特征描述;通过所述特征提取模型对所述第二图像进行特征提取,得到所述第四特征描述。In a possible design, performing feature extraction on each reviewed image in the image type includes: performing feature extraction on each reviewed image in the image type through a set feature extraction model; determining The third feature description of the first image and the fourth feature description of the second image include: performing feature extraction on the first image through the feature extraction model to obtain the third feature description; The feature extraction model performs feature extraction on the second image to obtain the fourth feature description.
采用上述方法,通过设定特征提取模型提取第一图像的第三特征描述,提取第二图像的第四特征描述。可以通过特征提取模型提取高维度的第三特征描述和第四特征描述,实现基于图像的全局特征,快速且高精度的检测篡改图像。Using the above method, the third feature description of the first image is extracted by setting the feature extraction model, and the fourth feature description of the second image is extracted. The high-dimensional third feature description and the fourth feature description can be extracted through the feature extraction model to realize the rapid and high-precision detection of tampered images based on the global features of the image.
第二方面,本发明实施例提供一种针对篡改图像的检测装置,该装置包括:In a second aspect, an embodiment of the present invention provides a device for detecting tampered images, the device including:
确定模块,用于确定第一图像的第一特征描述和所述第一图像所属的第一图像类型;所述第一图像为待审核图像;The determining module is used to determine the first feature description of the first image and the first image type to which the first image belongs; the first image is an image to be reviewed;
计算模块,用于从所述第一图像类型中已审核图像的特征描述,确定与所述第一特征描述的特征相似度符合第一相似度要求的第二特征描述;针对特征相似度符合第一相似度要求的第二特征描述,确定所述第二特征描述对应的第二图像;若所述第一图像与所述第二图像的图像相似度符合第二相似度要求,则确定所述第一图像为篡改图像。The calculation module is used to determine, from the feature description of the reviewed image in the first image type, a second feature description whose feature similarity with the first feature description meets the first similarity requirement; A second feature description with similarity requirements, determine the second image corresponding to the second feature description; if the image similarity between the first image and the second image meets the second similarity requirements, determine the The first image is a tampered image.
在一种可能的设计中,通过如下方式确定所述第一图像与所述第二图像的图像相似度,包括:In a possible design, determining the image similarity between the first image and the second image in the following manner includes:
所述确定模块还用于:确定所述第一图像的第三特征描述和所述第二图像的第四特征描述;其中,所述第三特征描述和所述第四特征描述的维度相同;所述第一特征描述和所述第二特征描述的维度相同;所述第三特征描述的维度数多于所述第一特征描述的维度数;The determining module is further configured to determine a third feature description of the first image and a fourth feature description of the second image; wherein the dimensions of the third feature description and the fourth feature description are the same; The dimensions of the first feature description and the second feature description are the same; the number of dimensions of the third feature description is more than the number of dimensions of the first feature description;
所述计算模块具体用于:计算所述第三特征描述和所述第四特征描述的相似度,从而得到所述第一图像与所述第二图像的图像相似度。The calculation module is specifically configured to calculate the similarity between the third feature description and the fourth feature description, so as to obtain the image similarity between the first image and the second image.
第三方面,本申请实施例还提供一种计算设备,包括:存储器,用于存储程序指令;处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行如第一方面的各种可能的设计中所述的方法。In a third aspect, an embodiment of the present application further provides a computing device, including: a memory, configured to store program instructions; a processor, configured to call the program instructions stored in the memory, and execute according to the obtained program as in the first aspect The methods described in the various possible designs.
第四方面,本申请实施例还提供一种计算机可读非易失性存储介质,包括计算机可读指令,当计算机读取并执行所述计算机可读指令时,使得计算机执行如第一方面的各种可能的设计中所述的方法。In a fourth aspect, embodiments of the present application also provide a computer-readable non-volatile storage medium, including computer-readable instructions. When the computer reads and executes the computer-readable instructions, the computer executes the same as in the first aspect. The methods described in the various possible designs.
本申请的这些实现方式或其他实现方式在以下实施例的描述中会更加简明易懂。These implementation manners or other implementation manners of the present application will be more concise and understandable in the description of the following embodiments.
附图说明Description of the drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present invention more clearly, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained from these drawings without creative labor.
图1为本发明实施例提供的一种针对篡改图像的检测的架构示意图;FIG. 1 is a schematic diagram of an architecture for detecting tampered images according to an embodiment of the present invention;
图2为本发明实施例提供的一种针对篡改图像的检测方法的流程示意图;2 is a schematic flowchart of a method for detecting tampered images according to an embodiment of the present invention;
图3为本发明实施例提供的一种针对篡改图像的检测方法的流程示意图;FIG. 3 is a schematic flowchart of a method for detecting tampered images according to an embodiment of the present invention;
图4为本发明实施例提供的一种针对篡改图像的检测装置示意图。FIG. 4 is a schematic diagram of a detection device for tampering images provided by an embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
本发明实施例提供的一种针对篡改图像的检测方法的架构示意图,如图1所示,已审核图像特征库系统101中存有已审核图像,并获取已审核图像的特征描述;已审核图像特征库系统101对各图像类型对应的已审核图像的特征描述设置检索索引。当图像检测系统102中输入待审核图像后,图像检测系统102确定待审核图像的图像类型,并对待审核图像进行特征提取,即提取第一特征描述;图像检测系统102获取待审核图像的图像类型后,调用已审核图像特征库系统101中的检索索引,获取与待审核图像的图像类型,相同图像类型的已审核图像的特征描述;图像检测系统102计算第一特征描述与已审核图像的特征描述的特征相似度,特征相似度符合第一相似度要求的特征描述为第二特征描述,根据第二特征描述从已审核图像特征库系统101获取第二特征描述对应的已审核图像;图像检测系统102计算待审核图像与已审核图像的图像相似度。篡改评估系统103获取待审核图像与已审核图像的图像相似度,评估图像相似度是否符合第二相似度要求,若符合,则确定待审核图像为篡改图像。否则,该待审核图像为非篡改图像。The embodiment of the present invention provides a schematic diagram of the architecture of a method for detecting tampered images, as shown in FIG. The feature library system 101 sets a retrieval index for the feature description of the reviewed image corresponding to each image type. After the image to be reviewed is input into the image detection system 102, the image detection system 102 determines the image type of the image to be reviewed, and performs feature extraction on the image to be reviewed, that is, extracts the first feature description; the image detection system 102 obtains the image type of the image to be reviewed Then, the retrieval index in the reviewed image feature library system 101 is called to obtain the feature description of the reviewed image of the same image type as the image type of the image to be reviewed; the image detection system 102 calculates the first feature description and the feature of the reviewed image The feature similarity of the description, the feature description whose feature similarity meets the requirements of the first similarity is the second feature description, and the audited image corresponding to the second feature description is obtained from the audited image feature database system 101 according to the second feature description; image detection The system 102 calculates the image similarity between the image to be reviewed and the image that has been reviewed. The tampering evaluation system 103 obtains the image similarity between the image to be reviewed and the image that has been reviewed, evaluates whether the image similarity meets the second similarity requirement, and if it does, determines that the image to be reviewed is a tampered image. Otherwise, the image to be reviewed is a non-tampered image.
基于此,本申请实施例提供了一种针对篡改图像的检测方法流程,如图2所示,包括:Based on this, the embodiment of the present application provides a method for detecting tampered images, as shown in FIG. 2, including:
步骤201、确定第一图像的第一特征描述和所述第一图像所属的第一图像类型;所述第一图像为待审核图像;Step 201: Determine the first feature description of the first image and the first image type to which the first image belongs; the first image is an image to be reviewed;
此处,第一图像为待审核图像,如,领取优惠权益需要上传营业执照和/或店面图像,通过上传篡改后的营业执照和/或相应的店面图像多次获取优惠权益,这里需要上传的营业执照和/或店面图像则是待审核图像。图像类型可以是药店类店面图像、超市类店面图像、加油站类店面图像以及证件照类图像等等。第一特征描述为待审核图像的特征描述数据;可以是向量形式,如,分别以各点的色彩、亮度、线条角度等等形成特征向量;也可以是特征集合,如,像素集合中包括各个点的像素数据、亮度集合中包括各个点的亮度等等形成的特征集合;这里具体特征描述的方式不做限定。也就是说,确定待审核图像的图像类型和图像特征描述。Here, the first image is the image to be reviewed. For example, to receive the preferential rights and interests, you need to upload the business license and/or storefront image, and you need to upload the preferential rights and interests by uploading the falsified business license and/or the corresponding storefront image multiple times. The business license and/or storefront image are the images to be reviewed. The image types can be pharmacy storefront images, supermarket storefront images, gas station storefront images, ID photo images, and so on. The first feature description is the feature description data of the image to be reviewed; it can be in the form of a vector, for example, a feature vector is formed by the color, brightness, line angle, etc. of each point; it can also be a feature set, for example, the pixel set includes each The feature set formed by the pixel data of the point and the brightness set including the brightness of each point, etc.; the specific feature description method is not limited here. In other words, determine the image type and image feature description of the image to be reviewed.
步骤202、从所述第一图像类型中已审核图像的特征描述,确定与所述第一特征描述的特征相似度符合第一相似度要求的第二特征描述;Step 202: From the feature description of the reviewed image in the first image type, determine a second feature description whose feature similarity with the first feature description meets the first similarity requirement;
此处,特征相似度为各个已审核图像的特征描述与第一特征描述的相似度。已审核图像的特征描述与第一特征描述相对应,为可以通过相应算法计算已审核图像的特征描述与第一特征描述的特征相似度的特征描述。如,第一特征描述为待审核图像的特征向量,已审核图像的特征描述为已审核图像的特征向量,计算待审核图像的特征向量和已审核图像的特征向量的余弦相似度做特征相似度;或计算待审核图像的特征向量和已审核图像的特征向量的内积做特征相似度;或计算待审核图像的特征向量和已审核图像的特征向量的欧几里得距离做特征相似度等等;特征相似度算法具体不做限定。又如,将第一特征描述的特征向量和/或已审核图像的特征描述的特征向量正交分解,在分解后的低维正交子空间上进行量化获得PQ(Product quantization,乘积量化)码,通过最近邻算法计算特征相似度。且低维空间采用较小的码本进行编码,还可以降低数据存储空间。因此,对特征描述的具体存在形式不做限定。第一相似度为特征相似度的设定阈值或特征相似度的概率分布等。如特征相似度为0-1的值,则可以根据行业经验设定特征相似度的阈值为0.8,若特 征相似度超过0.8,则确定该特征相似度对应的已审核图像为疑似被篡改图像;其中,大于阈值0.8为第一相似度要求;又如,特征相似度为每项特征的相似度的集合,若每项特征的相似度的集合的概率分布与设定概率分布情况相同,则确定该特征相似度对应的已审核图像为疑似被篡改图像;其中,设定概率分布情况相同为第一相似度要求;因此,第一相似度的具体存在形式不做限定。也就是说,根据第一图像类型获取已审核图像的特征描述,计算第一特征描述与各个已审核图像的特征描述的特征相似度。若特征相似度符合第一相似度的要求,获取符合第一相似度要求的特征相似度对应的第二特征描述。Here, the feature similarity is the similarity between the feature description of each reviewed image and the first feature description. The feature description of the reviewed image corresponds to the first feature description, and is a feature description that can calculate the similarity between the feature description of the reviewed image and the feature description of the first feature description through a corresponding algorithm. For example, the first feature description is the feature vector of the image to be reviewed, the feature description of the reviewed image is the feature vector of the reviewed image, and the cosine similarity between the feature vector of the image to be reviewed and the feature vector of the reviewed image is calculated as the feature similarity. ; Or calculate the inner product of the feature vector of the image to be audited and the feature vector of the audited image as the feature similarity; or calculate the Euclidean distance between the feature vector of the image to be audited and the feature vector of the audited image as the feature similarity, etc. Etc.; the feature similarity algorithm is not specifically limited. For another example, orthogonally decompose the feature vector of the first feature description and/or the feature vector of the reviewed image, and perform quantization on the decomposed low-dimensional orthogonal subspace to obtain a PQ (Product quantization, product quantization) code , Calculate the feature similarity through the nearest neighbor algorithm. In addition, the low-dimensional space is encoded with a smaller codebook, which can also reduce the data storage space. Therefore, the specific existence form of the feature description is not limited. The first similarity is a set threshold of feature similarity or a probability distribution of feature similarity. If the feature similarity is a value of 0-1, the threshold of feature similarity can be set to 0.8 according to industry experience. If the feature similarity exceeds 0.8, the audited image corresponding to the feature similarity is determined to be an image that is suspected of being tampered with; Among them, greater than the threshold 0.8 is the first similarity requirement; another example, feature similarity is the set of similarity of each feature, if the probability distribution of the set of similarity of each feature is the same as the set probability distribution, it is determined The reviewed image corresponding to the feature similarity is an image that is suspected of being tampered with; where the same probability distribution is set as the first similarity requirement; therefore, the specific existence form of the first similarity is not limited. That is to say, the feature description of the reviewed image is acquired according to the first image type, and the feature similarity between the first feature description and the feature description of each reviewed image is calculated. If the feature similarity meets the requirement of the first similarity, the second feature description corresponding to the feature similarity that meets the first similarity requirement is obtained.
其中,确定与所述第一特征描述的特征相似度符合第一相似度要求的第二特征描述,包括:通过最近邻搜索方法,确定与所述第一特征描述的特征相似度符合第一相似度要求的第二特征描述。也就是说,可以通过最近邻搜索算法计算第一特征描述与已审核图像的特征描述的特征相似度,进而确定符合第一相似度要求的特征相似度对应的第二特征描述。Wherein, determining the second feature description whose feature similarity with the first feature description meets the first similarity requirement includes: determining that the feature similarity with the first feature description meets the first similarity through a nearest neighbor search method The second feature description of the degree requirement. That is to say, the feature similarity between the first feature description and the feature description of the reviewed image can be calculated by the nearest neighbor search algorithm, and then the second feature description corresponding to the feature similarity that meets the first similarity requirement can be determined.
在计算特征相似度前,可以通过如下方式确定各图像类型中的各第二特征描述,包括:对已审核图像进行分类,得到各图像类型中的已审核图像;针对每个图像类型,对所述图像类型中的每个已审核图像进行特征提取,基于乘积量化方式对提取的特征进行降维处理得到已审核图像的特征描述,并确定所述已审核图像的特征描述的特征索引。也就是说,在计算特征相似度前,对已审核图像进行分类,例如,将图像分作证件照、店面图像等,证件照又可以分为身份证、营业执照、驾驶照等等,店面图像又可以分为超市店面图像、加油站店面图像等等。得到各图像类型中的已审核图像后,针对每个图像类型中的已审核图像进行特征提取,并将提取的各个已审核图像特征通过乘积量化的方式进行降维处理,得到已审核图像的特征描述。Before calculating the feature similarity, the description of each second feature in each image type can be determined by the following methods, including: classifying the reviewed images to obtain the reviewed images in each image type; Feature extraction is performed on each audited image in the image types, the extracted features are reduced in dimensionality based on the product quantization method to obtain the feature description of the audited image, and the feature index of the feature description of the audited image is determined. In other words, before calculating the feature similarity, classify the reviewed images, for example, divide the images into ID photos, storefront images, etc. The ID photos can be divided into ID cards, business licenses, driving photos, etc., storefront images It can be divided into supermarket storefront images, gas station storefront images, and so on. After obtaining the audited images in each image type, extract the features of the audited images in each image type, and perform dimensionality reduction processing on the extracted features of each audited image by multiplication and quantification, to obtain the features of the audited image describe.
其中,对所述图像类型中的每个已审核图像进行特征提取,包括:通过设定的特征提取模型对所述图像类型中的每个已审核图像进行特征提取;确定所述第一图像的第三特征描述和所述第二图像的第四特征描述,包括:通过所述特征提取模型对所述第一图像进行特征提取,得到所述第三特征描述; 通过所述特征提取模型对所述第二图像进行特征提取,得到所述第四特征描述。Wherein, performing feature extraction on each audited image in the image type includes: performing feature extraction on each audited image in the image type through a set feature extraction model; determining the value of the first image The third feature description and the fourth feature description of the second image include: performing feature extraction on the first image through the feature extraction model to obtain the third feature description; Perform feature extraction on the second image to obtain the fourth feature description.
此处,对所述图像类型中的每个已审核图像进行特征提取,通过设定的特征提取模型,如,对于超过10000张的商户门头照图像。对不同类别的图像标注标签,比如超市类图像标记为“1”、加油站类图像标注为“2”,在VGG16网络模型的基础上进行训练;得到模型全连接层特征参数,可以作为已审核图像的第四特征描述;对待审核图像在VGG16网络模型的基础上进行训练;得到模型全连接层特征参数,可以作为待审核图像的第三特征描述;后续取中间特征层作为512维特征输出,也就是对第三特征描述做降维处理,得到第一特征描述;对第四特征描述做降维处理,得到已审核图像的特征描述。或者,直接将已审核图像的每个点的每项特征取值,形成高维向量,即第四特征描述;直接将待审核图像的每个点的每项特征取值,形成高维向量,即第三特征描述。这里确定第三特征描述和第四特征描述的方式不做限定。Here, feature extraction is performed on each of the reviewed images in the image types, through a set feature extraction model, for example, for more than 10,000 merchant door head photos. Label different types of images, such as supermarket images marked as "1", gas station images marked as "2", training on the basis of the VGG16 network model; the fully connected layer feature parameters of the model are obtained, which can be regarded as audited The fourth feature description of the image; the image to be audited is trained on the basis of the VGG16 network model; the fully connected layer feature parameters of the model are obtained, which can be used as the third feature description of the image to be audited; the middle feature layer is subsequently taken as the 512-dimensional feature output, That is, the dimensionality reduction process is performed on the third feature description to obtain the first feature description; the dimensionality reduction process is performed on the fourth feature description to obtain the feature description of the reviewed image. Or, directly take the value of each feature of each point of the audited image to form a high-dimensional vector, that is, the fourth feature description; directly take the value of each feature of each point of the image to be audited to form a high-dimensional vector, That is the third feature description. The manner of determining the third feature description and the fourth feature description here is not limited.
步骤203、针对特征相似度符合第一相似度要求的第二特征描述,确定所述第二特征描述对应的第二图像;Step 203: For a second feature description whose feature similarity meets the first similarity requirement, determine a second image corresponding to the second feature description;
此处,针对特征相似度符合第一相似度要求的已审核图像的特征描述,符合第一相似度要求的已审核图像的特征描述为第二特征描述,根据第二特征描述确定第二特征描述对应的已审核图像。Here, for the feature description of the reviewed image whose feature similarity meets the first similarity requirement, the feature description of the reviewed image that meets the first similarity requirement is the second feature description, and the second feature description is determined based on the second feature description The corresponding reviewed image.
步骤204、若所述第一图像与所述第二图像的图像相似度符合第二相似度要求,则确定所述第一图像为篡改图像。Step 204: If the image similarity between the first image and the second image meets the second similarity requirement, determine that the first image is a tampered image.
此处,图像相似度为精确度高于特征相似度的相似度。图像相似度为通过相应算法计算待审核图像与符合第一相似度要求的已审核图像的相似度所得。如,待审核图像的特征向量与符合第一相似度要求的已审核图像的特征向量计算余弦相似度,做图像相似度;或待审核图像的特征向量与符合第一相似度要求的已审核图像的特征向量计算内积,做图像相似度;或待审核图像的特征向量与符合第一相似度要求的已审核图像的特征向量计算欧几里得距离;做图像相似度等等,图像相似度算法具体不做限定。第二相似度为图 像相似度的设定阈值或图像相似度的概率分布等。如图像相似度为0-1的值,则可以根据行业经验设定图像相似度的阈值为0.8,若图像相似度超过0.8,则确定该图像相似度对应的已审核图像为确认被篡改图像;其中,大于阈值0.8为第二相似度要求;又如,图像相似度为每项特征的相似度的集合,若每项特征的相似度的集合的概率分布与设定概率分布情况相同,则确定该图像相似度对应的已审核图像为确认被篡改图像;其中,设定概率分布情况相同为第二相似度要求;因此,第二相似度的具体存在形式不做限定。也就是说,若待审核图像与已审核图像的图像相似度符合第二相似度要求,则确定待审核图像为篡改图像。Here, the image similarity is the similarity whose accuracy is higher than the feature similarity. The image similarity is obtained by calculating the similarity between the image to be audited and the audited image that meets the first similarity requirement through the corresponding algorithm. For example, the feature vector of the image to be reviewed and the feature vector of the reviewed image that meets the first similarity requirement is calculated to calculate the cosine similarity, or the feature vector of the image to be reviewed and the audited image that meets the first similarity requirement Calculate the inner product of the feature vector to calculate the image similarity; or calculate the Euclidean distance between the feature vector of the image to be reviewed and the feature vector of the reviewed image that meets the requirements of the first similarity; do image similarity, etc., image similarity The algorithm is not specifically limited. The second similarity is the set threshold of image similarity or the probability distribution of image similarity. If the image similarity is a value of 0-1, the threshold of image similarity can be set to 0.8 according to industry experience. If the image similarity exceeds 0.8, the audited image corresponding to the image similarity is determined to be an image that has been tampered with; Among them, greater than the threshold 0.8 is the second similarity requirement; for another example, the image similarity is the set of similarity of each feature. If the probability distribution of the set of similarity of each feature is the same as the set probability distribution, it is determined The audited image corresponding to the image similarity is an image that has been tampered with; where the same probability distribution is set as the second similarity requirement; therefore, the specific existence form of the second similarity is not limited. That is, if the image similarity between the image to be reviewed and the image that has been reviewed meets the second similarity requirement, it is determined that the image to be reviewed is a tampered image.
其中,通过如下方式确定所述第一图像与所述第二图像的图像相似度,包括:确定所述第一图像的第三特征描述和所述第二图像的第四特征描述;其中,所述第三特征描述和所述第四特征描述的维度相同;所述第一特征描述和所述第二特征描述的维度相同;所述第三特征描述的维度数多于所述第一特征描述的维度数;计算所述第三特征描述和所述第四特征描述的相似度,从而得到所述第一图像与所述第二图像的图像相似度。Wherein, determining the image similarity between the first image and the second image in the following manner includes: determining a third feature description of the first image and a fourth feature description of the second image; wherein The third feature description and the fourth feature description have the same dimensions; the first feature description and the second feature description have the same dimensions; the third feature description has more dimensions than the first feature description The number of dimensions; the similarity between the third feature description and the fourth feature description is calculated to obtain the image similarity between the first image and the second image.
此处,待审核图像的第三特征描述与已审核图像的第四描述特征可以通过VGG16网络模型获取,也可以直接通过确定每个点的每项特征取值获取。可以直接调用步骤203中存储记忆的第三特征描述和第四特征描述,也可以重新计算第三特征描述和第四特征描述,这里确定第三特征描述和第四特征描述的方式不做限定。上述第三特征描述和第四特征描述的维度相同,第一特征描述和第二特征描述的维度相同,第三特征描述的维度高于第一特征描述。也就是说,计算图像相似度所基于的特征描述维度高于计算特征相似度所基于的特征描述维度。Here, the third feature description of the image to be reviewed and the fourth description feature of the reviewed image can be obtained through the VGG16 network model, or directly by determining the value of each feature of each point. The third feature description and the fourth feature description stored in step 203 can be directly called, or the third feature description and the fourth feature description can be recalculated. Here, the method of determining the third feature description and the fourth feature description is not limited. The above-mentioned third feature description and the fourth feature description have the same dimensions, the first feature description and the second feature description have the same dimensions, and the third feature description has a higher dimension than the first feature description. That is to say, the feature description dimension on which the calculation of image similarity is based is higher than the feature description dimension on which the calculation of feature similarity is based.
其中,确定所述第一图像与所述第二图像的图像相似度,包括:通过双通道图像相似度计算模型,确定所述第一图像与所述第二图像的图像相似度;其中,所述双通道图像相似度计算模型是通过历史样本对训练得到的;每个历史样本对中包括具有相似度标记的两张图像。也就是说,可以利用历史样 本对,即包含正样本图像和负样本图像的历史样本对,训练双通道图像相似度计算模型,如此将符合第一相似度要求的已审核图像和待审核图像输入双通道图像相似度计算模型,可以得到精确度更高的图像相似度。这里也可以直接将待审核图像的对应第三描述特征与已审核图像的第四描述特征做计算,如高维特征向量的内积、余弦相似度等,图像相似度的具体计算方式不做限定。Wherein, determining the image similarity between the first image and the second image includes: determining the image similarity between the first image and the second image through a two-channel image similarity calculation model; The two-channel image similarity calculation model is obtained by training on historical sample pairs; each historical sample pair includes two images with similarity marks. In other words, historical sample pairs, that is, historical sample pairs containing positive sample images and negative sample images, can be used to train a two-channel image similarity calculation model, so that the audited images and images to be audited that meet the requirements of the first similarity are input The two-channel image similarity calculation model can obtain more accurate image similarity. Here you can also directly calculate the corresponding third descriptive feature of the image to be reviewed and the fourth descriptive feature of the reviewed image, such as the inner product of high-dimensional feature vectors, cosine similarity, etc. The specific calculation method of image similarity is not limited .
本申请实施例还提供了一种针对篡改图像的检测方法流程,如图3所示,包括:The embodiment of the present application also provides a flow of a method for detecting tampered images, as shown in FIG. 3, including:
步骤301、创建已审核图像数据库。Step 301: Create a database of reviewed images.
步骤302、将已审核图像数据库中的已审核图像分类。Step 302: Classify the reviewed images in the reviewed image database.
步骤303、针对每类已审核图像提取每类已审核图像中各个已审核图像的特征,确定各个已审核图像的第四特征描述。Step 303: Extract the features of each reviewed image in each type of reviewed image for each type of reviewed image, and determine the fourth feature description of each reviewed image.
步骤304、对各个已审核图像的第四特征描述做降维处理,得到各个已审核图像的特征描述。通过Faiss(为稠密向量提供高效相似度搜索和聚类的框架)、HASH(一种将任意长度的消息压缩到某一固定长度的消息摘要的函数)等方法,为每类已审核图像的特征描述设置检索索引。Step 304: Perform dimensionality reduction processing on the fourth feature description of each reviewed image to obtain the feature description of each reviewed image. Through Faiss (a framework for efficient similarity search and clustering for dense vectors), HASH (a function that compresses messages of any length to a fixed-length message summary) and other methods, the characteristics of each type of audited image Describe setting search index.
步骤305、获取待审核图像;Step 305: Obtain an image to be reviewed;
步骤306、确定待审核图像的图像类型以及第一特征描述;Step 306: Determine the image type and the first feature description of the image to be reviewed;
步骤307、根据待审核图像的图像类型,通过索引确定相同图像类型的已审核图像的特征描述。Step 307: According to the image type of the image to be reviewed, the feature description of the reviewed image of the same image type is determined through the index.
步骤308、计算待审核图像的第一特征描述与已审核图像的特征描述的特征相似度。Step 308: Calculate the feature similarity between the first feature description of the image to be reviewed and the feature description of the reviewed image.
步骤309、确定符合第一相似度要求的特征相似度,并确定符合第一相似度要求的特征相似度对应的第二特征描述,根据第二特征描述获取第二特征描述对应的已审核图像。Step 309: Determine the feature similarity that meets the first similarity requirement, determine the second feature description corresponding to the feature similarity that meets the first similarity requirement, and obtain the reviewed image corresponding to the second feature description according to the second feature description.
步骤310、确定第二特征描述对应的已审核图像的第四特征描述,确定待审核图像的第三特征描述。Step 310: Determine the fourth feature description of the reviewed image corresponding to the second feature description, and determine the third feature description of the image to be reviewed.
步骤311、通过第三特征描述和第四特征描述计算图像相似度。Step 311: Calculate image similarity through the third feature description and the fourth feature description.
步骤312、确定存在符合第二相似度要求的图像相似度。Step 312: Determine that there is an image similarity that meets the second similarity requirement.
步骤313、确定待审核图像为篡改图像。Step 313: Determine that the image to be reviewed is a tampered image.
基于同样的构思,本发明实施例提供一种针对篡改图像的检测装置,图4为本申请实施例提供的一种针对篡改图像的检测装置示意图,如图4示,包括:Based on the same concept, an embodiment of the present invention provides a detection device for a tampered image. FIG. 4 is a schematic diagram of a detection device for a tampered image provided by an embodiment of the application, as shown in FIG. 4, including:
确定模块401,用于确定第一图像的第一特征描述和所述第一图像所属的第一图像类型;所述第一图像为待审核图像;The determining module 401 is configured to determine the first feature description of the first image and the first image type to which the first image belongs; the first image is an image to be reviewed;
计算模块402,用于从所述第一图像类型中已审核图像的特征描述,确定与所述第一特征描述的特征相似度符合第一相似度要求的第二特征描述;针对特征相似度符合第一相似度要求的第二特征描述,确定所述第二特征描述对应的第二图像;若所述第一图像与所述第二图像的图像相似度符合第二相似度要求,则确定所述第一图像为篡改图像。The calculation module 402 is used to determine, from the feature description of the reviewed image in the first image type, a second feature description whose feature similarity with the first feature description meets the first similarity requirement; The second feature description required by the first similarity is determined, and the second image corresponding to the second feature description is determined; if the image similarity between the first image and the second image meets the second similarity requirement, the second image is determined The first image is a tampered image.
在一种可能的设计中,通过如下方式确定所述第一图像与所述第二图像的图像相似度,包括:所述确定模块401还用于:确定所述第一图像的第三特征描述和所述第二图像的第四特征描述;其中,所述第三特征描述和所述第四特征描述的维度相同;所述第一特征描述和所述第二特征描述的维度相同;所述第三特征描述的维度数多于所述第一特征描述的维度数;所述计算模块402具体用于:计算所述第三特征描述和所述第四特征描述的相似度,从而得到所述第一图像与所述第二图像的图像相似度。In a possible design, determining the image similarity between the first image and the second image in the following manner includes: the determining module 401 is further configured to: determine the third feature description of the first image And the fourth feature description of the second image; wherein the dimensions of the third feature description and the fourth feature description are the same; the dimensions of the first feature description and the second feature description are the same; The number of dimensions of the third feature description is more than the number of dimensions of the first feature description; the calculation module 402 is specifically configured to: calculate the similarity between the third feature description and the fourth feature description, so as to obtain the The image similarity between the first image and the second image.
在一种可能的设计中,所述计算模块402具体用于:通过双通道图像相似度计算模型,确定所述第一图像与所述第二图像的图像相似度;其中,所述双通道图像相似度计算模型是通过历史样本对训练得到的;每个历史样本对中包括具有相似度标记的两张图像。In a possible design, the calculation module 402 is specifically configured to: determine the image similarity between the first image and the second image through a dual-channel image similarity calculation model; wherein, the dual-channel image The similarity calculation model is obtained by training on historical sample pairs; each historical sample pair includes two images with similarity marks.
所述计算模块402具体用于:通过最近邻搜索方法,确定与所述第一特征描述的特征相似度符合第一相似度要求的第二特征描述。The calculation module 402 is specifically configured to determine a second feature description whose feature similarity with the first feature description meets the first similarity requirement through a nearest neighbor search method.
所述确定模块401具体用于:对已审核图像进行分类,得到各图像类型中 的已审核图像;针对每个图像类型,对所述图像类型中的每个已审核图像进行特征提取,基于乘积量化方式对提取的特征进行降维处理得到已审核图像的特征描述,并确定所述已审核图像的特征描述的特征索引。The determining module 401 is specifically configured to: classify the reviewed images to obtain the reviewed images in each image type; for each image type, perform feature extraction on each of the reviewed images in the image type, based on the product The quantification method performs dimensionality reduction processing on the extracted features to obtain the feature description of the reviewed image, and determines the feature index of the feature description of the reviewed image.
所述计算模块402还用于:通过设定的特征提取模型对所述图像类型中的每个已审核图像进行特征提取;确定所述第一图像的第三特征描述和所述第二图像的第四特征描述,包括:通过所述特征提取模型对所述第一图像进行特征提取,得到所述第三特征描述;通过所述特征提取模型对所述第二图像进行特征提取,得到所述第四特征描述。The calculation module 402 is further configured to: perform feature extraction on each of the reviewed images in the image type through the set feature extraction model; determine the third feature description of the first image and the description of the second image The fourth feature description includes: performing feature extraction on the first image through the feature extraction model to obtain the third feature description; performing feature extraction on the second image through the feature extraction model to obtain the The fourth feature description.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。This application is described with reference to flowcharts and/or block diagrams of methods, equipment (systems), and computer program products according to this application. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment can be used to generate It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图 一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的精神和范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the application without departing from the spirit and scope of the application. In this way, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, then this application is also intended to include these modifications and variations.

Claims (10)

  1. 一种针对篡改图像的检测方法,其特征在于,所述方法包括:A method for detecting tampered images, characterized in that, the method includes:
    确定第一图像的第一特征描述和所述第一图像所属的第一图像类型;所述第一图像为待审核图像;Determine the first feature description of the first image and the first image type to which the first image belongs; the first image is an image to be reviewed;
    从所述第一图像类型中已审核图像的特征描述,确定与所述第一特征描述的特征相似度符合第一相似度要求的第二特征描述;针对特征相似度符合第一相似度要求的第二特征描述,确定所述第二特征描述对应的第二图像;若所述第一图像与所述第二图像的图像相似度符合第二相似度要求,则确定所述第一图像为篡改图像。From the feature description of the reviewed image in the first image type, determine the second feature description whose feature similarity with the first feature description meets the first similarity requirement; for those whose feature similarity meets the first similarity requirement The second feature description determines the second image corresponding to the second feature description; if the image similarity between the first image and the second image meets the second similarity requirement, then the first image is determined to be tampered with image.
  2. 根据权利要求1所述的方法,其特征在于,通过如下方式确定所述第一图像与所述第二图像的图像相似度,包括:The method according to claim 1, wherein determining the image similarity between the first image and the second image in the following manner comprises:
    确定所述第一图像的第三特征描述和所述第二图像的第四特征描述;其中,所述第三特征描述和所述第四特征描述的维度相同;所述第一特征描述和所述第二特征描述的维度相同;所述第三特征描述的维度数多于所述第一特征描述的维度数;Determine the third feature description of the first image and the fourth feature description of the second image; wherein the dimensions of the third feature description and the fourth feature description are the same; the first feature description and the fourth feature description The dimensions of the second feature description are the same; the number of dimensions of the third feature description is more than the number of dimensions of the first feature description;
    计算所述第三特征描述和所述第四特征描述的相似度,从而得到所述第一图像与所述第二图像的图像相似度。The similarity between the third feature description and the fourth feature description is calculated, so as to obtain the image similarity between the first image and the second image.
  3. 根据权利要求1所述的方法,其特征在于,确定所述第一图像与所述第二图像的图像相似度,包括:The method according to claim 1, wherein determining the image similarity between the first image and the second image comprises:
    通过双通道图像相似度计算模型,确定所述第一图像与所述第二图像的图像相似度;其中,所述双通道图像相似度计算模型是通过历史样本对训练得到的;每个历史样本对中包括具有相似度标记的两张图像。Determine the image similarity between the first image and the second image through a dual-channel image similarity calculation model; wherein, the dual-channel image similarity calculation model is obtained by training on historical sample pairs; each historical sample The alignment includes two images with similarity marks.
  4. 如权利要求1-3所述的任意一项方法,其特征在于,确定与所述第一特征描述的特征相似度符合第一相似度要求的第二特征描述,包括:The method according to any one of claims 1 to 3, wherein determining a second feature description whose similarity with the first feature description meets the first similarity requirement comprises:
    通过最近邻搜索方法,确定与所述第一特征描述的特征相似度符合第一相似度要求的第二特征描述。Through the nearest neighbor search method, the second feature description whose similarity with the first feature description meets the first similarity requirement is determined.
  5. 根据权利要求4所述的方法,其特征在于,The method of claim 4, wherein:
    通过如下方式确定各图像类型中的各第二特征描述,包括:Determine each second feature description in each image type by the following methods, including:
    对已审核图像进行分类,得到各图像类型中的已审核图像;Categorize the reviewed images to obtain the reviewed images in each image type;
    针对每个图像类型,对所述图像类型中的每个已审核图像进行特征提取,基于乘积量化方式对提取的特征进行降维处理得到已审核图像的特征描述,并确定所述已审核图像的特征描述的特征索引。For each image type, perform feature extraction on each reviewed image in the image type, perform dimensionality reduction processing on the extracted features based on the product quantization method to obtain the feature description of the reviewed image, and determine the characteristics of the reviewed image The feature index of the feature description.
  6. 根据权利要求5所述的方法,其特征在于,对所述图像类型中的每个已审核图像进行特征提取,包括:The method according to claim 5, characterized in that, performing feature extraction on each reviewed image in the image type comprises:
    通过设定的特征提取模型对所述图像类型中的每个已审核图像进行特征提取;Perform feature extraction on each reviewed image in the image type through the set feature extraction model;
    确定所述第一图像的第三特征描述和所述第二图像的第四特征描述,包括:Determining the third feature description of the first image and the fourth feature description of the second image includes:
    通过所述特征提取模型对所述第一图像进行特征提取,得到所述第三特征描述;Performing feature extraction on the first image by using the feature extraction model to obtain the third feature description;
    通过所述特征提取模型对所述第二图像进行特征提取,得到所述第四特征描述。Perform feature extraction on the second image through the feature extraction model to obtain the fourth feature description.
  7. 一种针对篡改图像的检测装置,其特征在于,所述装置包括:A detection device for tampering images, characterized in that the device comprises:
    确定模块,用于确定第一图像的第一特征描述和所述第一图像所属的第一图像类型;所述第一图像为待审核图像;The determining module is used to determine the first feature description of the first image and the first image type to which the first image belongs; the first image is an image to be reviewed;
    计算模块,用于从所述第一图像类型中已审核图像的特征描述,确定与所述第一特征描述的特征相似度符合第一相似度要求的第二特征描述;针对特征相似度符合第一相似度要求的第二特征描述,确定所述第二特征描述对应的第二图像;若所述第一图像与所述第二图像的图像相似度符合第二相似度要求,则确定所述第一图像为篡改图像。The calculation module is used to determine, from the feature description of the reviewed image in the first image type, a second feature description whose feature similarity to the first feature description meets the first similarity requirement; A second feature description with similarity requirements, determine the second image corresponding to the second feature description; if the image similarity between the first image and the second image meets the second similarity requirements, determine the The first image is a tampered image.
  8. 根据权利要求7所述的装置,其特征在于,通过如下方式确定所述第一图像与所述第二图像的图像相似度,包括:8. The device according to claim 7, wherein determining the image similarity between the first image and the second image in the following manner comprises:
    确定模块还用于:确定所述第一图像的第三特征描述和所述第二图像的 第四特征描述;其中,所述第三特征描述和所述第四特征描述的维度相同;所述第一特征描述和所述第二特征描述的维度相同;所述第三特征描述的维度数多于所述第一特征描述的维度数;The determining module is also used to determine the third feature description of the first image and the fourth feature description of the second image; wherein the dimensions of the third feature description and the fourth feature description are the same; The dimensions of the first feature description and the second feature description are the same; the number of dimensions of the third feature description is more than the number of dimensions of the first feature description;
    计算模块具体用于:计算所述第三特征描述和所述第四特征描述的相似度,从而得到所述第一图像与所述第二图像的图像相似度。The calculation module is specifically configured to calculate the similarity between the third feature description and the fourth feature description, so as to obtain the image similarity between the first image and the second image.
  9. 一种计算设备,其特征在于,包括:A computing device, characterized in that it comprises:
    存储器,用于存储程序指令;Memory, used to store program instructions;
    处理器,用于调用所述存储器中存储的程序指令,按照获得的程序执行权利要求1至6任一项所述的方法。The processor is configured to call the program instructions stored in the memory, and execute the method according to any one of claims 1 to 6 according to the obtained program.
  10. 一种计算机可读非易失性存储介质,其特征在于,包括计算机可读指令,当计算机读取并执行所述计算机可读指令时,使得计算机执行如权利要求1至6任一项所述的方法。A computer-readable non-volatile storage medium, characterized by comprising computer-readable instructions, when the computer reads and executes the computer-readable instructions, the computer is caused to execute any one of claims 1 to 6 Methods.
PCT/CN2021/074001 2020-02-17 2021-01-27 Detection method and apparatus for tampered image WO2021164515A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010097367.5 2020-02-17
CN202010097367.5A CN111325265B (en) 2020-02-17 2020-02-17 Detection method and device for tampered image

Publications (1)

Publication Number Publication Date
WO2021164515A1 true WO2021164515A1 (en) 2021-08-26

Family

ID=71172761

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/074001 WO2021164515A1 (en) 2020-02-17 2021-01-27 Detection method and apparatus for tampered image

Country Status (3)

Country Link
CN (1) CN111325265B (en)
TW (1) TWI759099B (en)
WO (1) WO2021164515A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115495712A (en) * 2022-09-28 2022-12-20 支付宝(杭州)信息技术有限公司 Digital work processing method and device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111325265B (en) * 2020-02-17 2023-09-01 中国银联股份有限公司 Detection method and device for tampered image
CN117576425B (en) * 2024-01-17 2024-04-16 南京掌控网络科技有限公司 Method and system for detecting scurrying image

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106485639A (en) * 2015-08-28 2017-03-08 百度在线网络技术(北京)有限公司 The method and apparatus differentiating forged certificate picture
CN109558903A (en) * 2018-11-20 2019-04-02 拉扎斯网络科技(上海)有限公司 A kind of license image detecting method, device, electronic equipment and readable storage medium storing program for executing
CN110414437A (en) * 2019-07-30 2019-11-05 上海交通大学 Face datection analysis method and system are distorted based on convolutional neural networks Model Fusion
US20200005078A1 (en) * 2018-07-02 2020-01-02 Honeywell International Inc. Content aware forensic detection of image manipulations
CN111325265A (en) * 2020-02-17 2020-06-23 中国银联股份有限公司 Detection method and device for tampered image

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930608A (en) * 2010-08-26 2010-12-29 北京交通大学 Method and system for blindly detecting tampered image
CN106846303A (en) * 2016-12-30 2017-06-13 平安科技(深圳)有限公司 Distorted image detection method and device
CN107944339B (en) * 2017-10-20 2020-01-21 阿里巴巴集团控股有限公司 Certificate verification and identity verification method and device
CN108510483B (en) * 2018-03-23 2020-10-20 云南师范大学 Method for generating color image tampering detection by adopting VLAD coding and SVM calculation
CN109829069B (en) * 2018-12-28 2021-03-12 广州华多网络科技有限公司 Image auditing processing method and device, electronic equipment and storage medium
CN110163761B (en) * 2019-03-27 2023-05-12 蚂蚁金服(杭州)网络技术有限公司 Suspicious item member identification method and device based on image processing
CN110781917B (en) * 2019-09-18 2021-03-02 北京三快在线科技有限公司 Method and device for detecting repeated image, electronic equipment and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106485639A (en) * 2015-08-28 2017-03-08 百度在线网络技术(北京)有限公司 The method and apparatus differentiating forged certificate picture
US20200005078A1 (en) * 2018-07-02 2020-01-02 Honeywell International Inc. Content aware forensic detection of image manipulations
CN109558903A (en) * 2018-11-20 2019-04-02 拉扎斯网络科技(上海)有限公司 A kind of license image detecting method, device, electronic equipment and readable storage medium storing program for executing
CN110414437A (en) * 2019-07-30 2019-11-05 上海交通大学 Face datection analysis method and system are distorted based on convolutional neural networks Model Fusion
CN111325265A (en) * 2020-02-17 2020-06-23 中国银联股份有限公司 Detection method and device for tampered image

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115495712A (en) * 2022-09-28 2022-12-20 支付宝(杭州)信息技术有限公司 Digital work processing method and device
CN115495712B (en) * 2022-09-28 2024-04-16 支付宝(杭州)信息技术有限公司 Digital work processing method and device

Also Published As

Publication number Publication date
TWI759099B (en) 2022-03-21
TW202133038A (en) 2021-09-01
CN111325265B (en) 2023-09-01
CN111325265A (en) 2020-06-23

Similar Documents

Publication Publication Date Title
WO2021164515A1 (en) Detection method and apparatus for tampered image
CN111080645B (en) Remote sensing image semi-supervised semantic segmentation method based on generation type countermeasure network
CN112381775B (en) Image tampering detection method, terminal device and storage medium
KR101896357B1 (en) Method, device and program for detecting an object
CN107273458B (en) Depth model training method and device, and image retrieval method and device
Ardizzone et al. Saliency based image cropping
CN111583180B (en) Image tampering identification method and device, computer equipment and storage medium
CN110942456B (en) Tamper image detection method, device, equipment and storage medium
CN111488873A (en) Character-level scene character detection method and device based on weak supervised learning
Derrouz et al. Moroccan video intelligent transport system: Vehicle type classification based on three-dimensional and two-dimensional features
Lin et al. Face detection and segmentation with generalized intersection over union based on mask R-CNN
Gupta et al. Text or non-text image classification using fully convolution network (FCN)
Guo et al. Safety helmet detection method based on faster r-cnn
JP2011087144A (en) Telop character area detection method, telop character area detection device, and telop character area detection program
CN113496115A (en) File content comparison method and device
CN113065559B (en) Image comparison method and device, electronic equipment and storage medium
CN113283396A (en) Target object class detection method and device, computer equipment and storage medium
CN112287763A (en) Image processing method, apparatus, device and medium
Martin Sagayam et al. Application of pseudo 2-D hidden Markov model for hand gesture recognition
Tao et al. A hybrid approach to detection and recognition of dashboard information in real-time
CN116541549B (en) Subgraph segmentation method, subgraph segmentation device, electronic equipment and computer readable storage medium
CN117853728A (en) Illegal main body detection method and device, electronic equipment and storage medium
JP6770227B2 (en) Image processing device, image area detection method and image area detection program
Pan et al. Dilated Convolution Network for Road Damage Detection
Gao et al. Typical scene material classification based on remote sensing image data

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: 21757630

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: 21757630

Country of ref document: EP

Kind code of ref document: A1