CN107833328B - Access control verification method and device based on face recognition and computing equipment - Google Patents

Access control verification method and device based on face recognition and computing equipment Download PDF

Info

Publication number
CN107833328B
CN107833328B CN201711157085.4A CN201711157085A CN107833328B CN 107833328 B CN107833328 B CN 107833328B CN 201711157085 A CN201711157085 A CN 201711157085A CN 107833328 B CN107833328 B CN 107833328B
Authority
CN
China
Prior art keywords
neural network
output data
face recognition
intermediate layer
access control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711157085.4A
Other languages
Chinese (zh)
Other versions
CN107833328A (en
Inventor
董健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
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 Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201711157085.4A priority Critical patent/CN107833328B/en
Publication of CN107833328A publication Critical patent/CN107833328A/en
Application granted granted Critical
Publication of CN107833328B publication Critical patent/CN107833328B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/30Individual registration on entry or exit not involving the use of a pass
    • G07C9/32Individual registration on entry or exit not involving the use of a pass in combination with an identity check
    • G07C9/37Individual registration on entry or exit not involving the use of a pass in combination with an identity check using biometric data, e.g. fingerprints, iris scans or voice recognition
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • G06F18/2148Generating training patterns; Bootstrap methods, e.g. bagging or boosting characterised by the process organisation or structure, e.g. boosting cascade
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)
  • Collating Specific Patterns (AREA)

Abstract

The invention discloses a door control verification method and device based on face recognition and a computing device, wherein the method comprises the following steps: acquiring an image shot by a camera; inputting the image into a second neural network to obtain a face recognition result; the second neural network is obtained by utilizing output data of at least one middle layer of a first neural network trained in advance to conduct guiding training, wherein the number of layers of the first neural network is more than that of the second neural network; judging whether the access control verification is successful or not by using the face recognition result; if so, completing the access control verification and opening the access control for the identified object. According to the invention, the trained neural network with fewer layers is used for quickly and accurately calculating to obtain the face recognition result, whether the access control verification is successful or not is conveniently judged according to the obtained face recognition result, and after the access control verification is completed, the access control is opened for the recognition object, so that the time for the recognition object to wait for the opening of the access control is reduced, and the user experience of the recognition object on the access control verification is improved.

Description

基于人脸识别的门禁验证方法及装置、计算设备Access control verification method and device based on face recognition, and computing equipment

技术领域technical field

本发明涉及深度学习领域,具体涉及一种基于人脸识别的门禁验证方法及装置、计算设备。The invention relates to the field of deep learning, in particular to a face recognition-based access control verification method and device, and computing equipment.

背景技术Background technique

随着现代化技术的发展,电子门禁得到了广泛的应用。通过电子门禁验证对入口的控制,可以有效的限制人员进入受控区域,达到确保受控区域安全的目的。如电子刷卡门禁验证、指纹门禁验证、人脸识别门禁验证等。电子刷卡门禁验证反应不够灵敏,有时候需要用刷卡多次才能验证成功;指纹门禁验证对指纹的清晰度要求较高,导致需要多次输入指纹才能验证成功;人脸识别可靠性好、更智能、更安全。With the development of modern technology, electronic access control has been widely used. The control of the entrance through electronic access control verification can effectively restrict personnel from entering the controlled area and achieve the purpose of ensuring the safety of the controlled area. Such as electronic card access control verification, fingerprint access control verification, face recognition access control verification, etc. The response of electronic card swiping access control verification is not sensitive enough, and sometimes it is necessary to swipe the card multiple times to verify the success; fingerprint access control verification requires high fingerprint clarity, which leads to the need to input fingerprints multiple times to verify successfully; face recognition is reliable and smarter ,safer.

现有技术中在人脸识别时采用神经网络对摄像头获取的图像进行检测。但一般采用的神经网络往往具有多层中间层,其可以得到精准的人脸识别结果,但多层中间层的计算速度会较慢,不能快速的对图像进行检测,无法及时反馈人脸识别结果,使得门禁验证速度慢。而采用中间层较少的神经网络时,由于中间层层数较少,其计算速度较快,可以快速反馈人脸识别结果,提高门禁验证的速度。但受其层数限制,有可能造成计算能力有限、拟合能力较差、得到结果不准确等问题。In the prior art, a neural network is used to detect an image acquired by a camera during face recognition. However, the commonly used neural network often has multiple intermediate layers, which can obtain accurate face recognition results, but the calculation speed of the multi-layer intermediate layers will be slow, which cannot quickly detect the image and feedback the face recognition results in time. , making the access control verification slow. When a neural network with fewer intermediate layers is used, due to the small number of intermediate layers, the calculation speed is faster, the face recognition results can be quickly fed back, and the speed of access control verification is improved. However, limited by the number of layers, it may cause problems such as limited computing power, poor fitting ability, and inaccurate results.

发明内容SUMMARY OF THE INVENTION

鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的基于人脸识别的门禁验证方法及装置、计算设备。In view of the above problems, the present invention is proposed to provide a face recognition-based access control verification method, device, and computing device that overcome the above problems or at least partially solve the above problems.

根据本发明的一个方面,提供了一种基于人脸识别的门禁验证方法,其包括:According to one aspect of the present invention, a face recognition-based access control verification method is provided, which includes:

获取摄像头拍摄的图像;Get the image captured by the camera;

将图像输入至第二神经网络中,得到人脸识别结果;其中,第二神经网络利用预先训练的第一神经网络的至少一层中间层的输出数据进行指导训练得到,第一神经网络的层数多于第二神经网络的层数;Input the image into the second neural network to obtain the face recognition result; wherein, the second neural network uses the output data of at least one intermediate layer of the pre-trained first neural network to guide the training to obtain, and the layer of the first neural network is obtained. The number is more than the number of layers of the second neural network;

利用人脸识别结果判断门禁验证是否成功;Use the face recognition result to judge whether the access control verification is successful;

若是,完成门禁验证,并对识别对象开启门禁。If so, complete the access control verification and open the access control for the identified object.

可选地,门禁验证包括进入门禁验证和/或离开门禁验证。Optionally, the access verification includes entry verification and/or exit verification.

可选地,方法包括:Optionally, the method includes:

利用人脸识别结果,结合得到人脸识别结果的时间记录识别对象的行为轨迹。Using the face recognition result, combined with the time when the face recognition result is obtained, the behavior track of the recognized object is recorded.

可选地,完成门禁验证,并对识别对象开启门禁进一步包括:Optionally, completing the access control verification and opening the access control to the identified object further includes:

根据人脸识别结果,获取识别对象的个人信息;其中,个人信息包含对识别对象的权限设置信息;Obtain the personal information of the recognized object according to the face recognition result; wherein, the personal information includes permission setting information for the recognized object;

根据识别对象的个人信息,对识别对象开启与其权限设置信息对应的门禁。According to the personal information of the identification object, open the access control corresponding to its permission setting information for the identification object.

可选地,方法还包括:Optionally, the method further includes:

若门禁验证失败,记录图像并发出报警信息。If the access control verification fails, the image is recorded and an alarm message is issued.

可选地,第二神经网络的训练过程包括:Optionally, the training process of the second neural network includes:

将人脸识别的训练样本数据输入至经训练得到的第一神经网络中,获得第一神经网络的至少一层第一中间层的输出数据;Input the training sample data of face recognition into the first neural network obtained by training, and obtain the output data of at least one layer of the first intermediate layer of the first neural network;

将人脸识别的训练样本数据输入至待训练的第二神经网络中,获得第二神经网络的至少一层第二中间层的输出数据以及最终输出数据,至少一层第二中间层与至少一层第一中间层具有对应关系;Input the training sample data of face recognition into the second neural network to be trained, and obtain the output data and final output data of at least one second intermediate layer of the second neural network, at least one second intermediate layer and at least one second intermediate layer. The first intermediate layer of the layer has a corresponding relationship;

利用至少一层第二中间层的输出数据与至少一层第一中间层的输出数据之间的损失,以及最终输出数据与预标注的输出数据之间的损失,对第二神经网络进行训练。The second neural network is trained using the loss between the output data of the at least one second intermediate layer and the output data of the at least one first intermediate layer, and the loss between the final output data and the pre-labeled output data.

可选地,至少一层第一中间层包含第一神经网络的瓶颈层;至少一层第二中间层包含第二神经网络的瓶颈层。Optionally, at least one layer of the first intermediate layer includes the bottleneck layer of the first neural network; at least one layer of the second intermediate layer includes the bottleneck layer of the second neural network.

可选地,利用至少一层第二中间层的输出数据与至少一层第一中间层的输出数据之间的损失,以及最终输出数据与预标注的输出数据之间的损失,对第二神经网络进行训练进一步包括:Optionally, using the loss between the output data of at least one second intermediate layer and the output data of at least one first intermediate layer, and the loss between the final output data and the pre-labeled output data, the second neural The network is trained further including:

根据至少一层第二中间层的输出数据与至少一层第一中间层的输出数据之间的损失更新第二神经网络的权重参数,根据最终输出数据与预标注的输出数据之间的损失更新第二神经网络的权重参数,对第二神经网络进行训练。The weight parameters of the second neural network are updated according to the loss between the output data of at least one second intermediate layer and the output data of at least one first intermediate layer, and updated according to the loss between the final output data and the pre-labeled output data The weight parameter of the second neural network is used to train the second neural network.

可选地,在将训练样本的输入数据输入至待训练的第二神经网络中,获得第二神经网络的至少一层第二中间层的输出数据以及最终输出数据之前,方法还包括:Optionally, before inputting the input data of the training sample into the second neural network to be trained, before obtaining the output data of at least one second intermediate layer of the second neural network and the final output data, the method further includes:

将人脸识别的训练样本数据进行下采样处理,将处理后的数据作为第二神经网络的人脸识别的训练样本数据。The training sample data for face recognition is down-sampled, and the processed data is used as the training sample data for face recognition of the second neural network.

可选地,利用至少一层第二中间层的输出数据与至少一层第一中间层的输出数据之间的损失,以及最终输出数据与预标注的输出数据之间的损失,对第二神经网络进行训练进一步包括:Optionally, using the loss between the output data of at least one second intermediate layer and the output data of at least one first intermediate layer, and the loss between the final output data and the pre-labeled output data, the second neural The network is trained further including:

利用至少一层第二中间层的输出数据与至少一层第一中间层的输出数据之间的损失,以及最终输出数据与对下采样处理后人脸识别的训练样本数据的预标注的输出数据之间的损失,对第二神经网络进行训练。Utilize the loss between the output data of at least one second intermediate layer and the output data of at least one first intermediate layer, as well as the final output data and the pre-labeled output data of the training sample data of face recognition after downsampling processing The loss between is used to train the second neural network.

可选地,方法还包括:Optionally, the method further includes:

收集摄像头拍摄的图像作为人脸识别的训练样本输入数据,以及,对图像进行人工标注,将标注后的图像作为预标注的输出数据。The images captured by the camera are collected as input data for training samples of face recognition, and the images are manually labeled, and the labeled images are used as pre-labeled output data.

根据本发明的另一方面,提供了一种基于人脸识别的门禁验证装置,其包括:According to another aspect of the present invention, a face recognition-based access control verification device is provided, which includes:

获取模块,适于获取摄像头拍摄的图像;an acquisition module, suitable for acquiring images captured by the camera;

识别模块,适于将图像输入至第二神经网络中,得到人脸识别结果;其中,第二神经网络利用预先训练的第一神经网络的至少一层中间层的输出数据进行指导训练得到,第一神经网络的层数多于第二神经网络的层数;The recognition module is suitable for inputting the image into the second neural network to obtain the face recognition result; wherein, the second neural network uses the pre-trained output data of at least one intermediate layer of the first neural network to guide and train, and the first neural network is obtained. The number of layers of one neural network is more than the number of layers of the second neural network;

判断模块,适于利用人脸识别结果判断门禁验证是否成功;The judgment module is suitable for judging whether the access control verification is successful by using the face recognition result;

开启模块,适于若是,完成门禁验证,并对识别对象开启门禁。Open the module, if it is suitable, complete the access control verification, and open the access control for the identified object.

