Personnel distance detection method and device

Through YoLov3 object detection model and depth image processing technology, the accuracy problem of personnel distance measurement in complex scenarios is solved, and the accurate measurement and detection of personnel distance in complex environments is achieved.

CN113111743BActive Publication Date: 2024-11-29BEIJING UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110334126.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-29
Publication Date
2024-11-29
Estimated Expiration
2041-03-29

AI Technical Summary

Technical Problem

In complex scenarios, it is difficult for the prior art to accurately measure the distance between people, especially in the presence of occlusion or other object interference.

Method used

The YoLov3 object detection model is used combined with the depth image processing technology, and images are acquired through the depth image shooting equipment, the personnel target is detected and the distance between them is calculated. The semi-supervised learning optimization model is used to improve the detection accuracy.

Benefits of technology

Accurate measurement of personnel distance in complex scenarios is achieved, the accuracy and efficiency of personnel target detection in depth images are improved, and the relative position and depth values ​​of personnel targets can be accurately obtained.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113111743B_ABST
    Figure CN113111743B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for detecting the distance between people. The method includes: obtaining a depth image through a depth image shooting device; detecting a person target in the depth image through a YoLov3 target detection model; when a person target is detected, calculating the distance between the person target and the shooting device through a distance calculation model; and outputting the calculation result of the distance between the person target and the shooting device. In this way, by accurately detecting the person target in the depth image and calculating its depth value in the depth image, the relative position of the person target in the depth image in each scene can be accurately obtained and the relative position between the person target and the depth image shooting device can be determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of depth image processing, and in particular to a method and device for detecting the distance between people. Background Art

[0002] In various crowded public places such as social gatherings, schools, and hospitals, the contact distance between people is unknown. Therefore, it is necessary to measure the social distance between people so as to effectively grasp the distance between people in crowded places. In the prior art, the distance between people is detected by a depth camera located at the top of the head, mainly by using a depth camera worn on the human head to detect the head of the person within the scene range, which can protect the privacy information of the person while measuring the distance between people. In the process of realizing the prior art, the inventor found that: in complex scenes with occlusion of people or interference from other objects, it is impossible to accurately measure the distance between people in the scene.

[0003] Therefore, it is necessary to provide a method and device for detecting the distance between people. Summary of the invention

[0004] The embodiment of the present application provides a technical solution for detecting the distance between people in a depth image, so as to solve the technical problem of low accuracy in calculating the distance between people in a depth image in complex scenes.

[0005] Specifically, a method for detecting a person's distance includes:

[0006] Acquire a depth image through a depth image capturing device;

[0007] Detecting human targets in the depth image using the YoLov3 target detection model;

[0008] When a human target is detected, the distance between the human target and the shooting device is calculated through the distance calculation model;

[0009] The calculation result of the distance between the human target and the photographing device is output.

[0010] Further, the depth image is obtained by a depth image capturing device, specifically including:

[0011] Acquire a depth image through a wearable depth image capturing device; or

[0012] A depth image is acquired through a fixed depth image capturing device.

[0013] Furthermore, the YoLov3 target detection model is used to detect the human target in the depth image, specifically including:

[0014] The head region of the human target is detected in the depth image by using the YoLov3 target detection model.

[0015] Furthermore, the YoLov3 target detection model is optimized by the following steps:

[0016] Obtain a training set of deep image data;

[0017] According to the training deep image dataset, a YoLov3 target detection model is trained by semi-supervised learning through a neural network algorithm;

[0018] The step of obtaining a training depth image data set specifically includes:

[0019] A training depth image data set consisting of a number of depth image data elements with classified and labeled human head positions and a number of depth image data elements with unclassified and labeled human head positions is obtained.

[0020] Furthermore, before obtaining the training depth image data set, the following steps are also included:

[0021] Obtain a public multi-person scene image dataset;

[0022] Extracting human body posture key point data from the data set by a human body posture estimation algorithm;

[0023] Generate a three-dimensional human body database based on the extracted human body posture key point data and by parameterizing the human body generation model SMPL;

[0024] A training depth image data set is generated based on the three-dimensional human body database and through a depth image conversion algorithm.

[0025] Furthermore, the YoLov3 target detection model is trained by semi-supervised learning based on the training depth image dataset and a neural network algorithm, specifically including:

[0026] According to a number of depth image data elements with classified and labeled human head positions in the training depth image data set, a number of depth image data elements with unclassified and labeled human head positions are subjected to head position prediction calculation through a neural network to generate a number of depth image data elements with predicted and labeled human head positions;

[0027] The YoLov3 target detection model is trained by semi-supervised learning based on a number of depth image data elements with classified and labeled human head positions in the training depth image data set and the number of depth image data elements with predicted and labeled human head positions.

[0028] Furthermore, the personnel distance detection method further includes:

[0029] Calculating the distance between the first person target and the second person target based on the calculation result of the distance between the first person target and the shooting device and the calculation result of the distance between the second person target and the shooting device, and using a distance calculation model;

[0030] The calculation result of the distance between the first human target and the second human target is output.

[0031] The embodiment of the present application also provides a personnel distance detection device.

[0032] Specifically, a personnel distance detection device includes:

[0033] An acquisition module, used to acquire a depth image through a depth image shooting device;

[0034] A detection module, used to detect a human target in the depth image by using a YoLov3 target detection model;

[0035] A calculation module, used to calculate the distance between the human target and the shooting device through a distance calculation model when a human target is detected;

[0036] The output module is used to output the calculation result of the distance between the human target and the shooting device.

[0037] Furthermore, the acquisition module is used to acquire a depth image through a depth image shooting device, specifically for:

[0038] Acquire a depth image through a wearable depth image capturing device; or

[0039] A depth image is acquired through a fixed depth image capturing device.

[0040] Furthermore, the detection module is used to detect human targets in the depth image through the YoLov3 target detection model, specifically for:

[0041] The head region of the human target is detected in the depth image by using the YoLov3 target detection model.

[0042] The technical solution provided in the embodiments of the present application has at least the following beneficial effects:

[0043] By using a personnel distance detection method and device, the personnel target in the depth image is accurately detected and its depth value in the depth image is calculated, so that the relative position of the personnel target in the depth image in each scene can be accurately obtained and the relative position between the personnel target and the depth image shooting device can be determined. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0045] Figure 1 A flowchart of a method for detecting human distance provided in an embodiment of the present application.

[0046] Figure 2 A schematic diagram of the structure of a personnel distance detection device provided in an embodiment of the present application.

[0047] 100 Personnel distance detection device

[0048] 11 Get Module

[0049] 12 Detection Module

[0050] 13 Computing Module

[0051] 14 Output Module DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0053] Please refer to Figure 1 , a method for detecting a person's distance provided in an embodiment of the present application, comprising the following steps:

[0054] S100: Acquire a depth image through a depth image capturing device.

[0055] The depth image shooting device here, in a specific application, can be a depth image shooting device developed based on binocular stereo vision technology, laser radar technology, structured light depth detection technology or TOF (Time of Flight) technology. By acquiring the depth image captured by the shooting device, the depth information of the environment in the depth image can be obtained. The shooting device can be designed with different sizes and different fixing methods according to the actual use scenario and actual use requirements. In this way, the depth image shooting device can be selectively applied to different scenes and objects according to actual use requirements. For example, the fixing method of the shooting device can be designed to be wearable. In this way, by designing it to a corresponding size and being worn by different moving objects, depth images of different scenes or different perspectives can be obtained. Among them, the depth image is the distance from the image collector of the depth image shooting device to each point in the scene as the pixel value, which can directly reflect the geometric shape of the visible surface of the scene in the image. In addition, the depth image data can be calculated and converted into point cloud data after coordinate transformation, and the point cloud data with rules and including necessary information can also be reversely calculated and converted into depth image data. It is understandable that the specific development technology used by the depth shooting device here obviously does not constitute a limitation on the specific protection scope of this application.

[0056] Furthermore, in a preferred embodiment provided in the present application, obtaining a depth image by a depth image capturing device specifically includes:

[0057] Acquire a depth image through a wearable depth image capturing device; or

[0058] A depth image is acquired through a fixed depth image capturing device.

