Hunchback sitting posture detection method, device, equipment and storage medium

By using key point detection and dynamic mean update of human images, the deployment difficulty and cost of hunchback posture detection are solved, and accurate hunchback posture recognition is achieved.

CN116311490BActive Publication Date: 2026-07-07UBTECH ROBOTICS CORP LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UBTECH ROBOTICS CORP LTD
Filing Date
2022-09-07
Publication Date
2026-07-07

Smart Images

  • Figure CN116311490B_ABST
    Figure CN116311490B_ABST
Patent Text Reader

Abstract

The application provides a humpback sitting posture detection method, device and equipment and a storage medium. The method comprises the following steps: performing key point detection on a human body image of a target user, obtaining a nose key point and a double-eye key point of the human body in the human body image, and obtaining coordinate information corresponding to the nose key point and the double-eye key point by using a preset coordinate system; calculating a first average value according to the coordinate information corresponding to the nose key point and the double-eye key point, wherein the first average value is the average value of the sum of the vertical coordinate value of the nose key point and the vertical coordinate value of the double-eye key point in the human body image; judging whether the first average value is less than a standard average value, if yes, calculating a difference value between the first average value and the standard average value and judging whether the difference value is within a standard floating range, if yes, outputting a current sitting posture detection result of the target user as a humpback sitting posture based on the human body image. The method can be directly deployed in an application program, does not need to be matched with equipment and depends on a sensor, reduces the deployment difficulty and saves the hardware cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of hunchback sitting posture detection technology, and in particular to a method, device, equipment and storage medium for hunchback sitting posture detection. Background Technology

[0002] Prolonged sitting during work and study can easily lead to hunchback, which can cause spinal curvature and negatively impact health. Currently, most existing technologies for detecting or correcting posture rely on sensors, requiring corresponding desks, chairs, or wearable devices, resulting in high deployment difficulty and hardware costs. Existing deep learning-based posture detection technologies utilize feature points in images for template matching and refinement to reduce false positives. For example, neural network classification can be used to distinguish between normal posture and hunchback. However, relying solely on classification to determine hunchback status is susceptible to environmental interference and suffers from low accuracy. Summary of the Invention

[0003] In view of this, embodiments of this application provide a method, apparatus, device and storage medium for detecting hunchback posture, aiming to at least solve one of the problems existing in the prior art, such as high deployment difficulty, high hardware cost and low accuracy.

[0004] The first aspect of this application provides a method for detecting hunchback posture, including:

[0005] Key point detection is performed on the human body image of the target user to obtain the key points of the nose and eyes in the human body image, and the coordinate information corresponding to the key points of the nose and eyes is obtained using a preset coordinate system.

[0006] The first mean is calculated based on the coordinate information corresponding to the key points of the nose and the key points of both eyes, wherein the first mean is the mean of the sum of the vertical coordinate values ​​of the key points of the nose and the vertical coordinate values ​​of the key points of both eyes in the human body image.

[0007] Determine whether the first mean is less than the standard mean. If it is less, calculate the difference between the first mean and the standard mean and determine whether the difference is within the standard fluctuation range. If it is, output the target user's current sitting posture detection result as hunchback sitting posture based on the human body image.

[0008] In conjunction with the first aspect, in a first possible implementation of the first aspect, after the step of outputting the detection result of the target user's current sitting posture as a hunchback posture based on the human body image, the method further includes:

[0009] The standard mean is updated based on the first mean, and the updated standard mean is applied to the detection of hunchback posture in the next human image. The updated standard mean is equal to the mean of the sum of the first mean and the standard mean.

[0010] In conjunction with the first possible implementation of the first aspect, in the second possible implementation of the first aspect, after the step of updating the standard mean based on the first mean, the method further includes:

[0011] The number of times the standard mean is updated is recorded. If the number of updates reaches a preset threshold, the standard mean is downgraded and the number of times the standard mean is updated is restarted after the downgrade.

[0012] In conjunction with the first aspect, in a third possible implementation of the first aspect, the step of outputting the target user's current sitting posture detection result as a hunchback sitting posture based on the human body image includes:

[0013] The historical record queue is invoked, and the detection result data sequence is obtained from the historical record queue, wherein the detection result data sequence contains several historical sitting posture detection result data sorted by time;