可选地,门禁验证包括进入门禁验证和/或离开门禁验证。Optionally, the access verification includes entry verification and/or exit verification.

可选地,装置还包括:Optionally, the device further includes:

记录模块,适于利用人脸识别结果,结合得到人脸识别结果的时间记录识别对象的行为轨迹。The recording module is suitable for recording the behavior track of the recognized object by using the face recognition result in combination with the time when the face recognition result is obtained.

可选地,开启模块进一步适于:Optionally, the opening module is further adapted to:

根据人脸识别结果,获取识别对象的个人信息;其中,个人信息包含对识别对象的权限设置信息;根据识别对象的个人信息,对识别对象开启与其权限设置信息对应的门禁。According to the face recognition result, the personal information of the recognition object is obtained; wherein, the personal information includes the permission setting information for the recognition object; according to the personal information of the recognition object, the access control corresponding to the permission setting information is opened for the recognition object.

可选地,装置还包括:Optionally, the device further includes:

报警模块,适于若门禁验证失败,记录图像并发出报警信息。The alarm module is suitable for recording images and sending alarm information if access control verification fails.

可选地,装置还包括:人脸识别网络指导训练模块;Optionally, the device further includes: a face recognition network guidance training module;

人脸识别网络指导训练模块包括:The face recognition network guidance training module includes:

第一输出单元,适于将人脸识别的训练样本数据输入至经训练得到的第一神经网络中,获得第一神经网络的至少一层第一中间层的输出数据;a first output unit, adapted to input the training sample data of face recognition into the first neural network obtained by training, and obtain the output data of at least one layer of the first intermediate layer of the first neural network;

第二输出单元,适于将人脸识别的训练样本数据输入至待训练的第二神经网络中,获得第二神经网络的至少一层第二中间层的输出数据以及最终输出数据,至少一层第二中间层与至少一层第一中间层具有对应关系;The second output unit is adapted to input the training sample data of face recognition into the second neural network to be trained, and obtain the output data and final output data of at least one second intermediate layer of the second neural network, at least one layer The second intermediate layer has a corresponding relationship with at least one first intermediate layer;

指导训练单元,适于利用至少一层第二中间层的输出数据与至少一层第一中间层的输出数据之间的损失,以及最终输出数据与预标注的输出数据之间的损失,对第二神经网络进行训练。The guidance training unit is adapted to utilize the loss between the output data of the at least one second intermediate layer and the output data of the at least one first intermediate layer, and the loss between the final output data and the pre-labeled output data, for the first Two neural networks are trained.

可选地,至少一层第一中间层包含第一神经网络的瓶颈层;至少一层第二中间层包含第二神经网络的瓶颈层。Optionally, at least one layer of the first intermediate layer includes the bottleneck layer of the first neural network; at least one layer of the second intermediate layer includes the bottleneck layer of the second neural network.

可选地,指导训练单元进一步适于:Optionally, the instruction training unit is further adapted to:

根据至少一层第二中间层的输出数据与至少一层第一中间层的输出数据之间的损失更新第二神经网络的权重参数,根据最终输出数据与预标注的输出数据之间的损失更新第二神经网络的权重参数,对第二神经网络进行训练。The weight parameters of the second neural network are updated according to the loss between the output data of at least one second intermediate layer and the output data of at least one first intermediate layer, and updated according to the loss between the final output data and the pre-labeled output data The weight parameter of the second neural network is used to train the second neural network.

可选地,人脸识别网络指导训练模块还包括:Optionally, the face recognition network guidance training module further includes:

下采样单元,适于将人脸识别的训练样本数据进行下采样处理,将处理后的数据作为第二神经网络的人脸识别的训练样本数据。The down-sampling unit is adapted to perform down-sampling processing on the training sample data for face recognition, and use the processed data as the training sample data for face recognition of the second neural network.

可选地,指导训练单元进一步适于:Optionally, the instruction training unit is further adapted to:

利用至少一层第二中间层的输出数据与至少一层第一中间层的输出数据之间的损失,以及最终输出数据与对下采样处理后人脸识别的训练样本数据的预标注的输出数据之间的损失,对第二神经网络进行训练。Utilize the loss between the output data of at least one second intermediate layer and the output data of at least one first intermediate layer, as well as the final output data and the pre-labeled output data of the training sample data of face recognition after downsampling processing The loss between is used to train the second neural network.

可选地,装置还包括:Optionally, the device further includes:

收集模块,适于收集摄像头拍摄的图像作为人脸识别的训练样本输入数据,以及,对图像进行人工标注,将标注后的图像作为预标注的输出数据。The collection module is suitable for collecting images captured by the camera as input data of training samples for face recognition, and manually labeling the images, and using the labeled images as pre-labeled output data.

根据本发明的又一方面,提供了一种计算设备,包括:处理器、存储器、通信接口和通信总线,处理器、存储器和通信接口通过通信总线完成相互间的通信;According to another aspect of the present invention, a computing device is provided, including: a processor, a memory, a communication interface, and a communication bus, and the processor, the memory, and the communication interface communicate with each other through the communication bus;

存储器用于存放至少一可执行指令,可执行指令使处理器执行上述基于人脸识别的门禁验证方法对应的操作。The memory is used for storing at least one executable instruction, and the executable instruction enables the processor to perform the operations corresponding to the above-mentioned face recognition-based access control verification method.

根据本发明的再一方面,提供了一种计算机存储介质,存储介质中存储有至少一可执行指令,可执行指令使处理器执行如上述基于人脸识别的门禁验证方法对应的操作。According to yet another aspect of the present invention, a computer storage medium is provided, the storage medium stores at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the above-mentioned face recognition-based access control verification method.

根据本发明提供的基于人脸识别的门禁验证方法及装置、计算设备,获取摄像头拍摄的图像;将图像输入至第二神经网络中,得到人脸识别结果;其中,第二神经网络利用预先训练的第一神经网络的至少一层中间层的输出数据进行指导训练得到,第一神经网络的层数多于第二神经网络的层数;利用人脸识别结果判断门禁验证是否成功;若是,完成门禁验证,并对识别对象开启门禁。本发明利用层数较高的第一神经网络的至少一层中间层的输出数据对层数较少的第二神经网络进行指导训练,使得训练得到的第二神经网络在保持其快速计算的情况下,大大提升了其准确性。利用第二神经网络可以快速准确计算得到人脸识别结果,方便根据得到的人脸识别结果判断门禁验证是否成功,并在完成门禁验证后,对识别对象开启门禁,减少了识别对象等待门禁开启的时间,提升识别对象对门禁验证的用户体验。According to the face recognition-based access control verification method, device, and computing device provided by the present invention, the image captured by the camera is obtained; the image is input into the second neural network to obtain the face recognition result; wherein, the second neural network uses pre-training The output data of at least one intermediate layer of the first neural network is obtained by guiding the training, and the number of layers of the first neural network is more than the number of layers of the second neural network; use the face recognition result to determine whether the access control verification is successful; if so, complete Access control verification and open access control to identified objects. In the present invention, the output data of at least one intermediate layer of the first neural network with a higher number of layers is used to guide the training of the second neural network with a smaller number of layers, so that the second neural network obtained by training keeps its fast calculation condition. , greatly improving its accuracy. The second neural network can be used to quickly and accurately calculate the face recognition result, which is convenient for judging whether the access control verification is successful according to the obtained face recognition result. time, and improve the user experience of the identification object for access control verification.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, in order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand , the following specific embodiments of the present invention are given.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明���。���图���用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are for the purpose of illustrating preferred embodiments only and are not to be considered limiting of the invention. Also, the same components are denoted by the same reference numerals throughout the drawings. In the attached image:

图1示出了根据本发明一个实施例的基于人脸识别的门禁验证方法的流程图;Fig. 1 shows the flow chart of the access control verification method based on face recognition according to an embodiment of the present invention;

图2示出了根据本发明另一个实施例的人脸识别网络指导训练方法的流程图;FIG. 2 shows a flowchart of a face recognition network guidance training method according to another embodiment of the present invention;

图3示出了根据本发明另一个实施例的基于人脸识别的门禁验证方法的流程图;Fig. 3 shows the flow chart of the access control verification method based on face recognition according to another embodiment of the present invention;

图4示出了根据本发明一个实施例的基于人脸识别的门禁验证装置的功能框图;4 shows a functional block diagram of an access control verification device based on face recognition according to an embodiment of the present invention;

图5示出了根据本发明另一个实施例的基于人脸识别的门禁验证装置的功能框图;5 shows a functional block diagram of an access control verification device based on face recognition according to another embodiment of the present invention;

图6示出了根据本发明一个实施例的一种计算设备的结构示意图。FIG. 6 shows a schematic structural diagram of a computing device according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be more thoroughly understood, and will fully convey the scope of the present disclosure to those skilled in the art.

图1示出了根据本发明一个实施例的基于人脸识别的门禁验证方法的流程图。如图1所示,基于人脸识别的门禁验证方法具体包括如下步骤:FIG. 1 shows a flowchart of an access control verification method based on face recognition according to an embodiment of the present invention. As shown in Figure 1, the access control verification method based on face recognition specifically includes the following steps:

步骤S101,获取摄像头拍摄的图像。In step S101, an image captured by a camera is acquired.

摄像头可以实时的拍摄到监控的图像,如在小区门口、车库口、电梯间、公司等场所安装摄像头,可以非常方便得查看实时情况。获取摄像头所拍摄到的图像,本实施例是对图像中的人物进行识别,因此获取摄像头拍摄的包含人物的图像,以便后续对该图像进行处理。The camera can capture real-time monitoring images, such as installing cameras at the entrance of the community, garage entrance, elevator room, company and other places, it is very convenient to view the real-time situation. The image captured by the camera is acquired. In this embodiment, the person in the image is identified. Therefore, the image including the person captured by the camera is acquired, so that the image can be processed subsequently.

步骤S102,将图像输入至第二神经网络中,得到人脸识别结果。Step S102, the image is input into the second neural network to obtain a face recognition result.

第二神经网络为浅层神经网络,其层数较少,计算速度快,一般适用于移动设备、小型计算器等设备。第一神经网络的层数多于第二神经网络的层数。第一神经网络的准确率更高,因此,利用预先训练的第一神经网络的至少一层中间层的输出数据对第二神经网络进行指导训练,使得第二神经网络最终的输出数据与第一神经网络的最终输出数据一致,在保留第二神经网络计算速度的前提下,大大提升了第二神经网络的计算性能。第二神经网络通过利用预先训练的第一神经网络的至少一层中间层的输出数据进行指导训练得到,其中,第一神经网络和第二神经网络训练使用的样本均为对象识别的训练样本。The second neural network is a shallow neural network, which has a small number of layers and a fast calculation speed, and is generally suitable for mobile devices, small calculators and other devices. The number of layers of the first neural network is greater than the number of layers of the second neural network. The accuracy of the first neural network is higher. Therefore, the pre-trained output data of at least one intermediate layer of the first neural network is used to guide the training of the second neural network, so that the final output data of the second neural network is the same as that of the first neural network. The final output data of the neural network is consistent, and the computing performance of the second neural network is greatly improved on the premise of retaining the computing speed of the second neural network. The second neural network is obtained by guiding training using the output data of at least one intermediate layer of the pre-trained first neural network, wherein the samples used in the training of the first neural network and the second neural network are both training samples for object recognition.

将图像输入至第二神经网络中,得到人脸识别结果。其中,人脸识别结果可以是对图像中人物的正脸或一定角度的侧脸的识别结果。Input the image into the second neural network to obtain the face recognition result. Wherein, the face recognition result may be the recognition result of the frontal face or the side face of a certain angle of the person in the image.

步骤S103,利用人脸识别结果判断门禁验证是否成功。Step S103, using the face recognition result to determine whether the access control verification is successful.