[0059] Since the depth image capturing device can be designed with different fixing methods according to actual usage requirements, the depth image can be acquired through a wearable depth image capturing device or a fixed depth image capturing device. The wearable depth image capturing device is designed to be of a corresponding size and can be worn by different moving objects. When the wearing object moves, the depth image capturing device moves with it. For example, RealSense TMThe Depth ModuleD430 stereoscopic vision depth camera is worn on the human head. In this way, when the wearer moves, the depth camera worn on the human head can obtain continuous depth images in different scenes and different perspectives. The fixed depth image shooting device is fixed at a certain spatial position and can obtain depth images based on the same spatial position at different times. Among them, the fixed depth image shooting device can also be designed to rotate its acquisition perspective. In this way, depth images of different perspectives can be obtained based on the same spatial position, so that depth images within different perspective ranges can be selected at the same spatial position according to actual needs.

[0060] S200: Detecting human targets in the depth image using the YoLov3 target detection model.

[0061] After the depth image is acquired through the depth image shooting device, it is necessary to purposefully screen the acquired depth image according to the actual image requirements. In particular, when a large number of depth images are acquired, only the depth images that meet the screening conditions need to be subsequently processed after screening. In this way, the memory size occupied by the depth image can be reduced while improving work efficiency. Therefore, it is necessary to detect the acquired depth image to filter out the image with the human target. That is, perform human detection in the depth image. Among the algorithms used for detection and classification, the YoLov3 network algorithm has a clear structure and excellent real-time performance. Therefore, the YoLov3 algorithm is selected as the target detection model to detect human targets in the acquired depth image. Through the YoLov3 target detection model detection, when the acquired depth image contains human targets, subsequent calculations can be performed. When the acquired depth image does not contain human targets, the depth image needs to be acquired again.

[0062] Furthermore, in a preferred embodiment provided in the present application, the detection of human targets in the depth image is performed by using the YoLov3 target detection model, specifically including:

[0063] The head region of the human target is detected in the depth image by using the YoLov3 target detection model.

[0064] After filtering the images with human targets in the acquired depth image, the depth image with human targets also uses the distance from the image collector of the depth image shooting device to each point in the scene as the pixel value, and reflects the geometric shape of the visible surface of the human target in the image. In order to accurately calculate the distance of the person based on the acquired depth image, it is necessary to detect the body part information with representative position in the human body, that is, the human head. Compared with other parts of the human body, the human head can more accurately represent the spatial position of the human target, so that the distance of the person can be calculated more accurately. For example, when the acquired depth image of the person only includes a partial body of the human body, such as only a human hand or a human leg, the image only presents the depth information and surface geometry of the corresponding human hand or leg. According to the depth image information at this time, it is impossible to accurately judge the specific spatial position of the human body. At this time, the depth image cannot be used to calculate the distance from the human target to the shooting device in the scene. Therefore, when performing detection through the YoLov3 target detection model, it is necessary to detect the head area of ​​the human target in the acquired depth image. In this way, the distance between the person in the depth image and the shooting device can be calculated more accurately.

[0065] Further, in a preferred embodiment provided in the present application, the YoLov3 target detection model is optimized by the following steps:

[0066] Obtain a training set of deep image data;

[0067] According to the training deep image dataset, a YoLov3 target detection model is trained by semi-supervised learning through a neural network algorithm;

[0068] The step of obtaining a training depth image data set specifically includes:

[0069] A training depth image data set consisting of a number of depth image data elements with classified and labeled human head positions and a number of depth image data elements with unclassified and labeled human head positions is obtained.

[0070] Although the YoLov3 network algorithm has a clear structure and excellent real-time performance, the initial parameters in the algorithm are all default values. At this time, the algorithm is directly used for the detection and classification of depth images, which will result in low detection accuracy and long time consumption. Therefore, in order to improve the detection accuracy and efficiency, it is necessary to optimize the relevant parameters in the YoLov3 network algorithm according to the actual detection effect.

[0071] Specifically, when optimizing the YoLov3 target detection model, it is necessary to first obtain a training depth image data set. The data set should contain classified and annotated depth image data elements. The classification and annotation is to manually classify whether the depth image also contains the human head position, and annotate it for distinction, so as to obtain classified and annotated depth image data elements. However, the manual classification and annotation of all training depth images containing the human head position requires a large manpower and time cost, so only part of the training depth images need to be classified and annotated. Therefore, the acquired training depth image data set contains several classified and annotated depth image data elements and several unclassified and annotated depth image data elements. Afterwards, according to several classified and annotated depth image data elements and through a neural network algorithm, several unclassified and annotated depth image data elements can be classified and annotated for the first time. That is, pseudo-label data is formed. At this time, the data elements after the first classification and annotation and the acquired classified and annotated data elements are input into the initial YoLov3 algorithm for model training. In addition, during the model training process, the YoLov3 algorithm can adaptively adjust the optimization weights. After training, each parameter in the model will be updated. At this time, according to the output result error of the model, several unclassified and labeled depth image data elements other than several classified and labeled image data elements are reclassified and labeled. After that, the detection model is retrained. The model training process is repeated until the model training is completed. That is, the semi-supervised learning optimization of the YoLov3 target detection model is performed.

