CN113239900A - Human body position detection method and device and computer readable storage medium - Google Patents

Human body position detection method and device and computer readable storage medium Download PDF

Info

Publication number
CN113239900A
CN113239900A CN202110674089.XA CN202110674089A CN113239900A CN 113239900 A CN113239900 A CN 113239900A CN 202110674089 A CN202110674089 A CN 202110674089A CN 113239900 A CN113239900 A CN 113239900A
Authority
CN
China
Prior art keywords
human body
proportion
image
unoccluded
height
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110674089.XA
Other languages
Chinese (zh)
Inventor
尹文科
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuncong Technology Group Co Ltd
Original Assignee
Yuncong Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yuncong Technology Group Co Ltd filed Critical Yuncong Technology Group Co Ltd
Priority to CN202110674089.XA priority Critical patent/CN113239900A/en
Publication of CN113239900A publication Critical patent/CN113239900A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting

Abstract

The invention relates to the technical field of trajectory data analysis, and particularly provides a method and a device for detecting human body positions and a computer readable storage medium, aiming at solving the technical problem of how to determine the positions of two shielded feet of a human body. To this end, a method of detecting a position of a human body according to an embodiment of the present invention includes: carrying out human body detection on an image to be detected, and acquiring a human body key point, a first height and a detection frame position; determining a ratio value of the length of the key point line segment to the first height; predicting the unoccluded proportion of the unoccluded human body in the image to be detected through a human body unoccluded proportion prediction model; according to the first height and the non-shielding proportion, acquiring a second height of the corresponding human body detection frame when the human body is not shielded; and determining the position of the foot of the human body in the image to be detected according to the position of the detection frame and the second height. The positions of the two feet of the pedestrian can be predicted on the premise that the two feet of the pedestrian are shielded, and the purpose of tracking the action track of the pedestrian is further achieved.

Description