利用人脸识别结果,如人脸识别结果为识别对象A,从门禁数据库存储的用户��息中查找是否存在A,若是,则判断门禁验证成功,执行步骤S104;若否,则门禁验证失败,不对识别对象开启门禁。或者人脸识别结果为识别对象A,从门禁数据库存储的用户信息中查找识别对象A,识别对象A的信息为在职,则判断门禁验证成功,执行步骤S104;识别对象A的信息为离职,则门禁验证失败,不对识别对象开启门禁。Using the face recognition result, if the face recognition result is the recognition object A, find out whether there is A in the user information stored in the access control database, if yes, then judge that the access control verification is successful, and execute step S104; if not, the access control verification fails, no Identify the object to open the door. Or the face recognition result is the recognition object A, find the recognition object A from the user information stored in the access control database, and the information of the recognition object A is on-the-job, then judge that the access control verification is successful, and execute step S104; the information of the recognition object A is resignation, then The access control verification fails, and the access control is not opened for the identified object.

步骤S104,完成门禁验证,并对识别对象开启门禁。In step S104, the access control verification is completed, and the access control is opened for the identified object.

门禁验证过程完成,门禁验证成功,并对图像中经人脸识别的识别对象开启门禁。The access control verification process is completed, the access control verification is successful, and the access control is opened for the recognized object identified by the face in the image.

进一步,若图像中存在多个人物,人脸识别结果也为多个。利用多个人脸识别结果分别判别门禁验证是否成功,仅对完成门禁验证成功的一个或多个识别对象开启门禁,对于门禁验证失败的识别用户关闭门禁,也可以有效的防止门禁验证失败的识别对象尾随进入。Further, if there are multiple people in the image, there are multiple face recognition results. Use multiple face recognition results to determine whether the access control verification is successful, and only open the access control for one or more identification objects that have completed the access control verification successfully, and close the access control for the identified users who fail the access control verification. Enter trailing.

根据本发明提供的基于人脸识别的门禁验证方法,获取摄像头拍摄的图像;将图像输入至第二神经网络中,得到人脸识别结果;其中,第二神经网络利用预先训练的第一神经网络的至少一层中间层的输出数据进行指导训练得到,第一神经网络的层数多于第二神经网络的层数;利用人脸识别结果判断门禁验证是否成功;若是,完成门禁验证,并对识别对象开启门禁。本发明利用层数较高的第一神经网络的至少一层中间层的输出数据对层数较少的第二神经网络进行指导训练,使得训练得到的第二神经网络在保持其快速计算的情况下,大大提升了其准确性。利用第二神经网络可以快速准确计算得到人脸识别结果,方便根据得到的人脸识别结果判断门禁验证是否成功,并在完成门禁验证后,对识别对象开启门禁,减少了识别对象等待门禁开启的时间,提升识别对象对门禁验证的用户体验。According to the access control verification method based on face recognition provided by the present invention, the image captured by the camera is obtained; the image is input into the second neural network to obtain the face recognition result; wherein, the second neural network uses the pre-trained first neural network The output data of at least one middle layer of the first neural network is obtained by guiding the training, and the number of layers of the first neural network is more than the number of layers of the second neural network; the face recognition result is used to judge whether the access control verification is successful; if so, the access control verification is completed, and the Identify the object to open the door. In the present invention, the output data of at least one intermediate layer of the first neural network with a higher number of layers is used to guide the training of the second neural network with a smaller number of layers, so that the second neural network obtained by training keeps its fast calculation condition. , greatly improving its accuracy. The second neural network can be used to quickly and accurately calculate the face recognition result, which is convenient for judging whether the access control verification is successful according to the obtained face recognition result. time, and improve the user experience of the identification object for access control verification.

图2示出了根据本发明一个实施例的人脸识别网络指导训练方法的流程示意图,如图2所示,人脸识别网络的指导训练步骤包括如下步骤:FIG. 2 shows a schematic flowchart of a face recognition network guidance training method according to an embodiment of the present invention. As shown in FIG. 2 , the guidance training step of the face recognition network includes the following steps:

步骤S201,将人脸识别的训练样本数据输入至经训练得到的第一神经网络中,获得第一神经网络的至少一层第一中间层的输出数据。Step S201 , input the training sample data of face recognition into the first neural network obtained by training, and obtain the output data of at least one first intermediate layer of the first neural network.

第一神经网络为预先经过训练已经固化的神经网络。具体地,第一神经网络预先使用了多个人脸识别的训练样本数据经过训练,第一神经网络已经能够很好的适用于人脸识别。��中,第一神经网络优选使用深层神经网络,如应用于云端服务器的神经网络,其性能好,计算量大,准确率高,速度会较慢。第一神经网络可以输出多层的第一中间层的输出数据,如第一神经网络包含4层第一中间层,分别������4层第一中间层������3层第一中间层、第2层第一中间层和第1层第一中间层,其中,第1层第一中间层为第一神经网络的瓶颈层。The first neural network is a pre-trained and solidified neural network. Specifically, the first neural network has been trained using multiple training sample data for face recognition in advance, and the first neural network has been well suited for face recognition. Among them, the first neural network preferably uses a deep neural network, such as a neural network applied to a cloud server, which has good performance, large amount of calculation, high accuracy and slow speed. The first neural network can output the output data of the first intermediate layer of multiple layers. For example, the first neural network contains 4 layers of the first intermediate layer, which are the first intermediate layer of the fourth layer, the first intermediate layer of the third layer, and the first intermediate layer of the second layer. The first intermediate layer and the first intermediate layer are the first intermediate layer, wherein the first intermediate layer of the first layer is the bottleneck layer of the first neural network.

将人脸识别的训练样本数据输入至第一神经网络中,可以获得第一神经网络的至少一层第一中间层的输出数据。这里,可以仅获取一层第一中间层的输出数据,也可以获取相邻多层的第一中间层的输出数据,或者获取相互间隔的多层的第一中间层的输出数据,具体根据实施的实际情况进行设置,此处不做限定。The training sample data of face recognition is input into the first neural network, and the output data of at least one layer of the first intermediate layer of the first neural network can be obtained. Here, only the output data of the first intermediate layer of one layer can be obtained, the output data of the first intermediate layer of adjacent layers can also be obtained, or the output data of the first intermediate layer of the multiple layers separated from each other can be obtained. According to the actual situation, it is not limited here.

步骤S202,将人脸识别的训练样本数据输入至待训练的第二神经网络中,获得第二神经网络的至少一层第二中间层的输出数据以及最终输出数据。Step S202 , input the training sample data of face recognition into the second neural network to be trained, and obtain output data and final output data of at least one second intermediate layer of the second neural network.

第二神经网络为人脸识别网络的指导训练中待训练的神经网络,为浅层神经网络,如应用于移动终端的神经网络,其计算能力有限,性能不佳。第一神经网络的层数多于第二神经网络。如第一神经网络的层数为4层,分别为第4层第一中间层、第3层第一中间层、第2层第一中间层和第1层第一中间层;第二神经网络的层数为2层,分别为第2层第二中间层和第1层第二中间层。The second neural network is the neural network to be trained in the guidance training of the face recognition network, which is a shallow neural network, such as a neural network applied to a mobile terminal, which has limited computing power and poor performance. The first neural network has more layers than the second neural network. For example, the number of layers of the first neural network is 4, which are the first middle layer of the fourth layer, the first middle layer of the third layer, the first middle layer of the second layer and the first middle layer of the first layer; the second neural network The number of layers is 2, which are the second intermediate layer of the second layer and the second intermediate layer of the first layer.

将人脸识别的训练样本数据输入至第二神经网络中,获得第二神经网络的至少一层第二中间层的输出数据。其中,至少一层第二中间层与至少一层第一中间层具有对应关系。如第一神经网络的第1层第一中间层与第二神经网络的第1层第二中间层对应,第一神经网络的第2层第一中间层与第二神经网络的第2层第二中间层对应。The training sample data of face recognition is input into the second neural network, and the output data of at least one second intermediate layer of the second neural network is obtained. Wherein, at least one second intermediate layer has a corresponding relationship with at least one first intermediate layer. For example, the first intermediate layer of the first neural network corresponds to the first intermediate layer of the second neural network, and the second intermediate layer of the first neural network corresponds to the second intermediate layer of the second neural network. The two middle layers correspond.

获得的第二神经网络的第二中间层的输出数据需要与获得的第一神经网络的第一中间层的输出数据相对应,若获得第一神经网络的两层第一中间层的输出数据,也需要获得第二神经网络的两层第二中间层的输出数据。如获得第一神经网络的第1层和第2层第一中间层的输出数据,对应的获得第二神经网络的第1层和第2层第二中间层的输出数据。The obtained output data of the second middle layer of the second neural network needs to correspond to the obtained output data of the first middle layer of the first neural network. If the output data of the two first middle layers of the first neural network are obtained, It is also necessary to obtain the output data of the two second intermediate layers of the second neural network. For example, to obtain the output data of the first layer of the first neural network and the first intermediate layer of the second layer, correspondingly obtain the output data of the first layer of the second neural network and the second intermediate layer of the second layer.

优选的,至少一层第一中间层可以包含第一神经网络的瓶颈层,即第一神经网络的第1层第一中间层,至少一层第二中间层包含第二神经网络的瓶颈层,即第二神经网络的第1层第二中间层。瓶颈层即神经网络中隐藏层的最高层,输出的向量维度最少的一层中间层。使用瓶颈层,可以保证后续在进行训练时,使最终输出数据更加准确,得到较好的训练结果。Preferably, at least one layer of the first intermediate layer may include the bottleneck layer of the first neural network, that is, the first layer of the first intermediate layer of the first neural network, and at least one layer of the second intermediate layer may include the bottleneck layer of the second neural network, That is, the first layer and the second intermediate layer of the second neural network. The bottleneck layer is the highest layer of the hidden layer in the neural network, and the middle layer with the least dimension of the output vector. Using the bottleneck layer can ensure that the final output data is more accurate during subsequent training, and better training results can be obtained.

在将人脸识别的训练样本数据输入至待训练的第二神经网络中,除获得第二神经网络的至少一层第二中间层的输出数据外,还需要获得第二神经网络的最终输出数据,以便于利用最终输出数据计算损失,对第二神经网络进行训练。In inputting the training sample data of face recognition into the second neural network to be trained, in addition to obtaining the output data of at least one second intermediate layer of the second neural network, it is also necessary to obtain the final output data of the second neural network , so as to use the final output data to calculate the loss and train the second neural network.

考虑到第二神经网络为浅层神经网络,当人脸识别的训练样本数据较大时,直接使用人脸识别的训练样本数据会影响第二神经网络的运算速度。可选地,可以先对人脸识别的训练样本数据进行下采样处理,如人脸识别的训练样本数据为图片时,进行下采样处理可以先降低图片分辨率,将处理后的人脸识别的训练样本数据作为第二神经网络输入的人脸识别的训练样本数据。这样处理时,第二神经网络使用下采样处理后低分辨率的人脸识别的训练样本数据进行训练,第一神经网络使用高分辨率的人脸识别的训练样本数据进行训练,利用两个神经网络的输出数据进行训练时,使得第二神经网络对低分辨率的人脸识别的训练样本数据也可以获得高分辨率的输出结果。Considering that the second neural network is a shallow neural network, when the training sample data for face recognition is large, directly using the training sample data for face recognition will affect the operation speed of the second neural network. Optionally, the training sample data for face recognition can be down-sampled first. For example, when the training sample data for face recognition is a picture, the down-sampling process can first reduce the resolution of the picture, and the processed face recognition data can be processed by down-sampling. The training sample data is used as the training sample data for face recognition input by the second neural network. In this process, the second neural network uses the low-resolution face recognition training sample data after downsampling for training, the first neural network uses the high-resolution face recognition training sample data for training, and uses two neural networks for training. When the output data of the network is trained, the second neural network can also obtain a high-resolution output result for the low-resolution face recognition training sample data.

步骤S203,利用至少一层第二中间层的输出数据与至少一层第一中间层的输出数据之间的损失,以及最终输出数据与预标注的输出数据之间的损失,对第二神经网络进行训练。Step S203, using the loss between the output data of at least one second intermediate layer and the output data of at least one first intermediate layer, and the loss between the final output data and the pre-labeled output data, to the second neural network. to train.