[0072] Furthermore, in a preferred embodiment provided by the present application, before obtaining the training depth image data set, the method further includes:

[0073] Obtain a public multi-person scene image dataset;

[0074] Extracting human body posture key point data from the data set by a human body posture estimation algorithm;

[0075] Generate a three-dimensional human body database based on the extracted human body posture key point data and by parameterizing the human body generation model SMPL;

[0076] A training depth image data set is generated based on the three-dimensional human body database and through a depth image conversion algorithm.

[0077] The acquired training depth image data set includes several depth image data elements with classified and labeled human head positions and several depth image data elements with unclassified and labeled human head positions. The classification and labeling is to manually classify whether the depth image contains the human head position area, and then label the human head position area of ​​the depth image containing the human head position, so as to distinguish and locate the image, thereby obtaining the classified and labeled depth image data elements. In addition, when classifying and labeling the human head position in the depth image, the specific area of ​​the human head presented in the image can also be classified and labeled. For example, the image presents the back of the head area, the front face area or the side face area of ​​the human head. Therefore, before acquiring the training depth image data set, the human head position in the depth image must be classified and labeled.

[0078] Specifically, by obtaining a public multi-person scene image data set, a large amount of image data foundation can be provided. Among them, the image is a color image, not a depth image. Therefore, the color image needs to be processed. It is worth noting that at this time, the human head area in the public multi-person scene image obtained needs to be classified and labeled. For example, the position of the human head in the obtained image is boxed or digitally classified and labeled. The human posture is estimated by the human pose estimation algorithm, and the key point data of the human posture in the obtained color image can be extracted. According to the extracted key point data and through the parametric human model (Parametric HumanModel), the human posture can be restored in three dimensions. The more human posture key point data is extracted, the more accurate the restored three-dimensional human posture. At this time, a three-dimensional human database is formed. Among them, since the human head area in the public multi-person scene image obtained has been classified and labeled, the key point data of the human head area in the three-dimensional human database is also classified and labeled. In detail, since the SMPL model (ASkinned Multi-Person Linear Model, SMPL for short) can combine the posture parameters and shape parameters of the human body in the process of three-dimensional restoration of the human body posture, it can not only restore the skin of the human body, but also more intuitively and accurately display the height, fatness and thinness of the human body in the image. Therefore, the SMPL model is selected to restore the three-dimensional posture of the human body. In this way, the restored human body posture is more accurate, so that the detection model can be trained more accurately. The restored three-dimensional posture of the human body is rendered by the depth image conversion model to obtain the depth image of the person in the image. It is worth noting that in order to increase the efficiency of converting the color image to the depth image, only the human body area in the color image can be rendered. Other objects and equipment outside the human body can choose whether to perform modeling and rendering according to actual needs. Among them, since the grid position of the human head in the three-dimensional human posture model restored by the SMPL model is known, the spatial position information of the human head position in the depth image can be obtained by mapping it to the head position of the two-dimensional depth image converted by the depth image conversion model. That is, the training data of the target head position of the classified and labeled personnel is obtained. When the acquired color image does not contain the human head area, the converted depth image cannot obtain the spatial position information of the human head. In addition, when annotating the human head area in the acquired public image, the specific presentation area of ​​the human head in the image can also be classified and annotated. At this time, the key point data of the specific presentation area of ​​the human head in the formed three-dimensional human database is also annotated.In this way, the specific presentation area of ​​the head in the three-dimensional posture model of the human body restored by the SMPL model is known, so that the specific presentation area of ​​the human head in the depth image finally converted is marked. It is worth noting that the manual classification and labeling of the human head area in all images of the acquired public multi-person scene image dataset requires a large manpower and time cost, so only some of the images need to be classified and labeled. At this time, a synthetic training depth image database composed of several depth image data elements with classified and labeled human head positions and several depth image data elements with unclassified and labeled human head positions is obtained. It can be understood that the specific number of depth images manually classified and labeled here does not constitute a limitation on the specific protection scope of this application.

