CN111666957B - Image authenticity recognition method and device - Google Patents
Image authenticity recognition method and device Download PDFInfo
- Publication number
- CN111666957B CN111666957B CN202010695746.4A CN202010695746A CN111666957B CN 111666957 B CN111666957 B CN 111666957B CN 202010695746 A CN202010695746 A CN 202010695746A CN 111666957 B CN111666957 B CN 111666957B
- Authority
- CN
- China
- Prior art keywords
- image
- recognized
- similar
- distance
- identified
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
本发明提供了一种图像真实性的识别方法及装置,包括:对待识别图像特征提取,得到深度学习特征、ORB特征和hash特征;基于深度学习特征,确定当前分类模板库中是否存在与待识别图像相似的分类图像;若不存在与待识别图像相似的分类图像,则基于深度学习特征,在历史图像中确定与待识别图像相似的候选相似图像;基于ORB特征、hash特征,在候选相似图像中确定待识别图像的相似图像;根据待识别图像对应的用户和相似图像对应的用户确定待识别图像的真实性。本发明的方法融合了多种不同的特征提取方法,大大提高了图像识别的准确率,并且通过机器自动识别的方式更加智能,提高了图像识别的效率,减少了人工成本。
The invention provides a method and device for identifying image authenticity, comprising: extracting features of an image to be identified, obtaining deep learning features, ORB features and hash features; Classified images similar to the image; if there is no classified image similar to the image to be recognized, then based on the deep learning feature, determine the candidate similar image similar to the image to be recognized in the historical image; based on the ORB feature and hash feature, in the candidate similar image Determine the similar image of the image to be recognized; determine the authenticity of the image to be recognized according to the user corresponding to the image to be recognized and the user corresponding to the similar image. The method of the present invention combines a variety of different feature extraction methods, which greatly improves the accuracy of image recognition, and is more intelligent through machine automatic recognition, improves the efficiency of image recognition, and reduces labor costs.
Description
技术领域technical field
本发明涉及图像识别的技术领域,尤其是涉及一种图像真实性的识别方法及装置。The invention relates to the technical field of image recognition, in particular to an image authenticity recognition method and device.
背景技术Background technique
近年来,随着互联网和移动互联网的普及,信贷业务高速发展,业务变得越来越多元和便捷。但是,信贷业务在为广大用户提供丰富的金融服务的同时,也带来了新的风险。最近几年,利用漏洞或者采取必要的技术手段进行非法交易的案件越来越多,严重损害了银行和客户的���产安全。随着不法分������������������专业化与技术手段的升级,传统风控模型中基于规则+验证的方式已经很难满足当前的风控需求。In recent years, with the popularization of the Internet and mobile Internet, the credit business has developed rapidly, and the business has become more and more diversified and convenient. However, while the credit business provides a wealth of financial services for the majority of users, it also brings new risks. In recent years, there have been more and more cases of using loopholes or necessary technical means to carry out illegal transactions, seriously damaging the property safety of banks and customers. With the professionalization of the criminal process and the upgrading of technical means, the traditional risk control model based on rules + verification has been difficult to meet the current risk control needs.
在信贷业务中,用户在多个场景下会提交不同类型的图像,人工查看图像的真实性时,无法全部查验,且对人的记忆要求高,不仅速度慢,而且准确率不高。In the credit business, users will submit different types of images in multiple scenarios. When manually checking the authenticity of the images, it is impossible to check all of them, and the requirements for human memory are high. Not only is the speed slow, but the accuracy rate is not high.
综上,现有的图像真实性的识别方法存在速度慢、准确率不高的技术问题。To sum up, the existing identification methods for image authenticity have the technical problems of slow speed and low accuracy.
发明内容Contents of the invention
本发明的目的在于提供一种图像真实性的识别方法及装置,以缓解现有的图像真实性的识别方法速度慢、准确率不高的技术问题。The object of the present invention is to provide an image authenticity identification method and device, so as to alleviate the technical problems of the existing image authenticity identification method which are slow in speed and low in accuracy.
第一方面,本发明实施例提供了一种图像真实性的识别方法,包括:In a first aspect, an embodiment of the present invention provides a method for identifying the authenticity of an image, including:
对待识别图像进行特征提取,得到所述待识别图像的深度学习特征、ORB特征和hash特征;Carry out feature extraction on the image to be identified, obtain the deep learning feature, ORB feature and hash feature of the image to be identified;
基于所述待识别图像的深度学习特征,确定当前分类模板库中是否存在与所述待识别图像相似的分类图像,以根据与所述待识别图像相似的分类图像确定所述待识别图像的真实性;Based on the deep learning features of the image to be recognized, determine whether there is a classified image similar to the image to be recognized in the current classification template library, so as to determine the authenticity of the image to be recognized according to the classified image similar to the image to be recognized sex;
若所述当前分类模板库中不存在与所述待识别图像相似的分类图像,则基于所述待识别图像的深度学习特征,在历史图像中确定与所述待识别图像相似的候选相似图像;If there is no classified image similar to the image to be recognized in the current classification template library, then based on the deep learning features of the image to be recognized, determine a candidate similar image similar to the image to be recognized in the historical image;
基于所述待识别图像的ORB特征、所述待识别图像的hash特征计算所述待识别图像与所述候选相似图像的距离,并基于所述距离,在所述候选相似图像中确定所述待识别图像的相似图像;Calculate the distance between the image to be recognized and the candidate similar image based on the ORB feature of the image to be recognized and the hash feature of the image to be recognized, and determine the candidate similar image in the candidate similar image based on the distance Identify similar images of an image;
根据所述待识别图像对应的用户和所述相似图像对应的用户确定所述待识别图像的真实性。The authenticity of the image to be identified is determined according to the user corresponding to the image to be identified and the user corresponding to the similar image.
进一步的,基于所述待识别图像的深度学习特征,确定当前分类模板库中是否存在与所述待识别图像相似的分类图像,以根据与所述待识别图像相似的分类图像确定所述待识别图像的真实性包括:Further, based on the deep learning features of the image to be recognized, determine whether there is a classification image similar to the image to be recognized in the current classification template library, so as to determine the classification image to be recognized according to the classification image similar to the image to be recognized Authenticity of images includes:
计算所述待识别图像的深度学习特征与所述当前分类模板库中各个分类图像的深度学习特征之间的第一余弦距离;Calculating the first cosine distance between the deep learning features of the image to be identified and the deep learning features of each classified image in the current classification template library;
基于第一预设距离在所述第一余弦距离中确定第一目标余弦距离,其中,所述第一目标余弦距离大于所述第一预设距离;determining a first target cosine distance among the first cosine distances based on a first preset distance, wherein the first target cosine distance is greater than the first preset distance;
将所述第一目标余弦距离对应的目标分类图像作为与所述待识别图像相似的分类图像;Using the target classification image corresponding to the first target cosine distance as a classification image similar to the image to be recognized;
根据所述目标分类图像所属的类别确定所述待识别图像的真实性。The authenticity of the image to be recognized is determined according to the category to which the target classification image belongs.
进一步的,基于所述待识别图像的深度学习特征,在历史图像中确定与所述待识别图像相似的候选相似图像包括:Further, based on the deep learning features of the image to be identified, determining a candidate similar image similar to the image to be identified in the historical image includes:
计算所述待识别图像的深度学习特征与各个历史图像的深度学习特征之间的第二余弦距离;Calculating the second cosine distance between the deep learning features of the image to be recognized and the deep learning features of each historical image;
基于第二预设距离在所述第二余弦距离中确定第二目标余弦距离,其中,所述第二目标余弦距离大于所述第二预设距离;determining a second target cosine distance among the second cosine distances based on a second preset distance, wherein the second target cosine distance is greater than the second preset distance;
将所述第二目标余弦距离对应的目标历史图像作为与所述待识别图像相似的候选相似图像。The target historical image corresponding to the second target cosine distance is used as a candidate similar image similar to the image to be recognized.
进一步的,基于所述待识别图像的ORB特征、所述待识别图像的hash特征计算所述待识别图像与所述候选相似图像的距离包括:Further, calculating the distance between the image to be recognized and the candidate similar image based on the ORB feature of the image to be recognized and the hash feature of the image to be recognized includes:
计算所述待识别图像的ORB特征与所述候选相似图像的ORB特征之间的第一距离;calculating the first distance between the ORB feature of the image to be identified and the ORB feature of the candidate similar image;
计算所述待识别图像的hash特征与所述候选相似图像的hash特征之间的第二距离;calculating a second distance between the hash feature of the image to be identified and the hash feature of the candidate similar image;
基于权重对所述第一距离和所述第二距离进行加权计算,得到所述待识别图像与所述候选相似图像的距离。Weighted calculation is performed on the first distance and the second distance based on weights to obtain a distance between the image to be recognized and the candidate similar image.
进一步的,基于所述距离,在所述候选相似图像中确定所述待识别图像的相似图像包括:Further, based on the distance, determining a similar image of the image to be recognized among the candidate similar images includes:
基于第三预设距离在所述距离中确定目标距离,其中,所述目标距离大于所述第三预设距离;determining a target distance among the distances based on a third preset distance, wherein the target distance is greater than the third preset distance;
将所述目标距离对应的目标候选相似图像作为所述待识别图像的相似图像。The target candidate similar image corresponding to the target distance is used as the similar image of the image to be recognized.
进一步的,根据所述待识别图像对应的用户和所述相似图像对应的用户确定所述待识别图像的真实性包括:Further, determining the authenticity of the image to be identified according to the user corresponding to the image to be identified and the user corresponding to the similar image includes:
若在所述相似图像中,存在目标相似图像对应的用户与所述待识别图像对应的用户不是同一用户,则确定所述待识别图像为虚假图像;If in the similar images, the user corresponding to the target similar image and the user corresponding to the image to be identified are not the same user, then determine that the image to be identified is a false image;
若在所述相似图像中,所有相似图像对应的用户与所述待识别图像对应的用户为同一用户,则确定所述待识别图像为真实图像。If, among the similar images, the users corresponding to all the similar images are the same user as the user corresponding to the image to be recognized, then it is determined that the image to be recognized is a real image.
进一步的,在根据所述待识别图像对应的用户和所述相似图像对应的用户确定所述待识别图像的真实性之后,所述方法还包括:Further, after determining the authenticity of the image to be identified according to the user corresponding to the image to be identified and the user corresponding to the similar image, the method further includes:
根据人工反馈结果自动更新所述第一预设距离、所述第二预设距离、所述第三预设距离和所述权重,其中,所述人工反馈结果为通过人工的方式对所述待识别图像和所述目标相似图像进行对比,得到的所述待识别图像和所述目标相似图像是否为不同用户的相似图像的结果。The first preset distance, the second preset distance, the third preset distance, and the weight are automatically updated according to the manual feedback result, wherein the manual feedback result is manually The recognition image is compared with the target similar image to obtain a result of whether the to-be-recognized image and the target similar image are similar images of different users.
进一步的,在对待识别图像进行特征提取之前,所述方法还包括:Further, before performing feature extraction on the image to be recognized, the method also includes:
获取所述当前分类模板库。Obtain the current classification template library.
进一步的,获取所述当前分类模板库包括:Further, obtaining the current classification template library includes:
采用聚类方法对预设时间范围内采集的图像进行聚类,得到所述预设时间范围内高频出现的图像;Clustering images collected within a preset time range by using a clustering method to obtain images that appear frequently within the preset time range;
通过人工的方式对所述高频出现的图像进行真实性判定,并根据判定结果更新分类模板库,得到所述当前分类模板库。The authenticity of the frequently appearing images is judged manually, and the classification template library is updated according to the judgment result to obtain the current classification template library.
第二方面,本发明实施例还提供了一种图像真实性的识别装置,包括:In the second aspect, the embodiment of the present invention also provides an image authenticity recognition device, including:
特征提取单元,用于对待识别图像进行特征提取,得到所述待识别图像的深度学习特征、ORB特征和hash特征;The feature extraction unit is used to perform feature extraction on the image to be identified, and obtain the deep learning feature, ORB feature and hash feature of the image to be identified;
第一确定单元,用于基于所述待识别图像的深度学习特征,确定当前分类模板库中是否存在与所述待识别图像相似的分类图像,以根据与所述待识别图像相似的分类图像确定所述待识别图像的真实性;The first determining unit is configured to determine whether there is a classified image similar to the image to be recognized in the current classification template library based on the deep learning features of the image to be recognized, so as to determine based on the classified image similar to the image to be recognized authenticity of the image to be identified;
第���确定���元,若所述当前分类模板库中不存在与所述待识别图像相似的分类图像,则基于所述待识别图像的深度学习特征,在历史图像中确定与所述待识别图像相似的候选相似图像;The second determination unit, if there is no classified image similar to the image to be recognized in the current classification template library, based on the deep learning features of the image to be recognized, determine in the historical image that is similar to the image to be recognized Candidate similar images for ;
计算单元,用于基于所述待识别图像的ORB特征、所述待识别图像的hash特征计算所述待识别图像与所述候选相似图像的距离,并基于所述距离,在所述候选相似图像中确定所述待识别图像的相似图像;A computing unit, configured to calculate the distance between the image to be recognized and the candidate similar image based on the ORB feature of the image to be recognized and the hash feature of the image to be recognized, and based on the distance, in the candidate similar image determining similar images of the image to be identified;
第三确定单元,用于根据所述待识别图像对应的用户和所述相似图像对应的用户确定所述待识别图像的真实性。The third determining unit is configured to determine the authenticity of the image to be identified according to the user corresponding to the image to be identified and the user corresponding to the similar image.
在本发明实施例中,提供了一种图像真实性的识别方法,该方法包括:先对待识别图像进行特征提取,得到待识别图像的深度学习特征、ORB特征和hash特征;然后,基于待识别图像的深度学习特征,确定当前分类模板库中是否存在与待识别图像相似的分类图像,以根据与待识别图像相似的分类图像确定待识别图像的真实性;若当前分类模板库中不存在与待识别图像相似的分类图像,则基于待识别图像的深度学习特征,在历史图像中确定与待识别图像相似的候选相似图像;进而基于待识别图像的ORB特征、待识别图像的hash特征计算待识别图像与候选相似图像的距离,并基于距离,在候选相似图像中确定待识别图像的相似图像;最后,根据待识别图像对应的用户和相似图像对应的用户确定待识别图像的真实性。通过上述描述可知,本发明的图像真实性的识别方法融合了多种不同的特征提取方法,大大提高了图像识别的准确率,并且通过机器自动识别的方式更加智能,提高了图像识别的效率,减少了人工成本,缓解了现有的图像真实性的识别方法速度慢、准确率不高的技术问题。In an embodiment of the present invention, a method for identifying the authenticity of an image is provided. The method includes: first performing feature extraction on the image to be identified to obtain deep learning features, ORB features, and hash features of the image to be identified; then, based on the The deep learning features of the image determine whether there is a classified image similar to the image to be recognized in the current classification template library, so as to determine the authenticity of the image to be recognized based on the classified image similar to the image to be recognized; if there is no similar image in the current classification template library For classified images that are similar to the image to be recognized, based on the deep learning features of the image to be recognized, a candidate similar image similar to the image to be recognized is determined in the historical image; Identify the distance between the image and the candidate similar image, and determine the similar image of the image to be recognized among the candidate similar images based on the distance; finally, determine the authenticity of the image to be recognized according to the user corresponding to the image to be recognized and the user corresponding to the similar image. It can be seen from the above description that the image authenticity recognition method of the present invention combines a variety of different feature extraction methods, which greatly improves the accuracy of image recognition, and is more intelligent through machine automatic recognition, improving the efficiency of image recognition. The labor cost is reduced, and the technical problems of slow speed and low accuracy of the existing recognition method of image authenticity are alleviated.
附图说明Description of drawings
为了更清楚地说明本发明具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出���造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific implementation of the present invention or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings that need to be used in the specific implementation or description of the prior art. Obviously, the accompanying drawings in the following description The drawings show some implementations of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative work.
图1为本发明实施例提供的一种图像真实性的识别方法的流程示意图;FIG. 1 is a schematic flowchart of an image authenticity recognition method provided by an embodiment of the present invention;
图2为本发明实施例提供的确定当前分类模板库中是否存在与待识别图像相似的分类图像的方法流程图;FIG. 2 is a flow chart of a method for determining whether there is a classified image similar to the image to be recognized in the current classification template library provided by an embodiment of the present invention;
图3为本发明实施例提供的在历史图像中确定与待识别图像相似的候选相似图像的方法流程图;FIG. 3 is a flow chart of a method for determining a candidate similar image similar to an image to be recognized in a historical image provided by an embodiment of the present invention;
图4为本发明实施例提供的在候选相似图像中确定待识别图像的相似图像的方法流程图;4 is a flowchart of a method for determining a similar image of an image to be recognized among candidate similar images provided by an embodiment of the present invention;
图5为本发明实施例提供的一种图像真实性的识别装置的示意图。Fig. 5 is a schematic diagram of an image authenticity recognition device provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合实施例对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
为便于对本实施例进行理解,首先对本发明实施例所公开的一种图像真实性的识别方法进行详细介绍。To facilitate the understanding of this embodiment, a method for identifying the authenticity of an image disclosed in the embodiment of the present invention is firstly introduced in detail.
实施例一:Embodiment one:
为便于对本实施例进行理解,首先对本发明实施例所公开的一种图像真实性的识别方法进行详细介绍,参见图1所示的一种图像真实性的识别方法的流程示意图,主要包括以下步骤:In order to facilitate the understanding of this embodiment, a method for identifying the authenticity of an image disclosed in the embodiment of the present invention is firstly introduced in detail, referring to the schematic flow chart of a method for identifying the authenticity of an image shown in Figure 1, which mainly includes the following steps :
步骤S102,对待识别图像进行特征提取,得到待识别图像的深度学习特征、ORB特征和hash特征;Step S102, performing feature extraction on the image to be recognized to obtain deep learning features, ORB features and hash features of the image to be recognized;
在本发明实施例中,该图像真实性的识别方法可以应用于服务器,是一种自动快速的图像识别方法。上述特征提取所采用的算法包括:ORB(Oriented Fast and RotatedBrief)算法、CNN卷积神经网络和hash算法。In the embodiment of the present invention, the method for identifying the authenticity of an image can be applied to a server, and is an automatic and fast image identification method. The algorithms used for the above feature extraction include: ORB (Oriented Fast and Rotated Brief) algorithm, CNN convolutional neural network and hash algorithm.
其中,ORB(Oriented Fast and Rotated Brief),可以用来对图像中的关键点快速创建特征向量,这些特征向量可以用来识别图像中的对象。ORB首先会从图像中查找特殊区域,称为关键点。关键点即图像中突出的小区域,比如角点,它们具有像素值急剧的从浅色变为深色的特征。然后ORB会为每个关键点计算相应的特征向量。ORB算法创建的特征向量只包含1和0,称为二元特征向量。1和0的顺序会根据特定关键点和其周围的像素区域而变化。该向量表示关键点周围的强度模式,因此多个特征向量可以用来识别更大的区域,甚至图像中的特定对象。ORB的特点是速度超快,而且在一定程度上不受噪点和图像变换的影响,例如旋转和缩放变换等。Among them, ORB (Oriented Fast and Rotated Brief), can be used to quickly create feature vectors for key points in the image, and these feature vectors can be used to identify objects in the image. ORB first looks for special regions in the image, called keypoints. Keypoints are small prominent regions in an image, such as corners, that are characterized by sharp changes in pixel values from light to dark. ORB then computes the corresponding feature vector for each keypoint. The eigenvectors created by the ORB algorithm contain only 1s and 0s and are called binary eigenvectors. The order of 1s and 0s changes according to the particular keypoint and the pixel area around it. This vector represents the intensity pattern around the keypoint, so multiple feature vectors can be used to identify larger regions or even specific objects in the image. ORB is characterized by being super fast and somewhat immune to noise and image transformations such as rotation and scaling.
CNN(卷积神经网络,Convolutional Neural Network)的基本结构包括两种特殊的神经元层,其一为卷积层,每个神经元的输入与前一层的局部相连,并提取该局部的特征;其二是池化层,用来求局部敏感性与二次特征提取的计算层。这种两次特征提取结构减少了特征分辨率,减少了需要优化的参数数目。本发明中���用VGG16网络架构(Very DeepConvolutional Networks for Large-Scale Image Recognition),其主要通过小的卷积核尺寸,让网络走向更深层次。The basic structure of CNN (Convolutional Neural Network, Convolutional Neural Network) includes two special neuron layers, one of which is a convolutional layer, the input of each neuron is connected to the part of the previous layer, and the feature of the part is extracted ; The second is the pooling layer, which is used to calculate the local sensitivity and the calculation layer of the secondary feature extraction. This twice feature extraction structure reduces feature resolution and reduces the number of parameters to be optimized. The VGG16 network architecture (Very Deep Convolutional Networks for Large-Scale Image Recognition) is used in the present invention, which mainly allows the network to go deeper through the small convolution kernel size.
需要说明的是,除了上述三种类型的特征之外,还可以包括hist特征等。It should be noted that, in addition to the above three types of features, the hist feature may also be included.
步骤S104,基于待识别图像的深度学习特征,确定当前分类模板库中是否存在与待识别图像相似的分类图像,以根据与待识别图像相似的分类图像确定待识别图像的真实性;Step S104, based on the deep learning features of the image to be recognized, determine whether there is a classified image similar to the image to be recognized in the current classification template library, so as to determine the authenticity of the image to be recognized according to the classified image similar to the image to be recognized;
在本发明实施例中,上述当前分类模板库中包含有两种分类模板库,一种为真实图像的模板库,另一种为虚假图像的模板库。其中,真实图像的模板库中包含有真实图像模板和真实图像模板的深度学习特征,虚假图像的模板库中包含虚假图像模板和虚假图像模板的深度学习特征。上述当前分类模板库是基于聚类技术和人工的方式构建得到的,下文中再对该模板库的构建过程进行具体描述。In the embodiment of the present invention, the above-mentioned current classification template library includes two kinds of classification template libraries, one is a template library of real images, and the other is a template library of fake images. Wherein, the template library of the real image contains the real image template and the deep learning features of the real image template, and the template library of the fake image contains the fake image template and the deep learning features of the fake image template. The above-mentioned current classification template library is constructed based on clustering technology and manual methods, and the construction process of the template library will be described in detail below.
实现时,若当前分类模板库中,存在分类图像A与待识别图像相似,且该分类图像A所属的类别为真实图像模板,那么可以确定待识别图像为真实图像;若分类图像A所属的类别为虚假图像模板,那么可以确定待识别图像为虚假图像。During implementation, if there is a classified image A similar to the image to be recognized in the current classification template library, and the category to which the classified image A belongs is a real image template, then it can be determined that the image to be recognized is a real image; if the category to which the classified image A belongs is a false image template, then it can be determined that the image to be recognized is a false image.
下文中再对确定当前分类模板库中是否存在与待识别图像相似的分类图像的过程进行具体介绍,在此不再赘述。The process of determining whether there is a classified image similar to the image to be recognized in the current classification template library will be described in detail below, and will not be repeated here.
步骤S106,若当前分类模板库中不存在与待识别图像相似的分类图像,则基于待识别图像的深度学习特征,在历史图像中确定与待识别图像相似的候选相似图像;Step S106, if there is no classified image similar to the image to be recognized in the current classification template library, based on the deep learning features of the image to be recognized, determine a candidate similar image similar to the image to be recognized in the historical images;
在本发明实施例中,服务器中存储有历史图像数据库,历史图像数据库中包含有历史图像和历史图像的图像特征。具体的,历史图像的图像特征包括:历史图像的深度学习特征、历史图像的ORB特征和历史图像的hash特征,每种特征构成一个图像特征字典。如:历史图像的深度学习特征就构成了深度学习特征字典、历史图像的ORB特征就构成了ORB特征字典、历史图像的hash特征就构成了hash特征字典。In the embodiment of the present invention, a historical image database is stored in the server, and the historical image database includes historical images and image features of the historical images. Specifically, the image features of historical images include: deep learning features of historical images, ORB features of historical images, and hash features of historical images, each of which constitutes an image feature dictionary. For example, the deep learning features of historical images constitute the deep learning feature dictionary, the ORB features of historical images constitute the ORB feature dictionary, and the hash features of historical images constitute the hash feature dictionary.
上述图像特征是对历史图像进行基于opencv中ORB特征、hash特征和深度学习特征向量的提取得到的。The above image features are obtained by extracting historical images based on ORB features, hash features and deep learning feature vectors in opencv.
步骤S108,基于待识别图像的ORB特征、待识别图像的hash特征计算待识别图像与候选相似图像的距离,并基于距离,在候选相似图像中确定待识别图像的相似图像;Step S108, calculating the distance between the image to be recognized and the candidate similar image based on the ORB feature of the image to be recognized and the hash feature of the image to be recognized, and based on the distance, determining a similar image of the image to be recognized among the candidate similar images;
发明人考虑到相似图像的识别会因为图像本身的复杂性,易受拍摄环境的影响,比如光照变化、尺度变化、视角变化等,不同类别的图像识别准确率不高。图像特征提取的方法种类繁多,没有一种四海皆准的特征,能够解决上述各种情况,基于此,发明人融合了上述多种不同的特征提取方法,能够兼顾多类图像,以提高相似图像识别的准确率。The inventor considers that the recognition of similar images is easily affected by the shooting environment due to the complexity of the image itself, such as changes in illumination, scale, and perspective, and the recognition accuracy of different types of images is not high. There are many kinds of image feature extraction methods, and there is no one-size-fits-all feature that can solve the above-mentioned various situations. Based on this, the inventor has integrated the above-mentioned various feature extraction methods, which can take into account multiple types of images to improve similarity. recognition accuracy.
步骤S110,根据待识别图像对应的用户和相似图像对应的用户确定待识别图像的真实性。Step S110, determine the authenticity of the image to be identified according to the user corresponding to the image to be identified and the user corresponding to the similar image.
在本发明实施例中,提供了一种图像真实性的识别方法,该方法包括:先对待识别图像进行特征提取,得到待识别图像的深度学习特征、ORB特征和hash特征;然后,基于待识别图像的深度学习特征,确定当前分类模板库中是否存在与待识别图像相似的分类图像,以根据与待识别图像相似的分类图像确定待识别图像的真实性;若当前分类模板库中不存在与待识别图像相似的分类图像,则基于待识别图像的深度学习特征,在历史图像中确定与待识别图像相似的候选相似图像;进而基于待识别图像的ORB特征、待识别图像的hash特征计算待识别图像与候选相似图像的距离,并基于距离,在候选相似图像中确定待识别图像的相似图像;最后,根据待识别图像对应的用户和相似图像对应的用户确定待识别图像的真实性。通过上述描述可知,本发明的图像真实性的识别方法融合了多种不同的特征提取方法,大大提高了图像识别的准确率,并且通过机器自动识别的方式更加智能,提高了图像识别的效率,减少了人工成本,缓解了现有的图像真实性的识别方法速度慢、准确率不高的技术问题。In an embodiment of the present invention, a method for identifying the authenticity of an image is provided. The method includes: first performing feature extraction on the image to be identified to obtain deep learning features, ORB features, and hash features of the image to be identified; then, based on the The deep learning features of the image determine whether there is a classified image similar to the image to be recognized in the current classification template library, so as to determine the authenticity of the image to be recognized based on the classified image similar to the image to be recognized; if there is no similar image in the current classification template library For classified images that are similar to the image to be recognized, based on the deep learning features of the image to be recognized, a candidate similar image similar to the image to be recognized is determined in the historical image; Identify the distance between the image and the candidate similar image, and determine the similar image of the image to be recognized among the candidate similar images based on the distance; finally, determine the authenticity of the image to be recognized according to the user corresponding to the image to be recognized and the user corresponding to the similar image. It can be seen from the above description that the image authenticity recognition method of the present invention combines a variety of different feature extraction methods, which greatly improves the accuracy of image recognition, and is more intelligent through machine automatic recognition, improving the efficiency of image recognition. The labor cost is reduced, and the technical problems of slow speed and low accuracy of the existing recognition method of image authenticity are alleviated.
上述内容对本发明的图像真实性的识别方法进行了���要介绍,下面对其中涉及到的具体内容进行详细介绍。The above content briefly introduces the image authenticity recognition method of the present invention, and the specific content involved will be described in detail below.
发明人考虑到历史图像的数量上千万,每天的数量都有很多,而在这么多的图像提交记录里可能只有几张图像是由非法用户提交的虚假图像,全量图像数据的黑白样本比例悬殊。这样的情况下,安排较多的人直接进行分类模板库的构建,对人工的要求极高,无法准确快速全量的构建分类模板库。The inventor considers that there are tens of millions of historical images, and there are a lot of them every day, and in so many image submission records, only a few images may be false images submitted by illegal users, and the proportion of black and white samples in the total image data is very different . In such a case, a large number of people are arranged to directly construct the classification template library, which requires extremely high labor, and it is impossible to accurately, quickly and fully construct the classification template library.
基于此,本发明实施例给出了一种构建当前分类模板库的方法。在本发明的一个可选实施例中,获取当前分类模板库包括如下(1)-(2)的步骤:Based on this, the embodiment of the present invention provides a method for constructing the current classification template library. In an optional embodiment of the present invention, obtaining the current classification template library includes the following steps (1)-(2):
(1)采用聚类方法对预设时间范围内采集的图像进行聚类,得到预设时间范围内高频出现的图像;(1) Using a clustering method to cluster the images collected within the preset time range to obtain images that appear frequently within the preset time range;
(2)通过人工的方式对高频出现的图像进行真实性判定,并根据判定结果更新分类模板库,得到当前分类模板库。(2) Carry out authenticity judgment on frequently occurring images by artificial means, and update the classification template library according to the judgment result to obtain the current classification template library.
具体的,在预设时间范围内(如近30天内),对该时间范围内采集的图像,使用聚类方法进行聚类,得到聚类中心图像,即高频出现的图像,然后将高频出现的图像推送由人工进行真实性判定。实现时,人工根据历史发现的虚假图像模板(如某个银行转账记录PS过金额的图像)以及真实图像模板(如业务审批邮件及制度文件截图等)确定上述高频出现的图像的真实性。进而更新分类模板库,得到当前真实图像的模板库和当前虚假图像的模板库。分类模板库的最初构建过程也可参考上述过程实现。Specifically, within the preset time range (such as within the past 30 days), the images collected within the time range are clustered using the clustering method to obtain the cluster center image, that is, the image with high frequency, and then the high frequency The image pushes that appear are manually judged for their authenticity. During implementation, manually determine the authenticity of the above-mentioned frequently occurring images based on false image templates found in history (such as an image of a bank transfer recording PS amount) and real image templates (such as business approval emails and screenshots of system documents, etc.). Then update the classification template library to obtain the template library of the current real image and the template library of the current false image. The initial construction process of the classification template library can also be realized by referring to the above process.
上述真实图像的模板库用于批量真实图像的剔除,不进行预警和反馈;上述虚假图像的模板库用于批量虚假图像的识别。The above-mentioned template library of real images is used to eliminate batches of real images without early warning and feedback; the above-mentioned template library of fake images is used to identify batches of fake images.
本发明结合聚类技术可以发现近期高频出现的图像,自动建立分类模板库,能够辅助人工判断该类图像是团伙作案还是业务审批类的通用图像。The invention combines the clustering technology to find images that appear frequently in the near future, automatically establishes a classification template library, and can assist manual judgment of whether the images of this type are general images of gang crimes or business approval.
在本发明的一个可选实施例中,参考图2,步骤S104,基于待识别图像的深度学习特征,确定当前分类模板库中是否存在与待识别图像相似的分类图像,以根据与待识别图像相似的分类图像确定待识别图像的真实性的步骤包括:In an optional embodiment of the present invention, referring to FIG. 2, step S104, based on the deep learning features of the image to be recognized, determines whether there is a classified image similar to the image to be recognized in the current classification template library, so as to Similar Classified Images The steps to determine the authenticity of the image to be recognized include:
步骤S201,计算待识别图像的深度学习特征与当前分类模板库中各个分类图像的深度学习特征之间的第一余弦距离;Step S201, calculating the first cosine distance between the deep learning features of the image to be recognized and the deep learning features of each classified image in the current classification template library;
具体的,计算待识别图像的深度学习特征向量和当前分类模板库中各个分类图像的深度学习特征向量之间的第一余弦距离。Specifically, the first cosine distance between the deep learning feature vector of the image to be recognized and the deep learning feature vector of each classified image in the current classification template library is calculated.
步骤S202,基于第一预设距离在第一余弦距离中确定第一目标余弦距离,其中,第一目标余弦距离大于第一预设距离;Step S202, determining a first target cosine distance in the first cosine distance based on the first preset distance, wherein the first target cosine distance is greater than the first preset distance;
步骤S203,将第一目标余弦距离对应的目标分类图像作为与待识别图像相似的分类图像;Step S203, using the target classification image corresponding to the first target cosine distance as a classification image similar to the image to be recognized;
步骤S204,根据目标分类图像所属的类别确定待识别图像的真实性。Step S204, determining the authenticity of the image to be recognized according to the category to which the target classification image belongs.
由上可知,本发明的分类模板库可以添加历史高频出现的虚假图像或者真实图像作为模板,使用了聚类技术能自动发现高频出现的图像以辅助分类模板库的建立,减少了人工工作量;另外,可以将待识别图像命中分类模板库中的分类图像的方式,确定待识别图像的真实性,减少了计算量,提高了图像识别的效率。As can be seen from the above, the classification template library of the present invention can add false images or real images that appear frequently in history as templates, and use clustering technology to automatically find images that appear frequently to assist the establishment of the classification template library, reducing manual work In addition, the authenticity of the image to be recognized can be determined by matching the image to be recognized with the classification image in the classification template library, which reduces the amount of calculation and improves the efficiency of image recognition.
在本发明的一个可选实施例中,参考图3,步骤S106,基于待识别图像的深度学习特征,在历史图像中确定与待识别图像相似的候选相似图像的步骤包括:In an optional embodiment of the present invention, referring to FIG. 3, step S106, based on the deep learning features of the image to be recognized, the step of determining a candidate similar image similar to the image to be recognized in the historical image includes:
步骤S301,计算待识别图像的深度学习特征与各个历史图像的深度学习特征之间的第二余弦距离;Step S301, calculating the second cosine distance between the deep learning features of the image to be recognized and the deep learning features of each historical image;
步骤S302,基于第二预设距离在第二余弦距离中确定第二目标余弦距离,其中,第二目标余弦距离大于第二预设距离;Step S302, determining a second target cosine distance in the second cosine distance based on the second preset distance, wherein the second target cosine distance is greater than the second preset distance;
步骤S303,将第二目标余弦距离对应的目标历史图像作为与待识别图像相似的候选相似图像。Step S303, taking the target historical image corresponding to the second target cosine distance as a candidate similar image similar to the image to be recognized.
上述步骤S301至步骤S303的过程完成了第一轮的待识别图像与历史图像的比对,初筛得到了候选相似图像的集合。The process from step S301 to step S303 above completes the first round of comparison between the image to be recognized and the historical image, and a set of candidate similar images is obtained through preliminary screening.
在本发明的一个可选实施例中,参考图4,步骤S108,在候选相似图像中确定待识别图像的相似图像的步骤包括:In an optional embodiment of the present invention, referring to FIG. 4, step S108, the step of determining a similar image of the image to be recognized among candidate similar images includes:
步骤S401,计算待识别图像的ORB特征与候选相似图像的ORB特征之间的第一距离;Step S401, calculating the first distance between the ORB feature of the image to be recognized and the ORB feature of the candidate similar image;
步骤S402,计算待识别图像的hash特征与候选相似图像的hash特征之间的第二距离;Step S402, calculating the second distance between the hash feature of the image to be recognized and the hash feature of the candidate similar image;
步骤S403,基于权重对第一距离和第二距离进行加权计算,得到待识别图像与候选相似图像的距离;Step S403, performing weighted calculation on the first distance and the second distance based on the weight, to obtain the distance between the image to be recognized and the candidate similar image;
具体的,计算待识别图像的ORB特征与各个候选相似图像的ORB特征之间的第一距离(可以为余弦距离),并计算待识别图像的hash特征与各个候选相似图像的hash特征之间的第二距离(可以为海明距离),进而基于第一距离的权重、第二距离的权重、第一距离和第二距离进行加权计算,得到待识别图像与各个候选相似图像的距离。Specifically, calculate the first distance (could be a cosine distance) between the ORB feature of the image to be recognized and the ORB feature of each candidate similar image, and calculate the hash feature between the image to be recognized and the hash feature of each candidate similar image The second distance (which may be the Hamming distance) is further calculated based on the weight of the first distance, the weight of the second distance, the first distance and the second distance to obtain the distance between the image to be recognized and each candidate similar image.
步骤S404,基于第三预设距离在距离中确定目标距离,其中,目标距离大于第三预设距离;Step S404, determining a target distance among distances based on a third preset distance, wherein the target distance is greater than the third preset distance;
步骤S405,将目标距离对应的目标候选相似图像作为待识别图像的相似图像。In step S405, the target candidate similar image corresponding to the target distance is used as a similar image of the image to be recognized.
上述步骤S401至步骤S405的过程完成了第二轮的待识别图像与候选相似图像的比对,第���轮细筛得到了待识别图像的相似图像的集合。The process from step S401 to step S405 above completes the second round of comparison between the image to be recognized and the candidate similar images, and the second round of fine screening obtains a set of similar images of the image to be recognized.
在本发明的一个可选实施例中,步骤S110,根据待识别图像对应的用户和相似图像对应的用户确定待识别图像的真实性的步骤包括如下1)和2)的过程:In an optional embodiment of the present invention, step S110, the step of determining the authenticity of the image to be recognized according to the user corresponding to the image to be recognized and the user corresponding to the similar image includes the following 1) and 2) processes:
1)若在相似图像中,存在目标相似图像对应的用户与待识别图像对应的用户不是同一用户,则确定待识别图像为虚假图像;1) If in the similar image, the user corresponding to the target similar image and the user corresponding to the image to be identified are not the same user, then determine that the image to be identified is a false image;
2)若在相似图像中,所有相似图像对应的用户与待识别图像对应的用户为同一用户,则确定待识别图像为真实图像。2) If in the similar images, the users corresponding to all the similar images and the user corresponding to the image to be recognized are the same user, then it is determined that the image to be recognized is a real image.
具体的,在判断待识别图像对应的用户与其相似图像对应的用户是否为同一用户时,可以通过用户业务信息的方式进行判断。例如:待识别图像对应的合同的证件号与其相似图像对应的合同的证件号一样,则确定待识别图像对应的用户与相似图像对应的用户为同一用户,反之,不是同一用户。Specifically, when judging whether the user corresponding to the image to be recognized and the user corresponding to the similar image are the same user, it may be judged in the form of user business information. For example, if the certificate number of the contract corresponding to the image to be recognized is the same as the certificate number of the contract corresponding to the similar image, it is determined that the user corresponding to the image to be recognized is the same user as the user corresponding to the similar image, and vice versa.
在正常情况下,待识别图像与其相似图像对应的用户应为同一用户,若待识别图像与其相似图像对应的用户不是同一用户,则说明待识别图像对应的用户盗用了与待识别图像相似的相似图像。Under normal circumstances, the user corresponding to the image to be recognized and its similar image should be the same user. If the user corresponding to the image to be recognized and its similar image is not the same user, it means that the user corresponding to the image to be recognized has stolen a similar image similar to the image to be recognized. image.
在本发明的一个可选实施例中,在根据待识别图像对应的用户和相似图像对应的用户确定待识别图像的真实性之后,该方法还包括:In an optional embodiment of the present invention, after determining the authenticity of the image to be identified according to the user corresponding to the image to be identified and the user corresponding to the similar image, the method further includes:
根据人工反馈结果自动更新第一预设距离、第二预设距离、第三预设距离和权重,其中,人工反馈结果为通过人工的方式对待识别图像和目标相似图像进行对比,得到的待识别图像和目标相似图像是否为不同用户的相似图像的结果。Automatically update the first preset distance, the second preset distance, the third preset distance and the weight according to the manual feedback result, wherein the manual feedback result is the image to be recognized obtained by comparing the image to be recognized with the similar image of the target in a manual way Whether the image and the target similar image are the result of similar images from different users.
在完成待识别图像真实性的识别后,将不是同一用户的相似图像(即目标相似图像)发由人工,由人工将待识别图像与目标相似图像进行对比,得到对比结果,并将该对比结果反馈至本发明的图像真实性的识别算法中,以使算法自动更新第一预设距离、第二预设距离、第三预设距离和权重,这样使得算法成为一个闭环,能够更好的适应变化。After completing the recognition of the authenticity of the image to be recognized, similar images that are not the same user (i.e. target similar images) are sent to the manual, and the manual compares the image to be recognized with the target similar image to obtain the comparison result, and compares the comparison result Feedback to the image authenticity recognition algorithm of the present invention, so that the algorithm automatically updates the first preset distance, the second preset distance, the third preset distance and weight, so that the algorithm becomes a closed loop, which can better adapt to Variety.
���发明的图像真实性的识别方法通过���同���法提取图像特征,经过��类模板库、初筛和细筛三轮图像对比,可以更快且准确的确定待识别图像的相似图像,另外,通过图像聚类辅助人工判断该类图像是虚假图像还是真实图像(即业务审批类的通用图像)用于构建模板库,减少了人工成本。The image authenticity recognition method of the present invention extracts image features through different algorithms, and after three rounds of image comparison of classification template library, preliminary screening and fine screening, can determine similar images of the image to be recognized more quickly and accurately. In addition, through image aggregation Class-assisted manual judgment of whether the image of this type is a fake image or a real image (that is, a general image of the business approval class) is used to build a template library, reducing labor costs.
本发明的图像真实性的识别方法具有以下优点:The identification method of image authenticity of the present invention has the following advantages:
1.针对不同特征提取算法的特点,对同一张图像进行多种图像特征提取,并且经过初筛和细筛(即融合了多种不同的图像特征提取方法和相似度计算方法),可以发挥不同类型特征提取算法的特点,准确性好;1. According to the characteristics of different feature extraction algorithms, multiple image feature extractions are performed on the same image, and after preliminary screening and fine screening (that is, a variety of different image feature extraction methods and similarity calculation methods are integrated), different images can be used. The characteristics of the type feature extraction algorithm, good accuracy;
2.对于分类模板库,可以添加历史高频出现的虚假图像或者真实图像作为模板,使用了聚类技术能自动发现高频出现的图像以辅助分类模板库的建立,减少了人工工作量;2. For the classification template library, false images or real images that appear frequently in history can be added as templates, and clustering technology can be used to automatically find frequently occurring images to assist the establishment of the classification template library, reducing the manual workload;
3.可以将待识别图像命中分类模板库中的分类图像的方式,确定待识别图像的真实性,减少了计算量,提高了图像识别的效率;3. The authenticity of the image to be recognized can be determined by matching the image to be recognized with the classified image in the classification template library, which reduces the amount of calculation and improves the efficiency of image recognition;
4.能够根据人工反馈结果自动更新距离阈值、权重,使得算法成为一个闭环,可以更好的适应变化,提高算法的准确性。4. It can automatically update the distance threshold and weight according to the manual feedback results, making the algorithm a closed loop, which can better adapt to changes and improve the accuracy of the algorithm.
实施例二:Embodiment two:
本发明实施例还提供了一种图像真实性的识别装置,该图像真实性的识别装置主要用于执行本发明实施例上述内容所提供的图像真实性的识别方法,以下对本发明实施例提供的图像真实性的识别装置做具体介绍。The embodiment of the present invention also provides an image authenticity identification device, the image authenticity identification device is mainly used to implement the image authenticity identification method provided in the above content of the embodiment of the present invention, the following provides the embodiment of the present invention The identification device for image authenticity will be introduced in detail.
图5���本发明实施例的一种图像真实性的识别装置的示意图,如图5所示,该图像真实性的识别装置主要包括:特征提取单元10、第一确定单元20、第二确定单元30、计算单元40和第三确定单元50,其中:Fig. 5 is a schematic diagram of an image authenticity recognition device according to an embodiment of the present invention. As shown in Fig. 5, the image authenticity recognition device mainly includes: a feature extraction unit 10, a first determination unit 20, and a second determination unit 30. The calculation unit 40 and the third determination unit 50, wherein:
特征提取单元,用于对待识别图像进行特征提取,得到待识别图像的深度学习特征、ORB特征和hash特征;The feature extraction unit is used for feature extraction of the image to be recognized, and obtains the deep learning feature, ORB feature and hash feature of the image to be recognized;
第一确定单元,用于基于待识别图像的深度学习特征,确定当前分类模板库中是否存在与待识别图像相似的分类图像,以根据与待识别图像相似的分类图像确定待识别图像的真实性;The first determination unit is configured to determine whether there is a classified image similar to the image to be recognized in the current classification template library based on the deep learning features of the image to be recognized, so as to determine the authenticity of the image to be recognized according to the classified image similar to the image to be recognized ;
第二确定单元,若当前分类模板库中不存在与待识别图像相似的分类图像,则基于待识别图像的深度学习特征,在历史图像中确定与待识别图像相似的候选相似图像;The second determining unit, if there is no classified image similar to the image to be recognized in the current classification template library, then based on the deep learning features of the image to be recognized, determine a candidate similar image similar to the image to be recognized in the historical image;
计算单元,用于基于待识别图像的ORB特征、待识别图像的hash特征计算待识别图像与候选相似图像的距离,并基于距离,在候选相似图像中确定待识别图像的相似图像;A calculation unit for calculating the distance between the image to be recognized and the candidate similar image based on the ORB feature of the image to be recognized and the hash feature of the image to be recognized, and based on the distance, determining a similar image of the image to be recognized among the candidate similar images;
第三确定单元,用于根据待识别图像对应的用户和相似图像对应的用户确定待识别图像的真实性。The third determination unit is configured to determine the authenticity of the image to be identified according to the user corresponding to the image to be identified and the user corresponding to the similar image.
在本发明实施例中,提供了一种图像真实性的识别装置,包括:先对待识别图像进行特征提取,得到待识别图像的深度学习特征、ORB特征和hash特征;然后,基于待识别图像的深度学习特征,确定当前分类模板库中是否存在与待识别图像相似的分类图像,以根据与待识别图像相似的分类图像确定待识别图像的真实性;若当前分类模板库中不存在与待识别图像相似的分类图像,则基于待识别图像的深度学习特征,在历史图像中确定与待识别图像相似的候选相似图像;进而基于待识别图像的ORB特征、待识别图像的hash特征计算待识别图像与候选相似图像的距离,并基于距离,在候选相似图像中确定待识别图像的相似图像;最后,根据待识别图像对应的用户和相似图像对应的用户确定待识别图像的真实性。通过上述描述可知,本发明的图像真实性的识别装置融合了多种不同的特征提取方法,大大提高了图像识别的准确率,并且通过机器自动识别的方式更加智能,提高了图像识别的效率,减少了人工成本,缓解了现有的图像真实性的识别方法速度慢、准确率不高的技术问题。In an embodiment of the present invention, an image authenticity identification device is provided, which includes: first performing feature extraction on the image to be identified to obtain deep learning features, ORB features, and hash features of the image to be identified; then, based on the image to be identified Deep learning features to determine whether there is a classified image similar to the image to be recognized in the current classification template library, so as to determine the authenticity of the image to be recognized based on the classified image similar to the image to be recognized; if there is no image similar to the image to be recognized in the current classification template library For classified images with similar images, based on the deep learning features of the image to be recognized, determine the candidate similar image similar to the image to be recognized in the historical image; and then calculate the image to be recognized based on the ORB feature of the image to be recognized and the hash feature of the image to be recognized The distance from the candidate similar image, and based on the distance, determine the similar image of the image to be recognized among the candidate similar images; finally, determine the authenticity of the image to be recognized according to the user corresponding to the image to be recognized and the user corresponding to the similar image. From the above description, it can be seen that the image authenticity recognition device of the present invention combines a variety of different feature extraction methods, which greatly improves the accuracy of image recognition, and is more intelligent through automatic machine recognition, improving the efficiency of image recognition. The labor cost is reduced, and the technical problems of slow speed and low accuracy of the existing recognition method of image authenticity are alleviated.
可选地,第一确定单元还用于:计算待识别图像的深度学习特征与当前分类模板库中各个分类图像的深度学习特征之间的第一余弦距离;基于第一预设距离在第一余弦距离中确定第一目标余弦距离,其中,第一目标余弦距离大于第一预设距离;将第一目标余弦距离对应的目标分类图像作为与待识别图像相似的分类图像;根据目标分类图像所属的类别确定待识别图像的真实性。Optionally, the first determination unit is also used to: calculate the first cosine distance between the deep learning features of the image to be recognized and the deep learning features of each classified image in the current classification template library; Determine the first target cosine distance in a cosine distance, wherein the first target cosine distance is greater than the first preset distance; the target classification image corresponding to the first target cosine distance is used as a classification image similar to the image to be identified; according to the target classification The class to which an image belongs determines the authenticity of the image to be recognized.
可选地,第二确定单元还用于:计算待识别图像的深度学习特征与各个历史图像的深度学习特征之间的第二余弦距离;基于第二预设距离在第二余弦距离中确定第二目标余弦距离,其中,第二目标余弦距离大于第二预设距离;将第二目标余弦距离对应的目标历史图像作为与待识别图像相似的候选相似图像。Optionally, the second determination unit is also used to: calculate a second cosine distance between the deep learning features of the image to be recognized and the deep learning features of each historical image; based on the second preset distance in the second cosine distance Determining a second target cosine distance, wherein the second target cosine distance is greater than a second preset distance; using the target historical image corresponding to the second target cosine distance as a candidate similar image similar to the image to be recognized.
可选地,计算单元还用于:计算待识别图像的ORB特征与候选相似图像的ORB特征之间的第一距离;计算待识别图像的hash特征与候选相似图像的hash特征之间的第二距离;基于权重对第一距离和第二距离进行加权计算,得到待识别图像与候选相似图像的距离。Optionally, the calculation unit is also used to: calculate the first distance between the ORB feature of the image to be recognized and the ORB feature of the candidate similar image; calculate the second distance between the hash feature of the image to be recognized and the hash feature of the candidate similar image Distance: weighted calculation is performed on the first distance and the second distance based on weights to obtain the distance between the image to be recognized and the candidate similar image.
可选地,计算单元还用于:基于第三预设距离在距离中确定目标距离,其中,目标距离大于第三预设距离;将目标距离对应的目标候选相似图像作为待识别图像的相似图像。Optionally, the computing unit is also used to: determine the target distance among the distances based on a third preset distance, wherein the target distance is greater than the third preset distance; use the target candidate similar image corresponding to the target distance as a similar image of the image to be recognized .
可选地,第三确定单元还用于:若在相似图像中,存在目标相似图像对应的用户与待识别图像对应的用户不是同一用户,则确定待识别图像为虚假图像;若在相似图像中,所有相似图像对应的用户与待识别图像对应的用户为同一用户,则确定待识别图像为真实图像。Optionally, the third determination unit is also used for: if in the similar image, the user corresponding to the target similar image and the user corresponding to the image to be identified are not the same user, then determine that the image to be identified is a false image; if in the similar image , the user corresponding to all the similar images is the same user as the user corresponding to the image to be recognized, then it is determined that the image to be recognized is a real image.
可选地,该装置还用于:根据人工反馈结果自动更新第一预设距离、第二预设距离、第三预设距离和权重,其中,人工反馈结果为通过人工的方式对待识别图像和目标相似图像进行对比,得到的待识别图像和目标相似图像是否为不同用户的相似图像的结果。Optionally, the device is also used to: automatically update the first preset distance, the second preset distance, the third preset distance and the weight according to the manual feedback result, wherein the manual feedback result is the recognition image and The target similar images are compared, and the result of whether the obtained image to be recognized and the target similar image are similar images of different users.
可选地,该装置还用于:获取当前分类模板库。Optionally, the device is also used to: acquire the current classification template library.
可选地,该装置还用于:采用聚类方法对预设时间范围内采集的图像进行聚类,得到预设时间范围内高频出现的图像;通过人工的方式对高频出现的图像进行真实性判定,并根据判定结果更新分类模板库,得到当前分类模板库。Optionally, the device is also used to: use a clustering method to cluster images collected within a preset time range to obtain images that appear frequently within a preset time range; The authenticity is judged, and the classification template library is updated according to the judgment result to obtain the current classification template library.
本发明实施例所提供的装置,其实现原理及产生的技术效果和前述方法实施例相��,���简要描述,装置实施例部分未提及之处,可参考前述方法实施例中相应内容。The implementation principles and technical effects of the device provided by the embodiment of the present invention are the same as those of the foregoing method embodiment. For brief description, for the parts not mentioned in the device embodiment, reference may be made to the corresponding content in the foregoing method embodiment.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,前述描述的系统、装置和单元的具体工作过程,均可以参考上述方法实施例中的对应过程,在此不再赘述。本申请实施例提供的图像真实性的识别装置与上述实施例提供的图像真实性的识别方法具有相同的技术特征,所以也能解决相同的技术问题,达到相同的技术效果。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the above-mentioned method embodiments, and will not be repeated here. The image authenticity identification device provided in the embodiment of the present application has the same technical features as the image authenticity identification method provided in the above embodiments, so it can also solve the same technical problem and achieve the same technical effect.
另外,在本发明实施例的描述中,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本发明中的具体含义。In addition, in the description of the embodiments of the present invention, unless otherwise specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection or a detachable connection , or integrally connected; it may be mechanically connected or electrically connected; it may be directly connected or indirectly connected through an intermediary, and it may be the internal communication of two components. Those of ordinary skill in the art can understand the specific meanings of the above terms in the present invention in specific situations.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术��案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
在本发明的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本发明和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本发明的限制。此外,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" etc. The indicated orientation or positional relationship is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, or in a specific orientation. construction and operation, therefore, should not be construed as limiting the invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and should not be construed as indicating or implying relative importance.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: It is still possible to modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the various embodiments of the present invention. scope.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010695746.4A CN111666957B (en) | 2020-07-17 | 2020-07-17 | Image authenticity recognition method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010695746.4A CN111666957B (en) | 2020-07-17 | 2020-07-17 | Image authenticity recognition method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111666957A CN111666957A (en) | 2020-09-15 |
| CN111666957B true CN111666957B (en) | 2023-04-25 |
Family
ID=72392644
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010695746.4A Active CN111666957B (en) | 2020-07-17 | 2020-07-17 | Image authenticity recognition method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111666957B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114219753B (en) * | 2021-10-27 | 2025-01-17 | 国网福建省电力有限公司检修分公司 | Deep learning-based power equipment surface defect detection method and terminal |
| CN116091807A (en) * | 2021-11-01 | 2023-05-09 | 中国移动通信有限公司研究院 | An image classification method and device |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007058722A (en) * | 2005-08-26 | 2007-03-08 | Fujifilm Corp | Discriminator learning method, object discriminating apparatus, and program |
| JP2010092413A (en) * | 2008-10-10 | 2010-04-22 | Ricoh Co Ltd | Image classification learning device, image classification learning method, and image classification learning system |
| CN106886785A (en) * | 2017-02-20 | 2017-06-23 | 南京信息工程大学 | A kind of Aerial Images Fast Match Algorithm based on multi-feature Hash study |
| CN108960412A (en) * | 2018-06-29 | 2018-12-07 | 北京京东尚��信息技术有限公司 | Image-recognizing method, device and computer readable storage medium |
| CN110084757A (en) * | 2019-04-15 | 2019-08-02 | 南京信息工程大学 | A kind of infrared depth image enhancement method based on generation confrontation network |
| CN110991533A (en) * | 2019-12-03 | 2020-04-10 | Oppo广东移动通信有限公司 | Image recognition method, recognition device, terminal device and readable storage medium |
| US10664722B1 (en) * | 2016-10-05 | 2020-05-26 | Digimarc Corporation | Image processing arrangements |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9740917B2 (en) * | 2012-09-07 | 2017-08-22 | Stone Lock Global, Inc. | Biometric identification systems and methods |
| GB2532075A (en) * | 2014-11-10 | 2016-05-11 | Lego As | System and method for toy recognition and detection based on convolutional neural networks |
| JP6866095B2 (en) * | 2016-09-26 | 2021-04-28 | キヤノン株式会社 | Learning device, image identification device, learning method, image identification method and program |
| EP3815040A4 (en) * | 2018-05-21 | 2022-03-02 | Corista LLC | Multi-sample whole slide image processing via multi-resolution registration |
-
2020
- 2020-07-17 CN CN202010695746.4A patent/CN111666957B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007058722A (en) * | 2005-08-26 | 2007-03-08 | Fujifilm Corp | Discriminator learning method, object discriminating apparatus, and program |
| JP2010092413A (en) * | 2008-10-10 | 2010-04-22 | Ricoh Co Ltd | Image classification learning device, image classification learning method, and image classification learning system |
| US10664722B1 (en) * | 2016-10-05 | 2020-05-26 | Digimarc Corporation | Image processing arrangements |
| CN106886785A (en) * | 2017-02-20 | 2017-06-23 | 南京信息工程大学 | A kind of Aerial Images Fast Match Algorithm based on multi-feature Hash study |
| CN108960412A (en) * | 2018-06-29 | 2018-12-07 | 北京京东尚科信息技术有限公司 | Image-recognizing method, device and computer readable storage medium |
| CN110084757A (en) * | 2019-04-15 | 2019-08-02 | 南京信息工程大学 | A kind of infrared depth image enhancement method based on generation confrontation network |
| CN110991533A (en) * | 2019-12-03 | 2020-04-10 | Oppo广东移动通信有限公司 | Image recognition method, recognition device, terminal device and readable storage medium |
Non-Patent Citations (1)
| Title |
|---|
| 基于轻量级分组注意力模块的图像分类算法;张盼盼,李其申,杨词慧;计算机应用;全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111666957A (en) | 2020-09-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Zaibi et al. | A lightweight model for traffic sign classification based on enhanced LeNet‐5 network | |
| CN113515988B (en) | Palm print recognition method, feature extraction model training method, device and medium | |
| US10853642B2 (en) | Fusing multi-spectral images for identity authentication | |
| CN110287813A (en) | Personal identification method and system | |
| CN113011307A (en) | Face recognition identity authentication method based on deep residual error network | |
| CN111177367A (en) | Case classification method, classification model training method and related products | |
| CN111666957B (en) | Image authenticity recognition method and device | |
| CN118734280A (en) | Biometric-based identity authentication method and device | |
| CN116092134A (en) | A Fingerprint Liveness Detection Method Based on Deep Learning and Feature Fusion | |
| WO2024260302A1 (en) | Liveness detection model training method and apparatus, and liveness detection method and apparatus | |
| CN118761888B (en) | Smart city service platform, method and equipment based on cloud computing and big data | |
| CN118658193B (en) | Document self-service signing method and system based on fusion verification | |
| WO2026021336A1 (en) | Seal library construction and seal retrieval | |
| CN118379560B (en) | Image fraud detection method, apparatus, device, storage medium, and program product | |
| CN110020617A (en) | A kind of personal identification method based on biological characteristic, device and storage medium | |
| CN120164235A (en) | Method and system for identifying dangerous personnel in power industry based on multimodal data | |
| CN117010893B (en) | Transaction risk control method, device and computer equipment based on biometric identification | |
| Wang et al. | Content-Based superpixel matching using spatially constrained student’st mixture model and scale-invariant key-superpixels | |
| CN117935325A (en) | Unsupervised domain generalization face anti-counterfeiting method, system, medium and electronic device | |
| KR102240495B1 (en) | Method for managing abusing user about identification and authentication, and server for the method | |
| CN116662589A (en) | Image matching method, device, electronic device and storage medium | |
| Krishnakumar et al. | Optimized fingerprint crime detection using robust deformed convolutional neural network for 5G network secure smart cities | |
| CN116631035B (en) | Face recognition output result screening method and device | |
| CN119323234B (en) | A node injection attack method and device based on target subgraph partitioning | |
| CN119577830B (en) | An AI-based Enterprise Information and Business Security Monitoring System and Method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20250918 Address after: 101149 Tongzhou District, Beijing City, Hui County Town, Hui Xing North Street No. 86 - 4684 Room (Cluster Registration) Patentee after: Beijing Lianyan Technology Co.,Ltd. Country or region after: China Address before: 410205 Hunan Province, Changsha City, Gaoxin Development Zone, Wenxuan Road No. 27, Lugu Yu Yuan F3 Building 1901-1905 Room Patentee before: Hunan Huawei Jin'an Enterprise Management Co.,Ltd. Country or region before: China |
|
| TR01 | Transfer of patent right |
