CN111291632A - A pedestrian state detection method, device and device - Google Patents
A pedestrian state detection method, device and device Download PDFInfo
- Publication number
- CN111291632A CN111291632A CN202010054088.0A CN202010054088A CN111291632A CN 111291632 A CN111291632 A CN 111291632A CN 202010054088 A CN202010054088 A CN 202010054088A CN 111291632 A CN111291632 A CN 111291632A
- Authority
- CN
- China
- Prior art keywords
- pedestrian
- image
- state detection
- attribute
- detection model
- 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.)
- Granted
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 271
- 238000012549 training Methods 0.000 claims abstract description 41
- 238000012545 processing Methods 0.000 claims abstract description 5
- 238000000034 method Methods 0.000 claims description 19
- 238000007781 pre-processing Methods 0.000 claims description 11
- 238000012360 testing method Methods 0.000 claims description 11
- 238000013527 convolutional neural network Methods 0.000 claims description 10
- 238000002372 labelling Methods 0.000 claims description 2
- 230000001815 facial effect Effects 0.000 claims 2
- 230000007547 defect Effects 0.000 abstract 1
- 238000004590 computer program Methods 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 230000009286 beneficial effect Effects 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/103—Static body considered as a whole, e.g. static pedestrian or occupant recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/52—Surveillance or monitoring of activities, e.g. for recognising suspicious objects
- G06V20/53—Recognition of crowd images, e.g. recognition of crowd congestion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Multimedia (AREA)
- General Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- Biomedical Technology (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明涉及行人检测技术领域,尤其涉及一种行人状态检测方法、装置以及设备。The present invention relates to the technical field of pedestrian detection, in particular to a pedestrian state detection method, device and device.
背景技术Background technique
随着科技的发展,人们可以通过在图像中识别图像中的各种信息,而目前,图像识别也大规模的应用于安防领域,通过图像来获取过路行人的状态信息,安检门、道闸、关口等。然而现有技术中,通过图像获取过路行人的状态信息只能判断行人的数量,无法对行人是否有携带行李、儿童以及行人的年龄状态进行综合检测,使得当行人通过安检通道时工作人员无法对行人进行引导,无法以及提醒行人将行李放入行李带中或者为年长者提供优先通道。With the development of science and technology, people can identify various information in the image through the image, and at present, image recognition is also widely used in the field of security. Pass, etc. However, in the prior art, only the number of pedestrians can be determined by obtaining the status information of passing pedestrians through images, and it is impossible to comprehensively detect whether the pedestrians have luggage, children and the age status of the pedestrians. Pedestrians guide, cannot and remind pedestrians to put their luggage in the luggage belt or provide priority access for the elderly.
综上所述,现有技术中对行人状态的检测方法存在着无法对行人综合情况进行判断的不足。To sum up, the methods for detecting the state of pedestrians in the prior art have the disadvantage that the comprehensive situation of pedestrians cannot be judged.
发明内容SUMMARY OF THE INVENTION
本发明提供了一种行人状态检测方法、装置以及设备,解决了现有技术中对行人状态的检测方法存在着无法对行人综合情况进行判断的不足。The present invention provides a pedestrian state detection method, device and equipment, which solves the problem that the pedestrian state detection method in the prior art cannot judge the comprehensive situation of the pedestrian.
本发明提供的一种行人状态检测方法,包括以下步骤:A pedestrian state detection method provided by the present invention includes the following steps:
步骤S1:获取现有的行人图像;Step S1: obtain an existing pedestrian image;
步骤S2:建立行人状态检测模型,使用行人状态检测模型对现有的行人图像进行处理;Step S2: establishing a pedestrian state detection model, and using the pedestrian state detection model to process the existing pedestrian images;
步骤S3:将经过处理后的行人图像输入到行人状态检测模型中进行训练,得到训练好的行人状态检测模型;Step S3: input the processed pedestrian image into the pedestrian state detection model for training, and obtain a trained pedestrian state detection model;
步骤S4:将实时的行人图像输入训练好的行人状态检测模型中,行人状态检测模型输出行人状态的判断结果。Step S4: Input the real-time pedestrian image into the trained pedestrian state detection model, and the pedestrian state detection model outputs the judgment result of the pedestrian state.
优选的,步骤S2具体包括以下步骤:Preferably, step S2 specifically includes the following steps:
步骤S201:将行人图像输入到行人状态检测模型中,行人状态检测模型对行人图像中的人体进行检测得到人体检测图像;Step S201: Input the pedestrian image into the pedestrian state detection model, and the pedestrian state detection model detects the human body in the pedestrian image to obtain the human body detection image;
步骤S202:行人状态检测模型对人体检测图像进行归一化得到行人属性检测图像;Step S202: the pedestrian state detection model normalizes the human body detection image to obtain the pedestrian attribute detection image;
步骤S203:行人状态检测模型对人体检测图像进行人脸检测并对齐得到人脸属性检测图像。Step S203: The pedestrian state detection model performs face detection on the human body detection image and aligns it to obtain a face attribute detection image.
优选的,分别对人体检测图像、人脸属性检测图像以及行人属性检测图像进行属性标注。Preferably, attribute annotation is performed on the human body detection image, the face attribute detection image and the pedestrian attribute detection image respectively.
优选的,人体检测图像的属性为行人数量;人脸属性检测图像的属性类别包括:性别、年龄、民族、表情、人脸姿态以及人脸穿戴;行人属性检测图像的属性类别包括:背包、提包、挎包、行李箱、携带儿童、轮椅以及婴儿车。Preferably, the attribute of the human body detection image is the number of pedestrians; the attribute category of the face attribute detection image includes: gender, age, ethnicity, expression, face posture and face wear; the attribute category of the pedestrian attribute detection image includes: backpack, handbag , satchels, luggage, carrying children, wheelchairs and strollers.
优选的,在步骤S3中,具体包括以下步骤:Preferably, in step S3, the following steps are specifically included:
步骤S301:将人体检测图像、人脸属性检测图像以及行人属性检测图像以一定的比例划分为训练集以及测试集;Step S301: Divide the human body detection image, the face attribute detection image and the pedestrian attribute detection image into a training set and a test set in a certain proportion;
步骤S302:按顺序将人体检测图像的训练集、人脸属性检测图像的训练集以及行人属性检测图像的训练集输入至行人状态检测模型中对行人状态检测模型的权重参数进行优化;Step S302: Input the training set of the human body detection image, the training set of the face attribute detection image and the training set of the pedestrian attribute detection image into the pedestrian state detection model in order to optimize the weight parameters of the pedestrian state detection model;
步骤S303:将测试集输入至训练好的行人状态检测模型中,得到行人状态检测模型的最优权重参数。Step S303: Input the test set into the trained pedestrian state detection model to obtain optimal weight parameters of the pedestrian state detection model.
优选的,人脸属性检测图像的人脸属性检测训练集中以每一项人脸属性检测图像的属性为一类,行人属性检测图像的行人属性训练集中以每一项行人属性检测图像的属性为一类。Preferably, in the face attribute detection training set of the face attribute detection image, the attribute of each face attribute detection image is classified as a class, and the pedestrian attribute training set of the pedestrian attribute detection image takes the attribute of each pedestrian attribute detection image as one type.
优选的,在步骤S301中,将人体检测图像作为人体检测训练集的正样本,将现有图像中不含行人的图像作为人体检测训练集的负样本输入至行人状态检测模型中,人脸属性检测训练集中包含有人脸属性检测图像的属性的所有类别且每一个类别的数量均等,行人属性训练集中包含有行人属性检测图像的所有类别且每一个类别的数量均等。Preferably, in step S301, the human body detection image is used as a positive sample of the human body detection training set, and the image without pedestrians in the existing image is input into the pedestrian state detection model as a negative sample of the human body detection training set. The detection training set contains all categories of the attributes of the face attribute detection images and the number of each category is equal, and the pedestrian attribute training set contains all the categories of the pedestrian attribute detection images and the number of each category is equal.
优选的,所述行人状态检测模型包括人体检测模型、人脸属性检测模型以及行人属性检测模型,所述人脸属性检测模型以及行人属性检测模型由卷积神经网络构成,所述卷积神经网络第一层卷积层和最后一层卷积层之间设置有至少一层反卷积层和至少一层inception层,所述inception进行卷积时采用多个不同尺寸的卷积核;所述人体检测模型采用faceboxes算法。Preferably, the pedestrian state detection model includes a human body detection model, a face attribute detection model and a pedestrian attribute detection model, and the face attribute detection model and the pedestrian attribute detection model are composed of a convolutional neural network, and the convolutional neural network At least one layer of deconvolution layer and at least one layer of inception layer are arranged between the first layer of convolution layer and the last layer of convolution layer, and the inception adopts multiple convolution kernels of different sizes when performing convolution; the The human detection model adopts the faceboxes algorithm.
一种行人状态检测装置,包括行人图像获取模块、图像预处理模块以及行人状态检测模型模块;A pedestrian state detection device, comprising a pedestrian image acquisition module, an image preprocessing module and a pedestrian state detection model module;
所述行人图像获取模块用于获取行人的图像;The pedestrian image acquisition module is used to acquire images of pedestrians;
所述图像预处理模块用于对行人的图像进行预处理;The image preprocessing module is used for preprocessing images of pedestrians;
所述行人状态检测模型模块用于建立行人状态检测模型并输出行人状态检测的结果。The pedestrian state detection model module is used to establish a pedestrian state detection model and output the result of pedestrian state detection.
一种行人状态检测设备,所述设备包括处理器以及存储器;A pedestrian state detection device, the device includes a processor and a memory;
所述存储器用于存储程序代码,并将所述程序代码传输给所述处理器;the memory is used to store program code and transmit the program code to the processor;
所述处理器用于根据所述程序代码中的指令执行权利要求1-8任一项所述的一种行人状态检测方法。The processor is configured to execute the pedestrian state detection method according to any one of claims 1-8 according to the instructions in the program code.
从以上技术方案可以看出,本发明具有以下优点:As can be seen from the above technical solutions, the present invention has the following advantages:
本发明实施例通过建立行人状态检测模型,将获取到的人体检测图像、人脸属性检测图像以及行人属性检测图像输入行人状态检测模型中,从而使得行人状态检测模型能够对行人的状态信息进行综合的判断,解决了现有技术中对行人状态的检测方法存在着无法对行人综合情况进行判断的不足,有利于安检人员对通过安检通道的行人进行引导,在实际应用中具有重要的意义。In the embodiment of the present invention, by establishing a pedestrian state detection model, the obtained human body detection image, face attribute detection image and pedestrian attribute detection image are input into the pedestrian state detection model, so that the pedestrian state detection model can synthesize the state information of pedestrians It solves the problem that the pedestrian state detection method in the prior art cannot judge the comprehensive situation of the pedestrian, and is beneficial to the security personnel to guide the pedestrians passing through the security inspection channel, which is of great significance in practical applications.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其它的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1为本发明实施例提供的一种行人状态检测方法、装置以及设备的方法流程图。FIG. 1 is a flowchart of a method, apparatus, and device for detecting a pedestrian state according to an embodiment of the present invention.
图2为本发明实施例提供的一种行人状态检测方法、装置以及设备的装置框架图。FIG. 2 is a device frame diagram of a pedestrian state detection method, device, and device provided by an embodiment of the present invention.
图3为本发明实施例提供的一种行人状态检测方法、装置以及设备的设备框架图。FIG. 3 is a device frame diagram of a pedestrian state detection method, device, and device according to an embodiment of the present invention.
具体实施方式Detailed ways
本发明实施例提供了一种行人状态检测方法、装置以及设备,用于解决解决了现有技术中对行人状态的检测方法存在着无法对行人综合情况进行判断的技术问题。The embodiments of the present invention provide a pedestrian state detection method, device and device, which are used to solve the technical problem that the pedestrian state detection method in the prior art cannot judge the comprehensive situation of the pedestrian.
为使得本发明的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,下面所描述的实施例仅仅是本发明一部分实施例,而非全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。In order to make the purpose, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the following The described embodiments are only some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
实施例1Example 1
请参阅图1,图1为本发明实施例提供的一种行人状态检测方法、装置以及设备的方法流程图。Please refer to FIG. 1. FIG. 1 is a flowchart of a method, apparatus, and device for detecting a pedestrian state according to an embodiment of the present invention.
如图1所示,本发明提供的一种行人状态检测方法,包括以下步骤:As shown in Figure 1, a pedestrian state detection method provided by the present invention includes the following steps:
步骤S1:获取现有的行人图像;Step S1: obtain an existing pedestrian image;
现有的行人图像可从安检匝道的摄像头拍摄得到的历史图像中选取,安检匝道的中的行人图像涵盖了大部分类型的行人状态图像,有利于后续行人检测模型对行人图像的学习以及检测。The existing pedestrian images can be selected from the historical images captured by the cameras on the security check ramp. The pedestrian images in the security check ramp cover most types of pedestrian state images, which are beneficial to the subsequent pedestrian detection model for the learning and detection of pedestrian images.
步骤S2:建立行人状态检测模型,使用行人状态检测模型对现有的行人图像进行处理;Step S2: establishing a pedestrian state detection model, and using the pedestrian state detection model to process the existing pedestrian images;
步骤S3:将经过处理后的行人图像输入到行人状态检测模型中进行训练,对行人状态检测模型进行优化,得到训练好的行人状态检测模型;Step S3: input the processed pedestrian image into the pedestrian state detection model for training, optimize the pedestrian state detection model, and obtain a trained pedestrian state detection model;
将经过处理后的现有行人图像输入至行人状态检测模型中进行训练,行人状态检测模型对不同类的图像,同一类不同属性类别的图像进行检测识别对自身进行优化,从而得到训练好的行人状态检测模型。Input the processed existing pedestrian images into the pedestrian state detection model for training. The pedestrian state detection model detects and recognizes images of different types and images of the same type with different attribute categories and optimizes itself, so as to obtain trained pedestrians. State detection model.
步骤S4:将实时的行人图像输入训练好的行人状态检测模型中,行人状态检测模型输出行人的状态的判断结果。Step S4: Input the real-time pedestrian image into the trained pedestrian state detection model, and the pedestrian state detection model outputs the judgment result of the state of the pedestrian.
将实时的行人图像输入到训练好的行人状态检测模型中,行人状态检测模型可直接对实时的行人图像进行检测判断,从而直接判断出行人的综合状态。The real-time pedestrian image is input into the trained pedestrian state detection model, and the pedestrian state detection model can directly detect and judge the real-time pedestrian image, so as to directly judge the comprehensive state of the pedestrian.
作为一个优选的实施例,步骤S2具体包括以下步骤:As a preferred embodiment, step S2 specifically includes the following steps:
步骤S201:将行人图像输入到行人状态检测模型中,行人状态检测模型对行人图像中的人体进行检测得到人体检测图像;Step S201: Input the pedestrian image into the pedestrian state detection model, and the pedestrian state detection model detects the human body in the pedestrian image to obtain the human body detection image;
步骤S202:行人状态检测模型对人体检测图像进行归一化得到行人属性检测图像;Step S202: the pedestrian state detection model normalizes the human body detection image to obtain the pedestrian attribute detection image;
步骤S203:行人状态检测模型对人体检测图像进行人脸检测并对齐得到人脸属性检测图像。Step S203: The pedestrian state detection model performs face detection on the human body detection image and aligns it to obtain a face attribute detection image.
将现有的行人图像分为人体检测图像,可使得行人状态检测模型只关注图像中的人体;将现有的行人图像分为人脸属性检测图像,可使得行人状态检测模型只关注图像中的人脸;将现有的行人图像分为行人属性检测图像,可使得行人状态检测模型只关注行人的属性;通过将现有的行人图像分为不同的类别有利于行人状态检测模型只集中关注图像中的特定一点,有利于提高行人状态检测模型的学习效率。Dividing the existing pedestrian images into human body detection images can make the pedestrian state detection model only focus on the human body in the image; dividing the existing pedestrian images into face attribute detection images can make the pedestrian state detection model only focus on the people in the image. face; dividing the existing pedestrian images into pedestrian attribute detection images can make the pedestrian state detection model only focus on the attributes of pedestrians; by dividing the existing pedestrian images into different categories, the pedestrian state detection model can only focus on the image. The specific point is beneficial to improve the learning efficiency of the pedestrian state detection model.
行人状态检测模型对行人图像进行检测得到人体矩阵形成的子图像,将子图像进行归一化处理,得到128*256的人体矩阵子图像,在人体矩阵子图像的基础上,对人体矩阵子图形使用人脸检测算法(即mtcnn或faceboxes)得到人脸图像,并对人脸图像进行对齐得到人脸属性检测图像,尺寸为96*112。The pedestrian state detection model detects the pedestrian image to obtain the sub-image formed by the human body matrix, and normalizes the sub-image to obtain a 128*256 human body matrix sub-image. Use the face detection algorithm (ie mtcnn or faceboxes) to get the face image, and align the face image to get the face attribute detection image, the size is 96*112.
作为一个优选的实施例,分别对人体检测图像、人脸属性检测图像以及行人属性检测图像进行属性标注。As a preferred embodiment, attribute labeling is performed on the human body detection image, the face attribute detection image, and the pedestrian attribute detection image, respectively.
通过对人体检测图像、人脸属性检测图像以及行人属性检测图像中的属性进行标注,可突出不同类别图像中需要行人状态检测模型识别的特征,有利于减少图像中的干扰项,提高行人状态检测模型的学习速度。By annotating the attributes in the human body detection image, the face attribute detection image and the pedestrian attribute detection image, the characteristics that need to be recognized by the pedestrian state detection model in different types of images can be highlighted, which is beneficial to reduce the interference items in the image and improve the pedestrian state detection. The learning rate of the model.
作为一个优选的实施例,人体检测图像的属性为行人数量;人脸属性检测图像的属性类别包括:性别、年龄、表情、民族、人脸姿态以及人脸穿戴;行人属性检测图像的属性类别包括:背包、提包、挎包、行李箱、牵小孩、轮椅以及婴儿车。As a preferred embodiment, the attribute of the human body detection image is the number of pedestrians; the attribute categories of the face attribute detection image include: gender, age, expression, ethnicity, face posture and face wear; the attribute category of the pedestrian attribute detection image includes : Backpacks, bags, satchels, suitcases, lead children, wheelchairs and strollers.
性别、年龄、表情、民族、人脸姿态以及人脸穿戴为人脸最直观的属性,通过学习该属性可使得行人状态检测模型推断出该行人外貌综合信息。而行人属性检测图像的属性可使得行人状态检测模型推断出该行人外形综合信息,从而判断出行人是否背包、携带行李或者行人为婴儿或坐在轮椅上的残障人士,方便工作人员对行人进行引导。Gender, age, expression, ethnicity, face pose and face wear are the most intuitive attributes of a face. By learning this attribute, the pedestrian state detection model can infer the comprehensive information of the pedestrian's appearance. The attributes of the pedestrian attribute detection image can enable the pedestrian state detection model to infer the comprehensive shape information of the pedestrian, so as to determine whether the pedestrian is carrying a backpack, carrying luggage, or whether the pedestrian is a baby or a disabled person in a wheelchair, which is convenient for the staff to guide the pedestrian. .
作为一个优选的实施例,在步骤S3中,具体包括以下步骤:As a preferred embodiment, in step S3, the following steps are specifically included:
步骤S301:将人体检测图像中的图像、人脸属性检测图像中的图像以及行人属性检测图像中的图像以一定的比例划分为训练集以及测试集;将图像划分为训练集对行人状态检测模型中进行训练,测试集对行人状态检测模型的检测效果进行测试。Step S301: Divide the image in the human body detection image, the image in the face attribute detection image, and the image in the pedestrian attribute detection image into a training set and a test set in a certain proportion; divide the image into a training set for the pedestrian state detection model. In the training, the test set is used to test the detection effect of the pedestrian state detection model.
步骤S302:按顺序将人体检测图像的训练集、人脸属性检测图像的训练集以及行人属性检测图像的训练集输入至行人状态检测模型中对行人状态检测模型的权重参数进行优化;Step S302: Input the training set of the human body detection image, the training set of the face attribute detection image and the training set of the pedestrian attribute detection image into the pedestrian state detection model in order to optimize the weight parameters of the pedestrian state detection model;
按顺序将人体检测图像中的训练集、人脸属性检测图像中的训练集以及行人属性检测图像中的训练集输入至行人状态检测模型中,行人状态检测模型根据三个训练集调整对自身的权重参数。The training set in the human body detection image, the training set in the face attribute detection image, and the training set in the pedestrian attribute detection image are input into the pedestrian state detection model in sequence, and the pedestrian state detection model adjusts its own state detection model according to the three training sets. weight parameter.
步骤S303:将测试集输入至行人状态检测模型中,得到行人状态检测模型的最优权重参数。Step S303: Input the test set into the pedestrian state detection model to obtain optimal weight parameters of the pedestrian state detection model.
将人体检测图像中的测试集、人脸属性检测图像中的测试集以及行人属性检测图像中的测试集输入至训练好的行人状态检测模型中,行人状态检测模型对自身的参数进行进一步的调整,寻得其自身的最优权重参数。Input the test set in the human body detection image, the test set in the face attribute detection image and the test set in the pedestrian attribute detection image into the trained pedestrian state detection model, and the pedestrian state detection model further adjusts its own parameters , to find its own optimal weight parameters.
作为一个优选的实施例,在步骤S301中,将裁人体检测图像作为人体检测训练集的正样本,将现有图像中不含行人的图像作为人体检测训练集的负样本输入至行人状态检测模型中,负样本的数量为正样本的三倍,人脸属性检测训练集中包含有人脸属性检测图像的属性的所有类别且每一个类别的数量均等,行人属性训练集中包含有行人属性检测图像的属性的所有类别且每一个类别的数量均等。As a preferred embodiment, in step S301, the cropped human body detection image is used as a positive sample of the human body detection training set, and the image without pedestrians in the existing image is used as a negative sample of the human body detection training set and input to the pedestrian state detection model , the number of negative samples is three times that of positive samples, the face attribute detection training set contains all categories of the attributes of the face attribute detection image and the number of each category is equal, and the pedestrian attribute training set contains the attributes of the pedestrian attribute detection image. of all categories with an equal number of each category.
作为一个优选的实施例,人脸属性检测图像的人脸属性检测训练集中以每一项人脸属性检测图像的属性为一类,行人属性检测图像的行人属性训练集中以每一项行人的属性为一类。As a preferred embodiment, the face attribute detection training set of the face attribute detection image takes the attribute of each face attribute detection image as a class, and the pedestrian attribute training set of the pedestrian attribute detection image uses the attribute of each pedestrian as a class.
作为一个优选的实施例,所述行人状态检测模型由卷积神经网络构成,所述行人状态检测模型包括人体检测模型、人脸属性检测模型以及行人属性检测模型,所述人脸属性检测模型以及行人属性检测模型由卷积神经网络构成,所述卷积神经网络第一层卷积层和最后一层卷积层之间设置有至少一层反卷积层和至少一层inception层,所述inception进行卷积时采用多个不同尺寸的卷积核;所述人体检测模型采用faceboxes算法。As a preferred embodiment, the pedestrian state detection model is composed of a convolutional neural network, and the pedestrian state detection model includes a human body detection model, a face attribute detection model, and a pedestrian attribute detection model. The face attribute detection model and The pedestrian attribute detection model is composed of a convolutional neural network, and at least one deconvolution layer and at least one inception layer are set between the first convolutional layer and the last convolutional layer of the convolutional neural network. When inception performs convolution, multiple convolution kernels of different sizes are used; the human detection model uses the faceboxes algorithm.
人脸属性检测模型以及行人属性检测模型中的卷积神经网络的第一层卷积层和最后一层卷积层之间设置有至少一层反卷积层和至少一层inception层,通过inception层可以使卷积神经网络可以更好地适应输入图像尺寸的变化,同时增加特征图像的多样性,多尺度融合特征图像,并降低运算量,通过反卷积层可以还原特征图像的尺寸,对特征图像进行补充扩展,既能学习到较高水平的特征,也能降低网络的模型参数,使得行人状态检测模型能够适应输入图像尺寸的变化,且卷积层学习到更为丰富的特征的问题。At least one deconvolution layer and at least one inception layer are set between the first convolutional layer and the last convolutional layer of the convolutional neural network in the face attribute detection model and the pedestrian attribute detection model. The layer can make the convolutional neural network better adapt to the change of the input image size, while increasing the diversity of feature images, multi-scale fusion of feature images, and reduce the amount of computation, the deconvolution layer can restore the size of the feature image, right The feature image is supplemented and expanded, which can not only learn high-level features, but also reduce the model parameters of the network, so that the pedestrian state detection model can adapt to changes in the size of the input image, and the convolution layer can learn more abundant features. .
将实时的行人图像输入经过行人状态检测模型之后,人体检测模型首先对实时的行人图像进行检测,检测出图像中行人的数量,之后,人脸属性检测模型以及行人属性检测模型中的卷积神经网络内的共享特征子网络(例如卷积层、反卷积层和inception层)会提取实时行人图像的属性特征,例如全连层会提取实时行人图像的属性,输出层通过共享属性的特征对待实时的行人图像的人脸属性检测图像的属性以及行人属性检测图像的属性进行计算得到实时行人图像中各个行人综合状态的识别结果。After inputting the real-time pedestrian image into the pedestrian state detection model, the human body detection model first detects the real-time pedestrian image to detect the number of pedestrians in the image. After that, the face attribute detection model and the convolutional neural network in the pedestrian attribute detection model The shared feature sub-network (such as convolutional layer, deconvolutional layer and inception layer) in the network will extract the attribute features of real-time pedestrian images. For example, the fully connected layer will extract the attributes of real-time pedestrian images, and the output layer will be treated by the features of shared attributes. The real-time pedestrian image's face attribute detection image attributes and the pedestrian attribute detection image attributes are calculated to obtain the recognition result of the comprehensive state of each pedestrian in the real-time pedestrian image.
实施例2Example 2
本申请实施例2提供了一种人脸属性识别装置,为便于说明,仅示出与本申请相关的部分,如图2所述,一种行人状态检测装置,包括行人图像获取模块401、图像预处理模块402以及行人状态检测模型模块403;Embodiment 2 of the present application provides a face attribute recognition device. For the convenience of description, only parts related to the present application are shown. As shown in FIG. 2 , a pedestrian state detection device includes a pedestrian
所述行人图像获取模块401用于获取行人的图像;The pedestrian
所述图像预处理模块402用于对行人的图像进行预处理;The
所述行人状态检测模型模块403用于建立行人状态检测模型并输出行人状态检测的结果。The pedestrian state
需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。It should be noted that the information exchange, execution process and other contents between the above-mentioned devices/units are based on the same concept as the method embodiments of the present application. For specific functions and technical effects, please refer to the method embodiments section. It is not repeated here.
实施例3Example 3
如图3所示,一种行人状态检测设备50,所述设备包括处理器500以及存储器501;As shown in FIG. 3 , a pedestrian
所述存储器501用于存储程序代码502,并将所述程序代码502传输给所述处理器;The
所述处理器500用于根据所述程序代码502中的指令执行上述的一种行人状态检测方法实施例中的步骤,例如图1所示的步骤S1至S5。或者,所述处理器500执行所述计算机程序502时实现上述各装置实施例中各模块/单元的功能,例如图2所示模块401至403的功能。The
示例性的,所述计算机程序502可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器501中,并由所述处理器500执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序502在所述终端设备50中的执行过程。例如,所述计算机程序502可以被分割包括行人图像获取模块、图像预处理模块以及行人状态检测模型模块;Exemplarily, the
所述行人图像获取模块用于获取行人的图像;The pedestrian image acquisition module is used to acquire images of pedestrians;
所述图像预处理模块用于对行人的图像进行预处理;The image preprocessing module is used for preprocessing images of pedestrians;
所述行人状态检测模型模块用于建立行人状态检测模型并输出行人状态检测的结果。The pedestrian state detection model module is used to establish a pedestrian state detection model and output the result of pedestrian state detection.
所述终端设备50可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述终端设备可包括,但不仅限于,处理器500、存储器501。本领域技术人员可以理解,图3仅仅是终端设备50的示例,并不构成对终端设备50的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备还可以包括输入输出设备、网络接入设备、总线等。The
所称处理器500可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called
所述存储器501可以是所述终端设备50的内部存储单元,例如终端设备50的硬盘或内存。所述存储器501也可以是所述终端设备50的外部存储设备,例如所述终端设备50上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器501还可以既包括所述终端设备50的内部存储单元也包括外部存储设备。所述存储器501用于存储所述计算机程序以及所述终端设备所需的其他程序和数据。所述存储器501还可以用于暂时地存储已经输出或者将要输出的数据。The
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-OnlyMemory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, removable hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes.
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: The technical solutions described in the embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010054088.0A CN111291632B (en) | 2020-01-17 | 2020-01-17 | Pedestrian state detection method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010054088.0A CN111291632B (en) | 2020-01-17 | 2020-01-17 | Pedestrian state detection method, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111291632A true CN111291632A (en) | 2020-06-16 |
CN111291632B CN111291632B (en) | 2023-07-11 |
Family
ID=71023422
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010054088.0A Active CN111291632B (en) | 2020-01-17 | 2020-01-17 | Pedestrian state detection method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111291632B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116188919A (en) * | 2023-04-25 | 2023-05-30 | 之江实验室 | Test method and device, readable storage medium and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109961009A (en) * | 2019-02-15 | 2019-07-02 | 平安科技(深圳)有限公司 | Pedestrian detection method, system, device and storage medium based on deep learning |
CN110110611A (en) * | 2019-04-16 | 2019-08-09 | 深圳壹账通智能科技有限公司 | Portrait attribute model construction method, device, computer equipment and storage medium |
CN110110693A (en) * | 2019-05-17 | 2019-08-09 | 北京字节跳动网络技术有限公司 | The method and apparatus of face character for identification |
CN110222625A (en) * | 2019-06-03 | 2019-09-10 | 上海眼控科技股份有限公司 | A kind of method and system that the identifying rows in video monitoring image are humanized |
CN110516512A (en) * | 2018-05-21 | 2019-11-29 | 北京中科奥森数据科技有限公司 | Training method, pedestrian's attribute recognition approach and the device of pedestrian's attributive analysis model |
-
2020
- 2020-01-17 CN CN202010054088.0A patent/CN111291632B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110516512A (en) * | 2018-05-21 | 2019-11-29 | 北京中科奥森数据科技有限公司 | Training method, pedestrian's attribute recognition approach and the device of pedestrian's attributive analysis model |
CN109961009A (en) * | 2019-02-15 | 2019-07-02 | 平安科技(深圳)有限公司 | Pedestrian detection method, system, device and storage medium based on deep learning |
CN110110611A (en) * | 2019-04-16 | 2019-08-09 | 深圳壹账通智能科技有限公司 | Portrait attribute model construction method, device, computer equipment and storage medium |
CN110110693A (en) * | 2019-05-17 | 2019-08-09 | 北京字节跳动网络技术有限公司 | The method and apparatus of face character for identification |
CN110222625A (en) * | 2019-06-03 | 2019-09-10 | 上海眼控科技股份有限公司 | A kind of method and system that the identifying rows in video monitoring image are humanized |
Non-Patent Citations (1)
Title |
---|
陈萍等: "基于深度学习的行人属性识别", 《信息通信》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116188919A (en) * | 2023-04-25 | 2023-05-30 | 之江实验室 | Test method and device, readable storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN111291632B (en) | 2023-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Wan et al. | Deep learning models for real-time human activity recognition with smartphones | |
Mahmood et al. | Facial expression recognition in image sequences using 1D transform and gabor wavelet transform | |
WO2021012494A1 (en) | Deep learning-based face recognition method and apparatus, and computer-readable storage medium | |
CN111954250B (en) | A Lightweight Wi-Fi Behavior Awareness Method and System | |
Arsalan et al. | OR-Skip-Net: Outer residual skip network for skin segmentation in non-ideal situations | |
CN110175595A (en) | Human body attribute recognition approach, identification model training method and device | |
CN107679546A (en) | Face image data acquisition method, device, terminal device and storage medium | |
CN109472209B (en) | An image recognition method, device and storage medium | |
CN113076905B (en) | Emotion recognition method based on context interaction relation | |
CN113723165B (en) | Method and system for detecting dangerous expressions of people to be detected based on deep learning | |
Sugumar | A Deep Learning Framework for COVID-19 Detection in X-Ray Images with Global Thresholding | |
CN107622261A (en) | Face age estimation method and device based on deep learning | |
CN110222718A (en) | The method and device of image procossing | |
CN114358279A (en) | Image recognition network model pruning method, device, equipment and storage medium | |
CN107967461A (en) | The training of SVM difference models and face verification method, apparatus, terminal and storage medium | |
CN105809090A (en) | Method and system for face sex characteristic extraction | |
US20210117662A1 (en) | Human parsing techniques utilizing neural network architectures | |
Yao et al. | Deep capsule network for recognition and separation of fully overlapping handwritten digits | |
CN110837777A (en) | Partial occlusion facial expression recognition method based on improved VGG-Net | |
CN111291632B (en) | Pedestrian state detection method, device and equipment | |
Aslam et al. | Wavelet-based convolutional neural networks for gender classification | |
Srivastava et al. | A CNN-SVM hybrid model for the classification of thyroid nodules in medical ultrasound images | |
Semwal et al. | S-PANET: a shallow convolutional neural network for pain severity assessment in uncontrolled environment | |
Sadawi et al. | Gesture correctness estimation with deep neural networks and rough path descriptors | |
Tasfia et al. | Face mask detection using viola-jones and Cascade Classifier |
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 | ||
CB02 | Change of applicant information |
Address after: Room 1301, No.132, Fengqi Road, phase III, software park, Xiamen City, Fujian Province Applicant after: Xiamen Entropy Technology Co.,Ltd. Address before: 361000, Xiamen three software park, Fujian Province, 8 North Street, room 2001 Applicant before: XIAMEN ZKTECO INFORMATION TECHNOLOGY Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20241213 Address after: No. 51 Binhe Road, Zhangmutou Town, Dongguan City, Guangdong Province 523628 Patentee after: Entropy based technology (Guangdong) Co.,Ltd. Country or region after: China Address before: Room 1301, No.132, Fengqi Road, phase III, software park, Xiamen City, Fujian Province Patentee before: Xiamen Entropy Technology Co.,Ltd. Country or region before: China |
|
TR01 | Transfer of patent right |