[0079] Further, in a preferred embodiment provided in the present application, the YoLov3 target detection model is trained by semi-supervised learning based on the training depth image data set and a neural network algorithm, specifically including:

[0080] According to a number of depth image data elements with classified and labeled human head positions in the training depth image data set, a number of depth image data elements with unclassified and labeled human head positions are subjected to head position prediction calculation through a neural network to generate a number of depth image data elements with predicted and labeled human head positions;

[0081] The YoLov3 target detection model is trained by semi-supervised learning based on a number of depth image data elements with classified and labeled human head positions in the training depth image data set and the number of depth image data elements with predicted and labeled human head positions.

[0082] When optimizing the YoLov3 target detection model, only some depth images in the training depth image database are classified and annotated. The classification and annotation is to manually classify whether the depth image contains the human head position area and then annotate the human head position area of ​​the depth image containing the human head position. According to several image data elements that have been classified and annotated with the human head position, the remaining several unclassified and annotated human head position depth image data elements can be classified and annotated for the first time by the neural network algorithm. That is, pseudo-label data is formed by prediction. At this time, all depth images have been classified and labeled. The data elements after the first classification and annotation and the obtained classified and annotated data elements are input into the initial YoLov3 algorithm for the first training of the model, and each parameter in the model will be updated. According to the error of the output result of the first training of the model, several unclassified and annotated depth image data elements other than several classified and annotated image data elements are classified and annotated for the second time. After that, the detection model is retrained. The model training process will be repeated until the model training is completed. That is, the semi-supervised learning optimization of the YoLov3 target detection model is performed. When the target detection model is trained sequentially, different training parameters will be generated. Among them, when the human head position area in the training depth image database is labeled and the specific presentation area of ​​the head is classified and labeled, the YoLov3 target detection model obtained by semi-supervised learning optimization can also detect the specific presentation area of ​​the human head. It is worth noting that during the model training process, the loss function of the classified labeled data elements and the unclassified labeled data elements can be adaptively weighted, that is, the optimization weight is adaptively adjusted. For example, when the unclassified labeled data elements are verified by the YoLov3 network after the second classification and labeling, the error of the verification result increases. At this time, when the YoLov3 network is trained for the next time, the weight of the pseudo-label training data can be adaptively reduced. After all training parameters are generated, the optimal training parameters to be configured can be determined by network search (GridSearch). In addition, after the YoLov3 target detection model is optimized by semi-supervised learning, its corresponding algorithm should satisfy the smoothness assumption (The Smoothness Assumption), cluster assumption (TheCluster Assumption) and manifold assumption (The Manifold Assumption). In this way, the trained detection model can detect local area features more accurately.

[0083] S300: When a human target is detected, the distance between the human target and the shooting device is calculated using a distance calculation model.

[0084] The depth image obtained by the depth image shooting device is detected by the YoLov3 target detection model. When there is no human target in it, the depth image needs to be acquired again until the depth image with the human target is acquired. When the acquired depth image is detected to have a human target, the distance between the human target and the shooting device can be calculated by the distance calculation model. It is worth noting that when there are two or more human heads in the acquired depth image, the distance between the corresponding person and the depth image shooting device can still be accurately calculated by the distance calculation model and according to the position information of the person's head in the acquired depth image. It is worth noting that when the distance between the human target and the shooting device is calculated by the calculation model, the relative position between the human target and the shooting device can also be calculated according to the position information of the person's head in the acquired depth image. For example, according to the human head position information in the acquired image, the specific position of the human target relative to the shooting device can be obtained by calculating the function of the spatial coordinate information in the calculation model. It can be understood that the specific number of human targets and the specific calculation method of the relative position between the human target and the shooting device described here do not constitute a limitation on the specific protection scope of this application.

[0085] S400: Outputting the calculation result of the distance between the human target and the shooting device.