[0014] The current sitting posture detection result of the target user is verified based on the detection result data sequence. If the verification is successful, the current sitting posture detection result of the target user is output as a hunchback sitting posture based on the human body image.

[0015] In conjunction with the third possible implementation of the first aspect, in the fourth possible implementation of the first aspect, the step of performing result verification processing on the detection result of the target user's current sitting posture based on the detection result data sequence includes:

[0016] Determine whether all historical sitting posture detection results in the detection result data sequence are hunchback sitting postures and whether the first mean value calculated by the hunchback sitting posture detection process corresponding to each historical sitting posture detection result is less than the first mean value calculated by the current hunchback sitting posture detection process.

[0017] If all historical sitting posture detection results are hunchback sitting postures and the first mean value calculated by the hunchback sitting posture detection process corresponding to each historical sitting posture detection result is less than the first mean value calculated by the current hunchback sitting posture detection process, then the test is considered passed.

[0018] In conjunction with the first aspect, in the fifth possible implementation of the first aspect, prior to the step of performing keypoint detection on the human body image of the target user, the method further includes:

[0019] Capture images of the target user to obtain user images;

[0020] Human detection is performed on the user image to detect human bodies in the user image and generate human body detection boxes based on the human bodies, wherein one human body corresponds to one human body detection box.

[0021] According to the preset detection box selection rules, the target human body detection box corresponding to the target user is selected from the generated human body detection box. The target human body detection box is used to crop the user image, and the cropped image is obtained as the human body image of the target user.

[0022] In conjunction with the first aspect or the first, second, third, fourth, or fifth possible implementations of the first aspect, in the sixth possible implementation of the first aspect, the method further includes:

[0023] The key points of the nose, eyes, and shoulders in the human body image are obtained, and the coordinate information corresponding to each key point of the nose, eyes, and shoulders is obtained using a preset coordinate system.

[0024] Based on the coordinate information corresponding to the key points of the nose, eyes, and shoulders, the first vertical distance between the key points of the nose and eyes and the second vertical distance between the key points of the nose and shoulders are calculated.

[0025] Calculate the ratio of the second vertical distance value to the first vertical distance value to obtain a first ratio. Compare the first ratio with a standard ratio. If the first ratio is less than the standard ratio, output the target user's current sitting posture detection result as a hunchback sitting posture based on the human body image.

[0026] A second aspect of this application provides a hunchback posture detection device, comprising:

[0027] The detection module is used to perform key point detection on the human body image of the target user, obtain the key points of the nose and eyes in the human body image, and obtain the coordinate information corresponding to the key points of the nose and eyes respectively using a preset coordinate system.

[0028] The calculation module is used to calculate a first mean value based on the coordinate information corresponding to the key points of the nose and the key points of both eyes, wherein the first mean value is the average of the sum of the vertical coordinate values ​​of the key points of the nose and the vertical coordinate values ​​of the key points of both eyes in the human body image.

[0029] The output module is used to determine whether the first mean is less than the standard mean. If it is less, the difference between the first mean and the standard mean is calculated and it is determined whether the difference is within the standard fluctuation range. If it is, the target user's current sitting posture detection result is output as a hunchback sitting posture based on the human body image.

[0030] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the electronic device, wherein the processor executes the computer program to implement the steps of the hunchback posture detection method provided in the first aspect.

[0031] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the hunchback posture detection method provided in the first aspect.

[0032] The hunchback posture detection method, device, electronic equipment, and storage medium provided in this application have the following beneficial effects:

[0033] This application performs keypoint detection on a target user's human image to obtain the nose and eye keypoints. It then uses a preset coordinate system to obtain the coordinate information corresponding to each keypoint. A first mean is calculated based on the coordinate information of the nose and eye keypoints, which is the average of the sum of the ordinate values ​​of the nose and eye keypoints in the human image. The application then determines whether the first mean is less than a standard mean. If it is, the difference between the first mean and the standard mean is calculated, and it is determined whether the difference is within the standard fluctuation range. If it is, the application outputs the target user's sitting posture detection result as a hunchback posture based on the human image. This method can be directly deployed in an application without requiring additional equipment or sensors; hunchback posture detection can be achieved solely through camera functionality, reducing deployment difficulty and saving hardware costs. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0035] Figure 1 A flowchart illustrating the implementation of a hunchback sitting posture detection method provided in this application embodiment;