根据至少一层第二中间层的输出数据与至少一层第一中间层的输出数据之间的损失,可以更新第二神经网络的权重参数,使第二神经网络至少一层第二中间层的输出数据尽可能的去接近第一神经网络至少一层第一中间层的输出数据。According to the loss between the output data of at least one second intermediate layer and the output data of at least one first intermediate layer, the weight parameters of the second neural network can be updated, so that the second neural network has at least one second intermediate layer. The output data is as close as possible to the output data of at least one first intermediate layer of the first neural network.

同时,根据第二神经网络的最终输出数据与预标注的输出数据之间的损失,可以更新第二神经网络的权重参数,使第二神经网络最终输出数据尽可能的去接近预标注的输出数据,保证第二神经网络最终输出数据的准确性。通过以上方式,完成对第二神经网络进行训练。可选地,当第二网络使用下采样处理后的人脸识别的训练样本数据时,还需要对下采样处理后的人脸识别的训练样本数据进行预标注,得到下采样处理后人脸识别的训练样本数据的预标注的输出数据。根据第二神经网络的最终输出数据与下采样处理后的预标注的输出数据之间的损失,可以更新第二神经网络的权重参数,使第二神经网络最终输出数据尽可能的去接近下采样处理后数据的预标注的输出数据,保证第二神经网络最终输出数据的准确性。At the same time, according to the loss between the final output data of the second neural network and the pre-labeled output data, the weight parameters of the second neural network can be updated to make the final output data of the second neural network as close to the pre-labeled output data as possible , to ensure the accuracy of the final output data of the second neural network. In the above manner, the training of the second neural network is completed. Optionally, when the second network uses the training sample data of face recognition after downsampling, it is also necessary to pre-mark the training sample data of face recognition after downsampling, so as to obtain the face recognition after downsampling. The pre-labeled output data of the training sample data. According to the loss between the final output data of the second neural network and the pre-labeled output data after downsampling, the weight parameters of the second neural network can be updated to make the final output data of the second neural network as close to downsampling as possible. The pre-labeled output data of the processed data ensures the accuracy of the final output data of the second neural network.

根据本发明提供的人脸识别网络指导训练方法,将人脸识别的训练样本数据输入至经训练得到的第一神经网络中,获得第一神经网络的至少一层第一中间层的输出数据;将人脸识别的训练样本数据输入至待训练的第二神经网络中,获得第二神经网络的至少一层第二中间层的输出数据以及最终输出数据,至少一层第二中间层与至少一层第一中间层具有对应关系;利用至少一层第二中间层的输出数据与至少一层第一中间层的输出数据之间的损失,以及最终输出数据与预标注的输出数据之间的损失,对第二神经网络进行训练。通过利用第一神经网络的至少一层第一中间层的输出数据对第二神经网络对应的至少一层第二中间层的输出数据进行训练,可以保持第二神经网络在其计算量不变的情况下,大大提升第二神经网络的性能,有效的缩减训练第二神经网络的训练时间,提高第二网络的训练效率。According to the face recognition network guidance training method provided by the present invention, the training sample data of face recognition is input into the first neural network obtained by training, and the output data of at least one layer of the first intermediate layer of the first neural network is obtained; Input the training sample data of face recognition into the second neural network to be trained, and obtain the output data and final output data of at least one second intermediate layer of the second neural network, at least one second intermediate layer and at least one second intermediate layer. Layer the first intermediate layer has a corresponding relationship; using the loss between the output data of at least one second intermediate layer and the output data of at least one first intermediate layer, and the loss between the final output data and the pre-labeled output data , to train the second neural network. By using the output data of at least one layer of the first intermediate layer of the first neural network to train the output data of at least one layer of the second intermediate layer corresponding to the second neural network, the second neural network can be maintained at a constant computational cost. In this case, the performance of the second neural network is greatly improved, the training time for training the second neural network is effectively reduced, and the training efficiency of the second network is improved.

图3示出了根据本发明另一个实施例的基于人脸识别的门禁验证方法的流程图。如图3所示,基于人脸识别的门禁验证方法具体包括如下步骤:FIG. 3 shows a flowchart of a method for authentication of access control based on face recognition according to another embodiment of the present invention. As shown in Figure 3, the access control verification method based on face recognition specifically includes the following steps:

步骤S301,获取摄像头拍摄的图像。Step S301, acquiring an image captured by a camera.

步骤S302,将图像输入至第二神经网络中,得到人脸识别结果。Step S302, the image is input into the second neural network to obtain a face recognition result.

以上步骤参照图1实施例中的步骤S101-S102,在此不再赘述。The above steps refer to steps S101-S102 in the embodiment of FIG. 1 , and details are not described herein again.

步骤S303,利用人脸识别结果判断门禁验证是否成功。Step S303, using the face recognition result to determine whether the access control verification is successful.

利用人脸识别结果,与门禁数据库存储的用户信息进行匹配,若匹配成功,则判断门禁验证成功,执行步骤S304;若匹配失败,则门禁验证失败,执行步骤S308。在匹配时,还需要进一步注意用户信息的当前状态。如门禁验证为公司门禁验证,匹配时仅与门禁数据库存储的用户信息的当前状态为在职状态的用户信息进行匹配,不与离职状态的用户信息匹配;或者门禁验证为小区门禁验证,匹配时仅与门禁数据库存储的用户信息的当前状态为当前住户的用户信息进行匹配,不与已搬离的用户信息匹配。The face recognition result is used to match the user information stored in the access control database. If the match is successful, it is determined that the access control verification is successful, and step S304 is performed; if the match fails, the access control verification fails, and step S308 is performed. When matching, further attention needs to be paid to the current state of user information. If the access control verification is the company access control verification, the matching will only match the user information stored in the access control database whose current status is the in-service status, and not match the user information in the resignation status; or the access verification is the community access verification verification, only when matching The current state of the user information stored in the access control database is the user information of the current resident, and it does not match the user information that has been moved away.

步骤S304,根据人脸识别结果,获取识别对象的个人信息。Step S304, according to the face recognition result, obtain the personal information of the recognized object.

步骤S305,根据识别对象的个人信息,对识别对象开启与其权限设置信息对应的门禁。Step S305, according to the personal information of the identification object, open the access control corresponding to the authority setting information for the identification object.

门禁验证成功后,根据人脸识别结果,进一步从门禁数据库中获取识别对象的个人信息。其中,个人信息包含对识别对象的权限设置信息。具体的,识别对象的个人信息包括其为小区1号楼5层住户,权限设置信息为其可以使用1号楼的电梯,但仅限于5层的电梯按键可以使用。利用人脸识别结果,1号楼电梯对识别对象门禁验证成功,开启1号楼电梯的电梯门。再根据获取的识别对象的个人信息,尤其是权限设置信息,对应的可以自动将5层的电梯按键点亮,使识别对象可以直接到达1号楼5层;或者,可以在识别对象手动按下5层电梯按键时,将5层电梯按键点亮。但识别对象手动按下其他层电梯按键时,其他层电梯按键不会点亮,不允许识别对象使用权限设置信息之外的其他层电梯按键,更保障小区住户的内部安全,尽可能的管控小区住户内部可能的隐患问题。After the access control verification is successful, according to the face recognition result, the personal information of the recognized object is further obtained from the access control database. Among them, the personal information includes permission setting information for the identification object. Specifically, the personal information of the identification object includes that he is a resident on the 5th floor of Building 1 of the community, and the permission setting information is that he can use the elevator of Building 1, but only the elevator buttons on the 5th floor can be used. Using the face recognition results, the elevator of Building 1 successfully authenticated the access control of the identified object, and the elevator door of the elevator of Building 1 was opened. Then according to the obtained personal information of the identification object, especially the permission setting information, the corresponding elevator button on the 5th floor can be automatically lighted, so that the identification object can directly reach the fifth floor of Building 1; or, it can be manually pressed on the identification object. When the elevator button on the 5th floor is pressed, the elevator button on the 5th floor will be lit. However, when the identification object manually presses the elevator buttons of other floors, the elevator buttons of other floors will not light up, and the identification object is not allowed to use the elevator buttons of other floors other than the permission setting information, so as to ensure the internal safety of the residents of the community, and control the community as much as possible. Potential hidden problems within the household.

步骤S306,利用人脸识别结果,结合得到人脸识别结果的时间记录识别对象的行为轨迹。In step S306, the behavior track of the recognized object is recorded using the face recognition result in combination with the time when the face recognition result is obtained.

利用人脸识别结果,以及在识别时得到人脸识别结果的时间,将时间与识别对象相关联,可以记录下识别对象在各个时间的行为轨迹。根据行为轨迹,自动获取需要的信息。如上下班打卡信息,日常行为习惯等。具体的,如公司门禁验证,在9点得到识别对象A的人脸识别结果,在18点又得到识别对象A的人脸识别结果,可以记录识别对象A在9点上班,18点下班的行为轨迹,自动完成识别对象A的上下班打卡记录;如果行为轨迹存在多条,识别对象A在9点、12点、13点、15点、16点、18点出现在门禁前,可以根据时间,获取最早时间9点为识别对象A的上班打卡记录,最晚时间18点为识别对象A的下班打卡记录;或者小区门禁验证,利用多个人脸识别结果,以及在识别时得到人脸识别结果的时间,可以统计得到小区住户的日常出入小区的行为轨迹。进一步,根据统计得到的小区住户日常出入小区的行为轨迹,可以得到小区住户的日常行为习惯,如作息习惯。按照小区住户的作息习惯(正常情况一般最早5点就有小区住户离开小区,最晚23点还有小区住户进入小区),将小区的多个门禁验证时间设置为与作息习惯相统一的时间(5点-23点),其他时间段门禁完全关闭,任何人都不能从这些门禁出入,小区中仅保留一个或两个门禁供小区住户进行门禁验证。这样提升小区的安全性,也更好对小区进出的人口进行管理,避免偷盗、传销、小广告等人员进出,对小区住户造成骚扰,甚至危及生命和财产安全的损失。Using the face recognition result and the time when the face recognition result is obtained during recognition, the time is associated with the recognition object, and the behavior track of the recognition object at each time can be recorded. According to the behavior trajectory, the required information is automatically obtained. Such as commuting card information, daily behavior habits, etc. Specifically, such as company access control verification, the face recognition result of the recognition object A is obtained at 9 o'clock, and the face recognition result of the recognition object A is obtained at 18 o'clock, and the behavior of the recognition object A at 9 o'clock and off work at 18 o'clock can be recorded. Track, automatically completes the commuting record of the recognition object A; if there are multiple behavioral trajectories, the recognition object A appears before the access control at 9:00, 12:00, 13:00, 15:00, 16:00, and 18:00. According to the time, The earliest time is 9:00 to obtain the clock-in record of the identification object A, and the latest time is 18:00 is the clock-out record of the identification object A; Time, you can get statistics on the daily behavior trajectory of the residents of the community entering and leaving the community. Further, according to the daily behavior trajectories of the residents of the community entering and leaving the community, the daily behavior habits of the residents in the community, such as work and rest habits, can be obtained. According to the work and rest habits of the residents of the community (normally, the residents of the community leave the community at the earliest at 5:00, and the residents of the community enter the community at the latest at 23:00). 5:00-23:00), the access control is completely closed during other time periods, and no one can enter or exit through these access control. Only one or two access control is reserved in the community for the residents of the community to conduct access control verification. In this way, the security of the community is improved, and it is also better to manage the population entering and leaving the community, avoiding theft, pyramid schemes, small advertisements and other personnel entering and leaving, causing harassment to the residents of the community, and even endangering the loss of life and property safety.

门禁验证可以仅包括进入时的门禁验证,也可以包括进入门禁验证和离开门禁验证,方便对进入和离开均进行门禁验证,更保障门禁安全,也方便区分识别对象是进入还是离开的行为轨迹。The access control verification can only include the access control verification when entering, and can also include the entry access verification verification and the exit access verification verification.

步骤S307,收集摄像头拍摄的图像作为人脸识别的训练样本输入数据,以及,对图像进行人工标注,将标注后的图像作为预标注的输出数据。Step S307 , collecting images captured by the camera as input data for training samples for face recognition, and manually labeling the images, and using the labeled images as pre-labeled output data.