[0086] After the distance calculation between the personnel target and the shooting device is completed, the corresponding result can be output. It is understandable that when there is only one personnel target in the acquired depth image, only one distance value can be output accordingly. However, if there are two or more personnel targets in the acquired depth image, it is necessary to match the calculated result with the corresponding personnel. It is worth noting that the relative position between the personnel target and the shooting device can be calculated through the calculation model based on the position information of the personnel head in the acquired depth image. Therefore, when the calculation result of the distance between the personnel target and the shooting device is output, the spatial position of the personnel target relative to the shooting device can also be output. At this time, when the calculation result of the distance or relative spatial position between the personnel target and the shooting device is output, the calculation result can be matched with the position information of the corresponding personnel. For example, the distance value is respectively marked in the human head area or the corresponding information column in the image. It is understandable that the specific marking method of the calculation result of the distance between the personnel target and the shooting device and the spatial position of the personnel target relative to the shooting device described here obviously does not constitute a limitation on the specific protection scope of this application.

[0087] Furthermore, in a preferred embodiment provided in the present application, the personnel distance detection method further includes:

[0088] Calculating the distance between the first person target and the second person target based on the calculation result of the distance between the first person target and the shooting device and the calculation result of the distance between the second person target and the shooting device, and using a distance calculation model;

[0089] The calculation result of the distance between the first human target and the second human target is output.

[0090] When there are different human targets in the depth image obtained by the depth image shooting device, the distance between each human target and the shooting device can be calculated separately by the distance calculation model. In this way, according to the calculation result of the distance between the first human target and the shooting device and the calculation result of the distance between the second human target and the shooting device and through the distance calculation model, the distance between the first human target and the second human target can be calculated. In addition, since the spatial position of each human target relative to the shooting device can be calculated synchronously when calculating the distance between different human targets and the shooting device, the relative spatial position between different human targets can be obtained according to the orientation of each human target relative to the shooting device and through the calculation model. At this time, not only the distance and spatial position of the human target relative to the shooting device are obtained, but also the distance and relative spatial position between different human targets can be obtained. The calculated distance or relative spatial position information between different human targets is output, and the distance and specific relative spatial position between different human targets can be intuitively understood, so that the rationality of the distance between different human targets can be better analyzed.

[0091] Please refer to Figure 2 , an embodiment of the present application provides a personnel distance detection device 100.

[0092] Specifically, a personnel distance detection device 100 includes:

[0093] An acquisition module 11 is used to acquire a depth image through a depth image shooting device;

[0094] A detection module 12, configured to detect a human target in the depth image by using a YoLov3 target detection model;

[0095] The calculation module 13 is used to calculate the distance between the human target and the shooting device through the distance calculation model when a human target is detected;

[0096] The output module 14 is used to output the calculation result of the distance between the human target and the shooting device.

[0097] The acquisition module 11 is used to acquire a depth image through a depth image shooting device. In specific applications, the depth image shooting device here can be a depth image shooting device developed based on binocular stereo vision technology, laser radar technology, structured light depth detection technology or TOF (Time of Flight) technology. The acquisition module 11 can obtain the depth information of the environment in the depth image by acquiring the depth image shot by the shooting device. The shooting device can be designed with different sizes and different fixing methods according to the actual use scene and actual use requirements. In this way, the acquisition module 11 can selectively apply the depth image shooting device to different scenes and objects according to actual use requirements. For example, the fixing method of the shooting device can be designed to be wearable. In this way, by designing it to a corresponding size and being worn by different moving objects, depth images of different scenes or different perspectives can be obtained. Among them, the depth image uses the distance from the image collector of the depth image shooting device to each point in the scene as the pixel value, which can directly reflect the geometric shape of the visible surface of the scene in the image. In addition, the depth image data can be converted into point cloud data through coordinate transformation, and the point cloud data with rules and necessary information can also be converted into depth image data through reverse calculation. It is understandable that the specific development technology used by the depth shooting device here obviously does not constitute a limitation on the specific protection scope of this application.

[0098] Further, in a preferred implementation manner provided in the present application, the acquisition module 11 is used to acquire a depth image through a depth image shooting device, specifically for:

[0099] Acquire a depth image through a wearable depth image capturing device; or

[0100] A depth image is acquired through a fixed depth image capturing device.