[0036] Figure 2This is a flowchart illustrating a method for outputting posture detection results in the hunchback sitting posture detection method provided in the embodiments of this application.

[0037] Figure 3 This is a flowchart of a method for verifying the sitting posture detection result in the hunchback sitting posture detection method provided in the embodiments of this application;

[0038] Figure 4 A flowchart of a method for acquiring human body images in the hunchback sitting posture detection method provided in the embodiments of this application;

[0039] Figure 5 A flowchart illustrating another method for detecting hunchback posture provided in this application embodiment;

[0040] Figure 6 A basic structural block diagram of a hunchback sitting posture detection device provided in an embodiment of this application;

[0041] Figure 7 This is a basic structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0043] Please see Figure 1 , Figure 1 A flowchart illustrating the implementation of a hunchback posture detection method provided in this application embodiment is shown below. Details are as follows:

[0044] S11: Perform key point detection on the human body image of the target user, obtain the key points of the nose and eyes in the human body image, and obtain the coordinate information corresponding to the key points of the nose and eyes respectively using a preset coordinate system.

[0045] In this embodiment, a keypoint detection model can be pre-trained using a deep learning neural network. This keypoint detection model is trained to acquire keypoint information such as the nose, eyes, and shoulders of a person in a human image. In this embodiment, the hunchback posture detection method is deployed on mobile terminals such as smartphones and iPads by embedding the algorithm into an application (APP). The APP calls the mobile terminal's camera to capture an image of the user's body. After obtaining the target human image, the human image can be input into the pre-trained keypoint detection model for keypoint detection. Based on this keypoint detection model, the nose keypoint and the keypoints of both eyes (left and right eyes) in the human image can be obtained. In this embodiment, by placing the human image in a preset coordinate system, the coordinate information corresponding to the nose keypoint and the keypoints of both eyes (left and right eyes) can be obtained according to their respective positions in the human image.

[0046] S12: Calculate the first mean value based on the coordinate information corresponding to the key points of the nose and the key points of both eyes, wherein the first mean value is the average of the sum of the vertical coordinate values ​​of the key points of the nose and the vertical coordinate values ​​of the key points of both eyes in the human body image.

[0047] In this embodiment, when obtaining the coordinate information corresponding to the nose key point and the eye key points using a preset coordinate system, the human image can be placed in the first quadrant of the coordinate system. That is, the horizontal and vertical coordinate values ​​of the coordinate information corresponding to the nose key point are both positive, and the horizontal and vertical coordinate values ​​of the coordinate information corresponding to the eye key points are also both positive. In the coordinate system, the left and right eye key points are kept on the same horizontal line, that is, the vertical coordinates of the left and right eye key points are the same. After obtaining the coordinate information corresponding to the nose key point and the eye key points, the vertical coordinate values ​​of the nose key point and the eye key points can be taken, and the sum of the vertical coordinate values ​​of the nose key point and the eye key points can be calculated. Dividing the sum by 2 yields the first mean.

[0048] S13: Determine whether the first mean is less than the standard mean. If it is less, calculate the difference between the first mean and the standard mean and determine whether the difference is within the standard fluctuation range. If it is, output the target user's current sitting posture detection result as hunchback sitting posture based on the human body image.

