CN117711076A - Speckle living body detection method, system, equipment and storage medium based on time sequence - Google Patents
Speckle living body detection method, system, equipment and storage medium based on time sequence Download PDFInfo
- Publication number
- CN117711076A CN117711076A CN202311599046.5A CN202311599046A CN117711076A CN 117711076 A CN117711076 A CN 117711076A CN 202311599046 A CN202311599046 A CN 202311599046A CN 117711076 A CN117711076 A CN 117711076A
- Authority
- CN
- China
- Prior art keywords
- frame
- tracked
- module
- detected
- executing
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/40—Spoof detection, e.g. liveness detection
- G06V40/45—Detection of the body part being alive
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/60—Extraction of image or video features relating to illumination properties, e.g. using a reflectance or lighting model
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/62—Extraction of image or video features relating to a temporal dimension, e.g. time-based feature extraction; Pattern tracking
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Software Systems (AREA)
- Evolutionary Computation (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- General Health & Medical Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Molecular Biology (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Human Computer Interaction (AREA)
- Image Analysis (AREA)
Abstract
本发明提供了一种基于时序的散斑活体检测方法,包括:获取待检测视频,进行目标检测,得到包含目标对象的初始帧,利用目标跟踪算法进行目标跟踪,对于跟踪到的每一帧图像,获取感兴趣区域,对多个图像帧中的感兴趣区域构建N个像素点的亮度变化向量,将该亮度变化向量作为活体检测分类器的输入,判断该特征向量表征的M个图像帧中的目标对象是否为活体。本发明具有抗干扰能力强、对各类假体都有很好的识别效果的优点。
The present invention provides a time-series-based speckle living body detection method, which includes: obtaining a video to be detected, performing target detection, obtaining an initial frame containing the target object, and using a target tracking algorithm to perform target tracking. For each frame of image tracked , obtain the area of interest, construct a brightness change vector of N pixels for the area of interest in multiple image frames, use the brightness change vector as the input of the living body detection classifier, and determine the M image frames represented by the feature vector. Whether the target object is a living body. The invention has the advantages of strong anti-interference ability and good recognition effect on various types of prostheses.
Description
技术领域Technical field
本发明涉及人体生物特征识别技术领域,具体地,涉及一种基于时序的散斑活体检测方法、系统、设备及存储介质。The present invention relates to the technical field of human biometric identification, and specifically to a time-series-based speckle living body detection method, system, equipment and storage medium.
背景技术Background technique
利用散斑进行活体识别是一种先进的技术,它基于散斑的特性,通过获取、处理和分析散斑图像,实现对生物体的识别和分类。这种技术具有非接触、高精度和高效率的特点,在医疗、安全、生物认证等领域得到了广泛的应用。Using speckles for living body recognition is an advanced technology. It is based on the characteristics of speckles and achieves the identification and classification of living organisms by acquiring, processing and analyzing speckle images. This technology has the characteristics of non-contact, high precision and high efficiency, and has been widely used in medical, security, biometric authentication and other fields.
在散斑图像的获取过程中,需要使用合适的光源和光学系统,并保证光源和系统的清洁和稳定。通过对散斑图像的处理和分析,可以提取出生物体的特征,并进行分类和识别。散斑技术的优势在于其安全性高、难以复制和非接触式。由于散斑特征是与个体生理结构紧密相关的,因此难以复制和伪造。同时,散斑技术是一种非接触式的生物识别技术,不会对人体造成任何伤害。In the process of acquiring speckle images, it is necessary to use appropriate light sources and optical systems, and ensure that the light sources and systems are clean and stable. Through the processing and analysis of speckle images, the characteristics of organisms can be extracted, classified and identified. The advantages of speckle technology are that it is safe, difficult to replicate and non-contact. Because speckle characteristics are closely related to individual physiological structures, they are difficult to copy and forge. At the same time, speckle technology is a non-contact biometric technology that will not cause any harm to the human body.
目前,散斑技术已经在金融、安防、医疗等多个领域得到广泛应用。例如,在金融领域,可以通过散斑技术进行身份验证,提高交易的安全性;在安防领域,可以通过散斑技术进行人员识别,提高安防效率;在医疗领域,可以通过散斑技术进行疾病诊断,提高诊断的准确性。At present, speckle technology has been widely used in many fields such as finance, security, and medical care. For example, in the financial field, speckle technology can be used for identity verification to improve transaction security; in the security field, speckle technology can be used to identify people and improve security efficiency; in the medical field, speckle technology can be used to diagnose diseases. , improve the accuracy of diagnosis.
但利用散斑进行活体识别也存在一些挑战,如光照条件、噪声干扰、特征提取和分类器的设计以及应用场景的多样性等。However, there are also some challenges in using speckles for living body recognition, such as lighting conditions, noise interference, feature extraction and classifier design, and the diversity of application scenarios.
以上背景技术内容的公开仅用于辅助理解本发明的发明构思及技术方案,其并不必然属于本专利申请的现有技术,在没有明确的证据表明上述内容在本专利申请的申请日已经公开的情况下,上述背景技术不应当用于评价本申请的新颖性和创造性。The disclosure of the above background technology content is only used to assist in understanding the inventive concepts and technical solutions of the present invention. It does not necessarily belong to the prior art of this patent application. In the absence of clear evidence that the above content has been disclosed on the filing date of this patent application, In this case, the above background technology should not be used to evaluate the novelty and inventiveness of this application.
发明内容Contents of the invention
为此,本发明对多帧散斑图检测目标对象,检测出连续多帧目标对象后,对感兴趣区域的散斑点提供一组像素点,构建像素点的亮度随时间变化的向量,并根据亮度变化向量判断目标对象是否为活体,具有抗干扰能力强、对各类假体都有很好的识别效果的优点。To this end, the present invention detects target objects in multi-frame speckle images. After detecting target objects in consecutive multiple frames, it provides a group of pixels for the speckle spots in the area of interest, constructs a vector in which the brightness of the pixels changes with time, and based on The brightness change vector determines whether the target object is a living body. It has the advantages of strong anti-interference ability and good recognition effect on various types of prostheses.
第一方面,本发明提供一种基于时序的散斑活体检测方法,其特征在于,包括:In a first aspect, the present invention provides a time-series-based speckle living body detection method, which is characterized by including:
步骤S1:获取待检测视频;Step S1: Obtain the video to be detected;
步骤S2:将所述待检测视频中的第一帧图像作为待检测帧;Step S2: Use the first frame image in the video to be detected as the frame to be detected;
步骤S3:对所述待检测帧进行目标检测,判断所述待检测帧中是否包含目标对象;如果是,则定位对目标区域并执行步骤S4,否则,执行步骤S5;Step S3: Perform target detection on the frame to be detected, and determine whether the frame to be detected contains a target object; if so, locate the target area and execute step S4; otherwise, execute step S5;
步骤S4:将所述待检测帧作为初始帧,利用特征点检测算法提取所述初始帧中的应选特征点,将所述初始帧中定位出的目标区域作为跟踪区域,将所述待检测视频中初始帧的下一帧作为待跟踪帧,并执行步骤S6;Step S4: Use the frame to be detected as an initial frame, use a feature point detection algorithm to extract feature points that should be selected in the initial frame, use the target area located in the initial frame as a tracking area, and use the target area to be detected as the tracking area. The next frame of the initial frame in the video is used as the frame to be tracked, and step S6 is executed;
步骤S5:将所述待检测视频中的下一帧图像作为待检测帧,并执行步骤S3;Step S5: Use the next frame of the image in the video to be detected as the frame to be detected, and execute step S3;
步骤S6:利用跟踪算法得到所述待跟踪帧的候选特征点,判断所述待跟踪帧中的应选特征点的数量是否满足第一预设条件,其中,所述应选特征点是所述候选特征点中满足第二预设条件的特征点,其中,所述第二预设条件为与所述待跟踪帧的上一帧中对应的应选特征点的距离小于或者等于S,如果所述待跟踪帧中的应选特征点的数量满足第一预设条件,确定所述待跟踪帧中跟踪到目标对象,根据所述待跟踪帧中的应选特征点的位置确定所述待跟踪帧上的目标区域,并执行步骤S7,否则,确定所述待跟踪帧中未跟踪到目标对象,将所述待跟踪帧的下一帧作为待检测帧,并执行步骤S3;Step S6: Use the tracking algorithm to obtain candidate feature points of the frame to be tracked, and determine whether the number of feature points that should be selected in the frame to be tracked meets the first preset condition, wherein the feature points that should be selected are the Feature points among candidate feature points that satisfy a second preset condition, where the second preset condition is that the distance to the corresponding feature point that should be selected in the previous frame of the frame to be tracked is less than or equal to S, if The number of feature points that should be selected in the frame to be tracked satisfies the first preset condition, it is determined that the target object is tracked in the frame to be tracked, and the target object to be tracked is determined based on the position of the feature points that should be selected in the frame to be tracked. The target area on the frame, and execute step S7, otherwise, determine that the target object is not tracked in the frame to be tracked, use the next frame of the frame to be tracked as the frame to be detected, and execute step S3;
步骤S7:获取所述待跟踪帧上的目标区域中的感兴趣区域,并执行步骤S8;Step S7: Obtain the area of interest in the target area on the frame to be tracked, and execute step S8;
步骤S8:判断跟踪到目标的图像帧的数量是否等于M,如果是,则执行步骤S9,否则,执行步骤S10;Step S8: Determine whether the number of image frames tracked to the target is equal to M. If so, execute step S9; otherwise, execute step S10;
步骤S9:以同一方向在M个图像帧上的感兴趣区域的每一个散斑点提取一组像素点,并对每个像素点构建亮度随时间变化的向量,得到N个像素点的亮度变化向量,并执行步骤S11;Step S9: Extract a group of pixels from each speckle spot in the area of interest on M image frames in the same direction, and construct a vector of brightness changes with time for each pixel, and obtain the brightness change vector of N pixels , and execute step S11;
步骤S10,获取所述待跟踪帧的下一帧,并将所述待跟踪帧的下一帧作为新的待跟踪帧,并执行步骤S6;Step S10, obtain the next frame of the frame to be tracked, use the next frame of the frame to be tracked as a new frame to be tracked, and execute step S6;
步骤S11,将所述亮度变化向量作为活体检测分类器的输入,判断所述特征向量表征的M个图像帧中的目标对象是否为活体,其中,所述活体检测分类器是使用预先获取的从真实目标对象和/或攻击目标对象提取得到的特征向量训练得到的。Step S11, use the brightness change vector as the input of a living body detection classifier to determine whether the target object in the M image frames represented by the feature vector is a living body, wherein the living body detection classifier uses pre-obtained from It is trained with feature vectors extracted from real target objects and/or attack target objects.
可选地,所述的一种基于时序的散斑活体检测方法,其特征在于,步骤S9中提取像素点时,以固定的位置对M个图像帧进行提取。Optionally, the described speckle living body detection method based on time series is characterized in that, when extracting pixel points in step S9, M image frames are extracted at fixed positions.
可选地,所述的一种基于时序的散斑活体检测方法,其特征在于,步骤S9中提取像素点时,以散斑点的中心为轴对M个图像帧进行提取。Optionally, the described speckle living body detection method based on time series is characterized in that, when extracting pixel points in step S9, M image frames are extracted with the center of the speckle spot as the axis.
可选地,所述的一种基于时序的散斑活体检测方法,其特征在于,步骤S9包括:Optionally, the described speckle living body detection method based on timing is characterized in that step S9 includes:
步骤S91:根据感兴趣区域内的散斑点分布,识别出连接最多散斑点的直线方向为第一方向;Step S91: According to the distribution of speckle spots in the area of interest, identify the straight line direction connecting the most speckle spots as the first direction;
步骤S92:以所述第一方向对M个图像帧中的所述感兴趣区域的散斑点进行提取,获得所述散斑点的亮度变化向量;Step S92: Extract the speckle spots in the region of interest in the M image frames in the first direction, and obtain the brightness change vector of the speckle spots;
步骤S93:对所述感兴趣区域的所有散斑点进行提取,得到N组亮度变化向量,并执行步骤S11。Step S93: Extract all speckle spots in the region of interest, obtain N groups of brightness change vectors, and execute step S11.
可选地,所述的一种基于时序的散斑活体检测方法,其特征在于,所述活体检测分类器在训练时的神经网络包括:第一反向残差模块、第一池化层、第二反向残差模块、第二池化层、第三反向残差模块、第一叠加层、第三池化层、第四反向残差模块、第二叠加层、第四池化层、第五反向残差模块、第三卷积层、第五池化层、随机丢弃层、分类器、第一卷积层、第二卷积层;其中,所述第一反向残差模块输出到所述第一池化层和所述第一卷积层,所述第一卷积层和所述第三反向残差模块输入所述第一叠加层,所述第二反向残差模块输出到所述第二卷积层和所述第二池化层,所述第二卷积层和所述第四反向残差模块输入所述第二叠加层;所述分类器输出活体概率和假体概率。Optionally, the time-series-based speckle life detection method is characterized in that the neural network of the life detection classifier during training includes: a first reverse residual module, a first pooling layer, The second reverse residual module, the second pooling layer, the third reverse residual module, the first overlay layer, the third pooling layer, the fourth reverse residual module, the second overlay layer, and the fourth pooling layer, the fifth reverse residual module, the third convolution layer, the fifth pooling layer, the random dropout layer, the classifier, the first convolution layer, the second convolution layer; wherein, the first reverse residual The difference module outputs to the first pooling layer and the first convolution layer, the first convolution layer and the third inverse residual module input the first overlay layer, and the second inverse residual module The residual module is output to the second convolution layer and the second pooling layer, and the second convolution layer and the fourth inverse residual module input the second overlay layer; the classification The device outputs the probability of living body and the probability of prosthetic body.
可选地,所述的一种基于时序的散斑活体检测方法,其特征在于,在步骤S11中,还将多个像素点的位置关系与所述亮度变化向量一同作为活体检测分类器的输入。Optionally, the described speckle life detection method based on time series is characterized in that, in step S11, the positional relationship of multiple pixels and the brightness change vector are also used as the input of the life detection classifier. .
可选地,所述的一种基于时序的散斑活体检测方法,其特征在于,在步骤S11中,根据所述像素点的位置,对所述亮度变化向量分别赋予不同的权重值。Optionally, the time-series-based speckle living body detection method is characterized in that, in step S11, different weight values are assigned to the brightness change vectors according to the positions of the pixel points.
第二方面,本发明提供一种基于时序的散斑活体检测系统,用于实现前述任一项所述的基于时序的散斑活体检测方法,其特征在于,包括:In a second aspect, the present invention provides a timing-based speckle living body detection system for implementing any of the aforementioned timing-based speckle living body detection methods, which is characterized in that it includes:
视频模块,用于获取待检测视频;Video module, used to obtain the video to be detected;
检测帧模块,用于将所述待检测视频中的第一帧图像作为待检测帧;A frame detection module, configured to use the first frame image in the video to be detected as the frame to be detected;
对象检测模块,用于对所述待检测帧进行目标检测,判断所述待检测帧中是否包含目标对象;如果是,则定位对目标区域并执行区域模块,否则,执行第一移动模块;An object detection module is used to perform target detection on the frame to be detected, and determine whether the frame to be detected contains a target object; if so, locate the target area and execute the area module; otherwise, execute the first movement module;
区域模块,用于将所述待检测帧作为初始帧,利用特征点检测算法提取所述初始帧中的应选特征点,将所述初始帧中定位出的目标区域作为跟踪区域,将所述待检测视频中初始帧的下一帧作为待跟踪帧,并执行筛选模块;A region module, configured to use the frame to be detected as an initial frame, use a feature point detection algorithm to extract feature points that should be selected in the initial frame, use the target area located in the initial frame as a tracking area, and use the feature point detection algorithm to extract the selected feature points in the initial frame. The next frame of the initial frame in the video to be detected is used as the frame to be tracked, and the filtering module is executed;
第一移动模块,用于将所述待检测视频中的下一帧图像作为待检测帧,并执行对象检测模块;The first moving module is used to use the next frame of the image in the video to be detected as the frame to be detected, and execute the object detection module;
筛选模块,用于利用跟踪算法得到所述待跟踪帧的候选特征点,判断所述待跟踪帧中的应选特征点的数量是否满足第一预设条件,其中,所述应选特征点是所述候选特征点中满足第二预设条件的特征点,其中,所述第二预设条件为与所述待跟踪帧的上一帧中对应的应选特征点的距离小于或者等于S,如果所述待跟踪帧中的应选特征点的数量满足第一预设条件,确定所述待跟踪帧中跟踪到目标对象,根据所述待跟踪帧中的应选特征点的位置确定所述待跟踪帧上的目标区域,并执行截取模块,否则,确定所述待跟踪帧中未跟踪到目标对象,将所述待跟踪帧的下一帧作为待检测帧,并执行对象检测模块;A screening module, configured to use a tracking algorithm to obtain candidate feature points of the frame to be tracked, and determine whether the number of feature points that should be selected in the frame to be tracked satisfies the first preset condition, wherein the feature points that should be selected are Feature points among the candidate feature points that satisfy a second preset condition, wherein the second preset condition is that the distance to the corresponding feature point that should be selected in the previous frame of the frame to be tracked is less than or equal to S, If the number of feature points that should be selected in the frame to be tracked meets the first preset condition, it is determined that the target object is tracked in the frame to be tracked, and the target object is determined according to the position of the feature points that should be selected in the frame to be tracked. The target area on the frame to be tracked, and execute the interception module; otherwise, determine that the target object is not tracked in the frame to be tracked, use the next frame of the frame to be tracked as the frame to be detected, and execute the object detection module;
截取模块,用于获取所述待跟踪帧上的目标区域中的感兴趣区域,并执行确认模块;An interception module, used to obtain the area of interest in the target area on the frame to be tracked, and execute the confirmation module;
确认模块,用于判断跟踪到目标的图像帧的数量是否等于M,如果是,则执行像素模块,否则,执行第二移动模块;The confirmation module is used to determine whether the number of image frames tracked to the target is equal to M. If so, execute the pixel module; otherwise, execute the second movement module;
像素模块,用于以同一方向在M个图像帧上的感兴趣区域的每一个散斑点提取一组像素点,并对每个像素点构建亮度随时间变化的向量,得到N个像素点的亮度变化向量,并执行判断模块;The pixel module is used to extract a set of pixels from each speckle spot in the area of interest on M image frames in the same direction, and construct a vector of changes in brightness over time for each pixel to obtain the brightness of N pixels. Change the vector and execute the judgment module;
第二移动模块,用于获取所述待跟踪帧的下一帧,并将所述待跟踪帧的下一帧作为新的待跟踪帧,并执行筛选模块;The second movement module is used to obtain the next frame of the frame to be tracked, use the next frame of the frame to be tracked as a new frame to be tracked, and execute the filtering module;
判断模块,用于将所述亮度变化向量作为活体检测分类器的输入,判断所述特征向量表征的M个图像帧中的目标对象是否为活体,其中,所述活体检测分类器是使用预先获取的从真实目标对象和/或攻击目标对象提取得到的特征向量训练得到的。A judgment module used to use the brightness change vector as an input to a living body detection classifier to judge whether the target object in the M image frames represented by the feature vector is a living body, wherein the living body detection classifier uses pre-obtained It is trained with feature vectors extracted from real target objects and/or attack target objects.
第三方面,本发明提供一种基于时序的散斑活体检测设备,其特征在于,包括:In a third aspect, the present invention provides a time-series-based speckle living body detection device, which is characterized in that it includes:
处理器;processor;
存储器,其中存储有所述处理器的可执行指令;A memory in which executable instructions of the processor are stored;
其中,所述处理器配置为经由执行所述可执行指令来执行前述中任意一项所述基于时序的散斑活体检测方法的步骤。Wherein, the processor is configured to execute any one of the foregoing steps of the timing-based speckle life detection method by executing the executable instructions.
第四方面,本发明提供一种计算机可读存储介质,用于存储程序,其特征在于,所述程序被执行时实现前述任意一项所述基于时序的散斑活体检测方法的步骤。In a fourth aspect, the present invention provides a computer-readable storage medium for storing a program, which is characterized in that when the program is executed, the steps of any one of the aforementioned timing-based speckle life detection methods are implemented.
与现有技术相比,本发明具有如下的有益效果:Compared with the prior art, the present invention has the following beneficial effects:
本发明利用多帧散斑图之间的变化进行活体检测,利用了散斑在不同深度、不同材质表面的效果不同,并且随时间变化的特性也不同,判断目标对象是否为活体,比利用单个散斑特性或单帧散斑图进行活体识别具有更好的效果,同时由于是多帧散斑间的对比,对于高仿的三维假体(如高仿真硅胶手模、橡胶手模等)具有更好的识别效果。The present invention uses the changes between multi-frame speckle images for living body detection. It takes advantage of the different effects of speckles at different depths and different material surfaces, and the different characteristics that change with time. It is better to determine whether the target object is a living body than by using a single speckle pattern. Speckle characteristics or single-frame speckle patterns have better results in living body recognition. At the same time, due to the comparison between multi-frame speckles, it is effective for high-imitation three-dimensional prostheses (such as high-simulation silicone hand models, rubber hand models, etc.) Better recognition effect.
本发明可以对三维硅胶手模,三维塑料手模,三维橡胶手模,三维硅胶套,二维平面假手做出假体的判断,能够有效的抓住活体真人手和攻击假体的本质特征,对于各类攻击假体具有广泛的抵挡作用。The invention can make prosthetic judgments on three-dimensional silicone hand models, three-dimensional plastic hand models, three-dimensional rubber hand models, three-dimensional silicone sleeves, and two-dimensional planar prosthetic hands, and can effectively grasp the essential characteristics of living real hands and attack the prostheses. It has a wide range of resistance to various types of attack prostheses.
本发明可以有效的降低环境光照给算法所带来的影响,在白天黑夜以及各种极端光照之下,能够稳定的工作而不受影响。The invention can effectively reduce the impact of ambient lighting on the algorithm, and can work stably without being affected during the day and night and under various extreme lighting conditions.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。通过阅读参照以下附图对非限制性实施例所作的详细描述,本发明的其它特征、目的和优点将会变得更明显:In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are only These are embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without exerting creative efforts. Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of the non-limiting embodiments with reference to the following drawings:
图1为本发明实施例中一种基于时序的散斑活体检测方法的步骤流程图;Figure 1 is a step flow chart of a timing-based speckle living body detection method in an embodiment of the present invention;
图2为本发明实施例中一种散斑图;Figure 2 is a speckle pattern in an embodiment of the present invention;
图3为本发明实施例中一种散斑图的提取示意图;Figure 3 is a schematic diagram of extracting a speckle pattern in an embodiment of the present invention;
图4为本发明实施例中一种真人皮肤反射的散斑亮度随时间变化图示意图;Figure 4 is a schematic diagram of the change in speckle brightness reflected by a real person's skin over time in an embodiment of the present invention;
图5为本发明实施例中一种硅胶手模假体反射的散斑亮度随时间的变化示意图;Figure 5 is a schematic diagram of the speckle brightness reflected by a silicone hand mold prosthesis changing with time in an embodiment of the present invention;
图6为本发明实施例中一种神经网络的结构示意图;Figure 6 is a schematic structural diagram of a neural network in an embodiment of the present invention;
图7为本发明实施例中一种反向残差模块的结构示意图;Figure 7 is a schematic structural diagram of a reverse residual module in an embodiment of the present invention;
图8为本发明实施例中一种得到N个像素点的亮度变化向量的步骤流程图;Figure 8 is a flow chart of steps for obtaining the brightness change vectors of N pixels in an embodiment of the present invention;
图9为本发明实施例中一种基于时序的散斑活体检测系统的结构示意图;Figure 9 is a schematic structural diagram of a timing-based speckle living body detection system in an embodiment of the present invention;
图10为本发明实施例中一种基于时序的散斑活体检测设备的结构示意图;以及Figure 10 is a schematic structural diagram of a timing-based speckle life detection device in an embodiment of the present invention; and
图11为本发明实施例中计算机可读存储介质的结构示意图。Figure 11 is a schematic structural diagram of a computer-readable storage medium in an embodiment of the present invention.
具体实施方式Detailed ways
下面结合具体实施例对本发明进行详细说明。以下实施例将有助于本领域的技术人员进一步理解本发明,但不以任何形式限制本发明。应当指出的是,对本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进。这些都属于本发明的保护范围。The present invention will be described in detail below with reference to specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例,例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if present) in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects without necessarily using Used to describe a specific order or sequence. It is to be understood that the figures so used are interchangeable under appropriate circumstances so that the embodiments of the invention described herein, for example, can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "include" and "having" and any variations thereof are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus that encompasses a series of steps or units and need not be limited to those explicitly listed. Those steps or elements may instead include other steps or elements not expressly listed or inherent to the process, method, product or apparatus.
本发明实施例提供的一种基于时序的散斑活体检测深度模组的方法,旨在解决现有技术中存在的问题。The embodiment of the present invention provides a time-series-based speckle living body detection depth module method, aiming to solve the problems existing in the existing technology.
下面以具体地实施例对本发明的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本发明的实施例进行描述。The technical solution of the present invention and how the technical solution of the present application solves the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will be described below with reference to the accompanying drawings.
本发明对多帧散斑图检测目标对象,检测出连续多帧目标对象后,对感兴趣区域的散斑点提供一组像素点,构建像素点的亮度随时间变化的向量,并根据亮度变化向量判断目标对象是否为活体,具有抗干扰能力强、对各类假体都有很好的识别效果的优点。The present invention detects target objects in multi-frame speckle patterns. After detecting target objects in consecutive multi-frames, it provides a group of pixels for the speckle spots in the area of interest, constructs a vector in which the brightness of the pixels changes with time, and calculates the brightness change vector according to the brightness change vector. It determines whether the target object is a living body, has the advantages of strong anti-interference ability and good recognition effect on various types of prostheses.
图1为本发明实施例中一种基于时序的散斑活体检测方法的步骤流程图。如图1所示,本发明实施例中一种基于时序的散斑活体检测方法的步骤包括:Figure 1 is a step flow chart of a time-series-based speckle living body detection method in an embodiment of the present invention. As shown in Figure 1, the steps of a timing-based speckle living body detection method in the embodiment of the present invention include:
步骤S1:获取待检测视频。Step S1: Obtain the video to be detected.
在本步骤中,从数据源中提取出待检测的视频。视频可以是一个实时视频流,也可以是预先录制的视频。视频既可以是本地实时获得的视频,也可以是其他终端采集后发送过来的视频。待检测视频可以为任意长度的视频,只要其中一部分满足需求即可。待检测视频可以是完整的一段视频,也可以是经过剪辑的视频。待检测视频是散斑图构成的视频。散斑图是由红外光斑投射信号生成的,包含有目标对象的信息。目标对象可以为人脸、手掌、瞳孔等任意人体部位。如图2所示,散斑图是由多个不连续的散斑的图案组成,与连续的红外图、RGB图等具有明显区别。同时,散斑的形状包含了目标对象的深度信息,可以更好地用于活体检测。In this step, the video to be detected is extracted from the data source. The video can be a live video stream or a pre-recorded video. The video can be a video obtained locally in real time, or a video collected and sent by other terminals. The video to be detected can be a video of any length, as long as part of it meets the requirements. The video to be detected can be a complete video or an edited video. The video to be detected is a video composed of speckle patterns. The speckle image is generated by the infrared spot projection signal and contains information about the target object. The target object can be any human body part such as face, palm, pupil, etc. As shown in Figure 2, the speckle image is composed of multiple discontinuous speckle patterns, which is obviously different from continuous infrared images, RGB images, etc. At the same time, the shape of the speckle contains the depth information of the target object, which can be better used for live detection.
目标对象的深度值需要在预设的范围内,如果超出预设的范围,则可能导致目标对象的信号较弱,难以进行有效的信号提取。对于散斑图而言,可以直接利用视差原理计算得到每个散斑点对象的深度值,从而可以评估是否满足需求。The depth value of the target object needs to be within a preset range. If it exceeds the preset range, the signal of the target object may be weak, making it difficult to perform effective signal extraction. For speckle images, the depth value of each speckle object can be calculated directly using the parallax principle, so that it can be evaluated whether it meets the requirements.
步骤S2:将所述待检测视频中的第一帧图像作为待检测帧。Step S2: Use the first frame image in the video to be detected as the frame to be detected.
在本步骤中,按照待检测视频中的图像帧在视频中的时间先后顺序,或指定的起始时间点,选择最早的第一帧图像作为待检测帧。In this step, according to the time sequence of the image frames in the video to be detected, or the specified starting time point, the earliest first frame of the image is selected as the frame to be detected.
步骤S3:对所述待检测帧进行目标检测,判断所述待检测帧中是否包含目标对象;如果是,则定位对目标区域并执行步骤S4,否则,执行步骤S5。Step S3: Perform target detection on the frame to be detected, and determine whether the frame to be detected contains a target object; if so, locate the target area and execute step S4; otherwise, execute step S5.
在本步骤中,对选定的帧进行目标检测。这涉及使用图像处理或机器学习技术来识别和定位视频中的目标对象。如果待检测帧中包含目标对象,算法会定位目标区域并进入下一步骤S4;否则,将返回到步骤S5,继续检测下一帧。In this step, object detection is performed on the selected frames. This involves using image processing or machine learning techniques to identify and locate target objects in videos. If the target object is included in the frame to be detected, the algorithm will locate the target area and enter the next step S4; otherwise, it will return to step S5 and continue to detect the next frame.
在进行目标检测时,根据应用场景选择合适的目标检测模型。比如检测人脸时,采用目标检测模型;检测手掌时,采用手掌检测模型;检测瞳孔时,采用瞳孔检测模型。需要说明的是,由于本实施例采用的散斑图,因此目标检测模型需要是可以应用于散斑图的模型,而非传统的基于红外图或RGB图像的目标检测模型。When performing target detection, select an appropriate target detection model according to the application scenario. For example, when detecting faces, the target detection model is used; when detecting palms, the palm detection model is used; when detecting pupils, the pupil detection model is used. It should be noted that since the speckle pattern is used in this embodiment, the target detection model needs to be a model that can be applied to the speckle pattern, rather than the traditional target detection model based on infrared images or RGB images.
在部分实施例中,还同时获得红外图或RGB图。红外图或RGB图与散斑图是对齐的。通过在红外图或RGB图上检测目标对象,判断散斑图上是否包含目标对象。如果在红外图或RGB图上检测到目标对象,就可以获得目标区域,再利用对应关系,获得散斑图上的目标区域。In some embodiments, infrared images or RGB images are also obtained simultaneously. The infrared image or RGB image is aligned with the speckle image. By detecting the target object on the infrared image or RGB image, it is judged whether the target object is included in the speckle image. If the target object is detected on the infrared image or RGB image, the target area can be obtained, and then the corresponding relationship is used to obtain the target area on the speckle image.
由于目标检测算法需要耗费的时间较长,如果对待检测视频中的每一帧均进行目标检测,则完成活体检测需要耗费大量的时间,导致活体检测的效率很低。而使用目标检测算法在一个待检测帧上检测到目标对象后,即对后续的图像帧使用目标跟踪算法跟踪目标对象,能明显缩短活体检测的时间,从而提高活体检测的效率。Since the target detection algorithm takes a long time, if target detection is performed on every frame of the video to be detected, it will take a lot of time to complete the living body detection, resulting in a very low efficiency of living body detection. After using the target detection algorithm to detect the target object on a frame to be detected, the target tracking algorithm is used to track the target object in subsequent image frames, which can significantly shorten the time of live detection, thereby improving the efficiency of live detection.
步骤S4:将所述待检测帧作为初始帧,利用特征点检测算法提取所述初始帧中的应选特征点,将所述初始帧中定位出的目标区域作为跟踪区域,将所述待检测视频中初始帧的下一帧作为待跟踪帧,并执行步骤S6。Step S4: Use the frame to be detected as an initial frame, use a feature point detection algorithm to extract feature points that should be selected in the initial frame, use the target area located in the initial frame as a tracking area, and use the target area to be detected as the tracking area. The next frame of the initial frame in the video is used as the frame to be tracked, and step S6 is performed.
在本步骤中,将步骤S3中检测出的待检测帧作为目标跟踪的初始帧。将初始帧中的目标区域作为跟踪区域,基于该跟踪区域即对初始帧的下一帧进行跟踪,从而得到初始帧的下一帧中的目标对象。在进行目标跟踪时,与前述步骤类似,可以采用适用于散斑图的目标跟踪算法。在部分实施例中,在进行目标跟踪时,还可以采用适用于RGB图或红外图的目标跟踪算法,再根据RGB图或红外图与散斑图的对应关系,获得应选特征点。In this step, the frame to be detected detected in step S3 is used as the initial frame for target tracking. The target area in the initial frame is used as the tracking area, and the next frame of the initial frame is tracked based on the tracking area, thereby obtaining the target object in the next frame of the initial frame. When performing target tracking, similar to the previous steps, a target tracking algorithm suitable for speckle patterns can be used. In some embodiments, when performing target tracking, a target tracking algorithm suitable for RGB images or infrared images can also be used, and then the selected feature points can be obtained based on the correspondence between the RGB image or infrared image and the speckle image.
步骤S5:将所述待检测视频中的下一帧图像作为待检测帧,并执行步骤S3。Step S5: Use the next frame of the image in the video to be detected as the frame to be detected, and execute step S3.
在本步骤中,我们将待检测视频中的下一帧图像作为新的待检测帧,然后返回步骤S3,继续进行目标检测。In this step, we use the next frame of the image in the video to be detected as the new frame to be detected, and then return to step S3 to continue target detection.
步骤S6:利用跟踪算法得到所述待跟踪帧的候选特征点,判断所述待跟踪帧中的应选特征点的数量是否满足第一预设条件,其中,所述应选特征点是所述候选特征点中满足第二预设条件的特征点,其中,所述第二预设条件为与所述待跟踪帧的上一帧中对应的应选特征点的距离小于或者等于S,如果所述待跟踪帧中的应选特征点的数量满足第一预设条件,确定所述待跟踪帧中跟踪到目标对象,根据所述待跟踪帧中的应选特征点的位置确定所述待跟踪帧上的目标区域,并执行步骤S7,否则,确定所述待跟踪帧中未跟踪到目标对象,将所述待跟踪帧的下一帧作为待检测帧,并执行步骤S3。Step S6: Use the tracking algorithm to obtain the candidate feature points of the frame to be tracked, and determine whether the number of feature points that should be selected in the frame to be tracked meets the first preset condition, wherein the feature points that should be selected are the Feature points among candidate feature points that satisfy a second preset condition, wherein the second preset condition is that the distance to the corresponding feature point that should be selected in the previous frame of the frame to be tracked is less than or equal to S, if The number of feature points that should be selected in the frame to be tracked meets the first preset condition, it is determined that the target object is tracked in the frame to be tracked, and the target object to be tracked is determined based on the position of the feature points that should be selected in the frame to be tracked. target area on the frame, and execute step S7. Otherwise, it is determined that the target object is not tracked in the frame to be tracked, and the next frame of the frame to be tracked is used as the frame to be detected, and step S3 is executed.
在本步骤中,利用跟踪算法得到待跟踪帧的候选特征点,然后判断待跟踪帧中的应选特征点的数量是否满足第一预设条件。如果满足,我们就确定待跟踪帧中跟踪到了目标对象,并根据应选特征点的位置确定待跟踪帧上的目标区域;如果不满足,我们就确定待跟踪帧中未跟踪到目标对象,然后将待跟踪帧的下一帧作为新的待检测帧,返回步骤S3。In this step, a tracking algorithm is used to obtain candidate feature points of the frame to be tracked, and then it is determined whether the number of feature points that should be selected in the frame to be tracked meets the first preset condition. If it is satisfied, we determine that the target object is tracked in the frame to be tracked, and determine the target area on the frame to be tracked based on the location of the selected feature points; if not, we determine that the target object is not tracked in the frame to be tracked, and then Use the next frame of the frame to be tracked as the new frame to be detected, and return to step S3.
步骤S7:获取所述待跟踪帧上的目标区域中的感兴趣区域,并执行步骤S8。Step S7: Obtain the area of interest in the target area on the frame to be tracked, and execute step S8.
在本步骤中,感兴趣区域是目标区域的一部分。由于目标区域通常是包含目标对象及部分背景在内的区域,而背景及部分目标对象对于本实施例中的活体判定无实际意义,但会干扰后续的比例判断,因此需要在感兴趣区域中利用特征点识别出更小的感兴趣区域。比如对于人脸,识别出多个关键之间的区域作为感兴趣区域;对于手掌,识别出手掌的关键点作为感兴趣区域。感兴趣区域是目标区域中随时间变动最大的部分。感兴趣区域的范围随目标对象的类型不同而不同。In this step, the region of interest is part of the target area. Since the target area usually includes the target object and part of the background, the background and part of the target object have no practical significance for the living body determination in this embodiment, but will interfere with the subsequent proportion judgment, so it needs to be used in the area of interest. Feature points identify smaller regions of interest. For example, for faces, the area between multiple keys is identified as the area of interest; for palms, the key points of the palm are identified as the area of interest. The region of interest is the part of the target area that changes most over time. The extent of the region of interest varies with the type of target object.
步骤S8:判断跟踪到目标的图像帧的数量是否等于M,如果是,则执行步骤S9,否则,执行步骤S10。Step S8: Determine whether the number of image frames tracked to the target is equal to M. If so, execute step S9. Otherwise, execute step S10.
在本步骤中,每跟踪到一帧包含目标对象的图像帧,则判断到目前为止,跟踪到目标对象的图像帧的数量是否达到预设的M,其中,M的具体数值可以根据活体检测的需要进行设置,在本实施例中不对M的具体数值进行限定。当跟踪到目标对象的图像帧的数量达到预设的M值时,执行步骤S9和S10,对M个图像帧进行提取。当跟踪到目标对象的帧数尚未达到预设的M值时,继续对当前帧的下一帧进行目标对象跟踪,直到跟踪到目标对象的图像帧的数量达到预设的M值。In this step, every time an image frame containing the target object is tracked, it is judged whether the number of image frames that have tracked the target object so far reaches the preset M, where the specific value of M can be based on the living body detection. Settings are required, and the specific value of M is not limited in this embodiment. When the number of image frames tracking the target object reaches the preset M value, steps S9 and S10 are executed to extract M image frames. When the number of frames in which the target object is tracked has not reached the preset M value, the target object tracking is continued on the next frame of the current frame until the number of image frames in which the target object is tracked reaches the preset M value.
步骤S9:以同一方向在M个图像帧上的感兴趣区域的每一个散斑点提取一组像素点,并对每个像素点构建亮度随时间变化的向量,得到N个像素点的亮度变化向量,并执行步骤S11。Step S9: Extract a group of pixels from each speckle spot in the area of interest on M image frames in the same direction, and construct a vector of brightness changes with time for each pixel, and obtain the brightness change vector of N pixels. , and execute step S11.
在本步骤中,对散斑图上的多个散斑以同一方向提取像素点。如图3所示,在提取像素点时,以一条直线的方式穿过散斑点,从而获得一组像素点。In this step, pixel points are extracted in the same direction from multiple speckles on the speckle map. As shown in Figure 3, when extracting pixels, a straight line passes through the speckle spots to obtain a set of pixels.
对真人手掌和硅胶手模分别拍摄了一组图像,并在这两组图像中的每一帧图像分别提取一组像素点。对于每一张图像,沿着所画的横线提取横线上的这组像素点的散斑图亮度作为纵坐标的值,将横线的横向位置(即X轴方向)作为横坐标,将每一组的多帧图像的亮度分别画到同一个坐标轴上,得到真人和攻击假体的散斑亮度的随着时间变化的特性分别如图4和图5所示。从图4中可以看出,散斑照射到真人皮肤上之后,由于皮肤中的毛细血管处于一个血液流动的动态变化的状态所导致的光学特性的动态变化,所以真人活体所反射的散斑亮度处在一个动态变化之中;对比之下,从图5中可以看出,3D硅胶手模假体由于不具备真人皮肤的这一特性,因此激光散斑的反射亮度也始终处于一种稳定的状态。A set of images was taken of the real palm and the silicone hand model, and a set of pixels was extracted from each frame of the two sets of images. For each image, extract the speckle pattern brightness of this group of pixels on the horizontal line along the drawn horizontal line as the value of the ordinate, use the horizontal position of the horizontal line (ie, the X-axis direction) as the abscissa, and The brightness of each group of multi-frame images is plotted on the same coordinate axis, and the time-varying characteristics of the speckle brightness of the real person and the attack prosthesis are obtained, as shown in Figures 4 and 5 respectively. As can be seen from Figure 4, after speckles are irradiated onto the skin of a real person, the capillaries in the skin are in a dynamic state of blood flow, resulting in dynamic changes in optical properties. Therefore, the brightness of the speckles reflected by the real person is is in a dynamic change; in contrast, as can be seen from Figure 5, the 3D silicone hand prosthesis does not have this characteristic of real skin, so the reflection brightness of laser speckles is always at a stable level. state.
在对每个像素点构建亮度随时间变化的向量时,以每个像素点为对象,记录其亮度随时间的变化关系,得到亮度随时间的向量。在图像帧的感兴趣区域内共提取出N个像素点,则可得到N个像素点的变化向量。本步骤中提取的像素点表示了感兴趣区域内每个散斑的特征,相比于整个散斑数据,具有更小的计算量,并且结果相当。When constructing a vector of changes in brightness over time for each pixel, take each pixel as an object and record the relationship between changes in brightness over time to obtain a vector of brightness over time. A total of N pixels are extracted from the area of interest of the image frame, and the change vectors of the N pixels can be obtained. The pixels extracted in this step represent the characteristics of each speckle in the area of interest. Compared with the entire speckle data, the calculation amount is smaller, and the results are comparable.
在部分实施例中,提取像素点时,以固定的位置对M个图像帧进行提取。在初始始帧中根据前述方法获得每个散斑点的像素点,并该像素点的位置固定,直接利用位置在后续的图像中进行提取,从而最终获得N个像素点的亮度变化向量。本实施例可以利用帧率快的特性,减少计算量,提高计算速度。In some embodiments, when extracting pixel points, M image frames are extracted at fixed positions. In the initial frame, the pixels of each speckle spot are obtained according to the aforementioned method, and the position of the pixel is fixed. The position is directly used to extract in subsequent images, thereby finally obtaining the brightness change vector of N pixels. This embodiment can take advantage of the fast frame rate feature to reduce the amount of calculation and increase the calculation speed.
在部分实施例中,在提取像素点时,以散斑点的中心为轴对M个图像帧进行提取。对每一帧重新确定像素点的位置,并根据散斑的对应关系确定多个像素点的对应关系。In some embodiments, when extracting pixel points, M image frames are extracted with the center of the speckle spot as the axis. The position of the pixel is re-determined for each frame, and the correspondence between multiple pixels is determined based on the correspondence between speckles.
在部分实施例中,如果同一散斑在不同图像帧上的像素点数量不同,则以M个图像帧中该散斑对应的最少像素点数量为有效像素点,并从每组的最中央的像素点进行对应,依次向两边进行对应,以获得精确的对应关系,从而获得唯一的亮度变化向量。In some embodiments, if the number of pixels of the same speckle on different image frames is different, the minimum number of pixels corresponding to the speckle in the M image frames is regarded as the effective pixel, and the number of pixels is determined from the centermost pixel of each group. The pixels are corresponding, and corresponding are performed on both sides in order to obtain an accurate correspondence, thereby obtaining a unique brightness change vector.
步骤S10,获取所述待跟踪帧的下一帧,并将所述待跟踪帧的下一帧作为新的待跟踪帧,并执行步骤S6。Step S10: Obtain the next frame of the frame to be tracked, use the frame next to the frame to be tracked as a new frame to be tracked, and execute step S6.
在本步骤中,当跟踪到人脸的帧数尚未达到预设的M值时,继续对当前待跟踪帧的下一帧进行人脸跟踪。In this step, when the number of frames in which the face is tracked has not reached the preset M value, face tracking continues on the next frame of the current frame to be tracked.
步骤S11,将所述亮度变化向量作为活体检测分类器的输入,判断所述特征向量表征的M个图像帧中的目标对象是否为活体,其中,所述活体检测分类器是使用预先获取的从真实目标对象和/或攻击目标对象提取得到的特征向量训练得到的。Step S11, use the brightness change vector as the input of a living body detection classifier to determine whether the target object in the M image frames represented by the feature vector is a living body, wherein the living body detection classifier uses pre-obtained from It is trained with feature vectors extracted from real target objects and/or attack target objects.
在本步骤中,将亮度变化向量作为活体检测分类器的输入,判断这M个图像帧中的目标对象是否为活体。这个活体检测分类器是使用预先从真实目标对象和/或攻击目标对象提取得到的特征向量训练得到的,可以将活体检测当做二分类问题处理,针对输入的任意一个特征向量,均可以判断该特征向量表征的M个图像帧中的目标对象是否为活体。In this step, the brightness change vector is used as the input of the living body detection classifier to determine whether the target object in these M image frames is a living body. This living body detection classifier is trained using feature vectors extracted from real target objects and/or attack target objects in advance. Living body detection can be treated as a two-classification problem. For any input feature vector, the feature can be judged The vector represents whether the target object in the M image frames is a living body.
在部分实施例中,还将多个像素点的位置关系与所述亮度变化向量一同作为活体检测分类器的输入。相比于前述实施例,本实施例的亮度变化向量不仅表示单个像素点的亮度随时间变化情况,还可以横向表示不同位置处的像素点之间的亮度关系,从而形成更加立体的亮度变化空间,大幅提高对假体的识别效果。In some embodiments, the positional relationship of multiple pixels and the brightness change vector are also used as the input of the living body detection classifier. Compared with the previous embodiment, the brightness change vector in this embodiment not only represents the brightness change of a single pixel over time, but can also horizontally represent the brightness relationship between pixels at different positions, thereby forming a more three-dimensional brightness change space. , greatly improving the recognition effect of prostheses.
在部分实施例中,在步骤S11中,根据所述像素点的位置,对所述亮度变化向量分别赋予不同的权重值。对于人体而言,血管的流动造成的变化是因不同个体、不同部位而不同的。权重在设置时,根据血管的位置进行权重分析。血管越粗,附近像素点的权重越大;血管越细,附近像素点的权重越小。人脸与手掌的血管分布不同,因此权重的设置也完全不同。需要说明的人,不同人的人脸或手掌的血管分布,尤其是毛细血管的分布位置不完全相同,因此本实施例在设置权重时,以血管附近的区域对相邻的若干个像素点赋予相同的权重值。比如,将像素点根据位置分为3类:靠近粗血管、靠近细血管、周围无血管,并分别给予不同的权重值。本实施例通过对不同的像素点的亮度变化向量赋予不同的权重值,可以使得变化明显的位置更易被识别,更好地识别出假体,并能够提高识别效率。In some embodiments, in step S11, different weight values are assigned to the brightness change vectors according to the positions of the pixels. For the human body, the changes caused by the flow of blood vessels vary from different individuals and different parts. When the weight is set, weight analysis is performed based on the location of the blood vessels. The thicker the blood vessels, the greater the weight of nearby pixels; the thinner the blood vessels, the smaller the weight of nearby pixels. The blood vessels in the face and palms are distributed differently, so the weight settings are also completely different. It should be noted that the distribution of blood vessels on the face or palms of different people, especially the distribution positions of capillaries, is not exactly the same. Therefore, when setting the weights in this embodiment, the area near the blood vessels is used to assign weights to several adjacent pixels. The same weight value. For example, pixels are divided into three categories according to their locations: close to thick blood vessels, close to thin blood vessels, and without surrounding blood vessels, and given different weight values respectively. In this embodiment, by assigning different weight values to the brightness change vectors of different pixel points, positions with obvious changes can be more easily identified, the prosthesis can be better identified, and the identification efficiency can be improved.
图6为本发明实施例中一种神经网络的结构示意图。如图6所示,本发明实施例中一种神经网络用于训练深度学习模型,包括:第一反向残差模块、第一池化层、第二反向残差模块、第二池化层、第三反向残差模块、第一叠加层、第三池化层、第四反向残差模块、第二叠加层、第四池化层、第五反向残差模块、第三卷积层、第五池化层、随机丢弃层、分类器、第一卷积层、第二卷积层;其中,所述第一反向残差模块输出到所述第一池化层和所述第一卷积层,所述第一卷积层和所述第三反向残差模块输入所述第一叠加层,所述第二反向残差模块输出到所述第二卷积层和所述第二池化层,所述第二卷积层和所述第四反向残差模块输入所述第二叠加层;所述分类器输出活体概率和假体概率。Figure 6 is a schematic structural diagram of a neural network in an embodiment of the present invention. As shown in Figure 6, a neural network in the embodiment of the present invention is used to train a deep learning model, including: a first reverse residual module, a first pooling layer, a second reverse residual module, and a second pooling layer. layer, the third reverse residual module, the first overlay layer, the third pooling layer, the fourth reverse residual module, the second overlay layer, the fourth pooling layer, the fifth reverse residual module, the third Convolutional layer, fifth pooling layer, random discarding layer, classifier, first convolutional layer, second convolutional layer; wherein the first reverse residual module outputs to the first pooling layer and The first convolution layer, the first convolution layer and the third inverse residual module input the first overlay layer, and the second inverse residual module outputs to the second convolution layer and the second pooling layer, the second convolution layer and the fourth inverse residual module input the second overlay layer; the classifier outputs the probability of living body and the probability of prosthesis.
需要说明的是,本领域技术人员可以根据图像大小调节池化层数,从而在训练速度与训练效果之间取得平衡。It should be noted that those skilled in the art can adjust the number of pooling layers according to the image size, thereby striking a balance between training speed and training effect.
深度学习模型在训练时的神经网络设计具有以下显著优点:The neural network design during training of deep learning models has the following significant advantages:
逐层预训练:深度学习模型采用逐层预训练的训练机制,这使得其能够克服传统神经网络容易过拟合及训练速度慢的问题。Layer-by-layer pre-training: The deep learning model adopts a layer-by-layer pre-training training mechanism, which enables it to overcome the problems of easy overfitting and slow training speed of traditional neural networks.
自动特征学习:通过逐层数据预训练,深度学习模型能够自动地学习到数据的初级特征,从而克服了人工设计特征费时、费力的传统方式。Automatic feature learning: Through layer-by-layer data pre-training, the deep learning model can automatically learn the primary features of the data, thus overcoming the time-consuming and laborious traditional method of manually designing features.
分布式数据学习:深度学习模型能够更有效地在分布式数据上进行学习,使得学习效率达到指数级。Distributed data learning: Deep learning models can learn more effectively on distributed data, making learning efficiency exponential.
深层建模能力:与浅层建模方式相比,深层建模能够更细致和高效地表示实际的复杂非线性问题。这意味着深度学习模型在处理复杂的现实问题时,如图像识别、语音识别等,具有更强的性能。Deep modeling capabilities: Compared with shallow modeling methods, deep modeling can represent actual complex nonlinear problems in more detail and efficiently. This means that deep learning models have stronger performance when dealing with complex real-world problems, such as image recognition, speech recognition, etc.
本实施例使得深度学习模型在处理复杂任务时具有更高的效率和准确性。This embodiment enables the deep learning model to have higher efficiency and accuracy when processing complex tasks.
图7为本发明实施例中一种反向残差模块的结构示意图。如图7所示,本发明实施例中一种反向残差模块包括:第一子卷积层、第一批量归一化层、第一非线性激活层、第二子卷积层、第二批量归一化层、第二非线性激活层、第三子卷积层、第三批量归一化层、第一子叠加层;其中,所述第一子卷积层输出到所述第一批量归一化层,所述第一子卷积层和所述第三批量归一化层输入到所述第一叠加层。Figure 7 is a schematic structural diagram of a reverse residual module in an embodiment of the present invention. As shown in Figure 7, a reverse residual module in the embodiment of the present invention includes: a first sub-convolution layer, a first batch normalization layer, a first non-linear activation layer, a second sub-convolution layer, two batch normalization layers, a second nonlinear activation layer, a third sub-convolution layer, a third batch normalization layer, and a first sub-overlay layer; wherein the first sub-convolution layer is output to the A batch normalization layer, the first sub-convolutional layer and the third batch normalization layer are input to the first overlay layer.
本实施例中的反向残差模块可以是前述实施例中第一反向残差模块、所述第二反向残差模块、所述第三反向残差模块、所述第四反向残差模块、所述第五反向残差模块中的任意一或多个。The reverse residual module in this embodiment may be the first reverse residual module, the second reverse residual module, the third reverse residual module, the fourth reverse residual module in the previous embodiment. Any one or more of the residual module and the fifth reverse residual module.
本实施例具有至少以下明显的优点:This embodiment has at least the following obvious advantages:
减少模型参数量:逆残差模块通过对残差连接进行可逆变换,可以有效地减少模型的参数量。传统的残差模块需要大量的卷积层,使得需要大量的参数。而逆残差模块通过倒置残差结构,即先进行投影卷积升维,然后通过深度卷积,最后再使用投影卷积降维,从而有效地减少了参数量。Reduce the number of model parameters: The inverse residual module can effectively reduce the number of model parameters by performing a reversible transformation on the residual connection. Traditional residual modules require a large number of convolutional layers, which require a large number of parameters. The inverse residual module effectively reduces the number of parameters by inverting the residual structure, that is, first performing projected convolution to increase the dimension, then using depth convolution, and finally using projected convolution to reduce the dimension.
提高模型性能:逆残差模块的设计使得网络在训练过程中不会出现梯度消失或梯度爆炸的问题,从而可以训练非常深的网络。这有助于提高模型的性能。Improve model performance: The design of the inverse residual module prevents the network from disappearing or exploding gradients during training, allowing the training of very deep networks. This helps improve model performance.
实现复杂度低:逆残差模块的实现主要通过两层相同或不同的卷积层和一个跳跃连接来完成,其实现相对简单,计算复杂度较低。Low implementation complexity: The implementation of the inverse residual module is mainly completed through two layers of the same or different convolutional layers and a skip connection. Its implementation is relatively simple and the computational complexity is low.
因此,实施例有效解决了深度网络训练中的梯度问题和参数过多的问题,提高了模型的性能,并且实现起来相对简单,这使得它在处理复杂任务时具有很高的实用价值。Therefore, the embodiment effectively solves the gradient problem and the problem of too many parameters in deep network training, improves the performance of the model, and is relatively simple to implement, which makes it of high practical value when processing complex tasks.
图8为本发明实施例中一种得到N个像素点的亮度变化向量的步骤流程图。如图8所示,本发明实施例中一种得到N个像素点的亮度变化向量的步骤包括:FIG. 8 is a flow chart of steps for obtaining brightness change vectors of N pixel points in an embodiment of the present invention. As shown in Figure 8, in the embodiment of the present invention, a step of obtaining the brightness change vector of N pixel points includes:
步骤S91:根据感兴趣区域内的散斑点分布,识别出连接最多散斑点的直线方向为第一方向。Step S91: According to the distribution of speckle spots in the area of interest, identify the straight line direction connecting the most speckle spots as the first direction.
在本步骤中,首先需要对感兴趣区域内的散斑点进行统计和分析。可以通过计算每个散斑点的坐标值,然后使用聚类算法(如K-means)对这些坐标值进行分组,以识别出散斑点的分布情况。接下来,可以计算每组散斑点的中心点,并找出连接这些中心点的直线方向。最后,选择连接最多散斑点的直线方向作为第一方向。In this step, you first need to count and analyze the speckle spots in the area of interest. The distribution of speckle spots can be identified by calculating the coordinate value of each speckle spot and then using a clustering algorithm (such as K-means) to group these coordinate values. Next, you can calculate the center point of each set of speckle spots and find the direction of the straight line connecting these center points. Finally, the straight line direction connecting the most speckle spots is selected as the first direction.
由于散斑是经过设计的,因此在一个图像帧的感兴趣区域中,散斑点会以一定的模式分布。通过分析这个模式,可以识别出连接最多散斑点的直线方向。Because speckle is designed, it will be distributed in a certain pattern within the region of interest in an image frame. By analyzing this pattern, the direction of the straight lines connecting the most speckle spots can be identified.
步骤S92:以所述第一方向对M个图像帧中的所述感兴趣区域的散斑点进行提取,获得所述散斑点的亮度变化向量。Step S92: Extract the speckle spots in the region of interest in the M image frames in the first direction to obtain the brightness change vector of the speckle spots.
在这个步骤中,使用上一步骤中识别出的第一方向,对一系列图像帧(M个图像帧)中的感兴趣区域的散斑点进行提取。这个过程会获得每个散斑点的亮度变化向量。这个向量可以表示散斑点在不同帧之间的亮度变化情况。In this step, the speckle spots of the area of interest in a series of image frames (M image frames) are extracted using the first direction identified in the previous step. This process will obtain the brightness change vector of each speckle spot. This vector can represent the brightness change of the speckle spot between different frames.
步骤S93:对所述感兴趣区域的所有散斑点进行提取,得到N组亮度变化向量,并执行步骤S11。Step S93: Extract all speckle spots in the region of interest, obtain N groups of brightness change vectors, and execute step S11.
在这个步骤中,需要对感兴趣区域的所有散斑点进行提取,以得到N组亮度变化向量。将这些亮度变化向量存储在一个矩阵中,以便后续步骤S11的处理。In this step, all speckle spots in the area of interest need to be extracted to obtain N sets of brightness change vectors. These brightness change vectors are stored in a matrix for subsequent processing in step S11.
本实施例识别出连接最多散斑点的第一方向,并对散斑提取部分像素点,得到N组亮度变化向量,可以更准确地提取感兴趣区域的散斑点,从而提高后续处理的准确性,可以更好地分析散斑点的分布和变化情况,并且可以降低计算量,提高计算效率。This embodiment identifies the first direction connecting the most speckle spots, extracts some pixels from the speckle spots, and obtains N sets of brightness change vectors, which can more accurately extract speckle spots in the area of interest, thus improving the accuracy of subsequent processing. The distribution and changes of speckle spots can be better analyzed, the amount of calculation can be reduced, and the calculation efficiency can be improved.
图9为本发明实施例中一种基于时序的散斑活体检测系统的结构示意图。如图9所示,本发明实施例中一种基于时序的散斑活体检测系统包括:FIG. 9 is a schematic structural diagram of a timing-based speckle life detection system in an embodiment of the present invention. As shown in Figure 9, a timing-based speckle living body detection system in the embodiment of the present invention includes:
视频模块,用于获取待检测视频;Video module, used to obtain the video to be detected;
检测帧模块,用于将所述待检测视频中的第一帧图像作为待检测帧;A frame detection module, configured to use the first frame image in the video to be detected as the frame to be detected;
对象检测模块,用于对所述待检测帧进行目标检测,判断所述待检测帧中是否包含目标对象;如果是,则定位对目标区域并执行区域模块,否则,执行第一移动模块;An object detection module is used to perform target detection on the frame to be detected, and determine whether the frame to be detected contains a target object; if so, locate the target area and execute the area module; otherwise, execute the first movement module;
区域模块,用于将所述待检测帧作为初始帧,利用特征点检测算法提取所述初始帧中的应选特征点,将所述初始帧中定位出的目标区域作为跟踪区域,将所述待检测视频中初始帧的下一帧作为待跟踪帧,并执行筛选模块;A region module, configured to use the frame to be detected as an initial frame, use a feature point detection algorithm to extract feature points that should be selected in the initial frame, use the target area located in the initial frame as a tracking area, and use the feature point detection algorithm to extract the selected feature points in the initial frame. The next frame of the initial frame in the video to be detected is used as the frame to be tracked, and the filtering module is executed;
第一移动模块,用于将所述待检测视频中的下一帧图像作为待检测帧,并执行对象检测模块;The first moving module is used to use the next frame of the image in the video to be detected as the frame to be detected, and execute the object detection module;
筛选模块,用于利用跟踪算法得到所述待跟踪帧的候选特征点,判断所述待跟踪帧中的应选特征点的数量是否满足第一预设条件,其中,所述应选特征点是所述候选特征点中满足第二预设条件的特征点,其中,所述第二预设条件为与所述待跟踪帧的上一帧中对应的应选特征点的距离小于或者等于S,如果所述待跟踪帧中的应选特征点的数量满足第一预设条件,确定所述待跟踪帧中跟踪到目标对象,根据所述待跟踪帧中的应选特征点的位置确定所述待跟踪帧上的目标区域,并执行截取模块,否则,确定所述待跟踪帧中未跟踪到目标对象,将所述待跟踪帧的下一帧作为待检测帧,并执行对象检测模块;A screening module, configured to use a tracking algorithm to obtain candidate feature points of the frame to be tracked, and determine whether the number of feature points that should be selected in the frame to be tracked satisfies the first preset condition, wherein the feature points that should be selected are Feature points among the candidate feature points that satisfy a second preset condition, wherein the second preset condition is that the distance to the corresponding feature point that should be selected in the previous frame of the frame to be tracked is less than or equal to S, If the number of feature points that should be selected in the frame to be tracked meets the first preset condition, it is determined that the target object is tracked in the frame to be tracked, and the target object is determined according to the position of the feature points that should be selected in the frame to be tracked. The target area on the frame to be tracked, and execute the interception module; otherwise, determine that the target object is not tracked in the frame to be tracked, use the next frame of the frame to be tracked as the frame to be detected, and execute the object detection module;
截取模块,用于获取所述待跟踪帧上的目标区域中的感兴趣区域,并执行确认模块;An interception module, used to obtain the area of interest in the target area on the frame to be tracked, and execute the confirmation module;
确认模块,用于判断跟踪到目标的图像帧的数量是否等于M,如果是,则执行像素模块,否则,执行第二移动模块;The confirmation module is used to determine whether the number of image frames tracked to the target is equal to M. If so, execute the pixel module; otherwise, execute the second movement module;
像素模块,用于以同一方向在M个图像帧上的感兴趣区域的每一个散斑点提取一组像素点,并对每个像素点构建亮度随时间变化的向量,得到N个像素点的亮度变化向量,并执行判断模块;The pixel module is used to extract a set of pixels from each speckle spot in the area of interest on M image frames in the same direction, and construct a vector of changes in brightness over time for each pixel to obtain the brightness of N pixels. Change the vector and execute the judgment module;
第二移动模块,用于获取所述待跟踪帧的下一帧,并将所述待跟踪帧的下一帧作为新的待跟踪帧,并执行筛选模块;The second movement module is used to obtain the next frame of the frame to be tracked, use the next frame of the frame to be tracked as a new frame to be tracked, and execute the filtering module;
判断模块,用于将所述亮度变化向量作为活体检测分类器的输入,判断所述特征向量表征的M个图像帧中的目标对象是否为活体,其中,所述活体检测分类器是使用预先获取的从真实目标对象和/或攻击目标对象提取得到的特征向量训练得到的。A judgment module used to use the brightness change vector as an input to a living body detection classifier to judge whether the target object in the M image frames represented by the feature vector is a living body, wherein the living body detection classifier uses pre-obtained It is trained with feature vectors extracted from real target objects and/or attack target objects.
本实施例对多帧散斑图检测目标对象,检测出连续多帧目标对象后,对感兴趣区域的散斑点提供一组像素点,构建像素点的亮度随时间变化的向量,并根据亮度变化向量判断目标对象是否为活体,具有抗干扰能力强、对各类假体都有很好的识别效果的优点。This embodiment detects the target object in multi-frame speckle images. After detecting the target object in consecutive multiple frames, a group of pixels is provided for the speckle spots in the area of interest, and a vector of the brightness of the pixels changing with time is constructed, and a vector is constructed according to the brightness change. The vector determines whether the target object is a living body. It has the advantages of strong anti-interference ability and good recognition effect on various types of prostheses.
本发明实施例中还提供一种基于时序的散斑活体检测设备,包括处理器。存储器,其中存储有处理器的可执行指令。其中,处理器配置为经由执行可执行指令来执行的一种基于时序的散斑活体检测方法的步骤。An embodiment of the present invention also provides a timing-based speckle life detection device, including a processor. Memory, which stores the executable instructions of the processor. Wherein, the processor is configured to execute the steps of a timing-based speckle life detection method by executing executable instructions.
如上,本实施例对多帧散斑图检测目标对象,检测出连续多帧目标对象后,对感兴趣区域的散斑点提供一组像素点,构建像素点的亮度随时间变化的向量,并根据亮度变化向量判断目标对象是否为活体,具有抗干扰能力强、对各类假体都有很好的识别效果的优点。As above, this embodiment detects the target object in multi-frame speckle images. After detecting the target object in consecutive multiple frames, it provides a set of pixels for the speckle spots in the area of interest, constructs a vector of changes in the brightness of the pixels over time, and based on The brightness change vector determines whether the target object is a living body. It has the advantages of strong anti-interference ability and good recognition effect on various types of prostheses.
所属技术领域的技术人员能够理解,本发明的各个方面可以实现为系统、方法或程序产品。因此,本发明的各个方面可以具体实现为以下形式,即:完全的硬件实施方式、完全的软件实施方式(包括固件、微代码等),或硬件和软件方面结合的实施方式,这里可以统称为“电路”、“模块”或“平台”。Those skilled in the art will understand that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention can be implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "Circuit", "Module" or "Platform".
图10是本发明实施例中的一种基于时序的散斑活体检测设备的结构示意图。下面参照图10来描述根据本发明的这种实施方式的电子设备600。图10显示的电子设备600仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。Figure 10 is a schematic structural diagram of a timing-based speckle life detection device in an embodiment of the present invention. An electronic device 600 according to this embodiment of the present invention is described below with reference to FIG. 10 . The electronic device 600 shown in FIG. 10 is only an example and should not bring any limitations to the functions and scope of use of the embodiments of the present invention.
如图10所示,电子设备600以通用计算设备的形式表现。电子设备600的组件可以包括但不限于:至少一个处理单元610、至少一个存储单元620、连接不同平台组件(包括存储单元620和处理单元610)的总线630、显示单元640等。As shown in Figure 10, electronic device 600 is embodied in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including the storage unit 620 and the processing unit 610), a display unit 640, and the like.
其中,存储单元存储有程序代码,程序代码可以被处理单元610执行,使得处理单元610执行本说明书上述一种基于时序的散斑活体检测方法部分中描述的根据本发明各种示例性实施方式的步骤。例如,处理单元610可以执行如图1中所示的步骤。Among them, the storage unit stores program code, and the program code can be executed by the processing unit 610, so that the processing unit 610 executes the various exemplary embodiments of the present invention described in the above-mentioned timing-based speckle life detection method part of this specification. step. For example, processing unit 610 may perform steps as shown in FIG. 1 .
存储单元620可以包括易失性存储单元形式的可读介质,例如随机存取存储单元(RAM)6201和/或高速缓存存储单元6202,还可以进一步包括只读存储单元(ROM)6203。The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 6201 and/or a cache storage unit 6202, and may further include a read-only storage unit (ROM) 6203.
存储单元620还可以包括具有一组(至少一个)程序模块6205的程序/实用工具6204,这样的程序模块6205包括但不限于:操作系统、一个或者多个应用程序、其它程序模块以及程序数据,这些示例中的每一个或某种组合中可能包括网络环境的实现。Storage unit 620 may also include a program/utility 6204 having a set of (at least one) program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, Each of these examples, or some combination, may include the implementation of a network environment.
总线630可以为表示几类总线结构中的一种或多种,包括存储单元总线或者存储单元控制器、外围总线、图形加速端口、处理单元或者使用多种总线结构中的任意总线结构的局域总线。Bus 630 may be a local area representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or using any of a variety of bus structures. bus.
电子设备600也可以与一个或多个外部设备700(例如键盘、指向设备、蓝牙设备等)通信,还可与一个或者多个使得用户能与该电子设备600交互的设备通信,和/或与使得该电子设备600能与一个或多个其它计算设备进行通信的任何设备(例如路由器、调制解调器等等)通信。这种通信可以通过输入/输出(I/O)接口650进行。并且,电子设备600还可以通过网络适配器660与一个或者多个网络(例如局域网(LAN),广域网(WAN)和/或公共网络,例如因特网)通信。网络适配器660可以通过总线630与电子设备600的其它模块通信。应当明白,尽管图10中未示出,可以结合电子设备600使用其它硬件和/或软件模块,包括但不限于:微代码、设备驱动器、冗余处理单元、外部磁盘驱动阵列、RAID系统、磁带驱动器以及数据备份存储平台等。Electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), may also communicate with one or more devices that enable a user to interact with electronic device 600, and/or with Any device (eg, router, modem, etc.) that enables the electronic device 600 to communicate with one or more other computing devices. This communication may occur through input/output (I/O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN), and/or a public network, such as the Internet) through the network adapter 660. Network adapter 660 may communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in Figure 10, other hardware and/or software modules may be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tapes Drives and data backup storage platforms, etc.
本发明实施例中还提供一种计算机可读存储介质,用于存储程序,程序被执行时实现的一种基于时序的散斑活体检测方法的步骤。在一些可能的实施方式中,本发明的各个方面还可以实现为一种程序产品的形式,其包括程序代码,当程序产品在终端设备上运行时,程序代码用于使终端设备执行本说明书上述一种基于时序的散斑活体检测方法部分中描述的根据本发明各种示例性实施方式的步骤。Embodiments of the present invention also provide a computer-readable storage medium for storing a program, and when the program is executed, the steps of a timing-based speckle living body detection method are implemented. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes program code. When the program product is run on a terminal device, the program code is used to cause the terminal device to execute the above described instructions. The steps according to various exemplary embodiments of the present invention are described in the section of a time-series-based speckle living body detection method.
如上所示,本实施例对多帧散斑图检测目标对象,检测出连续多帧目标对象后,对感兴趣区域的散斑点提供一组像素点,构建像素点的亮度随时间变化的向量,并根据亮度变化向量判断目标对象是否为活体,具有抗干扰能力强、对各类假体都有很好的识别效果的优点。As shown above, this embodiment detects target objects in multi-frame speckle patterns. After detecting target objects in consecutive multiple frames, a group of pixels are provided for the speckle spots in the area of interest to construct a vector in which the brightness of the pixels changes with time. It also determines whether the target object is a living body based on the brightness change vector. It has the advantages of strong anti-interference ability and good recognition effect on various types of prostheses.
图11是本发明实施例中的计算机可读存储介质的结构示意图。参考图11所示,描述了根据本发明的实施方式的用于实现上述方法的程序产品800,其可以采用便携式紧凑盘只读存储器(CD-ROM)并包括程序代码,并可以在终端设备,例如个人电脑上运行。然而,本发明的程序产品不限于此,在本文件中,可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。Figure 11 is a schematic structural diagram of a computer-readable storage medium in an embodiment of the present invention. Referring to FIG. 11 , a program product 800 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be used on a terminal device, For example, run on a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus or device.
程序产品可以采用一个或多个可读介质的任意组合。可读介质可以是可读信号介质或者可读存储介质。可读存储介质例如可以为但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。The Program Product may take the form of one or more readable media in any combination. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: electrical connection with one or more conductors, portable disk, hard disk, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
计算机可读存储介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了可读程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。可读存储介质还可以是可读存储介质以外的任何可读介质,该可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。可读存储介质上包含的程序代码可以用任何适当的介质传输,包括但不限于无线、有线、光缆、RF等等,或者上述的任意合适的组合。A computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave carrying the readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or device. Program code contained on a readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
可以以一种或多种程序设计语言的任意组合来编写用于执行本发明操作的程序代码,程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., as well as conventional procedural programming. Language—such as "C" or a similar programming language. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server execute on. In situations involving remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., provided by an Internet service). (business comes via Internet connection).
本实施例对多帧散斑图检测目标对象,检测出连续多帧目标对象后,对感兴趣区域的散斑点提供一组像素点,构建像素点的亮度随时间变化的向量,并根据亮度变化向量判断目标对象是否为活体,具有抗干扰能力强、对各类假体都有很好的识别效果的优点。This embodiment detects the target object in multi-frame speckle images. After detecting the target object in consecutive multiple frames, a group of pixels is provided for the speckle spots in the area of interest, and a vector of the brightness of the pixels changing with time is constructed, and a vector is constructed according to the brightness change. The vector determines whether the target object is a living body. It has the advantages of strong anti-interference ability and good recognition effect on various types of prostheses.
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。Each embodiment in this specification is described in a progressive manner. Each embodiment focuses on its differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. The above description of the disclosed embodiments enables those skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be practiced in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
以上对本发明的具体实施例进行了描述。需要理解的是,本发明并不局限于上述特定实施方式,本领域技术人员可以在权利要求的范围内做出各种变形或修改,这并不影响本发明的实质内容。Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above. Those skilled in the art can make various variations or modifications within the scope of the claims, which does not affect the essence of the present invention.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311599046.5A CN117711076A (en) | 2023-11-28 | 2023-11-28 | Speckle living body detection method, system, equipment and storage medium based on time sequence |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311599046.5A CN117711076A (en) | 2023-11-28 | 2023-11-28 | Speckle living body detection method, system, equipment and storage medium based on time sequence |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN117711076A true CN117711076A (en) | 2024-03-15 |
Family
ID=90148905
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311599046.5A Pending CN117711076A (en) | 2023-11-28 | 2023-11-28 | Speckle living body detection method, system, equipment and storage medium based on time sequence |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117711076A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118351601A (en) * | 2024-04-26 | 2024-07-16 | 浙江工业大学 | Finger living body anti-counterfeiting method based on speckle variance optical coherence tomography |
| CN119625021A (en) * | 2024-11-22 | 2025-03-14 | 北京圣机科技有限公司 | An anti-interference tracking method and system based on target infrared imaging characteristics |
| CN120070043A (en) * | 2025-04-29 | 2025-05-30 | 飞虎互动科技(北京)有限公司 | Financial business background environment visual wind control detection method based on image analysis |
-
2023
- 2023-11-28 CN CN202311599046.5A patent/CN117711076A/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118351601A (en) * | 2024-04-26 | 2024-07-16 | 浙江工业大学 | Finger living body anti-counterfeiting method based on speckle variance optical coherence tomography |
| CN119625021A (en) * | 2024-11-22 | 2025-03-14 | 北京圣机科技有限公司 | An anti-interference tracking method and system based on target infrared imaging characteristics |
| CN120070043A (en) * | 2025-04-29 | 2025-05-30 | 飞虎互动科技(北京)有限公司 | Financial business background environment visual wind control detection method based on image analysis |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107679490B (en) | Method and apparatus for detecting image quality | |
| Dubey et al. | A comprehensive survey on human pose estimation approaches | |
| Shamshad et al. | Enhancing brain tumor classification by a comprehensive study on transfer learning techniques and model efficiency using MRI datasets | |
| US20240282149A1 (en) | Liveness detection method and apparatus, and training method and apparatus for liveness detection system | |
| CN115050064B (en) | Human face liveness detection method, device, equipment and medium | |
| US20190392587A1 (en) | System for predicting articulated object feature location | |
| CN117711076A (en) | Speckle living body detection method, system, equipment and storage medium based on time sequence | |
| CN111709409A (en) | Face living body detection method, device, equipment and medium | |
| WO2021169637A1 (en) | Image recognition method and apparatus, computer device and storage medium | |
| Hu et al. | Deep neural network-based speaker-aware information logging for augmentative and alternative communication | |
| CN107578034A (en) | Information generating method and device | |
| Hanzla et al. | Human pose estimation and event recognition via feature extraction and neuro-fuzzy classifier | |
| CN109063643B (en) | Facial expression pain degree identification method under condition of partial hiding of facial information | |
| CN108229493A (en) | Object verification method and device and electronic equipment | |
| CN108229375B (en) | Method and device for detecting face image | |
| CN115994944A (en) | Three-dimensional key point prediction method, training method and related equipment | |
| CN116386099A (en) | Face multi-attribute recognition method and its model acquisition method and device | |
| Palanisamy et al. | An efficient hand gesture recognition based on optimal deep embedded hybrid convolutional neural network‐long short term memory network model | |
| CN113781462A (en) | Human body disability detection method, device, equipment and storage medium | |
| CN114764948B (en) | Liveness detection method, device, equipment and storage medium | |
| CN114120386A (en) | Face recognition method, device, equipment and storage medium | |
| CN118781663A (en) | Repeated action counting method and device based on multi-structure information perception network | |
| CN117711075A (en) | Biological information living body identification method, system, equipment and storage medium | |
| CN117475497A (en) | A high-precision facial acupuncture point identification method and identification model | |
| CN117711073A (en) | Human body biological information living body identification method, system, equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| WD01 | Invention patent application deemed withdrawn after publication | ||
| WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20240315 |