[0101] Since the depth image capturing device can be designed with different fixing methods according to actual usage requirements, the acquisition module 11 can acquire the depth image through a wearable depth image capturing device or a fixed depth image capturing device. The wearable depth image capturing device is designed to be of a corresponding size so that it can be worn by different moving objects. When the wearing object moves, the depth image capturing device moves with it. For example, RealSense TMThe Depth Module D430 stereoscopic vision depth camera is worn on the human head. In this way, when the wearer moves, the depth camera acquisition module 11 worn on the human head can acquire continuous depth images in different scenes and at different perspectives. The fixed depth image shooting device is fixed at a certain spatial position, and the acquisition module 11 can acquire depth images based on the same spatial position at different times. Among them, the fixed depth image shooting device can also be designed to have a rotatable acquisition perspective. In this way, the acquisition module 11 can acquire depth images of different perspectives based on the same spatial position, so that depth images within different perspective ranges can be selected at the same spatial position according to actual needs.

[0102] The detection module 12 is used to detect human targets in the depth image by using the YoLov3 target detection model.

[0103] After the depth image is acquired through the depth image shooting device, the detection module 12 is required to purposefully screen the acquired depth image according to the actual image requirements. In particular, when the number of acquired depth images is large, only the depth images that meet the screening conditions need to be subsequently processed after screening by the detection module 12. In this way, the memory size occupied by the depth image can be reduced while improving work efficiency. Therefore, the detection module 12 is required to detect the acquired depth image so as to screen out the image with the personnel target. That is, personnel detection is performed in the depth image. Among the algorithms used for detection and classification, the YoLov3 network algorithm has a clear structure and excellent real-time performance. Therefore, the YoLov3 algorithm is selected as the target detection model to detect personnel targets in the acquired depth image. The detection module 12 detects through the YoLov3 target detection model, and when the acquired depth image contains a personnel target, subsequent calculations can be performed. When the acquired depth image does not contain a personnel target, the depth image needs to be acquired again.

[0104] Further, in a preferred embodiment provided in the present application, the detection module 12 is used to detect human targets in the depth image through the YoLov3 target detection model, specifically for:

[0105] The head region of the human target is detected in the depth image by using the YoLov3 target detection model.

[0106] After the detection module 12 screens the images with human targets in the acquired depth image, the depth image with human targets also uses the distance from the image collector of the depth image shooting device to each point in the scene as the pixel value, and reflects the geometric shape of the visible surface of the human target in the image. In order to accurately calculate the distance of the personnel based on the acquired depth image, the detection module 12 needs to detect the body part information with representative position in the human body, that is, the human head. Compared with other parts of the human body, the human head can more accurately represent the spatial position of the human target, so that the distance of the personnel can be calculated more accurately. For example, when the personnel depth image acquired by the acquisition module 11 only includes a partial body of the human body, such as only a human hand or a human leg, the image only presents the depth information and surface geometry of the corresponding human hand or leg. According to the depth image information at this time, it is impossible to accurately judge the specific spatial position of the human body. At this time, the depth image cannot be used to calculate the distance from the human target to the shooting device in the scene. Therefore, when the detection module 12 performs detection through the YoLov3 target detection model, it is necessary to detect the head area of ​​the human target in the acquired depth image. In this way, the distance between the person in the depth image and the shooting device can be calculated more accurately.

[0107] The calculation module 13 is used to calculate the distance between the human target and the shooting device through a distance calculation model when a human target is detected.

[0108] The depth image acquired by the depth image shooting device is detected by the YoLov3 target detection model. When there is no human target in it, the acquisition module 11 needs to re-acquire the depth image until the depth image with the human target is acquired. When the depth image acquired by the acquisition module 11 is detected to have a human target, the calculation module 13 can calculate the distance between the human target and the shooting device through the distance calculation model. It is worth noting that when there are two or more human heads in the depth image acquired by the acquisition module 11, the calculation module 13 can still accurately calculate the distance between the corresponding person and the depth image shooting device through the distance calculation model and according to the position information of the person's head in the acquired depth image. It is worth noting that when the calculation module 13 calculates the distance between the human target and the shooting device through the calculation model, it can also calculate the relative position between the human target and the shooting device according to the position information of the person's head in the acquired depth image. For example, according to the human head position information in the image acquired by the acquisition module 11, the calculation module 13 can obtain the specific position of the human target relative to the shooting device by calculating the function of the spatial coordinate information in the calculation model. It is understandable that the specific number of human targets and the specific method of calculating the relative position between the human targets and the shooting equipment described here do not constitute a limitation on the specific protection scope of this application.