[0049] In this embodiment, the hunchback posture detection method is deployed in an app. Upon initial app use, the app can invoke the mobile terminal's camera to instruct the user to input a standard sitting posture image. The hunchback posture detection method deployed in the app then performs posture detection on this image, obtaining a standard mean and a standard fluctuation range. The standard mean can be obtained by calculating the sum of the ordinate values ​​of the nose keypoint and the eye keypoints in the standard sitting posture image, then dividing by 2. It is understood that in this embodiment, this standard mean is the initial standard mean of the hunchback posture detection method deployed in the app, pre-configured in the app and dynamically updated within it. The standard mean is dynamically updated every time the hunchback posture detection method in the app outputs the user's posture detection result based on the user's input image. The standard fluctuation range is the allowable range of the first mean used to determine if the user is in a hunchbacked state. The standard fluctuation range can be represented as the range of the line segment from the ordinate value of the nose keypoint to the ordinate value of the eye keypoints in the standard sitting posture image. For example, assuming that in a standard sitting posture image, the vertical coordinate of the nose key point is 10 and the vertical coordinate of the eye key points is 20, the standard mean is expressed as (20+10) / 2 = 15. The standard fluctuation range is expressed as 20-10 = 10. In this embodiment, by comparing the first mean calculated based on the target user's human body image with the standard mean currently recorded in the APP, it is determined whether the first mean is less than the standard mean. If it is less, the difference between the first mean and the standard mean is further calculated, and then it is determined whether the difference is within the standard fluctuation range. This determines whether the first mean meets the floating range condition for determining that the user is in a hunchback state. For example, assuming that the first mean calculated based on the target user's human body image is 13, the difference between the first mean 13 and the standard mean 15 or the standard mean 15 and the first mean 13 is subtracted, resulting in a difference of ±2. ±2 is within the positive and negative standard fluctuation range of 10 (i.e., ±10). At this time, the target user's current sitting posture detection result can be output as a hunchback sitting posture based on the human body image.

[0050] As can be seen from the above, the hunchback posture detection method provided in this application first performs key point detection on the human body image to obtain the coordinate information of the nose key point and the coordinate information of the eye key points of the target user in the current sitting posture. Then, it determines whether the target user is currently in a hunchback sitting posture by analyzing the positional relationship between the nose key point and the eye key points in the human body image. It can be directly deployed in the application APP of the mobile terminal. The hunchback sitting posture detection can be achieved by acquiring the human body image of the target user in the current state through a camera function. There is no need for matching wearable devices or sensors, which can effectively reduce the deployment difficulty and save hardware costs.

[0051] In some embodiments of this application, the hunchback posture detection method deployed in the APP dynamically updates its currently configured standard mean once after outputting the user's posture detection result based on the user's input human body image. In this embodiment, when dynamically updating the standard mean, a first mean calculated based on the target user's human body image during the current hunchback posture detection process can be obtained, and the standard mean is updated based on this first mean. The update process is as follows: calculate the mean of the sum of the first mean and the standard mean, use this calculated mean as the updated standard mean, and apply the updated standard mean to the hunchback posture detection method for the next human body image. For example, assuming the first mean is 13 and the standard mean is 15, the updated standard mean is (13+15) / 2 = 14. The first mean calculated for the next human body image is then compared with the updated standard mean of 14 to determine whether the user is in a hunchback state.

[0052] In some embodiments of this application, since the standard mean is constantly updated dynamically, multiple updates will cause the standard mean to get closer and closer to the average position of the standard sitting posture. To avoid this, in this embodiment, the standard mean can be adjusted downwards to achieve mean recovery. Specifically, a counter can be configured in the APP to record the number of updates to the standard mean. A threshold for triggering the recovery of the standard mean is preset. By comparing the current number of updates to the standard mean recorded by the counter with the preset threshold, if the recorded number of updates reaches the preset threshold, the current standard mean is adjusted downwards. The adjusted standard mean is then used as the updated standard mean in the hunchback sitting posture detection method for the next human body image. The adjustment process is as follows: Adjusted standard mean = Standard mean + (Maximum value in the standard fluctuation range - Minimum value in the standard fluctuation range) * 0.5. For example, assuming the preset threshold for the number of updates is 5 and the standard fluctuation range is [10, 20], after the standard mean has been updated 5 times, the current standard mean is 11. The adjusted standard mean = 11 + (20 - 10) * 0.5 = 16. When the standard mean is adjusted downwards, the counter is reset to zero, thus restarting the recording of the number of standard mean updates after the adjustment.

[0053] In some embodiments of this application, please refer to Figure 2 , Figure 2 This is a schematic flowchart illustrating a method for outputting posture detection results in the hunchback posture detection method provided in this application embodiment. Details are as follows:

[0054] S21: Call the historical record queue and obtain the detection result data sequence from the historical record queue, wherein the detection result data sequence contains several historical sitting posture detection result data sorted by time;

[0055] S22: Perform result verification processing on the current sitting posture detection result of the target user based on the detection result data sequence. If the verification passes, output the current sitting posture detection result of the target user as a hunchback sitting posture based on the human body image.