摄像头拍摄的图像和标注后的图像可以作为样本库中用于人脸识别的训练样本输入数据和输出数据。利用收集的摄像头拍摄的图像和标注后的图像可以对第二神经网络进行优化训练,以使第二神经网络的输出结果更加准确。The images captured by the camera and the labeled images can be used as input data and output data for face recognition training samples in the sample library. The second neural network can be optimized and trained by using the collected images captured by the camera and the labeled images, so that the output result of the second neural network is more accurate.

步骤S308,若门禁验证失败,记录图像并发出报警信息。Step S308, if the access control verification fails, record the image and issue an alarm message.

为提升门禁安全,在门禁验证失败后,可以将该图像进行记录作为证据,并发出报警信息,如小区门禁验证,有行为怪异的陌生人在门禁前,发送携带有图像(包含陌生人的图像)的报警信息给物业监控中心,同时,发出警报声音震慑陌生人,保障小区安全。In order to improve access control security, after the access control verification fails, the image can be recorded as evidence, and an alarm message can be issued, such as community access control verification, strangers who behave strangely before the access control, send images (including images of strangers) with them. ) alarm information to the property monitoring center, and at the same time, the alarm sound is issued to deter strangers and ensure the safety of the community.

根据本发明提供的基于人脸识别的门禁验证方法,利用经过训练的第二神经网络能够快速、准确地得到摄像头拍摄的图像对应的人脸识别结果,有效地提高对摄像头拍摄图像的人脸识别的准确率,同时保证第二神经网络的处理效率。进一步,基于得到的人脸识别结果,结合识别对象的个人信息,对识别对象开启与其权限设置信息对应的门禁,使门禁验证更智能、更具体,也更安全,提供识别对象更方便的服务。还可以结合得到人脸识别结果的时间记录识别对象的行为轨迹,自动实现如获取上下班打卡等信息、获取识别对象日常行为习惯等。还可以根据识别对象日常行为习惯设置门禁,提升门禁安全。对于门禁验证失败的情况,可以记录图像并发出报警信息,方便留下证据并及时提醒,避免危险发生。将摄像头拍摄的图像和人工标注后的图像放入样本库,可以对第二神经网络进行优化训练,以使第二神经网络的输出结果更加准确。According to the access control verification method based on face recognition provided by the present invention, the face recognition result corresponding to the image captured by the camera can be quickly and accurately obtained by using the trained second neural network, and the face recognition of the image captured by the camera can be effectively improved. accuracy, while ensuring the processing efficiency of the second neural network. Further, based on the obtained face recognition results, combined with the personal information of the recognized object, the access control corresponding to the authorization setting information is opened for the recognized object, so that the access control verification is more intelligent, more specific, and more secure, and more convenient services for the recognized object are provided. It can also record the behavior trajectory of the recognized object in combination with the time when the face recognition result is obtained, and automatically realize information such as obtaining the commute clock and other information, and obtaining the daily behavior habits of the recognized object. Access control can also be set according to the daily behavior habits of the identified objects to improve access control security. For the failure of access control verification, the image can be recorded and an alarm message can be issued, which is convenient for leaving evidence and reminding in time to avoid danger. By placing the images captured by the camera and manually labeled images into the sample library, the second neural network can be optimized and trained to make the output results of the second neural network more accurate.

图4示出了根据本发明一个实施例的基于人脸识别的门禁验证装置的功能框图,如图4所示,该装置包括:FIG. 4 shows a functional block diagram of an access control verification device based on face recognition according to an embodiment of the present invention. As shown in FIG. 4 , the device includes:

获取模块410,适于获取摄像头拍摄的图像。The acquiring module 410 is adapted to acquire an image captured by a camera.

摄像头可以实时的拍摄到监控的图像,如在小区门口、车库口、电梯间、公���等场所安装摄像头,可以非常方便得查看实时情况。获取模块410获取摄像头所拍摄到的图像,本实施例是对图像中的人物进行识别,因此获取模块410获取摄像头拍摄的包含人物的图像,以便后续对该图像进行处理。The camera can capture real-time monitoring images, such as installing cameras at the entrance of the community, garage entrance, elevator room, company and other places, it is very convenient to view the real-time situation. The acquisition module 410 acquires an image captured by a camera. In this embodiment, the person in the image is identified. Therefore, the acquisition module 410 acquires an image including a person captured by the camera for subsequent processing of the image.

识别模块420,适于将图像输入至第二神经网络中,得到人脸识别结果。The recognition module 420 is adapted to input the image into the second neural network to obtain a face recognition result.

第二神经网络为浅层神经网络,其层数较少,计算速度快,一般适用于移动设备、小型计算器等设备。第一神经网络的层数多于第二神经网络的层数。第一神经网络的准确率更高,因此,利用预先训练的第一神经网络的至少一层中间层的输出数据对第二神经网络进行指导训练,使得第二神经网络最终的输出数据与第一神经网络的最终输出数据一致,在保留第二神经网络计算速度的前提下,大大提升了第二神经网络的计算性能。第二神经网络通过利用预先训练的第一神经网络的至少一层中间层的输出数据进行指导训练得到,其中,第一神经网络和第二神经网络训练使用的样本均为对象识别的训练样本。The second neural network is a shallow neural network, which has a small number of layers and a fast calculation speed, and is generally suitable for mobile devices, small calculators and other devices. The number of layers of the first neural network is greater than the number of layers of the second neural network. The accuracy of the first neural network is higher. Therefore, the pre-trained output data of at least one intermediate layer of the first neural network is used to guide the training of the second neural network, so that the final output data of the second neural network is the same as that of the first neural network. The final output data of the neural network is consistent, and the computing performance of the second neural network is greatly improved on the premise of retaining the computing speed of the second neural network. The second neural network is obtained by guiding training using the output data of at least one intermediate layer of the pre-trained first neural network, wherein the samples used in the training of the first neural network and the second neural network are both training samples for object recognition.

识别模块420将图像输入至第二神经网络中,得到人脸识别结果。其中,人脸识别结果可以是对图像中人物的正脸或一定角度的侧脸的识别结果。The recognition module 420 inputs the image into the second neural network to obtain a face recognition result. Wherein, the face recognition result may be the recognition result of the frontal face or the side face of a certain angle of the person in the image.

判断模块430,适于利用人脸识别结果判断门禁验证是否成功。The judgment module 430 is adapted to use the face recognition result to judge whether the access control verification is successful.

判断模块430利用人脸识别结果,如识别模块420得到人脸识别结果为识别对象A,判断模块430从门禁数据库存储的用户信息中���找是否存在A,若是,则判断模块430判断门禁验证成功,执行开启模块440;若否,则判断模块430判断门禁验证失败,不对识别对象开启门禁。或者识别模块420得到人脸识别结果为识别对象A,判断模块430从门禁数据库存储的用户信息中查找识别对象A,识别对象A的信息为在职,则判断模块430判断门禁验证成功,执行开启模块440;识别对象A的信息为离职,则判断模块430判断门禁验证失败,不对识别对象开启门禁。The judgment module 430 utilizes the face recognition result, if the recognition module 420 obtains the face recognition result as the identification object A, the judgment module 430 searches for the existence of A from the user information stored in the access control database, and if so, the judgment module 430 judges that the access control verification is successful, Execute the opening module 440; if not, the judging module 430 judges that the access control verification fails, and does not open the access control to the identified object. Or the recognition module 420 obtains that the face recognition result is the recognition object A, and the judgment module 430 searches for the recognition object A from the user information stored in the access control database, and the information of the recognition object A is on-the-job, then the judgment module 430 judges that the access control verification is successful, and executes the opening module. 440: The information of the identification object A is resignation, then the judgment module 430 judges that the access control verification fails, and does not open the access control for the identification object.

开启模块440,适于若是,完成门禁验证,并对识别对象开启门禁。The opening module 440 is adapted to, if yes, complete the access control verification, and open the access control to the identified object.

开启模块440完成门禁验证过程,并对图像中经人脸识别的识别对象开启门禁。The opening module 440 completes the access control verification process, and opens the access control for the recognized object identified by the face in the image.

开启模块440进一步适于根据人脸识别结果,获取识别对象的个人信息;根据识别对象的个人信息,对识别对象开启与其权限设置信息对应的门禁。The opening module 440 is further adapted to obtain the personal information of the recognized object according to the face recognition result; according to the personal information of the recognized object, open the access control corresponding to the permission setting information of the recognized object.

判断模块430判断门禁验证成功后,根据人脸识别结果,开启模块440进一步从门禁数据库中获取识别对象的个人信息。其中,个人信息包含对识别对象的权限设置信息。具体的,识别对象的个人信息包括其为小区1号楼5层住户,权限设置信息为其可以使用1号楼的电梯,但仅限于5层的电梯按键可以使用。判断模块430利用人脸识别结果,判断1号楼电梯对识别对象门禁验证成功,开启模块440开启1号楼电梯的电梯门。开启模块440再根据获取的识别对象的个人信息,尤其是权限设置信息,对应的可以自动将5层的电梯按键点亮,使识别对象可以直接到达1号楼5层;或者,开启模块440可以在识别对象手动按下5层电梯按键时,将5层电梯按键点亮。但识别对象手动按下其他层电梯按键时,开启模块440对其他层电梯按键不会点亮,不允许识别对象使用权限设置信息之外的其他层电梯按键,更保障小区住户的内部安全,尽可能的管控小区住户内部可能的隐患问题。After the judging module 430 judges that the access control verification is successful, according to the face recognition result, the opening module 440 further obtains the personal information of the recognized object from the access control database. Among them, the personal information includes permission setting information for the identification object. Specifically, the personal information of the identification object includes that he is a resident on the 5th floor of Building 1 of the community, and the permission setting information is that he can use the elevator of Building 1, but only the elevator buttons on the 5th floor can be used. The judgment module 430 uses the face recognition result to judge that the elevator of Building 1 has successfully authenticated the access control of the identified object, and the opening module 440 opens the elevator door of the elevator of Building 1. The opening module 440 can automatically light up the elevator buttons on the 5th floor according to the acquired personal information of the identification object, especially the authority setting information, so that the identification object can directly reach the fifth floor of Building 1; or, the opening module 440 can When the recognition object manually presses the elevator button on the 5th floor, the elevator button on the 5th floor will be lit. However, when the identification object manually presses the elevator buttons of other floors, the opening module 440 will not light up the elevator buttons of other floors, and the identification object is not allowed to use the elevator buttons of other floors other than the permission setting information, so as to ensure the internal safety of the residents of the community. It is possible to control the possible hidden problems within the residents of the community.

进一步,若获取模块410获取的图像中存在多个人物,识别模块420得到的人脸识别结果也为多个。判断模块430利用多个人脸识别结果分别判别门禁验证是否成功,开启模块440仅对完成门禁验证成功的一个或多个识别对象开启门禁,对于门禁验证失败的识别用户�����门禁,���可以有效的防止门禁验证失败的识别对象尾随进入。Further, if there are multiple persons in the image acquired by the acquisition module 410, the face recognition results acquired by the recognition module 420 are also multiple. The judgment module 430 uses a plurality of face recognition results to judge whether the access control verification is successful, and the opening module 440 only opens the access control for one or more identification objects that have successfully completed the access control verification. The identification object that fails the access control verification enters trailingly.