Human body position detection method and device and computer readable storage medium
Technical Field
The invention relates to the technical field of trajectory data analysis, in particular to a method and a device for detecting human body positions and a computer-readable storage medium.
Background
The person trajectory analysis mainly aims at determining the positions of all persons in a monitoring area, particularly determining the positions of feet of a human body, and then obtaining the action trajectory of each person according to the position of each person. However, in some application scenarios, the positions of the feet of the human body cannot be determined due to the fact that the feet of the human body are shielded by buildings, automobiles or other pedestrians, and further the action tracks of the people cannot be obtained.
Accordingly, there is a need in the art for a new human body position detection scheme to solve the above problems.
Disclosure of Invention
In order to overcome the above drawbacks, the present invention is proposed to provide a human body position detection method that solves or at least partially solves the technical problem of how to determine the position of the occluded human body feet.
In a first aspect, a method for detecting a position of a human body is provided, where the method includes:
carrying out human body detection on an image to be detected so as to obtain human body key points, a first height of a human body detection frame and a detection frame position;
respectively determining the proportional values of the lengths of the key point line segments formed by different human body key points and the first heights;
predicting the unoccluded proportion of the unoccluded human body in the image to be detected according to the number of the key points of the human body, the number of the line segments of the key points and the proportion value by using a human body unoccluded proportion prediction model;
according to the first height and the non-shielding proportion, acquiring a second height of the corresponding human body detection frame when the human body is not shielded;
and determining the position of the foot of the human body in the image to be detected according to the position of the detection frame and the second height.
In a technical solution of the above method for detecting a human body position, the model for predicting a human body non-occlusion ratio is obtained by:
acquiring a human body image sample, wherein a foot area in a human body area in the human body image sample is shielded, and the non-shielding proportion corresponding to other non-shielded human body areas is known;
performing human body detection on the human body image sample to obtain human body key points and the height of a detection frame of a human body detection frame, respectively determining the number of key point line segments formed by different human body key points and the line segment length of each key point line segment, and respectively calculating the line segment proportion value of each line segment length and the height of the detection frame;
taking the unshielded proportion, the number of human key points, the number of key point line segments and the line segment proportion value which correspond to each human image sample as training data;
and performing model training on the data regression model by adopting the training data, and taking the data regression model after model training as a human body non-occlusion proportion prediction model.
In an aspect of the above method for detecting a human body position, before the step of "performing model training on a data regression model using the training data", the method further includes:
acquiring a first human body quality score of the human body image sample, wherein the first human body quality score is in positive correlation with the credibility of the unoccluded proportion of the human body image sample;
and taking the non-shielding proportion, the number of key points of the human body, the number of segments of the key points, the segment proportion value and the first human body quality corresponding to each human body image sample as new training data, and executing the steps of performing model training on a data regression model by using the training data and taking the data regression model after model training as a human body non-shielding proportion prediction model according to the new training data.
In a technical solution of the above method for detecting a position of a human body, "predicting an unshielded proportion that the human body is unshielded in the image to be detected" specifically includes:
acquiring a second human body mass fraction of the image to be detected, wherein the second human body mass fraction and the credibility of the unoccluded proportion of the image to be detected form a positive correlation;
and predicting the unoccluded proportion of the unoccluded human body in the image to be detected according to the number of the human body key points, the number of the key point line segments, the proportion value and the second human body quality score through the human body unoccluded proportion prediction model.
In a technical solution of the above method for detecting a position of a human body, "determining a position of a foot of the human body in the image to be detected according to the position of the detection frame and the second height" includes:
acquiring the position of an upper frame of the human body detection frame under the image coordinate system of the image to be detected according to the position of the detection frame;
determining the position of a lower frame of the corresponding human body detection frame under the image coordinate system when the human body is not shielded according to the position of the upper frame and the second height;
and determining the position of the foot of the human body in the image coordinate system according to the position of the lower frame.
In a second aspect, there is provided a human body position detection apparatus, including:
the human body detection module is configured to perform human body detection on the image to be detected so as to obtain human body key points, a first height of a human body detection frame and a detection frame position;
the proportion calculation module is configured to determine proportion values of lengths of key point line segments formed by different human body key points and the first height respectively;
an unoccluded proportion prediction module configured to predict an unoccluded proportion of the human body in the image to be detected, which is unoccluded, according to the number of the human body key points, the number of the key point line segments and the proportion value, through a human body unoccluded proportion prediction model;
a detection frame height determination module configured to obtain a second height of the corresponding human body detection frame when the human body is not occluded according to the first height and the unoccluded proportion;
a foot position determining module configured to determine a foot position of the human body in the image to be detected according to the detection frame position and the second height.
In an embodiment of the apparatus for detecting a human body position, the model for predicting a human body non-occlusion ratio is obtained by:
acquiring a human body image sample, wherein a foot area in a human body area in the human body image sample is shielded, and the non-shielding proportion corresponding to other non-shielded human body areas is known;
performing human body detection on the human body image sample to obtain human body key points and the height of a detection frame of a human body detection frame, respectively determining the number of key point line segments formed by different human body key points and the line segment length of each key point line segment, and respectively calculating the line segment proportion value of each line segment length and the height of the detection frame;
taking the unshielded proportion, the number of human key points, the number of key point line segments and the line segment proportion value which correspond to each human image sample as training data;
and performing model training on the data regression model by adopting the training data, and taking the data regression model after model training as a human body non-occlusion proportion prediction model.
In one embodiment of the apparatus for detecting a human body position, before the step of "performing model training on a data regression model using the training data", the method further includes:
acquiring a first human body quality score of the human body image sample, wherein the first human body quality score is in positive correlation with the credibility of the unoccluded proportion of the human body image sample;
and taking the non-shielding proportion, the number of key points of the human body, the number of segments of the key points, the segment proportion value and the first human body quality corresponding to each human body image sample as new training data, and executing the steps of performing model training on a data regression model by using the training data and taking the data regression model after model training as a human body non-shielding proportion prediction model according to the new training data.
In an aspect of the above apparatus for detecting a human body position, the non-occlusion ratio prediction module is further configured to:
acquiring a second human body mass fraction of the image to be detected, wherein the second human body mass fraction and the credibility of the unoccluded proportion of the image to be detected form a positive correlation;
and predicting the unoccluded proportion of the unoccluded human body in the image to be detected according to the number of the human body key points, the number of the key point line segments, the proportion value and the second human body quality score through the human body unoccluded proportion prediction model.
In one aspect of the above apparatus for detecting a position of a human body, the foot position determining module is further configured to:
acquiring the position of an upper frame of the human body detection frame under the image coordinate system of the image to be detected according to the position of the detection frame;
determining the position of a lower frame of the corresponding human body detection frame under the image coordinate system when the human body is not shielded according to the position of the upper frame and the second height;
and determining the position of the foot of the human body in the image coordinate system according to the position of the lower frame.
In a third aspect, a human body position detection device is provided, the control device comprises a processor and a storage device, the storage device is suitable for storing a plurality of program codes, and the program codes are suitable for being loaded and run by the processor to execute the human body position detection method according to any one of the above technical schemes.
In a fourth aspect, there is provided a computer readable storage medium having stored therein a plurality of program codes adapted to be loaded and run by a processor to execute the human body position detecting method according to any one of the above-mentioned human body position detecting methods.
One or more technical schemes of the invention at least have one or more of the following beneficial effects:
in the technical scheme of the implementation of the invention, human body detection is carried out on an image to be detected to obtain human body key points, a first height of a human body detection frame and a detection frame position, then the lengths of key point line segments formed by different human body key points are determined according to the human body key points, and the proportion value of the lengths of the key point line segments to the first height is determined according to the lengths of the key point line segments and the first height; after the proportion value is determined, calculating the unoccluded proportion of the unoccluded human body in the image to be detected according to the number of the key points of the human body, the number of the line segments of the key points and the proportion value through a pre-trained human body unoccluded proportion prediction model, wherein the unoccluded proportion represents the proportion of part of the height of the human body in the human body detection frame in the complete height of the human body; after the non-shielding proportion is calculated, the second height of the human body detection frame corresponding to the complete height of the human body when the human body is not shielded can be calculated through the first height and the non-shielding proportion, and the position of the foot of the human body in the image to be detected is finally determined through the position of the detection frame and the second height. Based on the above embodiment, according to the method for detecting the position of the human body provided by the embodiment of the invention, the positions of the human body feet can be predicted through the human body which is not shielded under the condition that the human body feet are shielded, so that the problem that the positions of the human body feet cannot be accurately determined when the human body feet are shielded in the prior art is solved.
Drawings
The disclosure of the present invention will become more readily understood with reference to the accompanying drawings. As is readily understood by those skilled in the art: these drawings are for illustrative purposes only and are not intended to constitute a limitation on the scope of the present invention. Wherein:
FIG. 1 is a flow chart illustrating the main steps of a method for detecting the position of a human body according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating the main steps of a method for obtaining an unoccluded scale prediction model according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating the main steps of a method for predicting an unoccluded ratio according to an embodiment of the present invention;
FIG. 4 is a flow chart illustrating the main steps of a method for determining the position of a human foot according to an embodiment of the present invention;
fig. 5 is a main block diagram of a human body position detecting apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of human key points of a human detection box according to one embodiment of the invention;
FIG. 7 is a schematic diagram of the length of a line segment of human keypoints and the distribution positions of human keypoints, according to an embodiment of the invention.
List of reference numerals:
51: a human body detection module; 52: a proportion calculation module; 53: an unoccluded proportion prediction module; 54: a detection frame height determination module; 55: a foot position determination module.
Detailed Description
Some embodiments of the invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only for explaining the technical principle of the present invention, and are not intended to limit the scope of the present invention.
In the description of the present invention, a "module" or "processor" may include hardware, software, or a combination of both. A module may comprise hardware circuitry, various suitable sensors, communication ports, memory, may comprise software components such as program code, or may be a combination of software and hardware. The processor may be a central processing unit, microprocessor, image processor, digital signal processor, or any other suitable processor. The processor has data and/or signal processing functionality. The processor may be implemented in software, hardware, or a combination thereof. Non-transitory computer readable storage media include any suitable medium that can store program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random-access memory, and the like. The term "a and/or B" denotes all possible combinations of a and B, such as a alone, B alone or a and B. The term "at least one A or B" or "at least one of A and B" means similar to "A and/or B" and may include only A, only B, or both A and B. The singular forms "a", "an" and "the" may include the plural forms as well.
In an example of an application scenario of the present invention, a monitoring device needs to be used to determine an action track of each pedestrian at an intersection, and accordingly, positions of both feet of each pedestrian need to be determined, but signs, advertisements, vehicles, and even other pedestrians at the intersection may block the pedestrian, so that the monitoring device cannot shoot the positions of both feet of the pedestrian, and thus cannot determine the action track of the pedestrian. In this regard, a human body position detection device according to an embodiment of the present invention may be installed in the monitoring device, and the device is used to detect the positions of both feet of the pedestrian, thereby completing the tracking of the movement track of the pedestrian. Specifically, the monitoring device sends the pedestrian image to the detection device of the human body position after acquiring the pedestrian image, the human body position detection device firstly carries out human body detection on an image to be detected to obtain a human body key point, a first height of a human body detection frame and a detection frame position, then calculating the ratio of the length of a key point line segment formed by different human body key points to the first height, predicting the non-shielding ratio by a human body non-shielding ratio prediction model, after the non-shielding proportion is predicted, the second height of the human body detection frame corresponding to the non-shielding human body can be determined according to the first height and the non-shielding proportion, the position of the human foot can be determined through the position of the human body detection frame and the second height, the determined position of the human foot is sent to the monitoring device, and the monitoring device can determine the action track of the pedestrian according to the received position of the human foot.
Referring to fig. 1, fig. 1 is a flow chart illustrating main steps of a method for detecting a position of a human body according to an embodiment of the present invention. As shown in fig. 1, the method for detecting the position of the human body in the embodiment of the present invention mainly includes the following steps S101 to S105.
Step S101: and carrying out human body detection on the image to be detected so as to obtain human body key points, the first height of the human body detection frame and the position of the detection frame.
In an embodiment of this embodiment, the image to be detected may be any frame of picture in the monitoring video, or may be a certain picture. As shown in fig. 6, the human body key points of the pedestrian in the image to be detected may include: the key points of 14 individuals, such as the top of the head, the cervical vertebra, the left shoulder, the right shoulder, the left elbow, the right elbow, the left hand, the right hand, the left crotch, the right crotch, the left knee, the right knee, the left foot, the right foot and the like. The first height of the human body detection frame may be a height of a minimum rectangular frame selected according to a pedestrian frame and including all human body regions of the pedestrian in the picture or the video frame after the pedestrian is determined in the video frame or the picture. The position of the detection frame may be a position of the detection frame in a coordinate system of the detection image.
For example, in the present embodiment, after a video frame or picture (to-be-detected image) is acquired, a human body key point of a certain pedestrian in the video frame or picture, a first height of a human body detection frame, and a position of the detection frame may be acquired. The acquired human body key points may include one or more pieces of human body key point information, each human body key point may include a plurality of pieces of human body key point information in this embodiment, and the human body key point information may include coordinates, confidence degrees, and categories of each human body key point appearing in the image coordinate system of the image to be detected. The confidence degree represents the credibility that the collected human key points in the video frames or pictures are the human key points belonging to the pedestrian, namely when the confidence degree of a certain human key point is lower than a confidence degree threshold value, the human key point is determined to be false detection, and then the information of the human key point is invalidated and is not included in the subsequent steps. The category represents the category of each human body key point, such as: the category of a certain human body key point is a key point at the position of the left shoulder, the category of a certain human body key point is a key point at the position of the left knee, and the like. Since the human body detection frame is the smallest rectangular frame that contains all human body regions of the pedestrian appearing in the image to be detected, the first height of the human body detection frame represents the height of the human body in the image.
Through the step S101, the human body key point information, the first height, and the position of the detection frame of the human body key point in the image to be detected can be obtained, and information required to be used in the subsequent step in the image to be detected can be extracted.
Step S102: and respectively determining the proportional values of the lengths and the first heights of the key point line segments formed by different human body key points.
In one embodiment of this embodiment, the lengths of the segments of the key points formed by different human key points can be calculated by the coordinates of the human key points in the above embodiment. As shown in fig. 7, the distance between the human body key point 1 and the human body key point 3, the distance between the human body key point 3 and the human body key point 5, the distance between the human body key point 7 and the human body key point 9, and the like may be calculated. In this embodiment, the length of the key point line segment may be calculated by a conventional line segment calculation method in the field of mathematical technology. For example, the length of each keypoint line segment may be calculated by "a method of determining the length of a line segment formed by two points by calculating the euclidean distance between the two points". After the length of each key point line segment is obtained, dividing the length of the key point line segment by the first height to obtain a proportional value of the length of the key point line segment and the first height.
Step S103: and predicting the unoccluded proportion of the human body in the image to be detected, which is not occluded, according to the number of the key points of the human body, the number of the line segments of the key points and the proportion value through a human body unoccluded proportion prediction model.
In an implementation manner of this embodiment, the number of the human body key points and the number of the key point line segments may be obtained through the human body key points obtained in step S101 and the key point line segments formed by different human body key points in step S102.
The non-shielding proportion represents the proportion of the height of the pedestrian in the human body detection frame in the real height of the human body, and the height of the human body detection frame corresponding to the pedestrian when the pedestrian is not shielded can be calculated by calculating the non-shielding proportion.
Referring to fig. 2, in an embodiment of the present embodiment, a human non-occlusion ratio prediction model may be obtained through steps S201 to S204 shown in fig. 2:
step S201: acquiring a human body image sample, wherein the foot area in the human body image sample is occluded and the corresponding unoccluded proportion of other unoccluded human body areas is known.
Step S202: the method comprises the steps of carrying out human body detection on a human body image sample to obtain human body key points and the height of a detection frame of a human body detection frame, respectively determining the number of key point line segments formed by different human body key points and the line segment length of each key point line segment, and respectively calculating the line segment proportion value of each line segment length and the height of the detection frame.
Step S203: and taking the unshielded proportion, the number of the human body key points, the number of the key point line segments and the line segment proportion value which correspond to each human body image sample as training data.
Step S204: and performing model training on the data regression model by adopting training data, and taking the data regression model after model training as a human body non-occlusion proportion prediction model.
The value of the unoccluded proportion of the human body image sample needs to be controlled within a certain interval, for example, the unoccluded proportion may be 90%, 80%, 70%, and so on.
It should be noted that, in this embodiment, a data regression model that is conventional in the field of machine learning technology may be used for model training, for example, a random forest model may be used for training, and in addition, other training models, such as linear regression, SVM regression, neural network, and the like, may also be used. In the training stage, the human body image sample with the known non-occlusion proportion is used for training the non-occlusion proportion model, so that the trained non-occlusion proportion prediction model meeting the requirements can be obtained.
In one embodiment of this embodiment, the step S203 may be replaced by the following steps 1 to 2:
step 1: and acquiring a first human body quality score of the human body image sample, wherein the first human body quality score has a positive correlation with the credibility of the unoccluded proportion of the human body image sample.
Step 2: and taking the unshielded proportion, the number of key points of the human body, the number of segments of the key points, the segment proportion value and the first human body quality corresponding to each human body image sample as new training data. In this embodiment, after new training data is acquired through the above steps 1 to 2, in step S204, the new training data may be used to perform model training on the data regression model, and the data regression model after model training is used as the human body non-occlusion ratio prediction model.
In the non-occlusion ratio prediction model of this embodiment, there may be problems that a non-human target is erroneously detected as a human body, or a certain human target is too small, or the received occlusion ratio is too high, or a video frame or an image is blurred, and these problems may cause an inaccurate prediction result of the non-occlusion ratio prediction model. Therefore, the confidence level of the human body image sample is confirmed through the first human body mass score, and when the first human body mass score is too low, processing is not performed, that is, the non-occlusion ratio of the pedestrian is not predicted. It should be noted that, in this embodiment, a conventional image quality evaluation method in the image processing technology field may be adopted to evaluate the blur degree of a video frame or a picture, and a human quality score is determined according to the evaluation result of the blur degree, where the higher the blur degree is, the lower the human quality score is. In addition, in this embodiment, the number and distribution positions of the key points of the human body may also be used to determine the human body mass score, in an actual situation, although there may be a deviation in the positions of the key points of the human body during the walking process of the pedestrian, the approximate distribution positions of the key points may not be changed fundamentally (as shown in fig. 7), so after the "human body key points" are detected, the human body mass score may be estimated according to the deviation degree of the compared "human body key points" by comparing the distribution positions of the "human body key points" with the positions of the key points of the human body of the real pedestrian, for example, when the deviation between the distribution of the collected "human body key points" and the distribution positions of the key points of the human body of the real pedestrian is larger, it is indicated that the possibility that the "human body key points" are human body key points belonging to the pedestrian is smaller, and the possibility that the key points belong to the animal body of the non-pedestrian is larger, and thus the lower the body mass fraction can be set at the larger the distribution positional deviation. For pedestrians with too high occluded ratio, the present embodiment may estimate the quality score by using the number of the human body key points, for example, the greater the number of the human body key points, the higher the quality score. Aiming at the condition that the human body target of the pedestrian is too small, the value of the length of the key point line segment can be adopted to evaluate the human body quality score, in the actual calculation process, the smaller the value of the length of the acquired key point line segment is, the longer the pedestrian is away from the acquisition device of the image to be detected to a certain extent, or the pedestrian is too small, the lower the accuracy of the height of the corresponding human body detection frame when the pedestrian is not shielded is calculated according to the predicted non-shielding proportion, so after the human body key point is detected, the human body quality score can be evaluated according to the length of the line segment of the human body key point, for example, the larger the value of the length of the key point line segment is (the length of the key point line segment needs to be in a reasonable value interval), the higher the quality score is.
Referring to fig. 3, in an embodiment of the present invention, the unoccluded proportion of the unoccluded human body in the image to be detected can be predicted through steps S301 to S302 as shown in fig. 3:
step S301: and acquiring a second human body mass fraction of the image to be detected, wherein the second human body mass fraction and the credibility of the unshielded proportion of the image to be detected form a positive correlation relationship.
Step S302: and predicting the unoccluded proportion of the unoccluded human body in the image to be detected according to the number of the key points of the human body, the number of the line segments of the key points, the proportion value and the second human body quality score through a human body unoccluded proportion prediction model.
By inputting the second human body quality score into the non-shielding ratio prediction model, the image to be detected with the low credibility can be filtered under the condition that the credibility of the non-shielding ratio of the image to be detected is low, the probability of inaccurate prediction is reduced, and meanwhile, unnecessary workload can be reduced. It should be noted that, the method for obtaining the second body mass fraction is similar to the method for obtaining the first body mass fraction, and for brevity of description, no further description is given here.
Step S104: and acquiring a second height of the corresponding human body detection frame when the human body is not shielded according to the first height and the non-shielding proportion.
The first height represents the height of the human body detection frame when being shielded, namely the height of a shielded pedestrian in an image, and the second height corresponding to the pedestrian when not being shielded can be calculated through the non-shielding proportion and the first height, namely the height of the pedestrian in the image when not being shielded.
Step S105: and determining the position of the foot of the human body in the image to be detected according to the position of the detection frame and the second height.
Referring to fig. 4, in an embodiment of the present embodiment, the foot position of the human body in the image to be detected may be determined through steps S401 to S403 as shown in fig. 4:
step S401: and acquiring the position of the upper frame of the human body detection frame under the image coordinate system of the image to be detected according to the position of the detection frame.
Step S402: and determining the position of the lower frame of the corresponding human body detection frame under the image coordinate system when the human body is not shielded according to the position of the upper frame and the second height.
Step S403: and determining the position of the foot of the human body in the image coordinate system according to the position of the lower frame.
The image coordinate system of the image to be detected is a planar coordinate system constructed by taking the upper left corner of the image to be detected as an original point, the value of the vertical coordinate of the upper frame position can be added with the second height after the upper frame position of the upper frame of the human body detection frame (the human body detection frame obtained in the step S101) is determined, the lower frame position of the lower frame of the corresponding human body detection frame under the image coordinate system when the human body is not shielded is determined, and then the foot position of the human body under the image coordinate system can be determined according to the lower frame position of the lower frame.
In one embodiment, the value of the abscissa of the position of the feet of the human body may also be determined by:
two abscissa values of two end points of an upper frame of the human body detection frame (the human body detection frame obtained in step S101) are obtained, and then the two abscissa values are added and averaged to obtain an abscissa value of a midpoint of the upper frame, and the abscissa value of the midpoint can be used as an abscissa value of positions of both feet of the human body. Since the human body in the image to be detected may have a tilt, the abscissa value of the midpoint of the upper frame may be determined as the abscissa value of the feet position, which is inaccurate, and therefore, the abscissa value of the feet position of the human body may also be determined according to the tilt degree, i.e., the slope, of the human body, which is not described herein again for brevity of description.
After the position of the foot of the human body is confirmed, the position of the foot of the human body in the image to be detected can be converted into a three-dimensional space such as a three-dimensional space position in a real physical world according to a conversion relation between a preset image coordinate system and a three-dimensional space coordinate system, so that the specific position of the human body in the real physical world can be accurately positioned according to the position. Further, when the pedestrian track is determined, the motion track of the pedestrian in the real powerless world can be determined according to the three-dimensional space positions.
In one embodiment, the conversion relationship between the coordinate values in the image to be detected and the coordinate values in the real world may be determined by:
firstly, a three-dimensional space coordinate system is established in a corresponding real world area in an image to be detected, then, the conversion relation between the image coordinate system and the three-dimensional space coordinate system is confirmed according to the comparison between the coordinate of any point in the coordinate system in the image to be detected and the coordinate of the point in the real world, and in the process, a plurality of points can be used for repeatedly confirming the conversion relation between the image coordinate system and the three-dimensional space coordinate system, so that the conversion accuracy from the image coordinate system to the three-dimensional space coordinate system reaches an ideal degree. After the conversion relationship between the image coordinate system and the three-dimensional space coordinate system is determined, the coordinate values in the detection image can be converted into coordinate values or positions in the real world.
It should be noted that the method for detecting positions of two feet of a human body in this embodiment is suitable for a situation where two feet of a human body are shielded, and if two feet of a human body are not shielded, the method for detecting positions of two feet of a human body may not be used, and the positions of two feet of a human body may be determined by a conventional means.
In the embodiment of the invention, human body key points, a first height of a human body detection frame and positions of the detection frames can be obtained by performing human body detection on an image to be detected, then a ratio value of lengths of key point line segments formed by different human body key points to the first height is calculated, the non-shielding ratio of the human body in the image to be detected, which is not shielded, is predicted according to the number of the human body key points, the number of the key point line segments and the ratio value, a second height of the human body detection frame, which corresponds to the situation that the human body is not shielded, is determined according to the first height and the non-shielding ratio, and finally the positions of the frames and the second height are detected, so that the positions of feet of the human body in the image to be detected are determined, the purpose of determining the positions of the human body is achieved, and the purpose of tracking the action tracks of pedestrians is further achieved.
It should be noted that, although the foregoing embodiments describe each step in a specific sequence, those skilled in the art will understand that, in order to achieve the effect of the present invention, different steps do not necessarily need to be executed in such a sequence, and they may be executed simultaneously (in parallel) or in other sequences, and these changes are all within the protection scope of the present invention.
Furthermore, the invention also provides a device for detecting the position of the human body.
Referring to fig. 5, fig. 5 is a main structural block diagram of a human body position detecting apparatus according to an embodiment of the present invention. As shown in fig. 5, the human body position detecting apparatus in the embodiment of the present invention mainly includes a human body detecting module 51, a proportion calculating module 52, an unobstructed proportion predicting module 53, a second height determining module 54, and a foot position determining module 55. In some embodiments, one or more of the human detection module 51, the scale calculation module 52, the unoccluded scale prediction module 53, the detection frame height determination module 54, and the foot position determination module 55 may be combined together into one module. In some embodiments, the human body detection module 51 may be configured to perform human body detection on the image to be detected to obtain the human body key point, the first height of the human body detection frame, and the detection frame position. The proportion calculation module 52 may be configured to determine the proportion values of the lengths to the first heights of the keypoint line segments formed by different human keypoints, respectively. The unoccluded proportion prediction module 53 may be configured to predict an unoccluded proportion of the human body in the image to be detected, which is not occluded, according to the number of the human body key points, the number of the key point line segments, and the proportion value, by using the human body unoccluded proportion prediction model. The detection frame height determination module 54 may be configured to obtain a second height of the corresponding human body detection frame when the human body is not occluded according to the first height and the non-occlusion ratio. The foot position determining module 55 may be configured to determine the foot position of the human body in the image to be detected according to the detection frame position and the second height. In one embodiment, the description of the specific implementation function may refer to the description of step S101 to step S105.
In one embodiment, the detection apparatus further includes a human body non-occlusion ratio prediction model obtaining module, and in this embodiment, the human body non-occlusion ratio prediction model obtaining module may be configured to obtain the human body non-occlusion ratio prediction model by:
acquiring a human body image sample, wherein the foot area in the human body image sample is occluded and the corresponding unoccluded proportion of other unoccluded human body areas is known.
The method comprises the steps of carrying out human body detection on a human body image sample to obtain human body key points and the height of a detection frame of a human body detection frame, respectively determining the number of key point line segments formed by different human body key points and the line segment length of each key point line segment, and respectively calculating the line segment proportion value of each line segment length and the height of the detection frame.
And taking the unshielded proportion, the number of the human body key points, the number of the key point line segments and the line segment proportion value which correspond to each human body image sample as training data.
And performing model training on the data regression model by adopting training data, and taking the data regression model after model training as a human body non-occlusion proportion prediction model. In one embodiment, the description of the specific implementation function may refer to the descriptions of step S201 to step S204.
In one embodiment, the human unoccluded proportion prediction model obtaining module may be further configured to perform the following operations:
and acquiring a first human body quality score of the human body image sample, wherein the first human body quality score has a positive correlation with the credibility of the unoccluded proportion of the human body image sample.
And taking the unshielded proportion, the number of key points of the human body, the number of segments of the key points, the segment proportion value and the first human body quality corresponding to each human body image sample as new training data.
And performing model training on the data regression model by adopting training data, and taking the data regression model after model training as a human body non-occlusion proportion prediction model. In one embodiment, the description of the specific implementation function may be referred to in step 1 to step 2.
In one embodiment, the non-occlusion ratio prediction module is further configured to:
and acquiring a second human body mass fraction of the image to be detected, wherein the second human body mass fraction and the credibility of the unshielded proportion of the image to be detected form a positive correlation relationship.
And predicting the unoccluded proportion of the unoccluded human body in the image to be detected according to the number of the key points of the human body, the number of the line segments of the key points, the proportion value and the second human body quality score through a human body unoccluded proportion prediction model. In one embodiment, the description of the specific implementation function may refer to the descriptions of step S301 to step S302.
In one embodiment, the foot position determination module is further configured to perform the following operations:
and acquiring the position of the upper frame of the human body detection frame under the image coordinate system of the image to be detected according to the position of the detection frame.
And determining the position of the lower frame of the corresponding human body detection frame under the image coordinate system when the human body is not shielded according to the position of the upper frame and the second height.
And determining the position of the foot of the human body in the image coordinate system according to the position of the lower frame. In one embodiment, the description of the specific implementation function may refer to the descriptions of step S401 to step S403.
The technical principles, the solved technical problems and the generated technical effects of the above-mentioned human body position detection device for implementing the embodiment of the human body position detection method shown in fig. 1 are similar, and it can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working process and related description of the human body position detection device may refer to the content described in the embodiment of the human body position detection method, and no further description is given here.
It will be understood by those skilled in the art that all or part of the flow of the method according to the above-described embodiment may be implemented by a computer program, which may be stored in a computer-readable storage medium and used to implement the steps of the above-described embodiments of the method when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying said computer program code, media, usb disk, removable hard disk, magnetic diskette, optical disk, computer memory, read-only memory, random access memory, electrical carrier wave signals, telecommunication signals, software distribution media, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
Furthermore, the invention also provides a device for detecting the position of the human body. In an embodiment of the device for detecting a position of a human body according to the present invention, the device for detecting a position of a human body comprises a processor and a storage device, the storage device may be configured to store a program for executing the method for detecting a position of a human body of the above-mentioned method embodiment, and the processor may be configured to execute a program in the storage device, the program including but not limited to a program for executing the method for detecting a position of a human body of the above-mentioned method embodiment. For convenience of explanation, only the parts related to the embodiments of the present invention are shown, and details of the specific techniques are not disclosed. The human body position detection means may be a human body position detection means device formed including various electronic devices.
Further, the invention also provides a computer readable storage medium. In one computer-readable storage medium embodiment according to the present invention, the computer-readable storage medium may be configured to store a program for executing the human body position detection method of the above-described method embodiment, which may be loaded and executed by a processor to implement the above-described human body position detection method. For convenience of explanation, only the parts related to the embodiments of the present invention are shown, and details of the specific techniques are not disclosed. The computer readable storage medium may be a storage device formed by including various electronic devices, and optionally, the computer readable storage medium is a non-transitory computer readable storage medium in the embodiment of the present invention.
Further, it should be understood that, since the configuration of each module is only for explaining the functional units of the apparatus of the present invention, the corresponding physical devices of the modules may be the processor itself, or a part of software, a part of hardware, or a part of a combination of software and hardware in the processor. Thus, the number of individual modules in the figures is merely illustrative.
Those skilled in the art will appreciate that the various modules in the apparatus may be adaptively split or combined. Such splitting or combining of specific modules does not cause the technical solutions to deviate from the principle of the present invention, and therefore, the technical solutions after splitting or combining will fall within the protection scope of the present invention.
So far, the technical solution of the present invention has been described with reference to one embodiment shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.