[0056] In this embodiment, when outputting the target user's current sitting posture detection result based on human body images, the sitting posture detection result obtained by the hunchback sitting posture detection method can also be verified based on temporal information, thereby improving the accuracy of the hunchback sitting posture detection method. In this embodiment, several human body images ordered by time can be obtained by capturing user images in a continuous time period. The hunchback sitting posture detection method can obtain several sitting posture detection results by sequentially performing hunchback sitting posture detection on these several time-ordered human body images, thus obtaining temporal information of the sitting posture detection results. For example, during the process of the hunchback sitting posture detection method performing hunchback sitting posture detection on several time-ordered human body images, a historical record queue can be used to record the sitting posture detection results output by the hunchback sitting posture detection method each time. For example, after the hunchback sitting posture detection method obtains a sitting posture detection result by performing hunchback sitting posture detection on the first time-ordered human body image, the first obtained sitting posture detection result and the first mean calculated during the first hunchback sitting posture detection are recorded as historical sitting posture detection result data in the historical record queue. After the hunchback posture detection method obtains the posture detection result by performing hunchback posture detection on the second human image sorted by time, the second obtained posture detection result and the first mean calculated during the second hunchback posture detection process are recorded as historical posture detection result data in the historical record queue. In the historical record queue, the recorded historical posture detection result data are sorted in chronological order, and so on. In this embodiment, the temporal information of the posture detection results, i.e., the detection result data sequence, can be obtained by calling the historical record queue. The detection result data sequence contains several historical posture detection result data sorted by time. In this embodiment, by performing temporal analysis on the detection result data sequence, the current posture detection result of the target user can be verified based on the detection result data sequence to determine whether the current posture detection result of the target user is accurate. If the verification passes, it means that the current posture detection result of the target user is accurate, and at this time, the current posture detection result of the target user can be output as hunchback posture based on the human image.

[0057] In this embodiment, the historical record queue has a data storage threshold. When the number of historical posture detection results recorded in the historical record queue reaches the data storage threshold, following the first-in-first-out (FIFO) rule of the historical record queue, each time a new historical posture detection result is recorded, an older historical posture detection result is deleted from the top of the queue stack. For example, assuming the data storage threshold is 3, after 3 historical posture detection results are recorded in the historical record queue, when the historical record queue records the 4th historical posture detection result, the 1st historical posture detection result recorded in the historical record queue is deleted. Furthermore, the historical record queue is invoked when the number of historical posture detection results recorded in the historical record queue reaches the data storage threshold. When the number of historical posture detection results recorded in the historical record queue reaches the data storage threshold, the historical record queue can be invoked to verify the posture detection results obtained by the hunchback posture detection method.

[0058] In some embodiments of this application, please refer to Figure 3 , Figure 3 This is a flowchart illustrating a method for verifying posture detection results in the hunchback posture detection method provided in this application embodiment. Details are as follows:

[0059] S31: Determine whether all historical sitting posture detection results in the detection result data sequence are hunchback sitting postures and whether the first mean value calculated by the hunchback sitting posture detection process corresponding to each historical sitting posture detection result is less than the first mean value calculated by the current hunchback sitting posture detection process.

[0060] S32: If all historical sitting posture detection results are hunchback sitting postures and the first mean value calculated by the hunchback sitting posture detection process corresponding to each historical sitting posture detection result is less than the first mean value calculated by the current hunchback sitting posture detection process, then the test is considered passed.

[0061] In this embodiment, when performing result verification processing on the target user's current sitting posture detection result based on the detection result data sequence, specifically, it can be determined by judging whether all historical sitting posture detection results in the detection result data sequence are hunchbacked sitting postures and whether the first mean calculated by the hunchbacked sitting posture detection process corresponding to each historical sitting posture detection result is less than the first mean calculated by the current hunchbacked sitting posture detection process. If all historical sitting posture detection results are hunchbacked sitting postures and the first mean calculated by the hunchbacked sitting posture detection process corresponding to each historical sitting posture detection result is less than the first mean calculated by the current hunchbacked sitting posture detection process, then it can be determined that the target user's current sitting posture detection result passes the verification. At this time, the target user's current sitting posture detection result can be output as hunchbacked sitting posture based on the human body image.