根据本发明提供的基于人脸识别的门禁验证装置,获取摄像头拍摄的图像;将图像输入至第二神经网络中,得到人脸识别结果;其中,第二神经网络利用预先训练的第一神经网络的至少一层中间层的输出数据进行指导训练得到,第一神经网络的层数多于第二神经网络的层数;利用人脸识别结果判断门禁验证是否成功;若是,完成门禁验证,并对识别对象开启门禁。本发明利用层数较高的第一神经网络的至少一层中间层的输出数据对层数较少的第二神经网络进行指导训练,使得训练得到的第二神经网络在保持其快速计算的情况下,大大提升了其准确性。利用第二神经网络可以快速准确计算得到人脸识别结果,方便根据得到的人脸识别结果判断门禁验证是否成功,并在完成门禁验证后,对识别对象开启门禁,减少了识别对象等待门禁开启的时间,提升识别对象对门禁验证的用户体验。According to the access control verification device based on face recognition provided by the present invention, the image captured by the camera is obtained; the image is input into the second neural network to obtain the face recognition result; wherein, the second neural network uses the pre-trained first neural network The output data of at least one middle layer of the first neural network is obtained by guiding the training, and the number of layers of the first neural network is more than the number of layers of the second neural network; the face recognition result is used to judge whether the access control verification is successful; if so, the access control verification is completed, and the Identify the object to open the door. In the present invention, the output data of at least one intermediate layer of the first neural network with a higher number of layers is used to guide the training of the second neural network with a smaller number of layers, so that the second neural network obtained by training keeps its fast calculation condition. , greatly improving its accuracy. The second neural network can be used to quickly and accurately calculate the face recognition result, which is convenient for judging whether the access control verification is successful according to the obtained face recognition result. time, and improve the user experience of the identification object for access control verification.

图5示出了根据本发明另一个实施例的基于人脸识别的门禁验证装置的功能框图,如图5所示,与图4相比,该装置还包括:FIG. 5 shows a functional block diagram of an access control verification device based on face recognition according to another embodiment of the present invention. As shown in FIG. 5 , compared with FIG. 4 , the device further includes:

记录模块450,适于利用人脸识别结果,结合得到人脸识别结果的时间记录识别对象的行为轨迹。The recording module 450 is adapted to use the face recognition result to record the behavior track of the recognized object in combination with the time when the face recognition result is obtained.

记录模块450利用人脸识别结果,以及在识别时得到人脸识别结果的时间,将时间与识别对象相关联,可以记录下识别对象在各个时间的行为轨迹。记录模块450还可以根据行为轨迹,自动获取需要的信息。如上下班打卡信息,日常行为习惯等。具体的,如公司门禁验证,根据识别模块420在9点得到识别对象A的人脸识别结果,在18点又得到识别对象A的人脸识别结果,记录模块450可以记录识别对象A在9点上班,18点下班的行为轨迹,自动完成识别对象A的上下班打卡记录;如果行为轨迹存在多条,识别模块420识别对象A在9点、12点、13点、15点、16点、18点出现在门禁前,记录模块450可以根据时间,获取最早时间9点为识别对象A的上班打卡记录,最晚时间18点为识别对象A的下班打卡记录;或者小区门禁验证,记录模块450利用多个人脸识别结果,以及在识别时得到人脸识别结果的时间,可以统计得到小区住户的日常出入小区的行为轨迹。进一步,记录模块450根据统计得到的小区住户日常出入小区的行为轨迹,可以得到小区住户的日常行为习惯,如作息习惯。按照小区住户的作息习惯(正常情况一般最早5点就有小区住户离开小区,最晚23点还有小区住户进入小区),将小区的多个门禁验证时间设置为与作息习惯相统一的时间(5点-23点),其他时间段门禁完全关闭,任何人都不能从这些门禁出入,小区中仅保留一个或两个门禁供小区住户进行门禁验证。这样提升小区的安全性,也更好对小区进出的人口进行管理,避免偷盗、传销、小广告等人员进出,对小区住户造成骚扰,甚至危及生命和财产安全的损失。The recording module 450 uses the face recognition result and the time when the face recognition result is obtained during the recognition, associates the time with the recognition object, and can record the behavior track of the recognition object at each time. The recording module 450 can also automatically acquire the required information according to the behavior track. Such as commuting card information, daily behavior habits, etc. Specifically, for example, the company's access control verification, according to the recognition module 420, the face recognition result of the recognition object A is obtained at 9 o'clock, and the face recognition result of the recognition object A is obtained at 18 o'clock, and the recording module 450 can record the recognition object A at 9 o'clock. The behavior track of going to get off work and leaving get off work at 18:00 will automatically complete the commuting record of the recognition object A; if there are multiple behavior tracks, the recognition module 420 will recognize the object A at 9:00, 12:00, 13:00, 15:00, 16:00, 18 If the point appears before the access control, the recording module 450 can obtain the check-in record for the identification object A at 9:00 at the earliest, and the punch-in record for the identification object A at 18:00 at the latest; or for community access control verification, the recording module 450 uses Multiple face recognition results, and the time when the face recognition results are obtained during the recognition, can count the behavioral trajectories of the residents of the community entering and leaving the community on a daily basis. Further, the recording module 450 can obtain the daily behavior habits, such as work and rest habits, of the residents of the residential area according to the behavior trajectories of the residents of the residential area entering and leaving the residential area on a daily basis. According to the work and rest habits of the residents of the community (normally, the residents of the community leave the community at the earliest at 5:00, and the residents of the community enter the community at the latest at 23:00). 5:00-23:00), the access control is completely closed during other time periods, and no one can enter or exit through these access control. Only one or two access control is reserved in the community for the residents of the community to conduct access control verification. In this way, the security of the community is improved, and it is also better to manage the population entering and leaving the community, avoiding theft, pyramid schemes, small advertisements and other personnel entering and leaving, causing harassment to the residents of the community, and even endangering the loss of life and property safety.

门禁验证可以仅包括进入时的门禁验证,也可以包括进入门禁验证和离开门禁验证,方便对进入和离开均进行门禁验证,更保障门禁安全,也方便区分识别对象是进入还是离开的行为轨迹。The access control verification can only include the access control verification when entering, and can also include the entry access verification verification and the exit access verification verification.

报警模块460,适于若门禁验证失败,记录图像并发出报警信息。The alarm module 460 is adapted to record an image and issue an alarm message if the access control verification fails.

为提升门禁安全,在判断模块430判断门禁验证失败后,报警模块460可以将该图像进行记录作为证据,并发出报警信息,如小区门禁验证,有行为怪异的陌生人在门禁前,判断模块430判断门禁验证失败,报警模块460发送携带有图像(包含陌生人的图像)的报警信息给物业监控中心,同时,发出警报声音震慑陌生人,保障小区安全。In order to improve access control security, after the judgment module 430 judges that the access control verification fails, the alarm module 460 can record the image as evidence, and send out alarm information, such as community access control verification, there is a strange stranger in front of the access control, the judgment module 430 Judging that the access control verification fails, the alarm module 460 sends alarm information carrying images (including images of strangers) to the property monitoring center, and at the same time, emits an alarm sound to deter strangers and ensure community safety.

人脸识别指导训练模块470,人脸识别指导训练模块470包括:第一输出单元471、第二输出单元472和指导训练单元473,还可以包括下采样单元474。The face recognition guidance training module 470 includes: a first output unit 471 , a second output unit 472 , a guidance training unit 473 , and may also include a downsampling unit 474 .

第一输出单元471,适于将人脸识别的训练样本数据输入至经训练得到的第一神经网络中,获得第一神经网络的至少一层第一中间层的输出数据。The first output unit 471 is adapted to input the training sample data of face recognition into the first neural network obtained by training, and obtain the output data of at least one first intermediate layer of the first neural network.

第一神经网络为预先经过训练已经固化的神经网络。具体地,第一神经网络预先使用了多个人脸识别的训练样本数据经过训练,第一神经网络已经能够很好的适用于人脸识别。其中,第一神经网络优选使用深层神经网络,如应用于云端服务器的神经网络,其性能好,计算量大,准确率高,速度会较慢。第���神经网络可以输出多层的第一中间层的输出数据,如第一神经网络包含4层第一中间层,分别为第4层第一中间层、第3层第一中间层、第2层第一中间层和第1层第一中间层,其中,第1层第一中间层为第一神经网络的瓶颈层。The first neural network is a pre-trained and solidified neural network. Specifically, the first neural network has been trained using multiple training sample data for face recognition in advance, and the first neural network has been well suited for face recognition. Among them, the first neural network preferably uses a deep neural network, such as a neural network applied to a cloud server, which has good performance, large amount of calculation, high accuracy and slow speed. The first neural network can output the output data of the first intermediate layer of multiple layers. For example, the first neural network contains 4 layers of the first intermediate layer, which are the first intermediate layer of the fourth layer, the first intermediate layer of the third layer, and the first intermediate layer of the second layer. The first intermediate layer and the first intermediate layer are the first intermediate layer, wherein the first intermediate layer of the first layer is the bottleneck layer of the first neural network.

第一输出单元471将人脸识别的训练样本数据输入至第一神经网络中,可以获得第一神经网络的至少一层第一中间层的输出数据。这里,第一输出单元471可以仅获取一层第一中间层的输出数据,也可以获取相邻多层的第一中间层的输出数据,或者第一输出单元471获取相互间隔的多层的第一中间层的输出数据,具体根据实施的实际情况进行设置,此处不做限定。The first output unit 471 inputs the training sample data of face recognition into the first neural network, and can obtain output data of at least one first intermediate layer of the first neural network. Here, the first output unit 471 may only acquire the output data of the first intermediate layer of one layer, or may acquire the output data of the first intermediate layer of adjacent layers, or the first output unit 471 may acquire the first intermediate layer of the multiple layers spaced from each other. The output data of an intermediate layer is specifically set according to the actual situation of the implementation, which is not limited here.

第二输出单元472,适于将人脸识别的训练样本数据输入至待训练的第二神经网络中,获得第二神经网络的至少一层第二中间层的输出数据以及最终输出数据,至少一层第二中间层与至少一层第一中间层具有对应关系。The second output unit 472 is adapted to input the training sample data of face recognition into the second neural network to be trained, and obtain the output data and final output data of at least one second intermediate layer of the second neural network, at least one The second intermediate layer has a corresponding relationship with the at least one first intermediate layer.

第二神经网络为人脸识别网络的指导训练中待训练的神经网络,为浅层神经网络,如应用于移动终端的神经网络,其计算能力有限,性能不佳。第一神经网络的层数多于第二神经网络。如第一神经网络的层数为4层,分别为第4层第一中间层、第3层第一中间层、第2层第一中间层和第1层第一中间层;第二神经网络的层数为2层,分别为第2层第二中间层和第1层第二中间层。The second neural network is the neural network to be trained in the guidance training of the face recognition network, which is a shallow neural network, such as a neural network applied to a mobile terminal, which has limited computing power and poor performance. The first neural network has more layers than the second neural network. For example, the number of layers of the first neural network is 4, which are the first middle layer of the fourth layer, the first middle layer of the third layer, the first middle layer of the second layer and the first middle layer of the first layer; the second neural network The number of layers is 2, which are the second intermediate layer of the second layer and the second intermediate layer of the first layer.

第二输出单元472将人脸识别的训练样本数据输入至第二神经网络中,获得第二神经网络的至少一层第二中间层的输出数据。其中,至少一层第二中间层与至少一层第一中间层具有对应关系。如第一神经网络的第1层第一中间层与第二神经网络的第1层第二中间层对应,第一神经网络的第2层第一中间层与第二神经网络的第2层第二中间层对应。The second output unit 472 inputs the training sample data of face recognition into the second neural network, and obtains output data of at least one second intermediate layer of the second neural network. Wherein, at least one second intermediate layer has a corresponding relationship with at least one first intermediate layer. For example, the first intermediate layer of the first neural network corresponds to the first intermediate layer of the second neural network, and the second intermediate layer of the first neural network corresponds to the second intermediate layer of the second neural network. The two middle layers correspond.

第二输出单元472获得的第二神经网络的第二中间层的输出数据需要与获得的第一神经网络的第一中间层的输出数据相对应,若第一输出单元471获得���一神经网络的���层���一中间层的输出数据,第���输出单元472���需要获得第二神经网络的两层第二中间层的输出数据。如第一输出单元471获得第一神经网络的第1层和第2层第一中间层的输出数据,对应的第二输出单元472获得第二神经网络的第1层和第2层第二中间层的输出数据。The output data of the second middle layer of the second neural network obtained by the second output unit 472 needs to correspond to the obtained output data of the first middle layer of the first neural network. If the first output unit 471 obtains the output data of the first middle layer of the first neural network For the output data of the two first intermediate layers, the second output unit 472 also needs to obtain the output data of the two second intermediate layers of the second neural network. For example, the first output unit 471 obtains the output data of the first layer of the first neural network and the first middle layer of the second layer, and the corresponding second output unit 472 obtains the first layer of the second neural network and the second middle layer of the second layer. The output data of the layer.