Claims (12)

1. A method for detecting the position of a human body, the method comprising:
carrying out human body detection on an image to be detected so as to obtain human body key points, a first height of a human body detection frame and a detection frame position;
respectively determining the proportional values of the lengths of the key point line segments formed by different human body key points and the first heights;
predicting the unoccluded proportion of the unoccluded human body in the image to be detected according to the number of the key points of the human body, the number of the line segments of the key points and the proportion value by using a human body unoccluded proportion prediction model;
according to the first height and the non-shielding proportion, acquiring a second height of the corresponding human body detection frame when the human body is not shielded;
and determining the position of the foot of the human body in the image to be detected according to the position of the detection frame and the second height.
2. The method for detecting the position of the human body according to claim 1, wherein the model for predicting the unoccluded proportion of the human body is obtained by:
acquiring a human body image sample, wherein a foot area in a human body area in the human body image sample is shielded, and the non-shielding proportion corresponding to other non-shielded human body areas is known;
performing human body detection on the human body image sample to obtain human body key points and the height of a detection frame of a human body detection frame, respectively determining the number of key point line segments formed by different human body key points and the line segment length of each key point line segment, and respectively calculating the line segment proportion value of each line segment length and the height of the detection frame;
taking the unshielded proportion, the number of human key points, the number of key point line segments and the line segment proportion value which correspond to each human image sample as training data;
and performing model training on the data regression model by adopting the training data, and taking the data regression model after model training as a human body non-occlusion proportion prediction model.
3. The method of claim 2, wherein before the step of performing model training on a data regression model using the training data, the method further comprises:
acquiring a first human body quality score of the human body image sample, wherein the first human body quality score is in positive correlation with the credibility of the unoccluded proportion of the human body image sample;
and taking the non-shielding proportion, the number of key points of the human body, the number of segments of the key points, the segment proportion value and the first human body quality corresponding to each human body image sample as new training data, and executing the steps of performing model training on a data regression model by using the training data and taking the data regression model after model training as a human body non-shielding proportion prediction model according to the new training data.
4. The method according to claim 3, wherein the step of predicting the unoccluded proportion of the unoccluded human body in the image to be detected specifically comprises:
acquiring a second human body mass fraction of the image to be detected, wherein the second human body mass fraction and the credibility of the unoccluded proportion of the image to be detected form a positive correlation;
and predicting the unoccluded proportion of the unoccluded human body in the image to be detected according to the number of the human body key points, the number of the key point line segments, the proportion value and the second human body quality score through the human body unoccluded proportion prediction model.
5. The method for detecting the position of the human body according to claim 1, wherein the specific step of determining the position of the foot of the human body in the image to be detected according to the position of the detection frame and the second height comprises:
acquiring the position of an upper frame of the human body detection frame under the image coordinate system of the image to be detected according to the position of the detection frame;
determining the position of a lower frame of the corresponding human body detection frame under the image coordinate system when the human body is not shielded according to the position of the upper frame and the second height;
and determining the position of the foot of the human body in the image coordinate system according to the position of the lower frame.
6. A device for detecting the position of a human body, the device comprising:
the human body detection module is configured to perform human body detection on the image to be detected so as to obtain human body key points, a first height of a human body detection frame and a detection frame position;
the proportion calculation module is configured to determine proportion values of lengths of key point line segments formed by different human body key points and the first height respectively;
an unoccluded proportion prediction module configured to predict an unoccluded proportion of the human body in the image to be detected, which is unoccluded, according to the number of the human body key points, the number of the key point line segments and the proportion value, through a human body unoccluded proportion prediction model;
a detection frame height determination module configured to obtain a second height of the corresponding human body detection frame when the human body is not occluded according to the first height and the unoccluded proportion;
a foot position determining module configured to determine a foot position of the human body in the image to be detected according to the detection frame position and the second height.
7. The apparatus according to claim 6, further comprising a human non-occlusion ratio prediction model obtaining module configured to obtain the human non-occlusion ratio prediction model by:
acquiring a human body image sample, wherein a foot area in a human body area in the human body image sample is shielded, and the non-shielding proportion corresponding to other non-shielded human body areas is known;
performing human body detection on the human body image sample to obtain human body key points and the height of a detection frame of a human body detection frame, respectively determining the number of key point line segments formed by different human body key points and the line segment length of each key point line segment, and respectively calculating the line segment proportion value of each line segment length and the height of the detection frame;
taking the unshielded proportion, the number of human key points, the number of key point line segments and the line segment proportion value which correspond to each human image sample as training data;
and performing model training on the data regression model by adopting the training data, and taking the data regression model after model training as a human body non-occlusion proportion prediction model.
8. The apparatus according to claim 7, wherein the human body unoccluded scale prediction model obtaining module is further configured to:
acquiring a first human body quality score of the human body image sample, wherein the first human body quality score is in positive correlation with the credibility of the unoccluded proportion of the human body image sample;
taking the unshielded proportion, the number of key points of the human body, the number of segments of the key points, the segment proportion value and the first human body quality score which correspond to each human body image sample as new training data;
and performing model training on the data regression model by adopting the new training data, and taking the data regression model after model training as a human body non-shielding proportion prediction model.
9. The apparatus according to claim 8, wherein the non-occlusion ratio prediction module is further configured to:
acquiring a second human body mass fraction of the image to be detected, wherein the second human body mass fraction and the credibility of the unoccluded proportion of the image to be detected form a positive correlation;
and predicting the unoccluded proportion of the unoccluded human body in the image to be detected according to the number of the human body key points, the number of the key point line segments, the proportion value and the second human body quality score through the human body unoccluded proportion prediction model.
10. The human position detection apparatus of claim 6, wherein the foot position determination module is further configured to:
acquiring the position of an upper frame of the human body detection frame under the image coordinate system of the image to be detected according to the position of the detection frame;
determining the position of a lower frame of the corresponding human body detection frame under the image coordinate system when the human body is not shielded according to the position of the upper frame and the second height;
and determining the position of the foot of the human body in the image coordinate system according to the position of the lower frame.
11. An apparatus for detecting the position of a human body comprising a processor and a storage device, the storage device being adapted to store a plurality of program codes, characterized in that the program codes are adapted to be loaded and run by the processor to perform the method for detecting the position of a human body according to any of claims 1 to 5.
12. A computer-readable storage medium having a plurality of program codes stored therein, wherein the program codes are adapted to be loaded and executed by a processor to perform the method for detecting the position of a human body according to any one of claims 1 to 5.
CN202110674089.XA 2021-06-17 2021-06-17 Human body position detection method and device and computer readable storage medium Pending CN113239900A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110674089.XA CN113239900A (en) 2021-06-17 2021-06-17 Human body position detection method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110674089.XA CN113239900A (en) 2021-06-17 2021-06-17 Human body position detection method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113239900A true CN113239900A (en) 2021-08-10