[0109] The output module 14 is used to output the calculation result of the distance between the human target and the shooting device.

[0110] After the distance calculation between the person target and the shooting device is completed, the output module 14 can output the corresponding result. It is understandable that when there is only one person target in the depth image acquired by the acquisition module 11, the output module 14 can only output one distance value. However, if there are two or more person targets in the depth image acquired by the acquisition module 11, it is necessary to match the calculated result with the corresponding person. It is worth noting that the relative position between the person target and the shooting device can be calculated through the calculation model based on the person head position information in the acquired depth image. Therefore, when outputting the calculation result of the distance between the person target and the shooting device, the output module 14 can also output the spatial position of the person target relative to the shooting device. At this time, when outputting the calculation result of the distance or relative spatial position between the person target and the shooting device, the calculation result can be matched with the position information of the corresponding person. For example, the distance value is respectively marked in the human head area or the corresponding information column in the image. It is understandable that the specific marking method of the calculation result of the distance between the person target person and the shooting device and the spatial position of the person target relative to the shooting device described here obviously does not constitute a limitation on the specific protection scope of this application.

[0111] It should be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, an element defined by the phrase "comprises a ..." does not exclude the existence of other identical elements in the process, method, commodity or device including the element.

[0112] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for detecting a person's distance, characterized in that: The following steps are involved: Acquire a depth image through a depth image capturing device; Using the YoLov3 target detection model, detecting the head area of ​​the human target in the depth image; When a human target is detected, the distance between the human target and the shooting device is calculated through the distance calculation model; Outputting the calculation result of the distance between the human target and the shooting device; The YoLov3 target detection model is optimized by the following steps: Obtain a training set of deep image data; According to the training deep image dataset, a YoLov3 target detection model is trained by semi-supervised learning through a neural network algorithm; The step of obtaining a training depth image data set specifically includes: Acquire a training depth image data set consisting of a number of depth image data elements with classified and labeled human head positions and a number of depth image data elements with unclassified and labeled human head positions; Before obtaining the deep image data set for training, it also includes: Obtain a public multi-person scene image dataset; Extracting human body posture key point data from the data set by a human body posture estimation algorithm; Generate a three-dimensional human body database based on the extracted human body posture key point data and by parameterizing the human body generation model SMPL; Generate a training depth image data set based on the three-dimensional human body database and through a depth image conversion algorithm; The YoLov3 target detection model is trained by semi-supervised learning based on the training deep image dataset and the neural network algorithm, specifically including: According to a number of depth image data elements with classified and labeled human head positions in the training depth image data set, a number of depth image data elements with unclassified and labeled human head positions are subjected to head position prediction calculation through a neural network to generate a number of depth image data elements with predicted and labeled human head positions; The YoLov3 target detection model is trained by semi-supervised learning based on a number of depth image data elements with classified and labeled human head positions in the training depth image data set and the number of depth image data elements with predicted and labeled human head positions.

2. The method for detecting the distance between a person and a vehicle according to claim 1, wherein: Obtaining a depth image through a depth image capturing device, specifically including: Acquire a depth image through a wearable depth image capturing device; or A depth image is acquired through a fixed depth image capturing device.

3. The method for detecting the distance between people according to claim 1, characterized in that: The personnel distance detection method also includes: Calculating the distance between the first person target and the second person target according to the calculation result of the distance between the first person target and the shooting device and the calculation result of the distance between the second person target and the shooting device, and using a distance calculation model; The calculation result of the distance between the first human target and the second human target is output.

4. The device for a method for detecting a person's distance according to any one of claims 1 to 3, characterized in that: include: An acquisition module, used to acquire a depth image through a depth image shooting device; A detection module, used for detecting a head region of a human target in the depth image by using a YoLov3 target detection model; A calculation module, used to calculate the distance between the human target and the shooting device through a distance calculation model when a human target is detected; The output module is used to output the calculation result of the distance between the human target and the shooting device.

5. The device according to claim 4, characterized in that The acquisition module is used to acquire a depth image through a depth image shooting device, specifically for: Acquire a depth image through a wearable depth image capturing device; Or obtain the depth image through a fixed depth image shooting device.

Citation Information

Patent Citations

  • Non-inductive dinner plate image data automatic annotation method based on adversarial learning

    CN110765844A

  • Real-time distance determination method and device, equipment and medium

    CN111814634A