优选的,至少一层第一中间层可以包含第一神经网络的瓶颈层,即第一神经网络的第1层第一中间层,至少一层第二中间层包含第二神经网络的瓶颈层,即第二神经网络的第1层第二中间层。瓶颈层即神经网络中隐藏层的最高层,输出的向量维度最少的一层中间层。使用瓶颈层,可以保证后续指导训练单元473在进行训练时,使最终输出数据更加准确,得到较好的训练结果。Preferably, at least one layer of the first intermediate layer may include the bottleneck layer of the first neural network, that is, the first layer of the first intermediate layer of the first neural network, and at least one layer of the second intermediate layer may include the bottleneck layer of the second neural network, That is, the first layer and the second intermediate layer of the second neural network. The bottleneck layer is the highest layer of the hidden layer in the neural network, and the middle layer with the least dimension of the output vector. Using the bottleneck layer can ensure that the final output data is more accurate and better training results are obtained when the subsequent guidance training unit 473 performs training.

在第二输出单元472将人脸识别的训练样本数据输入至待训练的第二神经网络中,除获得第二神经网络的至少一层第二中间层的输出数据外,第二输出单元472还需要获得第二神经网络的最终输出数据,以便于利用最终输出数据计算损失,对第二神经网络进行训练。The second output unit 472 inputs the training sample data of face recognition into the second neural network to be trained, in addition to obtaining the output data of at least one second intermediate layer of the second neural network, the second output unit 472 also The final output data of the second neural network needs to be obtained, so as to use the final output data to calculate the loss and train the second neural network.

下采样单元474,适于将人脸识别的训练样本数据进行下采样处理,将处理后的数据作为第二神经网络的人脸识别的训练样本数据。The down-sampling unit 474 is adapted to perform down-sampling processing on the training sample data for face recognition, and use the processed data as the training sample data for face recognition of the second neural network.

考虑到第二神经网络为浅层神经网络,当人脸识别的训练样本数据较大时,直接使用人脸识别的训练样本数据会影响第二神经网络的运算速度。可选地,下采样单元474可以先对人脸识别的训练样本数据进行下采样处理,如人脸识别的训练样本数据为图片时,下采样单元474进行下采样处理可以先降低图片分辨率,将处理后的人脸识别的训练样本数据作为第二神经网络输入的人脸识别的训练样本数据。这样第二输出单元472使用下采样处理后低分辨率的人脸识别的训练样本数据进行训练,第一输出单元471使用高分辨率的人脸识别的训练样本数据进行训练,指导训练单元473利用两个神经网络的输出数据进行训练时,使得第二神经网络对低分辨率的人脸识别的训练样本数据也可以获得高分辨率的输出结果。指导训练单元473,适于利用至少一层第二中间层的输出数据与至少一层第一中间层的输出数据之间的损失,以及最终输出数据与预标注的输出数据之间的损失,对第二神经网络进行训练。Considering that the second neural network is a shallow neural network, when the training sample data for face recognition is large, directly using the training sample data for face recognition will affect the operation speed of the second neural network. Optionally, the down-sampling unit 474 can first perform down-sampling processing on the training sample data of face recognition. For example, when the training sample data of face recognition is a picture, the down-sampling unit 474 can perform down-sampling processing to reduce the picture resolution first, The processed face recognition training sample data is used as the face recognition training sample data input by the second neural network. In this way, the second output unit 472 uses the low-resolution face recognition training sample data after downsampling for training, the first output unit 471 uses the high-resolution face recognition training sample data for training, and instructs the training unit 473 to use When the output data of the two neural networks are trained, the second neural network can also obtain high-resolution output results for the low-resolution face recognition training sample data. The guidance training unit 473 is adapted to utilize the loss between the output data of the at least one second intermediate layer and the output data of the at least one first intermediate layer, and the loss between the final output data and the pre-labeled output data, to The second neural network is trained.

指导训练单元473根据至少一层第二中间层的输出数据与至少一层第一中间层的输出数据之间的损失,可以更新第二神经网络的权重参数,使第二神经网络至少一层第二中间层的输出数据尽可能的去接近第一神经网络至少一层第一中间层的输出数据。The guidance training unit 473 can update the weight parameters of the second neural network according to the loss between the output data of at least one second intermediate layer and the output data of at least one first intermediate layer, so that the second neural network has at least one first intermediate layer. The output data of the second intermediate layer is as close as possible to the output data of at least one first intermediate layer of the first neural network.

同时,指导训练单元473根据第二神经网络的最终输出数据与预标注的输出数据之间的损失,可以更新第二神经网络的权重参数,使第二神经网络最终输出数据尽可能的去接近预标注的输出数据,保证第二神经网络最终输出数据的准确性。通过执行以上各单元,完成对第二神经网络进行训练。可选地,当人脸识别指导训练模块470包括下采样单元474时,下采样单元474还需要对下采样处理后的人脸识别的训练样本数据进行预标注,得到下采样处理后人脸识别的训练样本数据的预标注的输出数据。指导训练单元473根据第二神经网络的最终输出数据与下采样处理后的预标注的输出数据之间的损失,可以更新第二神经网络的权重参数,使第二神经网络最终输出数据尽可能的去接近下采样处理后数据的预标注的输出数据,保证第二神经网络最终输出数据的准确性。At the same time, the guidance training unit 473 can update the weight parameters of the second neural network according to the loss between the final output data of the second neural network and the pre-labeled output data, so that the final output data of the second neural network is as close as possible to the pre-labeled output data. The labeled output data ensures the accuracy of the final output data of the second neural network. By executing the above units, the training of the second neural network is completed. Optionally, when the face recognition guidance training module 470 includes the downsampling unit 474, the downsampling unit 474 also needs to pre-label the training sample data of the downsampling processed face recognition to obtain the downsampling processed face recognition. The pre-labeled output data of the training sample data. The guidance training unit 473 can update the weight parameters of the second neural network according to the loss between the final output data of the second neural network and the pre-labeled output data after the downsampling process, so that the final output data of the second neural network is as large as possible. To be close to the pre-labeled output data of the down-sampling processed data to ensure the accuracy of the final output data of the second neural network.

收集模块480,适于收集摄像头拍摄的图像作为人脸识别的训练样本输入数据,以及,对图像进行人工标注,将标注后的图像作为预标注的输出数据。The collection module 480 is adapted to collect images captured by the camera as input data for training samples of face recognition, and to manually label the images, and use the labeled images as pre-labeled output data.

收集��块480收集摄像头拍摄的图像和标注后的图像可以作为样本库中用于人脸识别的训练样本输入数据和输出数据。利用收集模块480收集的摄像头拍摄的图像和标注后的图像可以对第二神经网络进行优化训练,以使第二神经网络的输出结果更加准确。The collection module 480 collects the images captured by the camera and the marked images, which can be used as input data and output data for training samples in the sample database for face recognition. The images captured by the camera and the labeled images collected by the collection module 480 can be used to optimize the training of the second neural network, so that the output result of the second neural network is more accurate.

根据本发明提供的基于人脸识别的门禁验证装置,利用经过训练的第二神经网络能够快速、准确地得到人脸识别结果,有效地提高对摄像头拍摄图像的人脸识别的准确率,同时保证第二神经网络的处理效率。进一步,还可以结合得到人脸识别结果的时间记录识别对象的行为轨迹,自动实现如获取上下班打卡等信息、获取识别对象日常行为习惯等。还可以根据识别对象日常行为习惯设置门禁,提升门禁安全。对于门禁验证失败的情况,可以记录图像并发出报警信息,方便留下证据并及时提醒,避免危险发生。将摄像头拍摄的图像和人工标注后的图像放入样本库,可以对第二神经网络进行优化训练,以使第二神经网络的输出结果更加准确。According to the access control verification device based on face recognition provided by the present invention, the face recognition result can be obtained quickly and accurately by using the trained second neural network, the accuracy rate of face recognition on the image captured by the camera is effectively improved, and the guarantee of The processing efficiency of the second neural network. Further, the behavioral trajectory of the recognized object can be recorded in combination with the time when the face recognition result is obtained, to automatically realize information such as obtaining commuting and punching cards, and obtaining the daily behavioral habits of the recognized object. Access control can also be set according to the daily behavior habits of the identified objects to improve access control security. For the failure of access control verification, the image can be recorded and an alarm message can be issued, which is convenient for leaving evidence and reminding in time to avoid danger. By placing the images captured by the camera and manually labeled images into the sample library, the second neural network can be optimized and trained to make the output results of the second neural network more accurate.

本申请还提供了一种非易失性计算机存储介质,所述计算机存储介质存储有至少一可执行指令,该计算机可执行指令可执行上述任意方法实施例中的基于人脸识别的门禁验证方法。The present application also provides a non-volatile computer storage medium, where the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the face recognition-based access control verification method in any of the above method embodiments .

图6示出了根据本发明一个实施例的一种计算设��的结构示意图,本发明具体实施例并不对计算设备的具体实现做限定。FIG. 6 shows a schematic structural diagram of a computing device according to an embodiment of the present invention. The specific embodiment of the present invention does not limit the specific implementation of the computing device.

如图6所示,该计算设备可以包括:处理器(processor)602、���信������(Communications Interface)604、存储器(memory)606、以及通信总线608。As shown in FIG. 6 , the computing device may include: a processor (processor) 602 , a communications interface (Communications Interface) 604 , a memory (memory) 606 , and a communication bus 608 .

其中:in:

处理器602、通信接口604、以及存储器606通过通信总线608完成相互间的通信。The processor 602 , the communication interface 604 , and the memory 606 communicate with each other through the communication bus 608 .

通信接口604,用于与其它设备比如客户端或其它服务器等的网元通信。The communication interface 604 is used to communicate with network elements of other devices such as clients or other servers.

处理器602,用于执行程序610,具体可以执行上述基于人脸识别的门禁验证方法实施例中的相关步骤。The processor 602 is configured to execute the program 610, and specifically may execute the relevant steps in the above embodiments of the face recognition-based access control verification method.

具体地,程序610可以包括程序代码,该程序代码包括计算机操作指令。Specifically, the program 610 may include program code including computer operation instructions.