Family

ID=77140234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110674089.XA Pending CN113239900A (en) 2021-06-17 2021-06-17 Human body position detection method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113239900A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211411A (en) * 2007-12-21 2008-07-02 北京中星微电子有限公司 Human body detection process and device
CN108805907A (en) * 2018-06-05 2018-11-13 中南大学 A kind of pedestrian's posture multiple features INTELLIGENT IDENTIFICATION method
CN109766792A (en) * 2018-12-25 2019-05-17 东南大学 A kind of personal identification method based on facial image
CN111797791A (en) * 2018-12-25 2020-10-20 上海智臻智能网络科技股份有限公司 Human body posture recognition method and device
CN111914834A (en) * 2020-06-18 2020-11-10 绍兴埃瓦科技有限公司 Image recognition method and device, computer equipment and storage medium
CN112308045A (en) * 2020-11-30 2021-02-02 深圳集智数字科技有限公司 Detection method and device for dense crowd and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211411A (en) * 2007-12-21 2008-07-02 北京中星微电子有限公司 Human body detection process and device
CN108805907A (en) * 2018-06-05 2018-11-13 中南大学 A kind of pedestrian's posture multiple features INTELLIGENT IDENTIFICATION method
CN109766792A (en) * 2018-12-25 2019-05-17 东南大学 A kind of personal identification method based on facial image
CN111797791A (en) * 2018-12-25 2020-10-20 上海智臻智能网络科技股份有限公司 Human body posture recognition method and device
CN111914834A (en) * 2020-06-18 2020-11-10 绍兴埃瓦科技有限公司 Image recognition method and device, computer equipment and storage medium
CN112308045A (en) * 2020-11-30 2021-02-02 深圳集智数字科技有限公司 Detection method and device for dense crowd and electronic equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
刘杰: "《基于深度学习的人体位置与关键点检测》", 《中国优秀硕士学位论文全文数据库 信息科技辑》, 31 January 2021 (2021-01-31) *
张良等: "《姿态引导与多粒度特征融合的行人再识别》", 《激光与光电子学进展》, 8 May 2019 (2019-05-08) *
龚浩田: "《基于关键点检测的无锚框轻量级目标检测算法》", 《计算机科学》, 26 May 2021 (2021-05-26) *

Similar Documents

Publication Publication Date Title
CN111696128B (en) High-speed multi-target detection tracking and target image optimization method and storage medium
CN112669349B (en) Passenger flow statistics method, electronic equipment and storage medium
CN108805016B (en) Head and shoulder area detection method and device
CN111104925B (en) Image processing method, image processing apparatus, storage medium, and electronic device
CN110335313B (en) Audio acquisition equipment positioning method and device and speaker identification method and system
CN112465855B (en) Passenger flow statistical method, device, storage medium and equipment
CN112434566B (en) Passenger flow statistics method and device, electronic equipment and storage medium
CN110991397B (en) Travel direction determining method and related equipment
CN111753826B (en) Vehicle and license plate association method, device and electronic system
KR20150042544A (en) Mobile terminal for providing location information, method and system for measuring the location information
CN102930559A (en) Image processing method and device
CN113256683B (en) Target tracking method and related equipment
CN114359618A (en) Training method of neural network model, electronic equipment and computer program product
KR101313879B1 (en) Detecting and Tracing System of Human Using Gradient Histogram and Method of The Same
CN110956649A (en) Method and device for tracking multi-target three-dimensional object
CN113239900A (en) Human body position detection method and device and computer readable storage medium
CN116952277A (en) Potential position estimation method and system based on artificial intelligence and behavior characteristics
CN116311166A (en) Traffic obstacle recognition method and device and electronic equipment
CN111695404B (en) Pedestrian falling detection method and device, electronic equipment and storage medium
CN109800678A (en) The attribute determining method and device of object in a kind of video
CN114743262A (en) Behavior detection method and device, electronic equipment and storage medium
CN114882363A (en) Method and device for treating stains of sweeper
CN113592902A (en) Target tracking method and device, computer equipment and storage medium
CN109146969B (en) Pedestrian positioning method, device and processing equipment and storage medium thereof
CN111339898A (en) Behavior detection method and apparatus, computer readable storage medium, computer device

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