[0062] In some embodiments of this application, please refer to Figure 4 , Figure 4 This is a flowchart illustrating a method for acquiring a human body image in the hunchback posture detection method provided in this application embodiment. Details are as follows:

[0063] S41: Capture an image of the target user;

[0064] S42: Perform human detection on the user image, detect the human bodies present in the user image and generate human body detection boxes based on the human bodies, wherein one human body corresponds to one human body detection box;

[0065] S43: Select the target human body detection box corresponding to the target user from the generated human body detection box according to the preset detection box selection rules, use the target human body detection box to crop the user image, and obtain the cropped image as the human body image of the target user.

[0066] In this embodiment, the hunchback posture detection method can be deployed on mobile terminals such as smartphones and iPads by embedding the algorithm into an application (APP). In this embodiment, the mobile terminal's camera can be used to capture an image of the target user through the APP, thereby obtaining the user image. In this embodiment, a human detection model can be pre-trained using a deep learning neural network. This human detection model is trained to detect the presence of human bodies in the user image and, when a human body is detected, generates a human detection box based on the position of the human body's contour in the user image. After obtaining the user image, the obtained user image is input into the pre-trained human detection model for human detection, thereby detecting the human bodies present in the user image and generating human detection boxes based on the detected human bodies. One human body corresponds to one human detection box; that is, when multiple human bodies are detected in the user image, a corresponding human detection box can be generated based on the position of each human body in the user image. Since the target user is generally close to the camera, the human detection box generated for the target user's body in the user image generally has the largest area. Based on this rule, the detection box selection rule can be pre-set to select the human detection box with the largest area. At this point, according to the preset detection box selection rules, all human body detection boxes generated based on the user image are compared pairwise by area to obtain the human body detection box with the largest area. This largest human body detection box is then selected as the target human body detection box corresponding to the target user. The user image is then cropped using this target human body detection box, and the cropped image is obtained as the target user's human body image. It should be noted that the target user's human body image is the image within the target detection box.

[0067] In some embodiments of this application, please refer to Figure 5 , Figure 5 A flowchart of another method for detecting hunchback posture provided in this application embodiment is shown below. Details are as follows:

[0068] S51: Obtain the key points of the nose, eyes, and shoulders of the human body in the human body image, and use a preset coordinate system to obtain the coordinate information corresponding to each of the key points of the nose, eyes, and shoulders.

[0069] S52: Based on the coordinate information corresponding to the key points of the nose, eyes, and shoulders, calculate the first vertical distance between the key points of the nose and eyes and the second vertical distance between the key points of the nose and shoulders.

[0070] S53: Calculate the ratio of the second vertical distance value to the first vertical distance value to obtain a first ratio. Compare the first ratio with a standard ratio. If the first ratio is less than the standard ratio, output the target user's current sitting posture detection result as a hunchback sitting posture based on the human body image.

[0071] In this embodiment, because the standard mean needs to be automatically updated during the detection of hunchback posture using nose and eye key points, a cold start problem exists in the initial stage of hunchback posture detection using nose and eye key points. For example, the judgment results may be inaccurate or the initially set standard mean may not be reliable. To solve this cold start problem, this embodiment can set a time range to represent the initial stage of startup. During hunchback posture detection within this time range, the nose, eye, and shoulder key points of the human body in the human image can also be acquired, and the coordinate information corresponding to each of the nose, eye, and shoulder key points can be obtained using a preset coordinate system. Specifically, the human body image is placed in the first quadrant of the coordinate system, and the coordinate information corresponding to each of the nose, eye, and shoulder key points is obtained based on their respective positions in the first quadrant of the coordinate system. Then, based on the coordinate information corresponding to the nose keypoint, eye keypoint, and shoulder keypoint, the first vertical distance value between the nose keypoint and the eye keypoint, and the second vertical distance value between the nose keypoint and the shoulder keypoint are calculated. For example, the first vertical distance value is obtained by subtracting the ordinate value of the nose keypoint from the ordinate value of the eye keypoint. The second vertical distance value is obtained by subtracting the ordinate value of the shoulder keypoint from the ordinate value of the nose keypoint. After obtaining the first and second vertical distance values, the second vertical distance value is further divided by the first vertical distance value to calculate the ratio of the second vertical distance value to the first vertical distance value, obtaining a first ratio. By comparing the first ratio with a standard ratio, if the first ratio is less than the standard ratio, the target user's current sitting posture detection result based on the human image is a hunched posture; otherwise, the target user's current sitting posture detection result based on the human image is determined to be a normal sitting posture.

[0072] In this embodiment, within the initial timeframe of the representation startup, the posture detection results obtained based on nose and binocular keypoint detection, as well as those obtained based on nose, binocular, and shoulder keypoint detection, can be combined to obtain a union result. This union result is then used to determine whether the user is in a hunched-over posture. Specifically, if at least one posture detection result in the union result indicates a hunched-over posture, the user is considered to be in a hunched-over posture, and the current posture detection result for the target user is output as a hunched-over posture. It is understood that in this embodiment, the standard ratio is calculated based on the coordinate information of the nose, binocular, and shoulder keypoints identified in the entered standard posture image.

[0073] It is understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0074] In some embodiments of this application, please refer to Figure 6 , Figure 6 This is a basic structural block diagram of a hunchback posture detection device provided in an embodiment of this application. In this embodiment, the device includes units used to perform the steps in the above-described method embodiments. Please refer to the relevant descriptions in the above-described method embodiments for details. For ease of explanation, only the parts relevant to this embodiment are shown. Figure 6 As shown, the hunchback posture detection device includes a detection module 61, a calculation module 62, and an output module 63. The detection module 61 performs keypoint detection on a target user's human body image, acquiring the nose and eye keypoints in the image, and using a preset coordinate system to obtain the coordinate information corresponding to each keypoint. The calculation module 62 calculates a first mean based on the coordinate information of the nose and eye keypoints, where the first mean is the average of the sum of the vertical coordinates of the nose and eye keypoints in the human body image. The output module 63 determines whether the first mean is less than a standard mean. If it is less, it calculates the difference between the first mean and the standard mean and determines whether the difference is within the standard fluctuation range. If it is, it outputs the target user's current posture detection result as a hunchback posture based on the human body image.

[0075] It should be understood that the aforementioned hunchback posture detection device corresponds one-to-one with the aforementioned hunchback posture detection method, and will not be elaborated further here.

[0076] In some embodiments of this application, please refer to Figure 7 , Figure 7 This is a basic structural block diagram of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 7 of this embodiment includes: a processor 71, a memory 72, and a computer program 73 stored in the memory 72 and executable on the processor 71, such as a program for a hunchback posture detection method. When the processor 71 executes the computer program 73, it implements the steps in each embodiment of the hunchback posture detection method described above. Alternatively, when the processor 71 executes the computer program 73, it implements the functions of each module in the embodiment corresponding to the hunchback posture detection device described above. Please refer to the relevant descriptions in the embodiments for details, which will not be repeated here.

[0077] For example, the computer program 73 can be divided into one or more modules (units), which are stored in the memory 72 and executed by the processor 71 to complete this application. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 73 in the electronic device 7. For example, the computer program 73 can be divided into a detection module, a calculation module, and an output module, each with its specific functions as described above.

[0078] The electronic device may include, but is not limited to, a processor 71 and a memory 72. Those skilled in the art will understand that... Figure 7 This is merely an example of electronic device 7 and does not constitute a limitation on electronic device 7. It may include more or fewer components than shown, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0079] The processor 71 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0080] The memory 72 can be an internal storage unit of the electronic device 7, such as a hard disk or memory. The memory 72 can also be an external storage device of the electronic device 7, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 72 can include both internal and external storage units of the electronic device 7. The memory 72 is used to store the computer program and other programs and data required by the electronic device. The memory 72 can also be used to temporarily store data that has been output or will be output.

[0081] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0082] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above. In this embodiment, the computer-readable storage medium can be either non-volatile or volatile.

[0083] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.

[0084] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0085] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0086] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0087] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for detecting hunchback posture, characterized in that, include: Key point detection is performed on the human body image of the target user to obtain the key points of the nose and eyes in the human body image, and the coordinate information corresponding to the key points of the nose and eyes is obtained using a preset coordinate system. The first mean is calculated based on the coordinate information corresponding to the key points of the nose and the key points of both eyes, wherein the first mean is the mean of the sum of the vertical coordinate values ​​of the key points of the nose and the vertical coordinate values ​​of the key points of both eyes in the human body image. Determine whether the first mean is less than the standard mean. If it is less, calculate the difference between the first mean and the standard mean and determine whether the difference is within the standard fluctuation range. If it is, call the historical record queue and obtain the detection result data sequence from the historical record queue. The detection result data sequence contains several historical sitting posture detection result data sorted by time. The current sitting posture detection result of the target user is verified based on the detection result data sequence. If the verification is successful, the current sitting posture detection result of the target user is output as hunchback sitting posture based on the human body image. The standard mean is updated based on the first mean, and the updated standard mean is applied to the hunchback sitting posture detection of the next human image. The number of times the standard mean is updated is recorded. If the number of updates reaches a preset threshold, the standard mean is downgraded and the number of times the standard mean is updated is restarted after the downgrade.

2. The method for detecting hunchback posture according to claim 1, characterized in that, The updated standard mean is equal to the mean of the sum of the first mean and the standard mean.

3. The method for detecting hunchback posture according to claim 1, characterized in that, The step of performing result verification processing on the target user's current sitting posture detection result based on the detection result data sequence includes: Determine whether all historical sitting posture detection results in the detection result data sequence are hunchback sitting postures and whether the first mean value calculated by the hunchback sitting posture detection process corresponding to each historical sitting posture detection result is less than the first mean value calculated by the current hunchback sitting posture detection process. If all historical sitting posture detection results are hunchback sitting postures and the first mean value calculated by the hunchback sitting posture detection process corresponding to each historical sitting posture detection result is less than the first mean value calculated by the current hunchback sitting posture detection process, then the test is considered passed.

4. The method for detecting hunchback posture according to claim 1, characterized in that, Before the step of performing key point detection on the target user's human body image, the method further includes: Capture images of the target user to obtain user images; Human detection is performed on the user image to detect human bodies in the user image and generate human body detection boxes based on the human bodies, wherein one human body corresponds to one human body detection box. According to the preset detection box selection rules, the target human body detection box corresponding to the target user is selected from the generated human body detection box. The target human body detection box is used to crop the user image, and the cropped image is obtained as the human body image of the target user.

5. The method for detecting hunchback posture according to any one of claims 1-4, characterized in that, The method further includes: The key points of the nose, eyes, and shoulders in the human body image are obtained, and the coordinate information corresponding to each key point of the nose, eyes, and shoulders is obtained using a preset coordinate system. Based on the coordinate information corresponding to the key points of the nose, eyes, and shoulders, the first vertical distance between the key points of the nose and eyes and the second vertical distance between the key points of the nose and shoulders are calculated. Calculate the ratio of the second vertical distance value to the first vertical distance value to obtain a first ratio. Compare the first ratio with a standard ratio. If the first ratio is less than the standard ratio, output the target user's current sitting posture detection result as a hunchback sitting posture based on the human body image.

6. A hunchback posture detection device, characterized in that, include: The detection module is used to perform key point detection on the human body image of the target user, obtain the key points of the nose and eyes in the human body image, and obtain the coordinate information corresponding to the key points of the nose and eyes respectively using a preset coordinate system. The calculation module is used to calculate a first mean value based on the coordinate information corresponding to the key points of the nose and the key points of both eyes, wherein the first mean value is the average of the sum of the vertical coordinate values ​​of the key points of the nose and the vertical coordinate values ​​of the key points of both eyes in the human body image. The output module is used to determine whether the first mean is less than the standard mean. If it is less, it calculates the difference between the first mean and the standard mean and determines whether the difference is within the standard fluctuation range. If it is, it calls the historical record queue and obtains the detection result data sequence from the historical record queue. The detection result data sequence contains several historical sitting posture detection result data sorted by time. The current sitting posture detection result of the target user is verified based on the detection result data sequence. If the verification passes, the current sitting posture detection result of the target user is output as a hunchback sitting posture based on the human body image. The hunchback posture detection device is further configured to: update the standard mean based on the first mean, and apply the updated standard mean to the hunchback posture detection of the next human image; record the number of times the standard mean is updated, and if the number of updates reaches a preset threshold, adjust the standard mean downward and restart recording the number of times the standard mean is updated after the downward adjustment.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 5.