处理器602可能是中央处理器CPU,或者是特定集成电路ASIC(ApplicationSpecific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。计算设备包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。The processor 602 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in the computing device may be the same type of processors, such as one or more CPUs; or may be different types of processors, such as one or more CPUs and one or more ASICs.

存储器606,用于存放程序610。存储器606可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 606 is used to store the program 610 . Memory 606 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.

程序610具体可以用于使得处理器602执行上述任意方法实施例中的基于人脸识别的门禁验证方法。程序610中各步骤的具体实现可以参见上述基于人脸识别的门禁验证实施例中的相应步骤和单元中对应的描述,在此不赘述。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的设备和模块的具体工作过程,可以参考前述方法实施例中的对应过程描述,在此不再赘述。The program 610 may be specifically configured to cause the processor 602 to execute the face recognition-based access control verification method in any of the above method embodiments. For the specific implementation of the steps in the program 610, reference may be made to the corresponding descriptions in the corresponding steps and units in the above embodiments of access control verification based on face recognition, which are not repeated here. Those skilled in the art can clearly understand that, for the convenience and brevity of description, for the specific working process of the above-described devices and modules, reference may be made to the corresponding process descriptions in the foregoing method embodiments, which will not be repeated here.

在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used with teaching based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not directed to any particular programming language. It is to be understood that various programming languages may be used to implement the inventions described herein, and that the descriptions of specific languages above are intended to disclose the best mode for carrying out the invention.

在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. It will be understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.

类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it is to be understood that in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or its description. This disclosure, however, should not be construed as reflecting an intention that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.

本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art will understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and further they may be divided into multiple sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method so disclosed may be employed in any combination, unless at least some of such features and/or procedures or elements are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的���施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will appreciate that although some of the embodiments described herein include certain features, but not others, included in other embodiments, that combinations of features of different embodiments are intended to be within the scope of the invention within and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的基于人脸识别的门禁验证的装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of some or all of the components in the apparatus for access control verification based on face recognition according to the embodiments of the present invention. Full functionality. The present invention can also be implemented as apparatus or apparatus programs (eg, computer programs and computer program products) for performing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from Internet sites, or provided on carrier signals, or in any other form.

应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件��来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-described embodiments illustrate rather than limit the invention, and that alternative embodiments may be devised by those skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. do not denote any order. These words can be interpreted as names.

Claims (22)

1. A door control verification method based on face recognition comprises the following steps:
acquiring an image shot by a camera;
inputting the image into a second neural network to obtain a face recognition result; the second neural network is obtained by utilizing output data of at least one middle layer of a first neural network trained in advance to conduct guiding training, wherein the number of layers of the first neural network is more than that of the second neural network; the training process of the second neural network comprises the following steps: inputting training sample data of face recognition into a first neural network obtained through training, and obtaining output data of at least one first intermediate layer of the first neural network; inputting training sample data of face recognition into a second neural network to be trained to obtain output data and final output data of at least one second intermediate layer of the second neural network, wherein the at least one second intermediate layer and the at least one first intermediate layer have a corresponding relation; training a second neural network by using the loss between the output data of the at least one second intermediate layer and the output data of the at least one first intermediate layer and the loss between the final output data and the pre-labeled output data;
judging whether the access control verification is successful or not by using the face recognition result;
if so, completing the access control verification and opening the access control for the identified object.
2. The method of claim 1, wherein the gate verification comprises an entry verification and/or an exit verification.
3. The method according to claim 1 or 2, wherein the method comprises:
and recording the behavior track of the recognition object by using the face recognition result and combining the time of obtaining the face recognition result.
4. The method of claim 1 or 2, wherein said completing access verification and enabling access to the identified object further comprises:
acquiring personal information of an identification object according to the face identification result; wherein the personal information includes authority setting information for identifying an object;
and opening the access control corresponding to the authority setting information of the identification object according to the personal information of the identification object.
5. The method according to claim 1 or 2, wherein the method further comprises:
and if the access control verification fails, recording the image and sending alarm information.
6. The method of claim 1, wherein the at least one first intermediate layer comprises a bottleneck layer of a first neural network; the at least one second intermediate layer comprises a bottleneck layer of a second neural network.
7. The method of claim 1 or 6, wherein said training a second neural network with a loss between the output data of the at least one second intermediate layer and the output data of the at least one first intermediate layer, and a loss between the final output data and pre-labeled output data further comprises:
and updating the weight parameters of the second neural network according to the loss between the output data of the at least one second intermediate layer and the output data of the at least one first intermediate layer, updating the weight parameters of the second neural network according to the loss between the final output data and the pre-labeled output data, and training the second neural network.
8. The method of claim 1 or 6, wherein before said inputting the input data of the training samples into the second neural network to be trained, obtaining the output data of at least one layer of the second intermediate layer of the second neural network and the final output data, the method further comprises:
and performing downsampling processing on the training sample data of the face recognition, and taking the processed data as training sample data of the face recognition of a second neural network.
9. The method of claim 8, wherein training a second neural network with a loss between the output data of the at least one layer of second intermediate data and the output data of the at least one layer of first intermediate data, and a loss between the final output data and pre-labeled output data further comprises:
and training a second neural network by using the loss between the output data of the at least one second intermediate layer and the output data of the at least one first intermediate layer and the loss between the final output data and the pre-labeled output data of the training sample data for face recognition after the down-sampling processing.
10. The method according to claim 1 or 2, wherein the method further comprises:
collecting images shot by a camera as training sample input data of face recognition, carrying out manual annotation on the images, and using the annotated images as pre-annotated output data.
11. The utility model provides an entrance guard verifying attachment based on face identification, it includes:
the acquisition module is suitable for acquiring images shot by the camera;
the recognition module is suitable for inputting the image into a second neural network to obtain a face recognition result; the second neural network is obtained by utilizing output data of at least one middle layer of a first neural network trained in advance to conduct guiding training, wherein the number of layers of the first neural network is more than that of the second neural network;
the judging module is suitable for judging whether the entrance guard verification is successful or not by utilizing the face recognition result;
the opening module is suitable for completing entrance guard verification and opening an entrance guard for the identified object if the identification is positive;
the face recognition network guidance training module comprises:
the first output unit is suitable for inputting training sample data of face recognition into a first neural network obtained through training to obtain output data of at least one first middle layer of the first neural network;
the second output unit is suitable for inputting training sample data of face recognition into a second neural network to be trained to obtain output data and final output data of at least one layer of second intermediate layer of the second neural network, and the at least one layer of second intermediate layer and the at least one layer of first intermediate layer have a corresponding relation;
and the guiding training unit is suitable for training the second neural network by utilizing the loss between the output data of the at least one second intermediate layer and the output data of the at least one first intermediate layer and the loss between the final output data and the pre-labeled output data.
12. The apparatus of claim 11, wherein the gate verification comprises an entry verification and/or an exit verification.
13. The apparatus of claim 11 or 12, wherein the apparatus further comprises:
and the recording module is suitable for recording the behavior track of the recognition object by using the face recognition result and combining the time of obtaining the face recognition result.
14. The apparatus of claim 11 or 12, wherein the opening module is further adapted to:
acquiring personal information of an identification object according to the face identification result; wherein the personal information includes authority setting information for identifying an object; and opening the access control corresponding to the authority setting information of the identification object according to the personal information of the identification object.
15. The apparatus of claim 11 or 12, wherein the apparatus further comprises:
and the alarm module is suitable for recording the image and sending alarm information if the access control verification fails.
16. The apparatus of claim 11, wherein the at least one first intermediate layer comprises a bottleneck layer of a first neural network; the at least one second intermediate layer comprises a bottleneck layer of a second neural network.
17. The apparatus according to claim 11 or 16, wherein the coaching unit is further adapted to:
and updating the weight parameters of the second neural network according to the loss between the output data of the at least one second intermediate layer and the output data of the at least one first intermediate layer, updating the weight parameters of the second neural network according to the loss between the final output data and the pre-labeled output data, and training the second neural network.
18. The apparatus of claim 11 or 16, wherein the face recognition network guidance training module further comprises:
and the down-sampling unit is suitable for performing down-sampling processing on the training sample data of the face recognition, and taking the processed data as the training sample data of the face recognition of the second neural network.
19. The apparatus of claim 18, wherein the coaching unit is further adapted to:
and training a second neural network by using the loss between the output data of the at least one second intermediate layer and the output data of the at least one first intermediate layer and the loss between the final output data and the pre-labeled output data of the training sample data for face recognition after the down-sampling processing.
20. The apparatus of claim 11 or 12, wherein the apparatus further comprises:
and the collection module is suitable for collecting the image shot by the camera as training sample input data of face recognition, carrying out manual annotation on the image and using the annotated image as pre-annotated output data.
21. A computing device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the entrance guard verification method based on the face recognition according to any one of claims 1 to 10.
22. A computer storage medium having at least one executable instruction stored therein, the executable instruction causing a processor to perform operations corresponding to the access control verification method based on face recognition according to any one of claims 1 to 10.
CN201711157085.4A 2017-11-20 2017-11-20 Access control verification method and device based on face recognition and computing equipment Active CN107833328B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711157085.4A CN107833328B (en) 2017-11-20 2017-11-20 Access control verification method and device based on face recognition and computing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711157085.4A CN107833328B (en) 2017-11-20 2017-11-20 Access control verification method and device based on face recognition and computing equipment

Publications (2)

Publication Number Publication Date
CN107833328A CN107833328A (en) 2018-03-23
CN107833328B true CN107833328B (en) 2020-07-07

Family

ID=61652041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711157085.4A Active CN107833328B (en) 2017-11-20 2017-11-20 Access control verification method and device based on face recognition and computing equipment

Country Status (1)

Country Link
CN (1) CN107833328B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108537921B (en) * 2018-03-27 2020-04-14 南京甄视智能科技有限公司 Method and system for visitor identification based on face recognition
CN109243021B (en) * 2018-08-28 2021-09-17 余利 Deep reinforcement learning type intelligent door lock system and device based on user experience analysis
CN110895838A (en) * 2018-09-12 2020-03-20 格力电器(武汉)有限公司 Intelligent door lock control method and device and intelligent door lock
CN110766849A (en) * 2019-10-24 2020-02-07 武汉菲旺软件技术有限责任公司 Method, device, equipment and medium for automatically identifying foreign personnel by community access control
CN112037391A (en) * 2020-07-28 2020-12-04 北方夜视技术股份有限公司 Intelligent safe integrated management system for clean workshop
CN113205004A (en) * 2021-04-08 2021-08-03 武汉大学 Face recognition method based on multi-stage security system and multi-stage security system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651067A (en) * 2012-04-08 2012-08-29 南京理工大学常熟研究院有限公司 Face recognition device applied to entrance guard
CN104463194A (en) * 2014-11-04 2015-03-25 深圳市华尊科技有限公司 Driver-vehicle classification method and device
CN106056562A (en) * 2016-05-19 2016-10-26 京东方科技集团股份有限公司 Face image processing method and device and electronic device
CN106778584A (en) * 2016-12-08 2017-05-31 南京邮电大学 A kind of face age estimation method based on further feature Yu shallow-layer Fusion Features
CN107066941A (en) * 2017-03-01 2017-08-18 桂林电子科技大学 A kind of face identification method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102651067A (en) * 2012-04-08 2012-08-29 南京理工大学常熟研究院有限公司 Face recognition device applied to entrance guard
CN104463194A (en) * 2014-11-04 2015-03-25 深圳市华尊科技有限公司 Driver-vehicle classification method and device
CN106056562A (en) * 2016-05-19 2016-10-26 京东方科技集团股份有限公司 Face image processing method and device and electronic device
CN106778584A (en) * 2016-12-08 2017-05-31 南京邮电大学 A kind of face age estimation method based on further feature Yu shallow-layer Fusion Features
CN107066941A (en) * 2017-03-01 2017-08-18 桂林电子科技大学 A kind of face identification method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于卷积神经网络的人脸识别��究与实现》;万士宁;《中国优秀硕士学位论文全文数据库 信息科技辑》;20170215(第2期);参见第66-81页 *

Also Published As

Publication number Publication date
CN107833328A (en) 2018-03-23

Similar Documents

Publication Publication Date Title
CN107833328B (en) Access control verification method and device based on face recognition and computing equipment
WO2017202169A1 (en) Access control data processing method, access control method, and electronic apparatus
CN112949346A (en) Feature library updating method and device, inference server and storage medium
CN108269337A (en) A kind of dynamic human face identification gate control system
CN107832799A (en) Object identifying method and device, computing device based on camera scene
TW202030683A (en) Claim information extraction method and device, and electronic equipment
CN113837030A (en) Personnel intelligent management and control method, system and computer equipment for epidemic prevention and control
CN113469138B (en) Object detection method and device, storage medium and electronic device
CN114550951B (en) A rapid medical treatment method, device, computer equipment and storage medium
CN111259682A (en) Method and device for monitoring safety at construction site
CN108154115A (en) Object identifying method and device, computing device based on camera scene
CN115719530A (en) Ticket checking method for gate and ticket checking gate
Jadhav et al. Attendance management system using face recognition
CN113642462A (en) Driving behavior assessment method and device, terminal equipment and storage medium
Aljohnai et al. AI-Based Attendance Management System Using Image Processing Techniques during COVID-19 Pandemic
CN112633244A (en) Social relationship identification method and device, electronic equipment and storage medium
CN121032506A (en) A method, device, storage medium, and program product for identifying transaction risks.
CN112784627B (en) Method, device, electronic device and medium for identity recognition
CN106157412A (en) A kind of personnel's access system and method
CN114743300B (en) Access control method and system based on behavior big data model
CN114495204A (en) A dual-terminal passenger authentication method for autonomous vehicles
Hidayat et al. Face Recognition-Based Surveillance System in Mining Industry
CN113762096A (en) Health code identification method and device, storage medium and electronic equipment
US20250141867A1 (en) Systems and methods for digital media-based user authentication
CN112017347B (en) A visitor registration method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant