WO2021174789A1 - Feature extraction-based image recognition method and image recognition device - Google Patents

Feature extraction-based image recognition method and image recognition device Download PDF

Info

Publication number
WO2021174789A1
WO2021174789A1 PCT/CN2020/112404 CN2020112404W WO2021174789A1 WO 2021174789 A1 WO2021174789 A1 WO 2021174789A1 CN 2020112404 W CN2020112404 W CN 2020112404W WO 2021174789 A1 WO2021174789 A1 WO 2021174789A1
Authority
WO
WIPO (PCT)
Prior art keywords
similarity
candidate record
image information
clothing
recognition
Prior art date
Application number
PCT/CN2020/112404
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 WO2021174789A1 publication Critical patent/WO2021174789A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • 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
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation

Definitions

  • This application relates to the field of image recognition technology in artificial intelligence, and in particular to an image recognition method, device, computer equipment, and computer storage medium based on feature extraction.
  • the purpose of this application is to provide an image recognition method, device, computer equipment, and computer storage medium that can accurately and quickly recognize a person in an image, so as to solve the above-mentioned defects in the prior art.
  • this application provides an image recognition method based on feature extraction, which includes the following steps:
  • facial features can be extracted from the image information, extract the facial features, and obtain a first candidate record from a recognition database based on the facial features, where the first candidate record contains facial reference features, Clothing reference features and object identifiers, where the first degree of similarity between the facial reference features in the first candidate record and the facial features is greater than a first threshold;
  • the first similarity is less than the second threshold, extracting clothing features from the image information, and calculating the second similarity between the clothing reference feature in the first candidate record and the clothing feature; Wherein the second threshold is greater than the first threshold;
  • the object identifier contained in the target candidate record is output as the recognition result of the image information.
  • this application also proposes an image recognition device based on feature extraction, and the image recognition device based on feature extraction includes:
  • the image acquisition module is adapted to acquire image information of the object to be identified in response to an image recognition instruction
  • the first comparison module is suitable for extracting facial features from the image information when facial features can be extracted from the image information, and obtaining the first candidate record from the recognition database based on the facial features, wherein
  • the first candidate record includes a face reference feature, a clothing reference feature, and an object identifier, and the first similarity between the face reference feature in the first candidate record and the facial feature is greater than a first threshold;
  • the second comparison module is adapted to extract clothing features from the image information when the first similarity is less than a second threshold, and calculate the second reference feature in the first candidate record and the clothing feature The second degree of similarity between;
  • the correction module is adapted to correct the second similarity based on the first similarity to obtain the corrected similarity
  • the target confirmation module is adapted to use the first candidate record with the highest correction similarity as the target candidate record
  • the recognition module is adapted to output the object identifier contained in the target candidate record as the recognition result of the image information.
  • this application also proposes a computer device, the computer device including a memory, a processor, and an image recognition program based on feature extraction that is stored on the memory and can run on the processor, When the processor executes the image recognition program based on feature extraction, the following steps are implemented:
  • facial features can be extracted from the image information, extract the facial features, and obtain a first candidate record from a recognition database based on the facial features, where the first candidate record contains facial reference features, Clothing reference features and object identifiers, where the first degree of similarity between the facial reference features in the first candidate record and the facial features is greater than a first threshold;
  • the first similarity is less than the second threshold, extracting clothing features from the image information, and calculating the second similarity between the clothing reference feature in the first candidate record and the clothing feature; Wherein the second threshold is greater than the first threshold;
  • the object identifier contained in the target candidate record is output as the recognition result of the image information.
  • this application also proposes a computer-readable storage medium that stores an image recognition program based on feature extraction.
  • the image recognition program based on feature extraction is executed by a processor, the following is achieved: step:
  • facial features can be extracted from the image information, extract the facial features, and obtain a first candidate record from a recognition database based on the facial features, where the first candidate record contains facial reference features, Clothing reference features and object identifiers, where the first degree of similarity between the facial reference features in the first candidate record and the facial features is greater than a first threshold;
  • the first similarity is less than the second threshold, extracting clothing features from the image information, and calculating the second similarity between the clothing reference feature in the first candidate record and the clothing feature; Wherein the second threshold is greater than the first threshold;
  • the object identifier contained in the target candidate record is output as the recognition result of the image information.
  • the image recognition method, device, computer equipment, and computer-readable storage medium based on feature extraction provided in this application can accurately and quickly recognize tasks in a monitoring screen.
  • this application adds a facial feature recognition step. For images that can obtain facial features, priority is given to facial recognition, and the clothing recognition similarity is corrected according to the similarity of facial recognition. At the same time, facial features and clothing features are combined for recognition, making the recognition results more accurate and complete.
  • this application can adjust the clothing feature model in the recognition library in real time according to the recognition results of the video images, and fully consider the increase, decrease, and change of clothes in different areas or different time periods, so that the recognition results of this application are more intelligent and humane. .
  • FIG. 1 is a flowchart of Embodiment 1 of the image recognition method of this application.
  • FIG. 2 is a schematic diagram of program modules of Embodiment 1 of the image recognition device of this application;
  • Embodiment 3 is a schematic diagram of the hardware structure of Embodiment 1 of the image recognition device of this application;
  • FIG. 5 is a flowchart of Embodiment 3 of the image recognition method of this application.
  • the image recognition method, device, computer equipment, and computer-readable storage medium based on feature extraction provided in this application can accurately and quickly recognize tasks in a monitoring screen.
  • this application adds a facial feature recognition step. For images that can obtain facial features, priority is given to facial recognition, and the clothing recognition similarity is corrected according to the similarity of facial recognition. At the same time, facial features and clothing features are combined for recognition, making the recognition results more accurate and complete.
  • this application can adjust the clothing feature model in the recognition library in real time according to the recognition results of the video images, and fully consider the increase, decrease, and change of clothes in different areas or different time periods, so that the recognition results of this application are more intelligent and humane. .
  • the identity information can include ID number, name, etc.
  • the image information includes facial feature information and clothing feature information.
  • the front desk staff will store the visitor’s identity information and image information as a feature record in the recognition library, which will be used as a reference for later image recognition.
  • the feature record contains (identity information, facial feature information, clothing feature information) Three-element array.
  • this embodiment proposes an image recognition method based on feature extraction, which specifically includes the following steps:
  • the image recognition instruction in this application can be triggered automatically or manually. In the case of automatic triggering, it can be triggered based on time or conditions. For example, set to automatically collect an image every minute and identify the person in the image, or set to collect an image every time the optical sensor is blocked. Recognize people in images, etc.
  • This embodiment corresponds to the situation in which facial features can be obtained from the collected image information. Generally speaking, at this time, the visitor is relatively close to the monitoring device and there is no obstruction in the middle.
  • this application compares the extracted facial features with the feature records pre-stored in the recognition library, and obtains the first candidate record whose facial feature similarity is greater than the first threshold from the pre-stored feature records .
  • the first threshold in this application can be flexibly set according to needs, such as 60%, 70%, and so on.
  • the identification database of this application stores a three-element array containing (identity information, facial feature information, and clothing feature information), and each three-element array corresponds to a feature record.
  • the process of comparing the extracted facial features with the feature records pre-stored in the recognition library is to obtain the corresponding facial feature information from the feature records of the recognition library, and then compare the extracted facial features with those obtained in the recognition library.
  • the facial feature information is compared, and the first similarity x1 between the two is calculated. If the first similarity is greater than the preset first threshold, the feature record is taken as the first candidate record.
  • step S2 After one or more first candidate records have been obtained in step S2, this step is used to calculate the second difference between the clothing feature extracted from the image information and the clothing feature information stored in the first candidate record. Similarity.
  • TH is the first threshold
  • is the control coefficient
  • the present application actually corrects the second similarity x2 in a forward or reverse direction according to the relationship between the first similarity x1 and the first threshold TH.
  • the corresponding correction value ⁇ is greater than 1, and the correction to the second similarity x2 is positive;
  • the first similarity x1 is less than the first threshold TH,
  • the corresponding correction value ⁇ is less than 1, and the correction of the second degree of similarity x2 is reversed.
  • the first candidate record with the largest corrected similarity S obtained by calculation is taken as the final selected target candidate record.
  • the corresponding identity information is obtained from the target candidate record, and the identity information is output as the final recognition result of the image information obtained in step S1. For example, if the identity information stored in the target candidate record is "Li San, 1980xxxxxxxx", the output recognition result is "Name: Li San; ID number: 1980xxxxxxxx”.
  • S7 Determine whether the sharpness of the image information is greater than a third threshold; if so, replace the clothing reference feature in the target candidate record with the clothing feature extracted from the image information.
  • This step is used to select high-quality image information of the object to be recognized, and replace the pre-stored clothing feature information in the target candidate record with the clothing feature in the image information.
  • the image information of the object to be identified in this application is the latest collected information, the clothing features in the image information are more real-time, and the clothing features in the image information of the object to be identified are replaced by the pre-stored in the target candidate record.
  • This application can respond to visitor changes or changes in clothing in a timely manner, thereby improving the accuracy of image recognition and making the image recognition process more intelligent.
  • the image recognition device 10 may include or be divided into one or more program modules, and one or more program modules are stored. It is stored in a storage medium and executed by one or more processors to complete the application and realize the above-mentioned image recognition method.
  • the program module referred to in the present application refers to a series of computer program instruction segments capable of completing specific functions, and is more suitable for describing the execution process of the image recognition device 10 in the storage medium than the program itself. The following description will specifically introduce the functions of each program module in this embodiment:
  • the image acquisition module 11 is adapted to acquire image information of the object to be identified in response to an image recognition instruction
  • the first comparison module 12 is adapted to extract the facial features when the facial features can be extracted from the image information, and obtain the first candidate record from the recognition database based on the facial features, wherein the first candidate record
  • the candidate record contains a face reference feature, a clothing reference feature, and an object identifier, and the first similarity between the face reference feature in the first candidate record and the facial feature is greater than a first threshold;
  • the second comparison module 13 is adapted to extract clothing features from the image information when the first similarity is less than the second threshold, and calculate the relationship between the clothing reference feature in the first candidate record and the clothing feature The second degree of similarity of, wherein the second threshold is greater than the first threshold;
  • the correction module 14 is adapted to correct the second similarity based on the first similarity to obtain the corrected similarity
  • the target confirmation module 15 is adapted to use the first candidate record with the highest correction similarity as the target candidate record;
  • the recognition module 16 is adapted to output the object identifier contained in the target candidate record as the recognition result of the image information
  • the update module 17 is adapted to determine whether the sharpness of the image information is greater than a third threshold, and if so, replace the clothing reference feature in the first candidate record with the clothing feature extracted from the image information.
  • the correction module 14 includes:
  • the correction value unit 141 is adapted to calculate the correction value ⁇ based on the first degree of similarity, and the calculation formula of the correction value ⁇ is:
  • TH is the first threshold
  • is the control coefficient
  • x1 is the first degree of similarity
  • the correction similarity unit 142 is adapted to multiply the second similarity by the correction value to obtain the corrected similarity S:
  • x2 is the second degree of similarity.
  • This embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a cabinet server (including independent servers, or A server cluster composed of multiple servers) and so on.
  • the computer device 20 in this embodiment at least includes but is not limited to: a memory 21 and a processor 22 that can be communicatively connected to each other through a system bus, as shown in FIG. 3. It should be pointed out that FIG. 3 only shows the computer device 20 with components 21-22, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
  • the memory 21 (ie, readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), Read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, etc.
  • the memory 21 may be an internal storage unit of the computer device 20, such as a hard disk or a memory of the computer device 20.
  • the memory 21 may also be an external storage device of the computer device 20, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (Secure Digital, SMC) equipped on the computer device 20. SD) card, flash card (Flash Card), etc.
  • the memory 21 may also include both an internal storage unit of the computer device 20 and an external storage device thereof.
  • the memory 21 is generally used to store an operating system and various application software installed in the computer device 20, such as the program code of the image recognition device 10 in the first embodiment, and so on.
  • the memory 21 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 22 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips.
  • the processor 22 is generally used to control the overall operation of the computer device 20.
  • the processor 22 is used to run the program code or process data stored in the memory 21, for example, to run the image recognition device 10, so as to implement the image recognition method of the first embodiment.
  • this embodiment is suitable for situations where facial feature recognition is sufficiently certain.
  • this embodiment proposes an image recognition method based on feature extraction, which specifically includes the following steps:
  • S220 Extract facial features from the image information, and obtain a first candidate record from a recognition database based on the facial features; wherein the first candidate record contains a facial reference feature, a clothing reference feature, and an object identifier.
  • the first similarity between the facial reference feature in a candidate record and the facial feature is greater than the first threshold.
  • the first candidate record in this application may be a three-element array containing (identity information, facial feature information, clothing feature information).
  • S230 Determine whether the first similarity is greater than a second threshold, where the second threshold is higher than the first threshold; if so, use the first candidate record with the highest first similarity as a target candidate record.
  • the first degree of similarity obtained by comparing facial features is sufficiently large, for example, more than 95%, then we are confident enough to be sure that the identity information of the object to be recognized can be determined only through facial feature recognition. Therefore, At this time, the first candidate record corresponding to the sufficiently large similarity can be directly used as the target candidate record.
  • S240 Output the object identifier contained in the target candidate record as the recognition result of the image information.
  • this embodiment is suitable for situations where facial features cannot be obtained due to reasons such as a relatively long shooting distance, too low shooting pixels, or occlusion between the monitoring device and the object to be identified.
  • this embodiment proposes an image recognition method based on feature extraction, which specifically includes the following steps:
  • S310 In response to the image recognition instruction, obtain image information of the object to be recognized.
  • S320 In the case that facial features cannot be extracted from the image information, extract clothing features from the image information, and obtain a second candidate record from the recognition database based on the clothing features, and the second candidate record is The second degree of similarity between the clothing reference feature and the clothing feature is greater than the fourth threshold.
  • the process of obtaining the second candidate record from the recognition database based on the second feature includes:
  • the clothing feature extracted from the image information is compared with each clothing feature information stored in the recognition database for the second similarity.
  • the candidate record corresponding to the first similarity is taken as The second candidate record.
  • the fourth threshold in this application can be flexibly set according to actual needs, for example, set to 80%, 90%, and so on.
  • this application uses the second candidate record with the highest second similarity as the target candidate record.
  • the recognition result is not unique, but a plurality of different recognition results can be provided for reference. At this time, it is possible to sort from high to low according to the data of the second similarity, and use the top second candidate records as the target candidate records.
  • S340 Output the object identifier contained in the target candidate record as the recognition result of the image information.
  • the embodiment also provides a computer-readable storage medium.
  • the computer-readable storage medium may be non-volatile or volatile, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic Memory, magnetic disks, optical disks, servers, App application malls, etc., have computer programs stored thereon, and corresponding functions are realized when the programs are executed by the processor.
  • the computer-readable storage medium of this embodiment is used to store the image recognition device 10, and when executed by a processor, it implements the image recognition method of the first embodiment.

Abstract

The present application relates to computer vision processing in artificial intelligence, and provides a feature extraction-based image recognition method, comprising the following steps: in response to an image recognition instruction, obtaining image information of an object to be recognized; extracting a first feature from the image information, and obtaining a first candidate record from a recognition library on the basis of the first feature, wherein the first candidate record comprises a first reference feature, a second reference feature, and an object identifier, and a first similarity between the first reference feature in the first candidate record and the first feature is greater than a first threshold; extracting a second feature from the image information, and calculating a second similarity between the second reference feature in the first candidate record and the second feature; correcting the second similarity on the basis of the first similarity to obtain a corrected similarity; taking the first candidate record having the highest corrected similarity as a target candidate record; and taking the object identifier comprised in the target candidate record as the recognition result of the image information and outputting the recognition result.

Description

基于特征提取的图像识别方法及图像识别装置Image recognition method and image recognition device based on feature extraction
相关申请的交叉引用Cross-references to related applications
本申请申明享有2020年03月04日递交的申请号为202010142297.0、名称为“基于特征提取的图像识别方法及图像识别装置”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。This application affirms that it enjoys the priority of the Chinese patent application with the application number 202010142297.0 and the title "Image recognition method and image recognition device based on feature extraction" filed on March 4, 2020. The entire content of the Chinese patent application is by reference The method is incorporated in this application.
技术领域Technical field
本申请涉及人工智能中的图像识别技术领域,特别涉及一种基于特征提取的图像识别方法、装置、计算机设备及计算机存储介质。This application relates to the field of image recognition technology in artificial intelligence, and in particular to an image recognition method, device, computer equipment, and computer storage medium based on feature extraction.
背景技术Background technique
视频监控在社会生产生活中占有越来越重要的地位,随着人们安全性需求的不断提高,对于从视频监控画面中准确识别目标行人也提出了更高的要求。发明人发现,行人本身具有多种外在表征,如样貌、体型、衣着、携带物等,这些表征都可以作为识别特征来辅助进行行人识别。由于视频中的行人大部分时间难以获得鲁棒性强的面部特征,在传统的行人重识别方法中,大多采用行人的衣着为重识别的外在表征。但是在实际应用中,由于行人衣着会不断变化,如增减衣物以及经常出现建筑物或其它行人遮挡等情况,加上不同摄像头的可能存在的色差,都会显著影响基于衣着表征的行人识别的准确性和查全率。因此,如何提供一种准确、全面的行人识别方案,成为本领域技术人员亟待解决的技术问题。Video surveillance occupies an increasingly important position in social production and life. With the continuous improvement of people's safety requirements, higher requirements are also put forward for accurately identifying target pedestrians from video surveillance pictures. The inventor found that pedestrians themselves have a variety of external characteristics, such as appearance, body shape, clothing, carrying things, etc., and these characteristics can be used as identification features to assist pedestrian identification. Since it is difficult for the pedestrians in the video to obtain robust facial features most of the time, in the traditional pedestrian re-identification methods, most of the pedestrians’ clothing is used as the external representation of the re-recognition. However, in practical applications, the clothing of pedestrians will continue to change, such as adding or removing clothing, and frequent occlusions by buildings or other pedestrians, plus the possible color difference of different cameras, will significantly affect the accuracy of pedestrian recognition based on clothing representations. Sex and recall. Therefore, how to provide an accurate and comprehensive pedestrian recognition solution has become an urgent technical problem to be solved by those skilled in the art.
发明内容Summary of the invention
本申请的目的是提供一种能够准确快速识别图像中人物的图像识别方法、装置、计算机设备及计算机存储介质,以解决现有技术中存在的上述缺陷。The purpose of this application is to provide an image recognition method, device, computer equipment, and computer storage medium that can accurately and quickly recognize a person in an image, so as to solve the above-mentioned defects in the prior art.
为实现上述目的,本申请提供一种基于特征提取的图像识别方法,包括以下步骤:To achieve the above objective, this application provides an image recognition method based on feature extraction, which includes the following steps:
响应于图像识别指令,获取待识别对象的图像信息;In response to the image recognition instruction, obtain the image information of the object to be recognized;
在能够从所述图像信息中提取到面部特征的情况下,提取所述面部特征,基于所述面部特征从识别库中获取第一候选记录,其中所述第一候选记录中包含面部参照特征、衣着参照特征和对象标识,所述第一候选记录中的面部参照特征与所述面部特征之间的第一相似度大于第一阈值;If facial features can be extracted from the image information, extract the facial features, and obtain a first candidate record from a recognition database based on the facial features, where the first candidate record contains facial reference features, Clothing reference features and object identifiers, where the first degree of similarity between the facial reference features in the first candidate record and the facial features is greater than a first threshold;
在所述第一相似度小于第二阈值的情况下,从所述图像信息中提取衣着特征,计算所述第一候选记录中的衣着参照特征与所述衣着特征之间的第二相似度;其中所述第二阈值大于所述第一阈值;In the case that the first similarity is less than the second threshold, extracting clothing features from the image information, and calculating the second similarity between the clothing reference feature in the first candidate record and the clothing feature; Wherein the second threshold is greater than the first threshold;
基于所述第一相似度,对所述第二相似度进行修正,得到修正相似度;Correcting the second similarity based on the first similarity to obtain a corrected similarity;
将修正相似度最高的所述第一候选记录作为目标候选记录;Taking the first candidate record with the highest correction similarity as the target candidate record;
将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The object identifier contained in the target candidate record is output as the recognition result of the image information.
此外,为实现上述目的,本申请还提出一种基于特征提取的图像识别装置,所述基于特征提取的图像识别装置包括:In addition, in order to achieve the above object, this application also proposes an image recognition device based on feature extraction, and the image recognition device based on feature extraction includes:
图像获取模块,适用于响应于图像识别指令,获取待识别对象的图像信息;The image acquisition module is adapted to acquire image information of the object to be identified in response to an image recognition instruction;
第一对比模块,适用于在能够从所述图像信息中提取到面部特征的情况下,从所述图像信息中提取面部特征,基于所述面部特征从识别库中获取第一候选记录,其中所述第一候选记录中包含面部参照特征、衣着参照特征和对象标识,所述第一候选记录中的面部参照特征与所述面部特征之间的第一相似度大于第一阈值;The first comparison module is suitable for extracting facial features from the image information when facial features can be extracted from the image information, and obtaining the first candidate record from the recognition database based on the facial features, wherein The first candidate record includes a face reference feature, a clothing reference feature, and an object identifier, and the first similarity between the face reference feature in the first candidate record and the facial feature is greater than a first threshold;
第二对比模块,适用于在所述第一相似度小于第二阈值的情况下,从所述图像信息中提取衣着特征,计算所述第一候选记录中的第二参照特征与所述衣着特征之间的第二相似度;The second comparison module is adapted to extract clothing features from the image information when the first similarity is less than a second threshold, and calculate the second reference feature in the first candidate record and the clothing feature The second degree of similarity between;
修正模块,适用于基于所述第一相似度,对所述第二相似度进行修正,得到修正相似 度;The correction module is adapted to correct the second similarity based on the first similarity to obtain the corrected similarity;
目标确认模块,适用于将修正相似度最高的所述第一候选记录作为目标候选记录;The target confirmation module is adapted to use the first candidate record with the highest correction similarity as the target candidate record;
识别模块,适用于将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The recognition module is adapted to output the object identifier contained in the target candidate record as the recognition result of the image information.
此外,为实现上述目的,本申请还提出一种计算机设备,所述计算机设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的基于特征提取的图像识别程序,所述处理器执行所述基于特征提取的图像识别程序时实现以下步骤:In addition, in order to achieve the above object, this application also proposes a computer device, the computer device including a memory, a processor, and an image recognition program based on feature extraction that is stored on the memory and can run on the processor, When the processor executes the image recognition program based on feature extraction, the following steps are implemented:
响应于图像识别指令,获取待识别对象的图像信息;In response to the image recognition instruction, obtain the image information of the object to be recognized;
在能够从所述图像信息中提取到面部特征的情况下,提取所述面部特征,基于所述面部特征从识别库中获取第一候选记录,其中所述第一候选记录中包含面部参照特征、衣着参照特征和对象标识,所述第一候选记录中的面部参照特征与所述面部特征之间的第一相似度大于第一阈值;If facial features can be extracted from the image information, extract the facial features, and obtain a first candidate record from a recognition database based on the facial features, where the first candidate record contains facial reference features, Clothing reference features and object identifiers, where the first degree of similarity between the facial reference features in the first candidate record and the facial features is greater than a first threshold;
在所述第一相似度小于第二阈值的情况下,从所述图像信息中提取衣着特征,计算所述第一候选记录中的衣着参照特征与所述衣着特征之间的第二相似度;其中所述第二阈值大于所述第一阈值;In the case that the first similarity is less than the second threshold, extracting clothing features from the image information, and calculating the second similarity between the clothing reference feature in the first candidate record and the clothing feature; Wherein the second threshold is greater than the first threshold;
基于所述第一相似度,对所述第二相似度进行修正,得到修正相似度;Correcting the second similarity based on the first similarity to obtain a corrected similarity;
将修正相似度最高的所述第一候选记录作为目标候选记录;Taking the first candidate record with the highest correction similarity as the target candidate record;
将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The object identifier contained in the target candidate record is output as the recognition result of the image information.
此外,为实现上述目的,本申请还提出一种计算机可读存储介质,所述存储介质上存储有基于特征提取的图像识别程序,所述基于特征提取的图像识别程序被处理器执行时实现以下步骤:In addition, in order to achieve the above-mentioned object, this application also proposes a computer-readable storage medium that stores an image recognition program based on feature extraction. When the image recognition program based on feature extraction is executed by a processor, the following is achieved: step:
响应于图像识别指令,获取待识别对象的图像信息;In response to the image recognition instruction, obtain the image information of the object to be recognized;
在能够从所述图像信息中提取到面部特征的情况下,提取所述面部特征,基于所述面部特征从识别库中获取第一候选记录,其中所述第一候选记录中包含面部参照特征、衣着参照特征和对象标识,所述第一候选记录中的面部参照特征与所述面部特征之间的第一相似度大于第一阈值;If facial features can be extracted from the image information, extract the facial features, and obtain a first candidate record from a recognition database based on the facial features, where the first candidate record contains facial reference features, Clothing reference features and object identifiers, where the first degree of similarity between the facial reference features in the first candidate record and the facial features is greater than a first threshold;
在所述第一相似度小于第二阈值的情况下,从所述图像信息中提取衣着特征,计算所述第一候选记录中的衣着参照特征与所述衣着特征之间的第二相似度;其中所述第二阈值大于所述第一阈值;In the case that the first similarity is less than the second threshold, extracting clothing features from the image information, and calculating the second similarity between the clothing reference feature in the first candidate record and the clothing feature; Wherein the second threshold is greater than the first threshold;
基于所述第一相似度,对所述第二相似度进行修正,得到修正相似度;Correcting the second similarity based on the first similarity to obtain a corrected similarity;
将修正相似度最高的所述第一候选记录作为目标候选记录;Taking the first candidate record with the highest correction similarity as the target candidate record;
将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The object identifier contained in the target candidate record is output as the recognition result of the image information.
本申请提供的基于特征提取的图像识别方法、装置、计算机设备及计算机可读存储介质,能够对监控画面中的任务进行准确快速地识别。在传统基于衣着特征识别的基础上,本申请增加了面部特征识别步骤、对于能够获取到面部特征的图像,优先进行面部识别,并根据面部识别的相似度对衣着识别相似度进行修正,从而能够同时结合面部特征和衣着特征进行识别,使得识别结果更加准确完善。并且本申请能够根据视频画面的识别结果实时调整识别库中的衣着特征模型,充分考虑行人在不同区域或者不同时间段增减、变换衣物的情况,使得本申请的识别结果更加智能化和人性化。The image recognition method, device, computer equipment, and computer-readable storage medium based on feature extraction provided in this application can accurately and quickly recognize tasks in a monitoring screen. On the basis of traditional clothing feature recognition, this application adds a facial feature recognition step. For images that can obtain facial features, priority is given to facial recognition, and the clothing recognition similarity is corrected according to the similarity of facial recognition. At the same time, facial features and clothing features are combined for recognition, making the recognition results more accurate and complete. In addition, this application can adjust the clothing feature model in the recognition library in real time according to the recognition results of the video images, and fully consider the increase, decrease, and change of clothes in different areas or different time periods, so that the recognition results of this application are more intelligent and humane. .
附图说明Description of the drawings
图1为本申请的图像识别方法实施例一的流程图;FIG. 1 is a flowchart of Embodiment 1 of the image recognition method of this application;
图2为本申请的图像识别装置实施例一的程序模块示意图;2 is a schematic diagram of program modules of Embodiment 1 of the image recognition device of this application;
图3为本申请的图像识别装置实施例一的硬件结构示意图;3 is a schematic diagram of the hardware structure of Embodiment 1 of the image recognition device of this application;
图4为本申请的图像识别方法实施例二的流程图;4 is a flowchart of Embodiment 2 of the image recognition method of this application;
图5为本申请的图像识别方法实施例三的流程图。FIG. 5 is a flowchart of Embodiment 3 of the image recognition method of this application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions, and advantages of this application clearer and clearer, the following further describes the application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the application, and are not used to limit the application. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请提供的基于特征提取的图像识别方法、装置、计算机设备及计算机可读存储介质,能够对监控画面中的任务进行准确快速地识别。在传统基于衣着特征识别的基础上,本申请增加了面部特征识别步骤、对于能够获取到面部特征的图像,优先进行面部识别,并根据面部识别的相似度对衣着识别相似度进行修正,从而能够同时结合面部特征和衣着特征进行识别,使得识别结果更加准确完善。并且本申请能够根据视频画面的识别结果实时调整识别库中的衣着特征模型,充分考虑行人在不同区域或者不同时间段增减、变换衣物的情况,使得本申请的识别结果更加智能化和人性化。The image recognition method, device, computer equipment, and computer-readable storage medium based on feature extraction provided in this application can accurately and quickly recognize tasks in a monitoring screen. On the basis of traditional clothing feature recognition, this application adds a facial feature recognition step. For images that can obtain facial features, priority is given to facial recognition, and the clothing recognition similarity is corrected according to the similarity of facial recognition. At the same time, facial features and clothing features are combined for recognition, making the recognition results more accurate and complete. In addition, this application can adjust the clothing feature model in the recognition library in real time according to the recognition results of the video images, and fully consider the increase, decrease, and change of clothes in different areas or different time periods, so that the recognition results of this application are more intelligent and humane. .
实施例一Example one
本申请应用场景之一为写字楼中的访客管理。当某访客造访写字楼时,需要首先在前台进行登记,并留存身份信息和影像信息。其中身份信息可以包含身份证号,姓名等,影像信息包含面部特征信息和衣着特征信息。前台工作人员会将该访客的身份信息和影像信息作为一条特征记录存储到识别库中,作为后期进行图像识别的参照,例如该特征记录是包含(身份信息,面部特征信息,衣着特征信息)的三元数组。当访客进入写字楼内部之后,其图像信息会被设置在写字楼不同位置处的视频(图像)监控设备所采集。当写字楼中的访客较多时,本申请可以根据监控设备采集到的不同图像信息确定图像中的人物身份,从而掌握访客的动态位置。One of the application scenarios of this application is visitor management in office buildings. When a visitor visits an office building, he needs to register at the front desk first and keep his identity information and image information. The identity information can include ID number, name, etc., and the image information includes facial feature information and clothing feature information. The front desk staff will store the visitor’s identity information and image information as a feature record in the recognition library, which will be used as a reference for later image recognition. For example, the feature record contains (identity information, facial feature information, clothing feature information) Three-element array. When visitors enter the office building, their image information will be collected by video (image) monitoring equipment set up at different locations in the office building. When there are many visitors in the office building, this application can determine the identity of the person in the image according to the different image information collected by the monitoring equipment, so as to grasp the dynamic location of the visitor.
请参阅图1,本实施例提出一种基于特征提取的图像识别方法,具体包括以下步骤:Referring to FIG. 1, this embodiment proposes an image recognition method based on feature extraction, which specifically includes the following steps:
S1:响应于图像识别指令,获取待识别对象的图像信息。S1: In response to the image recognition instruction, obtain image information of the object to be recognized.
本申请中的图像识别指令可以自动触发,也可以是手动触发。对于自动触发的情况,可以是根据时间定时触发,也可以是根据条件触发,例如,设置每隔一分钟自动采集一次图像并识别图像中的人物,或者设置每当光学传感器被遮挡时采集图像并识别图像中的人物,等等。The image recognition instruction in this application can be triggered automatically or manually. In the case of automatic triggering, it can be triggered based on time or conditions. For example, set to automatically collect an image every minute and identify the person in the image, or set to collect an image every time the optical sensor is blocked. Recognize people in images, etc.
S2:在能够从所述图像信息中提取到面部特征的情况下,提取所述面部特征,基于所述第一特征从识别库中获取第一候选记录,其中所述第一候选记录中包含面部参照特征、衣着参照特征和对象标识,所述第一候选记录中的面部参照特征与所述面部特征之间的第一相似度大于第一阈值。S2: In the case where facial features can be extracted from the image information, extract the facial features, and obtain a first candidate record from a recognition database based on the first feature, where the first candidate record contains a face With reference to the reference feature, the clothing reference feature, and the object identifier, the first degree of similarity between the facial reference feature in the first candidate record and the facial feature is greater than a first threshold.
本实施例对应可以从采集的图像信息中获取到面部特征的情况,一般来说此时访客距离监控设备较近且中间没有遮挡。This embodiment corresponds to the situation in which facial features can be obtained from the collected image information. Generally speaking, at this time, the visitor is relatively close to the monitoring device and there is no obstruction in the middle.
当从图像信息中提取到面部特征之后,本申请将提取到的面部特征与识别库中预存的特征记录进行对比,从预存的特征记录中获取面部特征相似度大于第一阈值的第一候选记录。本申请中的第一阈值可以根据需要灵活设置,例如60%,70%等等。After the facial features are extracted from the image information, this application compares the extracted facial features with the feature records pre-stored in the recognition library, and obtains the first candidate record whose facial feature similarity is greater than the first threshold from the pre-stored feature records . The first threshold in this application can be flexibly set according to needs, such as 60%, 70%, and so on.
根据前文中的描述,本申请的识别库中存储的是包含(身份信息,面部特征信息,衣着特征信息)的三元数组,每一个三元数组对应一条特征记录。According to the foregoing description, the identification database of this application stores a three-element array containing (identity information, facial feature information, and clothing feature information), and each three-element array corresponds to a feature record.
因此本申请将提取到的面部特征与识别库中预存的特征记录进行对比的过程为,从识别库的特征记录中获取对应的面部特征信息,然后将提取到的面部特征与识别库中获取的面部特征信息进行对比,计算两者之间的第一相似度x1。若第一相似度大于预设的第一阈值,则将所述特征记录作为第一候选记录。本领域普通技术人员理解,该第一候选记录可以是一条或者多条。Therefore, in this application, the process of comparing the extracted facial features with the feature records pre-stored in the recognition library is to obtain the corresponding facial feature information from the feature records of the recognition library, and then compare the extracted facial features with those obtained in the recognition library. The facial feature information is compared, and the first similarity x1 between the two is calculated. If the first similarity is greater than the preset first threshold, the feature record is taken as the first candidate record. Those of ordinary skill in the art understand that there may be one or more first candidate records.
S3:在所述第一相似度小于第二阈值的情况下,从所述图像信息中提取衣着特征,计 算所述第一候选记录中的衣着参照特征与所述衣着特征之间的第二相似度x2。其中所述第二阈值大于所述第一阈值。S3: When the first similarity is less than the second threshold, extract clothing features from the image information, and calculate the second similarity between the clothing reference feature in the first candidate record and the clothing feature Degree x2. Wherein the second threshold is greater than the first threshold.
在步骤S2已经获取到一条或多条第一候选记录的基础上,本步骤用于计算从图像信息中提取到的衣着特征和所述第一候选记录中存储的衣着特征信息之间的第二相似度。After one or more first candidate records have been obtained in step S2, this step is used to calculate the second difference between the clothing feature extracted from the image information and the clothing feature information stored in the first candidate record. Similarity.
S4:基于所述第一相似度x1,对所述第二相似度x2进行修正,得到修正相似度S。S4: Based on the first similarity x1, the second similarity x2 is corrected to obtain the corrected similarity S.
本申请计算修正相似度S的步骤如下所示:The steps for calculating the revised similarity S in this application are as follows:
S41:基于所述第一相似度x1计算修正值λ,所述修正值λ的计算公式为:S41: Calculate the correction value λ based on the first degree of similarity x1, and the calculation formula of the correction value λ is:
Figure PCTCN2020112404-appb-000001
Figure PCTCN2020112404-appb-000001
上式中TH为所述第一阈值,α为控制系数;In the above formula, TH is the first threshold, and α is the control coefficient;
S42:用所述第二相似度x2乘以所述修正值λ,得到所述修正相似度S:S42: Multiply the second similarity x2 by the correction value λ to obtain the correction similarity S:
S=λx 2S=λx 2 .
通过上述计算式可知,本申请实际上是根据第一相似度x1与第一阈值TH之间的关系来对第二相似度x2进行正向或者反向的修正。总体来说,当第一相似度x1大于第一阈值TH时,相应的修正值λ大于1,对第二相似度x2的修正是正向的;当第一相似度x1小于第一阈值TH时,相应的修正值λ小于1,对第二相似度x2的修正是反向的。It can be seen from the above calculation formula that the present application actually corrects the second similarity x2 in a forward or reverse direction according to the relationship between the first similarity x1 and the first threshold TH. Generally speaking, when the first similarity x1 is greater than the first threshold TH, the corresponding correction value λ is greater than 1, and the correction to the second similarity x2 is positive; when the first similarity x1 is less than the first threshold TH, The corresponding correction value λ is less than 1, and the correction of the second degree of similarity x2 is reversed.
S5:将修正相似度最高的所述第一候选记录作为目标候选记录。S5: Use the first candidate record with the highest correction similarity as the target candidate record.
本步骤中,将计算得到的修正相似度S最大的第一候选记录作为最终选定的目标候选记录。In this step, the first candidate record with the largest corrected similarity S obtained by calculation is taken as the final selected target candidate record.
S6:将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。S6: Output the object identifier contained in the target candidate record as the recognition result of the image information.
本步骤从目标候选记录中获取对应的身份信息,将该身份信息作为步骤S1中获取的图像信息的最终识别结果进行输出。例如,目标候选记录中存储的身份信息为“李三,1980xxxxxxxx”,则输出识别结果为“姓名:李三;身份证号:1980xxxxxxxx”。In this step, the corresponding identity information is obtained from the target candidate record, and the identity information is output as the final recognition result of the image information obtained in step S1. For example, if the identity information stored in the target candidate record is "Li San, 1980xxxxxxxx", the output recognition result is "Name: Li San; ID number: 1980xxxxxxxx".
S7:判断所述图像信息的清晰度是否大于第三阈值;若是,用所述图像信息中提取的所述衣着特征替换所述目标候选记录中的所述衣着参照特征。S7: Determine whether the sharpness of the image information is greater than a third threshold; if so, replace the clothing reference feature in the target candidate record with the clothing feature extracted from the image information.
本步骤用于挑选出质量较高的待识别对象的图像信息,并用所述图像信息中的衣着特征替换目标候选记录中预先存储的衣着特征信息。This step is used to select high-quality image information of the object to be recognized, and replace the pre-stored clothing feature information in the target candidate record with the clothing feature in the image information.
由于本申请中待识别对象的图像信息是最新采集到的信息,因此该图像信息中的衣着特征更加具有实时性,通过用待识别对象的图像信息中的衣着特征来替换目标候选记录中预先存储的衣着特征信息,本申请可以及时应对访客增减或者改变衣着的情形,从而提高图像识别的准确率,使得图像识别过程更加智能化。Since the image information of the object to be identified in this application is the latest collected information, the clothing features in the image information are more real-time, and the clothing features in the image information of the object to be identified are replaced by the pre-stored in the target candidate record. This application can respond to visitor changes or changes in clothing in a timely manner, thereby improving the accuracy of image recognition and making the image recognition process more intelligent.
请继续参阅图2,示出了一种基于特征提取的图像识别装置,在本实施例中,图像识别装置10可以包括或被分割成一个或多个程序模块,一个或者多个程序模块被存储于存储介质中,并由一个或多个处理器所执行,以完成本申请,并可实现上述图像识别方法。本申请所称的程序模块是指能够完成特定功能的一系列计算机程序指令段,比程序本身更适合于描述图像识别装置10在存储介质中的执行过程。以下描述将具体介绍本实施例各程序模块的功能:Please continue to refer to FIG. 2, which shows an image recognition device based on feature extraction. In this embodiment, the image recognition device 10 may include or be divided into one or more program modules, and one or more program modules are stored. It is stored in a storage medium and executed by one or more processors to complete the application and realize the above-mentioned image recognition method. The program module referred to in the present application refers to a series of computer program instruction segments capable of completing specific functions, and is more suitable for describing the execution process of the image recognition device 10 in the storage medium than the program itself. The following description will specifically introduce the functions of each program module in this embodiment:
图像获取模块11,适用于响应于图像识别指令,获取待识别对象的图像信息;The image acquisition module 11 is adapted to acquire image information of the object to be identified in response to an image recognition instruction;
第一对比模块12,适用于在能够从所述图像信息中提取到面部特征的情况下,提取所述面部特征,基于所述面部特征从识别库中获取第一候选记录,其中所述第一候选记录中包含面部参照特征、衣着参照特征和对象标识,所述第一候选记录中的面部参照特征与所述面部特征之间的第一相似度大于第一阈值;The first comparison module 12 is adapted to extract the facial features when the facial features can be extracted from the image information, and obtain the first candidate record from the recognition database based on the facial features, wherein the first candidate record The candidate record contains a face reference feature, a clothing reference feature, and an object identifier, and the first similarity between the face reference feature in the first candidate record and the facial feature is greater than a first threshold;
第二对比模块13,适用于在第一相似度小于第二阈值的情况下,从所述图像信息中提取衣着特征,计算所述第一候选记录中的衣着参照特征与所述衣着特征之间的第二相似度,其中所述第二阈值大于所述第一阈值;The second comparison module 13 is adapted to extract clothing features from the image information when the first similarity is less than the second threshold, and calculate the relationship between the clothing reference feature in the first candidate record and the clothing feature The second degree of similarity of, wherein the second threshold is greater than the first threshold;
修正模块14,适用于基于所述第一相似度,对所述第二相似度进行修正,得到修正相 似度;The correction module 14 is adapted to correct the second similarity based on the first similarity to obtain the corrected similarity;
目标确认模块15,适用于将修正相似度最高的所述第一候选记录作为目标候选记录;The target confirmation module 15 is adapted to use the first candidate record with the highest correction similarity as the target candidate record;
识别模块16,适用于将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出;The recognition module 16 is adapted to output the object identifier contained in the target candidate record as the recognition result of the image information;
更新模块17,适用于判断所述图像信息的清晰度是否大于第三阈值,若是,用所述图像信息中提取的所述衣着特征替换所述第一候选记录中的所述衣着参照特征。The update module 17 is adapted to determine whether the sharpness of the image information is greater than a third threshold, and if so, replace the clothing reference feature in the first candidate record with the clothing feature extracted from the image information.
根据本申请提供的图像识别装置,其中,所述修正模块14包括:According to the image recognition device provided by the present application, the correction module 14 includes:
修正值单元141,适用于基于所述第一相似度计算修正值λ,所述修正值λ的计算公式为:The correction value unit 141 is adapted to calculate the correction value λ based on the first degree of similarity, and the calculation formula of the correction value λ is:
Figure PCTCN2020112404-appb-000002
Figure PCTCN2020112404-appb-000002
上式中TH为所述第一阈值,α为控制系数,x1为所述第一相似度;In the above formula, TH is the first threshold, α is the control coefficient, and x1 is the first degree of similarity;
修正相似度单元142,适用于用所述第二相似度乘以所述修正值,得到所述修正相似度S:The correction similarity unit 142 is adapted to multiply the second similarity by the correction value to obtain the corrected similarity S:
S=λx 2S=λx 2 ;
上式中x2为所述第二相似度。In the above formula, x2 is the second degree of similarity.
本实施例还提供一种计算机设备,如可以执行程序的智能手机、平板电脑、笔记本电脑、台式计算机、机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。本实施例的计算机设备20至少包括但不限于:可通过系统总线相互通信连接的存储器21、处理器22,如图3所示。需要指出的是,图3仅示出了具有组件21-22的计算机设备20,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。This embodiment also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a cabinet server (including independent servers, or A server cluster composed of multiple servers) and so on. The computer device 20 in this embodiment at least includes but is not limited to: a memory 21 and a processor 22 that can be communicatively connected to each other through a system bus, as shown in FIG. 3. It should be pointed out that FIG. 3 only shows the computer device 20 with components 21-22, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
本实施例中,存储器21(即可读存储介质)包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器21可以是计算机设备20的内部存储单元,例如该计算机设备20的硬盘或内存。在另一些实施例中,存储器21也可以是计算机设备20的外部存储设备,例如该计算机设备20上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,存储器21还可以既包括计算机设备20的内部存储单元也包括其外部存储设备。本实施例中,存储器21通常用于存储安装于计算机设备20的操作系统和各类应用软件,例如实施例一的图像识别装置10的程序代码等。此外,存储器21还可以用于暂时地存储已经输出或者将要输出的各类数据。In this embodiment, the memory 21 (ie, readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), Read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 21 may be an internal storage unit of the computer device 20, such as a hard disk or a memory of the computer device 20. In other embodiments, the memory 21 may also be an external storage device of the computer device 20, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (Secure Digital, SMC) equipped on the computer device 20. SD) card, flash card (Flash Card), etc. Of course, the memory 21 may also include both an internal storage unit of the computer device 20 and an external storage device thereof. In this embodiment, the memory 21 is generally used to store an operating system and various application software installed in the computer device 20, such as the program code of the image recognition device 10 in the first embodiment, and so on. In addition, the memory 21 can also be used to temporarily store various types of data that have been output or will be output.
处理器22在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器22通常用于控制计算机设备20的总体操作。本实施例中,处理器22用于运行存储器21中存储的程序代码或者处理数据,例如运行图像识别装置10,以实现实施例一的图像识别方法。In some embodiments, the processor 22 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 22 is generally used to control the overall operation of the computer device 20. In this embodiment, the processor 22 is used to run the program code or process data stored in the memory 21, for example, to run the image recognition device 10, so as to implement the image recognition method of the first embodiment.
实施例二Example two
本实施例适用于面部特征识别足够确定的情形。请参阅图4,本实施例提出一种基于特征提取的图像识别方法,具体包括以下步骤:This embodiment is suitable for situations where facial feature recognition is sufficiently certain. Referring to FIG. 4, this embodiment proposes an image recognition method based on feature extraction, which specifically includes the following steps:
S210:响应于图像识别指令,获取待识别对象的图像信息。S210: In response to the image recognition instruction, obtain image information of the object to be recognized.
S220:从所述图像信息中提取面部特征,基于所述面部特征从识别库中获取第一候选记录;其中所述第一候选记录中包含面部参照特征、衣着参照特征和对象标识,所述第一候选记录中的面部参照特征与所述面部特征之间的第一相似度大于第一阈值。S220: Extract facial features from the image information, and obtain a first candidate record from a recognition database based on the facial features; wherein the first candidate record contains a facial reference feature, a clothing reference feature, and an object identifier. The first similarity between the facial reference feature in a candidate record and the facial feature is greater than the first threshold.
本申请中的第一候选记录可以是包含(身份信息,面部特征信息,衣着特征信息)的三元数组。The first candidate record in this application may be a three-element array containing (identity information, facial feature information, clothing feature information).
S230:判断所述第一相似度是否大于第二阈值,其中所述第二阈值高于所述第一阈值;若是,将第一相似度最高的所述第一候选记录作为目标候选记录。S230: Determine whether the first similarity is greater than a second threshold, where the second threshold is higher than the first threshold; if so, use the first candidate record with the highest first similarity as a target candidate record.
本领域技术人员可以理解,当通过比对面部特征得到的第一相似度足够大,例如超过95%,那么我们有足够的把握确信仅通过面部特征识别就可以确定待识别对象的身份信息,因此此时可以直接把该足够大的相似度所对应的第一候选记录作为目标候选记录。Those skilled in the art can understand that when the first degree of similarity obtained by comparing facial features is sufficiently large, for example, more than 95%, then we are confident enough to be sure that the identity information of the object to be recognized can be determined only through facial feature recognition. Therefore, At this time, the first candidate record corresponding to the sufficiently large similarity can be directly used as the target candidate record.
S240:将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。S240: Output the object identifier contained in the target candidate record as the recognition result of the image information.
本实施例中,无需再进行衣着特征的对比,从而可以缩短图像识别的时间,提高图像识别效率。In this embodiment, there is no need to compare clothing features, so that the time for image recognition can be shortened and the efficiency of image recognition can be improved.
实施例三Example three
本实施例适用于当拍摄距离比较远、拍摄像素太低、或者监控设备与待识别对象之间有遮挡等原因而造成无法获得面部特征的情形。请参阅图5,本实施例提出一种基于特征提取的图像识别方法,具体包括以下步骤:This embodiment is suitable for situations where facial features cannot be obtained due to reasons such as a relatively long shooting distance, too low shooting pixels, or occlusion between the monitoring device and the object to be identified. Referring to FIG. 5, this embodiment proposes an image recognition method based on feature extraction, which specifically includes the following steps:
S310:响应于图像识别指令,获取待识别对象的图像信息。S310: In response to the image recognition instruction, obtain image information of the object to be recognized.
S320:在无法从所述图像信息中提取到面部特征的情况下,从所述图像信息中提取衣着特征,基于所述衣着特征从识别库中获取第二候选记录,所述第二候选记录中的衣着参照特征与所述衣着特征之间的第二相似度大于第四阈值。S320: In the case that facial features cannot be extracted from the image information, extract clothing features from the image information, and obtain a second candidate record from the recognition database based on the clothing features, and the second candidate record is The second degree of similarity between the clothing reference feature and the clothing feature is greater than the fourth threshold.
基于第二特征从识别库中获取第二候选记录的过程包括:The process of obtaining the second candidate record from the recognition database based on the second feature includes:
将从图像信息中提取到的衣着特征与识别库中存储的每个衣着特征信息进行第二相似度对比,当第二相似度大于第四阈值时,将该第一相似度对应的候选记录作为第二候选记录。本申请中的第四阈值可以根据实际需要灵活设置,例如设置为80%、90%等。The clothing feature extracted from the image information is compared with each clothing feature information stored in the recognition database for the second similarity. When the second similarity is greater than the fourth threshold, the candidate record corresponding to the first similarity is taken as The second candidate record. The fourth threshold in this application can be flexibly set according to actual needs, for example, set to 80%, 90%, and so on.
S330:将第二相似度最高的所述的第二候选记录作为目标候选记录。S330: Use the second candidate record with the highest second similarity as the target candidate record.
当需要仅输出一个识别结果时,本申请将第二相似度最高的第二候选记录作为目标候选记录。本领域技术人员可以理解,识别结果有时并不是唯一的,而是可以提供多个不同的识别结果进行参考。这时可以根据第二相似度的数据进行从高到低排列,把排序最靠前的几个第二候选记录作为目标候选记录。When only one recognition result needs to be output, this application uses the second candidate record with the highest second similarity as the target candidate record. Those skilled in the art can understand that sometimes the recognition result is not unique, but a plurality of different recognition results can be provided for reference. At this time, it is possible to sort from high to low according to the data of the second similarity, and use the top second candidate records as the target candidate records.
S340:将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。S340: Output the object identifier contained in the target candidate record as the recognition result of the image information.
本实施例还提供一种计算机可读存储介质,该计算机可读存储介质可以是非易失性的,也可以是易失性的,如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘、服务器、App应用商城等等,其上存储有计算机程序,程序被处理器执行时实现相应功能。本实施例的计算机可读存储介质用于存储图像识别装置10,被处理器执行时实现实施例一的图像识别方法。This embodiment also provides a computer-readable storage medium. The computer-readable storage medium may be non-volatile or volatile, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic Memory, magnetic disks, optical disks, servers, App application malls, etc., have computer programs stored thereon, and corresponding functions are realized when the programs are executed by the processor. The computer-readable storage medium of this embodiment is used to store the image recognition device 10, and when executed by a processor, it implements the image recognition method of the first embodiment.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the foregoing embodiments of the present application are for description only, and do not represent the superiority or inferiority of the embodiments.
流程图中或在此以其它方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。Any process or method description in the flowchart or described in other ways herein can be understood as a module, segment or part of code that includes one or more executable instructions for implementing specific logical functions or steps of the process , And the scope of the preferred embodiments of the present application includes additional implementations, which may not be in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order according to the functions involved. This should It is understood by those skilled in the art to which the embodiments of the present application belong.
本技术领域的普通技术人员可以理解,实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。A person of ordinary skill in the art can understand that all or part of the steps carried in the method of the foregoing embodiments can be implemented by a program instructing relevant hardware to complete, and the program can be stored in a computer-readable medium. When executed, it includes one of the steps of the method embodiment or a combination thereof.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例” 或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, descriptions with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples" or "some examples" etc. mean the specific features described in conjunction with the embodiments or examples. The structure, material or feature is included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above-mentioned terms do not necessarily refer to the same embodiment or example. Moreover, the described specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。Through the description of the above implementation manners, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of the application, and do not limit the scope of the patent for this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of the application, or directly or indirectly applied to other related technical fields , The same reason is included in the scope of patent protection of this application.

Claims (20)

  1. 一种基于特征提取的图像识别方法,其中,包括以下步骤:An image recognition method based on feature extraction, which includes the following steps:
    响应于图像识别指令,获取待识别对象的图像信息;In response to the image recognition instruction, obtain the image information of the object to be recognized;
    在能够从所述图像信息中提取到面部特征的情况下,提取所述面部特征,基于所述面部特征从识别库中获取第一候选记录,其中所述第一候选记录中包含面部参照特征、衣着参照特征和对象标识,所述第一候选记录中的面部参照特征与所述面部特征之间的第一相似度大于第一阈值;If facial features can be extracted from the image information, extract the facial features, and obtain a first candidate record from a recognition database based on the facial features, where the first candidate record contains facial reference features, Clothing reference features and object identifiers, where the first degree of similarity between the facial reference features in the first candidate record and the facial features is greater than a first threshold;
    在所述第一相似度小于第二阈值的情况下,从所述图像信息中提取衣着特征,计算所述第一候选记录中的衣着参照特征与所述衣着特征之间的第二相似度;其中所述第二阈值大于所述第一阈值;In the case that the first similarity is less than the second threshold, extracting clothing features from the image information, and calculating the second similarity between the clothing reference feature in the first candidate record and the clothing feature; Wherein the second threshold is greater than the first threshold;
    基于所述第一相似度,对所述第二相似度进行修正,得到修正相似度;Correcting the second similarity based on the first similarity to obtain a corrected similarity;
    将修正相似度最高的所述第一候选记录作为目标候选记录;Taking the first candidate record with the highest correction similarity as the target candidate record;
    将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The object identifier contained in the target candidate record is output as the recognition result of the image information.
  2. 根据权利要求1所述的图像识别方法,其中,所述基于所述第一相似度,对所述第二相似度进行修正,得到修正相似度的步骤包括:The image recognition method according to claim 1, wherein the step of correcting the second similarity based on the first similarity to obtain the corrected similarity comprises:
    基于所述第一相似度计算修正值λ,所述修正值λ的计算公式为:The correction value λ is calculated based on the first similarity, and the calculation formula of the correction value λ is:
    Figure PCTCN2020112404-appb-100001
    Figure PCTCN2020112404-appb-100001
    上式中TH为所述第一阈值,α为控制系数,x 1为所述第一相似度; In the above formula, TH is the first threshold, α is the control coefficient, and x 1 is the first degree of similarity;
    用所述第二相似度乘以所述修正值,得到所述修正相似度S:Multiply the second similarity by the correction value to obtain the corrected similarity S:
    S=λx 2S=λx 2 ;
    上式中x 2为所述第二相似度。 In the above formula, x 2 is the second degree of similarity.
  3. 根据权利要求1所述的图像识别方法,其中,所述从所述图像信息中提取面部特征,基于所述面部特征从识别库中获取第一候选记录的步骤之后,还包括:The image recognition method according to claim 1, wherein after the step of extracting facial features from the image information and obtaining the first candidate record from the recognition library based on the facial features, the method further comprises:
    在所述第一相似度大于等于第二阈值的情况下,将第一相似度最高的所述第一候选记录作为目标候选记录;In a case where the first similarity is greater than or equal to a second threshold, use the first candidate record with the highest first similarity as the target candidate record;
    将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The object identifier contained in the target candidate record is output as the recognition result of the image information.
  4. 根据权利要求1或3所述的图像识别方法,其中,所述将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出的步骤之后,还包括:The image recognition method according to claim 1 or 3, wherein after the step of outputting the object identifier contained in the target candidate record as the recognition result of the image information, the method further comprises:
    判断所述图像信息的清晰度是否大于第三阈值;Judging whether the sharpness of the image information is greater than a third threshold;
    若是,用所述图像信息中提取的所述衣着特征替换所述第一候选记录中的所述衣着参照特征。If yes, replace the clothing reference feature in the first candidate record with the clothing feature extracted from the image information.
  5. 根据权利要求4所述的图像识别方法,其中,在所述响应于图像识别指令,获取待识别对象的图像信息的步骤之后,还包括:The image recognition method according to claim 4, wherein after the step of obtaining image information of the object to be recognized in response to the image recognition instruction, the method further comprises:
    在无法从所述图像信息中提取到面部特征的情况下,从所述图像信息中提取衣着特征,基于所述衣着特征从识别库中获取第二候选记录,所述第二候选记录中的衣着参照特征与所述衣着特征之间的第二相似度大于第四阈值;In the case that the facial features cannot be extracted from the image information, the clothing features are extracted from the image information, and the second candidate record is obtained from the recognition database based on the clothing features, and the clothing in the second candidate record The second degree of similarity between the reference feature and the clothing feature is greater than the fourth threshold;
    将第二相似度最高的所述的第二候选记录作为目标候选记录;Taking the second candidate record with the highest second degree of similarity as the target candidate record;
    将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The object identifier contained in the target candidate record is output as the recognition result of the image information.
  6. 一种基于特征提取的图像识别装置,其中,包括:An image recognition device based on feature extraction, which includes:
    图像获取模块,适用于响应于图像识别指令,获取待识别对象的图像信息;The image acquisition module is adapted to acquire image information of the object to be identified in response to an image recognition instruction;
    第一对比模块,适用于在能够从所述图像信息中提取到面部特征的情况下,从所述图像信息中提取面部特征,基于所述面部特征从识别库中获取第一候选记录,其中所述第一候选记录中包含面部参照特征、衣着参照特征和对象标识,所述第一候选记录中的面部参照特征与所述面部特征之间的第一相似度大于第一阈值;The first comparison module is suitable for extracting facial features from the image information when facial features can be extracted from the image information, and obtaining the first candidate record from the recognition database based on the facial features, wherein The first candidate record includes a face reference feature, a clothing reference feature, and an object identifier, and the first similarity between the face reference feature in the first candidate record and the facial feature is greater than a first threshold;
    第二对比模块,适用于在所述第一相似度小于第二阈值的情况下,从所述图像信息中 提取衣着特征,计算所述第一候选记录中的第二参照特征与所述衣着特征之间的第二相似度;The second comparison module is adapted to extract clothing features from the image information when the first similarity is less than the second threshold, and calculate the second reference feature in the first candidate record and the clothing feature The second degree of similarity between
    修正模块,适用于基于所述第一相似度,对所述第二相似度进行修正,得到修正相似度;The correction module is adapted to correct the second similarity based on the first similarity to obtain the corrected similarity;
    目标确认模块,适用于将修正相似度最高的所述第一候选记录作为目标候选记录;The target confirmation module is adapted to use the first candidate record with the highest correction similarity as the target candidate record;
    识别模块,适用于将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The recognition module is adapted to output the object identifier contained in the target candidate record as the recognition result of the image information.
  7. 根据权利要求6所述的图像识别装置,其中,所述修正模块包括:The image recognition device according to claim 6, wherein the correction module comprises:
    修正值单元,适用于基于所述第一相似度计算修正值λ,所述修正值λ的计算公式为:The correction value unit is adapted to calculate the correction value λ based on the first degree of similarity, and the calculation formula of the correction value λ is:
    Figure PCTCN2020112404-appb-100002
    Figure PCTCN2020112404-appb-100002
    上式中TH为所述第一阈值,α为控制系数,x 1为所述第一相似度; In the above formula, TH is the first threshold, α is the control coefficient, and x 1 is the first degree of similarity;
    修正相似度单元,适用于用所述第二相似度乘以所述修正值,得到所述修正相似度S:The modified similarity unit is adapted to multiply the second similarity by the modified value to obtain the modified similarity S:
    S=λx 2S=λx 2 ;
    上式中x 2为所述第二相似度。 In the above formula, x 2 is the second degree of similarity.
  8. 根据权利要求6所述的图像识别设备,其中,还包括:The image recognition device according to claim 6, further comprising:
    第二目标确认模块,适用于在所述第一相似度大于等于第二阈值的情况下,将第一相似度最高的所述第一候选记录作为目标候选记录;The second target confirmation module is adapted to use the first candidate record with the highest first similarity as the target candidate record when the first similarity is greater than or equal to a second threshold;
    第二识别模块,适用于将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The second recognition module is adapted to output the object identifier contained in the target candidate record as the recognition result of the image information.
  9. 根据权利要求8所述的图像识别装置,其中,还包括:The image recognition device according to claim 8, further comprising:
    更新模块,适用于判断所述图像信息的清晰度是否大于第三阈值,若是,用所述图像信息中提取的所述衣着特征替换所述第一候选记录中的所述衣着参照特征。The update module is adapted to determine whether the sharpness of the image information is greater than a third threshold, and if so, replace the clothing reference feature in the first candidate record with the clothing feature extracted from the image information.
  10. 根据权利要求9所述的图像识别装置,其中,还包括:The image recognition device according to claim 9, further comprising:
    第三对比模块,适用于在无法从所述图像信息中提取到面部特征的情况下,从所述图像信息中提取衣着特征,基于所述衣着特征从识别库中获取第二候选记录,所述第二候选记录中的衣着参照特征与所述衣着特征之间的第二相似度大于第四阈值;The third comparison module is suitable for extracting clothing features from the image information when facial features cannot be extracted from the image information, and obtaining a second candidate record from the recognition database based on the clothing features, the The second degree of similarity between the clothing reference feature in the second candidate record and the clothing feature is greater than the fourth threshold;
    第三目标确认模块,适用于将第二相似度最高的所述的第二候选记录作为目标候选记录;The third target confirmation module is adapted to use the second candidate record with the highest second degree of similarity as the target candidate record;
    第三识别模块,适用于将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The third recognition module is adapted to output the object identifier contained in the target candidate record as the recognition result of the image information.
  11. 一种计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现基于特征提取的图像识别方法的以下步骤:A computer device includes a memory, a processor, and a computer program stored on the memory and capable of running on the processor, wherein the processor implements the following steps of an image recognition method based on feature extraction when the processor executes the computer program:
    响应于图像识别指令,获取待识别对象的图像信息;In response to the image recognition instruction, obtain the image information of the object to be recognized;
    在能够从所述图像信息中提取到面部特征的情况下,提取所述面部特征,基于所述面部特征从识别库中获取第一候选记录,其中所述第一候选记录中包含面部参照特征、衣着参照特征和对象标识,所述第一候选记录中的面部参照特征与所述面部特征之间的第一相似度大于第一阈值;If facial features can be extracted from the image information, extract the facial features, and obtain a first candidate record from a recognition database based on the facial features, where the first candidate record contains facial reference features, Clothing reference features and object identifiers, where the first degree of similarity between the facial reference features in the first candidate record and the facial features is greater than a first threshold;
    在所述第一相似度小于第二阈值的情况下,从所述图像信息中提取衣着特征,计算所述第一候选记录中的衣着参照特征与所述衣着特征之间的第二相似度;其中所述第二阈值大于所述第一阈值;In the case that the first similarity is less than the second threshold, extracting clothing features from the image information, and calculating the second similarity between the clothing reference feature in the first candidate record and the clothing feature; Wherein the second threshold is greater than the first threshold;
    基于所述第一相似度,对所述第二相似度进行修正,得到修正相似度;Correcting the second similarity based on the first similarity to obtain a corrected similarity;
    将修正相似度最高的所述第一候选记录作为目标候选记录;Taking the first candidate record with the highest correction similarity as the target candidate record;
    将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The object identifier contained in the target candidate record is output as the recognition result of the image information.
  12. 根据权利要求11所述的计算机设备,其中,所述基于所述第一相似度,对所述 第二相似度进行修正,得到修正相似度的步骤包括:The computer device according to claim 11, wherein the step of correcting the second similarity based on the first similarity to obtain the corrected similarity comprises:
    基于所述第一相似度计算修正值λ,所述修正值λ的计算公式为:The correction value λ is calculated based on the first similarity, and the calculation formula of the correction value λ is:
    Figure PCTCN2020112404-appb-100003
    Figure PCTCN2020112404-appb-100003
    上式中TH为所述第一阈值,α为控制系数,x 1为所述第一相似度; In the above formula, TH is the first threshold, α is the control coefficient, and x 1 is the first degree of similarity;
    用所述第二相似度乘以所述修正值,得到所述修正相似度S:Multiply the second similarity by the correction value to obtain the corrected similarity S:
    S=λx 2S=λx 2 ;
    上式中x 2为所述第二相似度。 In the above formula, x 2 is the second degree of similarity.
  13. 根据权利要求11所述的计算机设备,其中,所述从所述图像信息中提取面部特征,基于所述面部特征从识别库中获取第一候选记录的步骤之后,还包括:The computer device according to claim 11, wherein, after the step of extracting facial features from the image information and obtaining the first candidate record from a recognition library based on the facial features, the method further comprises:
    在所述第一相似度大于等于第二阈值的情况下,将第一相似度最高的所述第一候选记录作为目标候选记录;In a case where the first similarity is greater than or equal to a second threshold, use the first candidate record with the highest first similarity as the target candidate record;
    将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The object identifier contained in the target candidate record is output as the recognition result of the image information.
  14. 根据权利要求11或13所述的计算机设备,其中,所述将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出的步骤之后,还包括:The computer device according to claim 11 or 13, wherein after the step of outputting the object identifier contained in the target candidate record as the recognition result of the image information, the method further comprises:
    判断所述图像信息的清晰度是否大于第三阈值;Judging whether the sharpness of the image information is greater than a third threshold;
    若是,用所述图像信息中提取的所述衣着特征替换所述第一候选记录中的所述衣着参照特征。If yes, replace the clothing reference feature in the first candidate record with the clothing feature extracted from the image information.
  15. 根据权利要求14所述的计算机设备,其中,在所述响应于图像识别指令,获取待识别对象的图像信息的步骤之后,还包括:The computer device according to claim 14, wherein after the step of obtaining image information of the object to be recognized in response to the image recognition instruction, the method further comprises:
    在无法从所述图像信息中提取到面部特征的情况下,从所述图像信息中提取衣着特征,基于所述衣着特征从识别库中获取第二候选记录,所述第二候选记录中的衣着参照特征与所述衣着特征之间的第二相似度大于第四阈值;In the case that the facial features cannot be extracted from the image information, the clothing features are extracted from the image information, and the second candidate record is obtained from the recognition database based on the clothing features, and the clothing in the second candidate record The second degree of similarity between the reference feature and the clothing feature is greater than the fourth threshold;
    将第二相似度最高的所述的第二候选记录作为目标候选记录;Taking the second candidate record with the highest second degree of similarity as the target candidate record;
    将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The object identifier contained in the target candidate record is output as the recognition result of the image information.
  16. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现基于特征提取的图像识别方法的以下步骤:A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps of an image recognition method based on feature extraction are implemented:
    响应于图像识别指令,获取待识别对象的图像信息;In response to the image recognition instruction, obtain the image information of the object to be recognized;
    在能够从所述图像信息中提取到面部特征的情况下,提取所述面部特征,基于所述面部特征从识别库中获取第一候选记录,其中所述第一候选记录中包含面部参照特征、衣着参照特征和对象标识,所述第一候选记录中的面部参照特征与所述面部特征之间的第一相似度大于第一阈值;If facial features can be extracted from the image information, extract the facial features, and obtain a first candidate record from a recognition database based on the facial features, where the first candidate record contains facial reference features, Clothing reference features and object identifiers, where the first degree of similarity between the facial reference features in the first candidate record and the facial features is greater than a first threshold;
    在所述第一相似度小于第二阈值的情况下,从所述图像信息中提取衣着特征,计算所述第一候选记录中的衣着参照特征与所述衣着特征之间的第二相似度;其中所述第二阈值大于所述第一阈值;In the case that the first similarity is less than the second threshold, extracting clothing features from the image information, and calculating the second similarity between the clothing reference feature in the first candidate record and the clothing feature; Wherein the second threshold is greater than the first threshold;
    基于所述第一相似度,对所述第二相似度进行修正,得到修正相似度;Correcting the second similarity based on the first similarity to obtain a corrected similarity;
    将修正相似度最高的所述第一候选记录作为目标候选记录;Taking the first candidate record with the highest correction similarity as the target candidate record;
    将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The object identifier contained in the target candidate record is output as the recognition result of the image information.
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述基于所述第一相似度,对所述第二相似度进行修正,得到修正相似度的步骤包括:15. The computer-readable storage medium according to claim 16, wherein the step of correcting the second similarity based on the first similarity to obtain the corrected similarity comprises:
    基于所述第一相似度计算修正值λ,所述修正值λ的计算公式为:The correction value λ is calculated based on the first similarity, and the calculation formula of the correction value λ is:
    Figure PCTCN2020112404-appb-100004
    Figure PCTCN2020112404-appb-100004
    上式中TH为所述第一阈值,α为控制系数,x 1为所述第一相似度; In the above formula, TH is the first threshold, α is the control coefficient, and x 1 is the first degree of similarity;
    用所述第二相似度乘以所述修正值,得到所述修正相似度S:Multiply the second similarity by the correction value to obtain the corrected similarity S:
    S=λx 2S=λx 2 ;
    上式中x 2为所述第二相似度。 In the above formula, x 2 is the second degree of similarity.
  18. 根据权利要求16所述的计算机可读存储介质,其中,所述从所述图像信息中提取面部特征,基于所述面部特征从识别库中获取第一候选记录的步骤之后,还包括:16. The computer-readable storage medium according to claim 16, wherein, after the step of extracting facial features from the image information and obtaining the first candidate record from a recognition library based on the facial features, the method further comprises:
    在所述第一相似度大于等于第二阈值的情况下,将第一相似度最高的所述第一候选记录作为目标候选记录;In a case where the first similarity is greater than or equal to a second threshold, use the first candidate record with the highest first similarity as the target candidate record;
    将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The object identifier contained in the target candidate record is output as the recognition result of the image information.
  19. 根据权利要求16或18所述的计算机可读存储介质,其中,所述将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出的步骤之后,还包括:The computer-readable storage medium according to claim 16 or 18, wherein after the step of outputting the object identifier contained in the target candidate record as the recognition result of the image information, the method further comprises:
    判断所述图像信息的清晰度是否大于第三阈值;Judging whether the sharpness of the image information is greater than a third threshold;
    若是,用所述图像信息中提取的所述衣着特征替换所述第一候选记录中的所述衣着参照特征。If yes, replace the clothing reference feature in the first candidate record with the clothing feature extracted from the image information.
  20. 根据权利要求19所述的计算机可读存储介质,其中,在所述响应于图像识别指令,获取待识别对象的图像信息的步骤之后,还包括:The computer-readable storage medium according to claim 19, wherein after the step of obtaining image information of the object to be recognized in response to the image recognition instruction, the method further comprises:
    在无法从所述图像信息中提取到面部特征的情况下,从所述图像信息中提取衣着特征,基于所述衣着特征从识别库中获取第二候选记录,所述第二候选记录中的衣着参照特征与所述衣着特征之间的第二相似度大于第四阈值;In the case that the facial features cannot be extracted from the image information, the clothing features are extracted from the image information, and the second candidate record is obtained from the recognition database based on the clothing features, and the clothing in the second candidate record The second degree of similarity between the reference feature and the clothing feature is greater than the fourth threshold;
    将第二相似度最高的所述的第二候选记录作为目标候选记录;Taking the second candidate record with the highest second degree of similarity as the target candidate record;
    将所述目标候选记录中包含的对象标识作为所述图像信息的识别结果进行输出。The object identifier contained in the target candidate record is output as the recognition result of the image information.
PCT/CN2020/112404 2020-03-04 2020-08-31 Feature extraction-based image recognition method and image recognition device WO2021174789A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010142297.0A CN111339979B (en) 2020-03-04 2020-03-04 Image recognition method and image recognition device based on feature extraction
CN202010142297.0 2020-03-04

Publications (1)

Publication Number Publication Date
WO2021174789A1 true WO2021174789A1 (en) 2021-09-10

Family

ID=71185794

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/112404 WO2021174789A1 (en) 2020-03-04 2020-08-31 Feature extraction-based image recognition method and image recognition device

Country Status (2)

Country Link
CN (1) CN111339979B (en)
WO (1) WO2021174789A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111339979B (en) * 2020-03-04 2023-09-19 平安科技(深圳)有限公司 Image recognition method and image recognition device based on feature extraction
CN112149740B (en) * 2020-09-25 2021-12-28 上海商汤智能科技有限公司 Target re-identification method and device, storage medium and equipment
CN112699803B (en) * 2020-12-31 2024-01-16 竹间智能科技(上海)有限公司 Face recognition method, system, equipment and readable storage medium
CN113219870B (en) * 2021-05-07 2022-03-08 禹焱科技河北有限公司 Intelligent data acquisition and sharing device for industrial instrument
CN116382468A (en) * 2023-02-24 2023-07-04 江阴市宝虹电器有限公司 Automatic triggering method, system and storage medium for interaction function of intelligent mirror

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060158307A1 (en) * 2005-01-13 2006-07-20 Samsung Electronics Co., Ltd. System and method for face recognition
CN104408404A (en) * 2014-10-31 2015-03-11 小米科技有限责任公司 Face identification method and apparatus
CN108154099A (en) * 2017-12-20 2018-06-12 北京奇艺世纪科技有限公司 A kind of character recognition method, device and electronic equipment
CN108846676A (en) * 2018-08-02 2018-11-20 平安科技(深圳)有限公司 Biological characteristic assistant payment method, device, computer equipment and storage medium
CN111339979A (en) * 2020-03-04 2020-06-26 平安科技(深圳)有限公司 Image recognition method and image recognition device based on feature extraction

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009015406A (en) * 2007-07-02 2009-01-22 Nippon Telegr & Teleph Corp <Ntt> Image feature extraction apparatus, image feature extraction method, image feature extraction program, and recording medium which stores its program, image similarity calculation apparatus, image similarity calculation method, image similarity calculation program, recording medium which stores its program
CN107330360A (en) * 2017-05-23 2017-11-07 深圳市深网视界科技有限公司 A kind of pedestrian's clothing colour recognition, pedestrian retrieval method and device
CN110287889A (en) * 2019-06-26 2019-09-27 银河水滴科技(北京)有限公司 A kind of method and device of identification
CN110503022A (en) * 2019-08-19 2019-11-26 北京积加科技有限公司 A kind of personal identification method, apparatus and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060158307A1 (en) * 2005-01-13 2006-07-20 Samsung Electronics Co., Ltd. System and method for face recognition
CN104408404A (en) * 2014-10-31 2015-03-11 小米科技有限责任公司 Face identification method and apparatus
CN108154099A (en) * 2017-12-20 2018-06-12 北京奇艺世纪科技有限公司 A kind of character recognition method, device and electronic equipment
CN108846676A (en) * 2018-08-02 2018-11-20 平安科技(深圳)有限公司 Biological characteristic assistant payment method, device, computer equipment and storage medium
CN111339979A (en) * 2020-03-04 2020-06-26 平安科技(深圳)有限公司 Image recognition method and image recognition device based on feature extraction

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GUO RUI, SHULING ZHANG, XIAOFEN WANG: "Study of Feature Extraction and Similarity Match Method on Face Recognition", COMPUTER ENGINEERING, SHANGHAI JISUANJI XUEHUI, CN, vol. 32, no. 11, 30 June 2006 (2006-06-30), CN, pages 225 - 247, XP055841915, ISSN: 1000-3428 *

Also Published As

Publication number Publication date
CN111339979B (en) 2023-09-19
CN111339979A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
WO2021174789A1 (en) Feature extraction-based image recognition method and image recognition device
CN110197146B (en) Face image analysis method based on deep learning, electronic device and storage medium
CN108038176B (en) Method and device for establishing passerby library, electronic equipment and medium
US8718324B2 (en) Method, apparatus and computer program product for providing object tracking using template switching and feature adaptation
WO2019011298A1 (en) Target tracking method and apparatus, electronic device and storage medium
WO2021143865A1 (en) Positioning method and apparatus, electronic device, and computer readable storage medium
TWI798815B (en) Target re-identification method, device, and computer readable storage medium
WO2016015621A1 (en) Human face picture name recognition method and system
CN111291887B (en) Neural network training method, image recognition device and electronic equipment
US10936876B2 (en) Content recognition method, system and storage medium thereof
WO2021174941A1 (en) Physical attribute recognition method, system, computer device, and storage medium
WO2019184140A1 (en) Vr-based application program opening method, electronic apparatus, device and storage medium
WO2019033575A1 (en) Electronic device, face tracking method and system, and storage medium
JP6941966B2 (en) Person authentication device
WO2015042891A1 (en) Image semantic segmentation method and apparatus
CN111914775A (en) Living body detection method, living body detection device, electronic apparatus, and storage medium
CN113723157B (en) Crop disease identification method and device, electronic equipment and storage medium
CN113869137A (en) Event detection method and device, terminal equipment and storage medium
WO2024011852A1 (en) Object tracking method and apparatus, and electronic device
WO2020172870A1 (en) Method and apparatus for determining motion trajectory of target object
CN109241316B (en) Image retrieval method, image retrieval device, electronic equipment and storage medium
CN109146913B (en) Face tracking method and device
WO2020155486A1 (en) Facial recognition optimization method and apparatus, computer device and storage medium
WO2018121414A1 (en) Electronic device, and target image recognition method and apparatus
CN116582653A (en) Intelligent video monitoring method and system based on multi-camera data fusion

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

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

Country of ref document: EP

Kind code of ref document: A1