Sitting posture detection method and device and electronic equipment
By receiving depth values, filtering the target measurement points, determining the coordinates of key points, and analyzing the sitting posture detection method, the problem of inaccurate sitting posture detection results is solved, and accurate judgment and healthy prevention of sitting posture are achieved.
Patent Information
- Application Number
- CN202510644333.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-08-26
AI Technical Summary
In the prior art, the sitting posture detection results are inaccurate, making it difficult to effectively identify the bad sitting posture.
By receiving a sitting posture detection request carrying depth values, filter out the target measurement points, determine the coordinates of the key points, analyze the coordinate relationship between the key points, and judge the sitting posture status.
Accurate detection of sitting postures is achieved, standard sitting postures and bad sitting posture types can be identified, bad sitting postures are corrected in a timely manner, and health problems are prevented.
Smart Images

Figure CN120544236A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a sitting posture detection method, device and electronic equipment. Background Art
[0002] In related technologies, it is necessary to detect sitting postures to promptly identify unhealthy postures, such as crooked sitting or excessive leaning back, to prevent them from causing serious harm to health. However, in related technologies, there is a technical problem of inaccurate results when detecting sitting postures.
[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0004] The embodiments of the present invention provide a sitting posture detection method, device, and electronic device to at least solve the technical problem in the related art that when detecting a sitting posture, the sitting posture detection result is inaccurate.
[0005] According to one aspect of an embodiment of the present invention, a sitting posture detection method is provided, comprising: receiving a sitting posture detection request, wherein the sitting posture detection request carries depth values corresponding to a plurality of initial measuring points; in response to the sitting posture detection request, determining a plurality of target measuring points corresponding to a target object from the plurality of initial measuring points based on the depth values corresponding to the plurality of initial measuring points; determining a plurality of key point coordinates corresponding to the target object from the measuring point coordinates corresponding to the plurality of target measuring points, wherein the key points corresponding to the plurality of key point coordinates have a coordinate correlation relationship; and determining a sitting posture detection result corresponding to the target object based on the plurality of key point coordinates.
[0006] Optionally, determining the sitting posture detection result corresponding to the target object based on the multiple key point coordinates includes: determining the sitting posture detection type corresponding to the target object; determining, based on the sitting posture detection type, multiple sitting posture key points corresponding to the sitting posture detection type from the key points corresponding to the multiple key point coordinates; determining the current coordinate relationship between the multiple sitting posture key points based on the key point coordinates corresponding to the multiple sitting posture key points; determining the standard coordinate relationship between the multiple sitting posture key points based on the sitting posture detection type; and determining the sitting posture detection result corresponding to the sitting posture detection type based on the standard coordinate relationship and the current coordinate relationship between the multiple sitting posture key points.
[0007] Optionally, the current coordinate relationship between the multiple sitting key points is determined based on the key point coordinates corresponding to the multiple sitting key points, including: when the current coordinate relationship includes a head coordinate relationship, and the multiple sitting key points include a head key point, a first shoulder key point and a second shoulder key point, the head coordinate relationship corresponding to the target object is determined based on the coordinates corresponding to the head key point, the coordinates corresponding to the first shoulder key point and the coordinates corresponding to the second shoulder key point.
[0008] Optionally, based on the coordinates corresponding to the head key point, the coordinates corresponding to the first shoulder key point and the coordinates corresponding to the second shoulder key point, the head coordinate relationship corresponding to the target object is determined, including: when the coordinates are spatial coordinates and the head coordinate relationship includes a head depth relationship, based on the spatial coordinates corresponding to the head key point, determining the depth value corresponding to the head key point; based on the spatial coordinates corresponding to the first shoulder key point, determining the depth value corresponding to the first shoulder key point; based on the spatial coordinates corresponding to the second shoulder key point, determining the depth value corresponding to the second shoulder key point; based on the depth values corresponding to the head key points, the depth values corresponding to the first shoulder key point and the depth values corresponding to the second shoulder key point, determining the head depth relationship corresponding to the target object.
[0009] Optionally, determining the head coordinate relationship corresponding to the target object based on the coordinates corresponding to the head key point, the coordinates corresponding to the first shoulder key point and the coordinates corresponding to the second shoulder key point includes: determining the shoulder center point between the first shoulder key point and the second shoulder key point based on the coordinates corresponding to the first shoulder key point and the coordinates corresponding to the second shoulder key point; determining the head coordinate relationship corresponding to the target object based on the coordinates corresponding to the head key point and the coordinates corresponding to the shoulder center point.
[0010] Optionally, determining the head depth relationship corresponding to the target object based on the depth value corresponding to the head key point, the depth value corresponding to the first shoulder key point and the depth value corresponding to the second shoulder key point includes: determining the shoulder center point between the first shoulder key point and the second shoulder key point; determining the depth value corresponding to the shoulder center point based on the depth value corresponding to the first shoulder key point and the depth value corresponding to the second shoulder key point; determining the head depth relationship corresponding to the target object based on the depth value corresponding to the head key point and the depth value corresponding to the shoulder center point.
[0011] Optionally, determining the current coordinate relationship between the multiple sitting key points based on the key point coordinates corresponding to the multiple sitting key points respectively includes: when the current coordinate relationship includes a shoulder coordinate relationship, and the multiple sitting key points include a first shoulder key point and a second shoulder key point, determining the coordinate difference value between the key point coordinates corresponding to the first shoulder key point and the key point coordinates corresponding to the second shoulder key point, wherein the horizontal coordinate of the first shoulder key point is smaller than the horizontal coordinate of the second shoulder key point; and determining the shoulder coordinate relationship corresponding to the target object based on the coordinate difference value.
[0012] Optionally, determining the shoulder coordinate relationship corresponding to the target object based on the coordinate difference value includes: when the coordinate difference value includes a depth difference value and the shoulder coordinate relationship includes a shoulder depth relationship, determining the shoulder depth relationship corresponding to the target object based on the depth difference value.
[0013] Optionally, determining a plurality of key point coordinates corresponding to the target object from the measurement point coordinates respectively corresponding to the plurality of target measurement points includes: retrieving a key point determination model, wherein the key point determination model is obtained by training an initial model based on a plurality of sample measurement point coordinates, a deviation determination function, and an additional constraint function, the sample measurement point coordinates include a plurality of key sample coordinates, the deviation determination function is used to determine the degree of deviation between a plurality of output coordinates of the initial model and the plurality of key sample coordinates, and the additional constraint function is used to constrain the coordinate relationship between the output measurement points corresponding to the plurality of output coordinates; and inputting the measurement point coordinates respectively corresponding to the plurality of target measurement points into the key point determination model to obtain the plurality of key point coordinates corresponding to the target object.
[0014] Optionally, determining a plurality of target measuring points corresponding to the target object from the plurality of initial measuring points based on the depth values respectively corresponding to the plurality of initial measuring points includes: determining a detection device and a plurality of current measuring points corresponding to the target object, wherein the plurality of current measuring points are obtained by performing sitting posture detection on the target object based on the detection device at a current time; determining a plurality of historical detection times corresponding to the target object based on a detection refinement index corresponding to the detection device and the current time; determining a plurality of historical measuring points corresponding to the plurality of historical detection times based on the detection device and the plurality of historical detection times; and determining a plurality of target measuring points corresponding to the target object from the plurality of current measuring points and the plurality of corresponding historical measuring points based on the depth values respectively corresponding to the plurality of current measuring points and the depth values respectively corresponding to the plurality of corresponding historical measuring points.
[0015] According to one aspect of an embodiment of the present invention, a sitting posture detection device is provided, comprising: a receiving module for receiving a sitting posture detection request, wherein the sitting posture detection request carries depth values corresponding to a plurality of initial measuring points; a responding module for determining, in response to the sitting posture detection request, a plurality of target measuring points corresponding to a target object from the plurality of initial measuring points based on the depth values corresponding to the plurality of initial measuring points; a first determining module for determining, from the measuring point coordinates corresponding to the plurality of target measuring points, a plurality of key point coordinates corresponding to the target object, wherein the key points corresponding to the plurality of key point coordinates have a coordinate correlation relationship; and a second determining module for determining a sitting posture detection result corresponding to the target object based on the plurality of key point coordinates.
[0016] According to one aspect of an embodiment of the present invention, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement any one of the above-mentioned sitting posture detection methods.
[0017] According to one aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute any one of the above-mentioned sitting posture detection methods.
[0018] In an embodiment of the present invention, a sitting posture detection request is received, wherein the sitting posture detection request carries depth values corresponding to a plurality of initial measurement points. In response to the sitting posture detection request, a plurality of target measurement points corresponding to a target object are determined from the plurality of initial measurement points based on the depth values corresponding to the plurality of initial measurement points. A plurality of key point coordinates corresponding to the target object are determined from the measurement point coordinates corresponding to the plurality of target measurement points, wherein the key points corresponding to the plurality of key point coordinates have a coordinate correlation relationship. A sitting posture detection result corresponding to the target object is determined based on the plurality of key point coordinates. According to the depth values corresponding to multiple initial measurement points of the target object (such as the distance values measured by the detection equipment), multiple target measurement points are screened out from the multiple initial measurement points to eliminate background interference. On this basis, multiple key point coordinates are screened out from the measurement point coordinates corresponding to the multiple target measurement points, and key features that can accurately describe the body posture of the target object are further extracted. Therefore, by analyzing the coordinates of multiple key points (such as the center of the head, the center of the shoulder, etc.) and the coordinate correlation between them (such as relative position, distance, angle, etc.), the sitting posture of the target object can be judged, which helps to clarify whether the sitting posture of the target object meets the standard sitting posture or whether there is a bad sitting posture and its specific type, thereby solving the technical problem in related technologies that when detecting the sitting posture, the sitting posture detection results are inaccurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0020] Figure 1 is a flow chart of a sitting posture detection method according to an embodiment of the present invention;
[0021] Figure 2 Schematic diagram of the installation position of the sensor in an optional embodiment of the present invention;
[0022] Figure 3 This is a flowchart of sitting posture detection in an optional embodiment of the present invention;
[0023] Figure 4 This is a schematic diagram of a key point detection model architecture in an optional embodiment of the present invention;
[0024] Figure 5 This is a schematic diagram of a standard sitting posture in an optional embodiment of the present invention;
[0025] Figure 6 This is a schematic diagram of an abnormal sitting posture with the head tilted to the left in an optional embodiment of the present invention;
[0026] Figure 7 This is a schematic diagram of an abnormal sitting posture with the head lowered and leaning forward in an optional embodiment of the present invention;
[0027] Figure 8 2 is a structural block diagram of a sitting posture detection device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Example 1
[0031] According to an embodiment of the present invention, an embodiment of a sitting posture detection method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0032] Figure 1 Flowchart of the sitting posture detection method according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:
[0033] S102, receiving a sitting posture detection request, wherein the sitting posture detection request carries depth values corresponding to a plurality of initial measurement points;
[0034] In step S102 provided in the present application, a sitting posture detection request carrying depth values corresponding to a plurality of initial measurement points is received.
[0035] The method involves a sitting posture detection request, which is a request for performing sitting posture detection on a target object. The sitting posture detection request may be a signal or instruction that triggers a sitting posture detection process.
[0036] This involves multiple initial measurement points, which are the measurement points initially detected during the sitting posture detection process of the target object. These initial measurement points include the target object's own measurement points as well as measurement points of the surrounding background other than the target object. For example, in the case where a detection device (such as a sensor) is installed on one side of a desktop, and the target object is located on the side of the desktop opposite the detection device, the multiple initial measurement points acquired by the detection device include the target object's own measurement points as well as measurement points of the surrounding background other than the target object (such as measurement points in the distant background behind the target object or measurement points in the close background on the desktop).
[0037] This involves a depth value, which describes the distance (e.g., vertical distance) between the detection device and the detected object (e.g., the target object itself, or the surrounding background outside the target object). In sitting posture detection, this depth value can reflect the spatial position relationship between the initial measurement point and the detection device.
[0038] Receiving a sitting posture detection request with multiple initial depth values provides the basic data and trigger signal for subsequent sitting posture detection. These depth values can be used to determine the spatial relationship between the target object and its surrounding background, providing the necessary data foundation for subsequent target point screening, key point coordinate determination, and ultimately, sitting posture judgment.
[0039] S104, in response to the sitting posture detection request, determining a plurality of target measuring points corresponding to the target object from the plurality of initial measuring points according to the depth values respectively corresponding to the plurality of initial measuring points;
[0040] In step S104 provided in the present application, a sitting posture detection request is responded to, and based on the depth values corresponding to the multiple initial measurement points carried in the sitting posture detection request, multiple target measurement points corresponding to the target object are determined from the multiple initial measurement points.
[0041] Among them, the target object is involved, and the target object is the subject that needs to be detected for sitting posture. For example, in the scene of sitting posture detection, the target object can be a person sitting on a chair whose sitting posture needs to be detected.
[0042] This involves multiple target measurement points, which are selected from the multiple initial measurement points and are related to the target object. These multiple target measurement points can better reflect the location of the target object's body parts. For example, these multiple target measurement points can reflect the target object's upper body (head measurement points, shoulder measurement points, etc.).
[0043] By screening out multiple target measurement points based on the depth values of multiple initial measurement points, the measurement points related to the target object (such as a person) can be accurately located from the initial measurement points containing the background, thereby eliminating the interference of irrelevant background information and more accurately obtaining the position information of the target object's body parts, providing a reliable data basis for subsequent sitting posture detection and analysis.
[0044] S106, determining a plurality of key point coordinates corresponding to the target object from the measurement point coordinates corresponding to the plurality of target measurement points, wherein the key points corresponding to the plurality of key point coordinates have a coordinate correlation relationship;
[0045] In step S106 provided in the present application, a plurality of key point coordinates corresponding to the target object are determined from the measurement point coordinates corresponding to the plurality of target measurement points.
[0046] Among them, multiple key point coordinates are involved, which are the coordinates corresponding to the measurement points that can describe the body posture of the target object, such as the coordinates corresponding to the center of the head, the coordinates corresponding to the center of the shoulder, the coordinates corresponding to both shoulders, etc.
[0047] The coordinate correlation relationship is a spatial position relationship between the coordinates of multiple key points, which can be a relative position relationship, a distance relationship, an angle relationship, a coordinate difference relationship, etc.
[0048] By determining the coordinates of multiple key points corresponding to the target object from multiple target measurement points, we can further accurately extract the key features that can accurately describe the body posture of the target object, thereby providing an analysis basis for the subsequent detection of the target object's sitting posture by analyzing the coordinates of multiple key points (such as the center of the head, the center of the shoulder, the shoulders, etc.) and the coordinate correlation between them (such as relative position, distance, angle, etc.).
[0049] S108: Determine a sitting posture detection result corresponding to the target object based on the coordinates of the multiple key points.
[0050] In step S108 provided in the present application, a sitting posture detection result corresponding to the target object is determined based on the coordinates of multiple key points.
[0051] This involves the sitting posture detection result, which is the result of analyzing the coordinates of multiple key points and the coordinate correlation between them to determine the target object's sitting posture. The sitting posture detection result can include whether the target object's sitting posture meets the standard sitting posture, whether there is an unhealthy sitting posture, and the specific type of sitting posture. For example, the sitting posture detection result can include but is not limited to "normal sitting posture," "head tilted forward," "shoulders tilted," "body leaning back," etc.
[0052] By analyzing the coordinates of key points and the relationship between them, the sitting posture of the target object can be determined, which helps to clarify whether the sitting posture of the target object conforms to the standard sitting posture or whether there is an unhealthy sitting posture and its specific type (such as "head tilted forward", "shoulders tilted", etc.), so as to accurately detect the sitting posture of the target object, which helps to timely discover and correct unhealthy sitting postures and prevent health problems caused by unhealthy sitting postures.
[0053] Through the above steps S102-S108, a sitting posture detection request is received, wherein the sitting posture detection request carries depth values corresponding to the multiple initial measuring points respectively; in response to the sitting posture detection request, multiple target measuring points corresponding to the target object are determined from the multiple initial measuring points based on the depth values corresponding to the multiple initial measuring points respectively; multiple key point coordinates corresponding to the target object are determined from the measuring point coordinates corresponding to the multiple target measuring points respectively, wherein the key points corresponding to the multiple key point coordinates have a coordinate correlation relationship; and a sitting posture detection result corresponding to the target object is determined based on the multiple key point coordinates. According to the depth values corresponding to multiple initial measurement points of the target object (such as the distance values measured by the detection equipment), multiple target measurement points are screened out from the multiple initial measurement points to eliminate background interference. On this basis, multiple key point coordinates are screened out from the measurement point coordinates corresponding to the multiple target measurement points, and key features that can accurately describe the body posture of the target object are further extracted. Therefore, by analyzing the coordinates of multiple key points (such as the center of the head, the center of the shoulder, etc.) and the coordinate correlation between them (such as relative position, distance, angle, etc.), the sitting posture of the target object can be judged, which helps to clarify whether the sitting posture of the target object meets the standard sitting posture or whether there is a bad sitting posture and its specific type, thereby solving the technical problem in related technologies that when detecting the sitting posture, the sitting posture detection results are inaccurate.
[0054] As an optional embodiment, the sitting posture detection result corresponding to the target object is determined based on multiple key point coordinates, including: determining the sitting posture detection type corresponding to the target object; determining multiple sitting posture key points corresponding to the sitting posture detection type from the key points corresponding to the multiple key point coordinates based on the sitting posture detection type; determining the current coordinate relationship between the multiple sitting posture key points based on the key point coordinates corresponding to the multiple sitting posture key points; determining the standard coordinate relationship between the multiple sitting posture key points based on the sitting posture detection type; determining the sitting posture detection result corresponding to the sitting posture detection type based on the standard coordinate relationship and the current coordinate relationship between the multiple sitting posture key points.
[0055] In this embodiment, specific steps of determining a sitting posture detection result corresponding to a target object based on multiple key point coordinates are described.
[0056] Among them, the sitting posture detection type is involved. This sitting posture detection type is a classification of sitting posture detection based on different detection requirements or application scenarios. Different detection types correspond to different sitting posture characteristics or sitting posture problems. For example, depending on the application scenario, the sitting posture detection type can include but is not limited to judging the left and right tilt of the head, judging when the head is lowered, judging when the body is leaning back, judging when the body is tilted left and right, judging when the body is leaning forward, and judging when the body is turning sideways. The sitting posture detection type can also include but is not limited to normal sitting posture detection, head sitting posture detection, and body sitting posture detection.
[0057] Among them, multiple sitting posture key points are involved, and the multiple sitting posture key points are key body parts closely related to the sitting posture state under the corresponding sitting posture detection type. For example, in the case where the sitting posture detection type is head sitting posture detection, for head sitting posture detection, the multiple sitting posture key points may include head key points (such as head center key points, multiple head contour key points), shoulder key points (such as key points corresponding to both shoulders, shoulder center key points, etc.). In the case where the sitting posture detection type is body sitting posture detection, for body sitting posture detection, the multiple sitting posture key points can be said to include a first shoulder key point and a second shoulder key point.
[0058] This involves the current coordinate relationship, which is the real-time coordinate relationship between multiple sitting posture key points during the actual detection process. This current coordinate relationship reflects the current sitting posture of the target object. This current coordinate relationship can include relative position relationships, distance relationships, angle relationships, etc.
[0059] The standard coordinate relationship is a coordinate relationship between multiple key points of a sitting posture in a standard sitting posture. The standard coordinate relationship can be a predetermined coordinate relationship that serves as a benchmark for whether the sitting posture is correct.
[0060] In the steps involved in this embodiment, the sitting posture detection type of the target object is first determined, and then multiple sitting posture key points related to the sitting posture detection type are screened out from multiple key points. Then, the current coordinate relationship of these multiple sitting posture key points is analyzed and compared with the corresponding standard coordinate relationship. Finally, the sitting posture detection result corresponding to the sitting posture detection type is obtained based on the comparison result, thereby achieving accurate judgment of the sitting posture state of the target object.
[0061] By specifying the sitting posture detection type, we can specifically filter out multiple sitting posture key points related to that type of sitting posture detection. These sitting posture key points can accurately and directly describe the sitting posture state corresponding to that type of sitting posture detection. Further analysis of the current coordinate relationship of these sitting posture key points can reflect the current sitting posture state of the target object. By comparing the current coordinate relationship with the standard coordinate relationship, we can directly and accurately determine whether the current sitting posture meets the standard sitting posture for that sitting posture detection type.
[0062] As an optional embodiment, the current coordinate relationship between multiple sitting key points is determined based on the key point coordinates corresponding to the multiple sitting key points, including: when the current coordinate relationship includes a head coordinate relationship, and the multiple sitting key points include a head key point, a first shoulder key point and a second shoulder key point, the head coordinate relationship corresponding to the target object is determined based on the coordinates corresponding to the head key point, the coordinates corresponding to the first shoulder key point and the coordinates corresponding to the second shoulder key point.
[0063] In this embodiment, specific steps of determining the current coordinate relationship between a plurality of sitting posture key points according to the key point coordinates corresponding to the plurality of sitting posture key points are described.
[0064] This involves the head coordinate relationship, which is the spatial position relationship between key head points and other related points (such as the center of the shoulder). This head coordinate relationship can include relative position, distance, angle, etc., which is used to describe the position of the head relative to other body parts. Through this head coordinate relationship, it can be used to determine whether the head posture is correct, such as whether the head is leaning forward or backward.
[0065] Among them, head key points are involved, which are key measurement points used to describe the position and posture of the head, such as the head center point, head contour point, etc.
[0066] Among them, a first shoulder key point is involved, and the first shoulder key point is a key point of one shoulder (such as the left shoulder) of the target object's shoulders.
[0067] Among them, a second shoulder key point is involved, and the second shoulder key point is a key point of the other shoulder (such as the right shoulder) of the target object.
[0068] In the steps involved in this embodiment, when the current coordinate relationship involves a head coordinate relationship, and the sitting key points include a head key point, a first shoulder key point and a second shoulder key point, the head coordinate relationship of the target object is determined based on the coordinates of the head key point, the coordinates of the first shoulder key point and the coordinates of the second shoulder key point.
[0069] When the current coordinate relationship involves the head coordinate relationship, and multiple sitting key points include the head key point, the first shoulder key point and the second shoulder key point, the head coordinate relationship of the target object is determined according to the coordinates of the head key point, the coordinates of the first shoulder key point and the coordinates of the second shoulder key point, which can accurately describe the position of the head relative to the shoulders, thereby helping to accurately judge whether the head posture is correct.
[0070] Optionally, based on the coordinates corresponding to the head key point, the coordinates corresponding to the first shoulder key point and the coordinates corresponding to the second shoulder key point, the head coordinate relationship corresponding to the target object is determined, including: based on the coordinates corresponding to the first shoulder key point and the coordinates corresponding to the second shoulder key point, determining the shoulder center point between the first shoulder key point and the second shoulder key point; based on the coordinates corresponding to the head key point and the coordinates corresponding to the shoulder center point, determining the head coordinate relationship corresponding to the target object.
[0071] Among them, the shoulder center point is involved. The shoulder center point is the center point determined by the first shoulder key point and the second shoulder key point, and can be the midpoint of the two shoulders (that is, the first shoulder key point and the second shoulder key point).
[0072] In the steps involved in this embodiment, the shoulder center point between the first shoulder key point and the second shoulder key point is determined based on the coordinates corresponding to the first shoulder key point and the coordinates corresponding to the second shoulder key point. Then, the head coordinate relationship of the target object is determined based on the coordinates of the head key point and the coordinates of the shoulder center point.
[0073] By determining the head coordinate relationship based on the coordinates of the key points of the head and the center points of the shoulders, the position of the head relative to the shoulders can be accurately quantified, thereby providing a specific numerical basis for judging the head posture, so as to accurately identify whether the head is leaning forward, backward or in other abnormal postures.
[0074] As an optional embodiment, the head coordinate relationship corresponding to the target object is determined based on the coordinates corresponding to the head key point, the coordinates corresponding to the first shoulder key point and the coordinates corresponding to the second shoulder key point, including: when the coordinates are spatial coordinates and the head coordinate relationship includes a head depth relationship, determining the depth value corresponding to the head key point based on the spatial coordinates corresponding to the head key point; determining the depth value corresponding to the first shoulder key point based on the spatial coordinates corresponding to the first shoulder key point; determining the depth value corresponding to the second shoulder key point based on the spatial coordinates corresponding to the second shoulder key point; determining the head depth relationship corresponding to the target object based on the depth value corresponding to the head key point, the depth value corresponding to the first shoulder key point and the depth value corresponding to the second shoulder key point.
[0075] In this embodiment, specific steps are described for determining the head coordinate relationship corresponding to the target object based on the coordinates corresponding to the head key point, the coordinates corresponding to the first shoulder key point, and the coordinates corresponding to the second shoulder key point.
[0076] Among them, coordinates are involved, which are used to determine the positions of measuring points (such as initial measuring points, target measuring points, key points, shoulder center points, etc.) in space.
[0077] The spatial coordinates are used to reflect the position of the measuring point in three-dimensional space and include depth values.
[0078] This involves the head depth relationship, which reflects the depth difference between the key points of the head and the center point of the shoulder. In other words, the head depth relationship reflects the position of the head relative to the shoulder, especially the position in the front-to-back direction, and is used to determine whether the head is tilted forward or backward.
[0079] In the steps involved in this embodiment, when the coordinates are spatial coordinates and the head coordinate relationship includes a head depth relationship, the depth value corresponding to the head key point is determined based on the spatial coordinates corresponding to the head key point, and the depth value corresponding to the first shoulder key point is determined based on the spatial coordinates corresponding to the first shoulder key point, and the depth value corresponding to the second shoulder key point is determined based on the spatial coordinates corresponding to the second shoulder key point. Then, the head depth relationship corresponding to the target object is determined based on the depth value corresponding to the head key point, the depth value corresponding to the first shoulder key point, and the depth value corresponding to the second shoulder key point.
[0080] Optionally, based on the depth value corresponding to the head key point, the depth value corresponding to the first shoulder key point and the depth value corresponding to the second shoulder key point, the depth relationship of the head corresponding to the target object is determined, including: determining the shoulder center point between the first shoulder key point and the second shoulder key point; determining the depth value corresponding to the shoulder center point based on the depth value corresponding to the first shoulder key point and the depth value corresponding to the second shoulder key point; determining the depth relationship of the head corresponding to the target object based on the depth value corresponding to the head key point and the depth value corresponding to the shoulder center point.
[0081] When the coordinates are spatial coordinates and the head coordinate relationship includes the head depth relationship, the depth value can directly reflect the spatial position of each key part of the target subject's body relative to the measurement device. By calculating the depth values of the head key points, the first shoulder key points, and the second shoulder key points, and detecting head posture based on the relationship between these depth values, the front-to-back position relationship of the head relative to the shoulders can be accurately quantified, and the spatial position relationship of the head in the depth direction can be accurately reflected. This helps accurately determine the target subject's sitting posture and effectively determine whether the head is tilted forward or backward.
[0082] On this basis, the shoulder center point between the first shoulder key point and the second shoulder key point is determined as a relatively stable reference point. By comparing the depth value of the head key point with the depth value of the shoulder center point, the front and rear position relationship of the head relative to the shoulders can be intuitively and quickly judged.
[0083] As an optional embodiment, the current coordinate relationship between multiple sitting key points is determined based on the key point coordinates corresponding to the multiple sitting key points, including: when the current coordinate relationship includes a shoulder coordinate relationship and the multiple sitting key points include a first shoulder key point and a second shoulder key point, the coordinate difference value between the key point coordinates corresponding to the first shoulder key point and the key point coordinates corresponding to the second shoulder key point is determined, wherein the horizontal coordinate of the first shoulder key point is smaller than the horizontal coordinate of the second shoulder key point; based on the coordinate difference value, the shoulder coordinate relationship corresponding to the target object is determined.
[0084] In this embodiment, specific steps of determining the current coordinate relationship between a plurality of sitting posture key points according to the key point coordinates corresponding to the plurality of sitting posture key points are described.
[0085] The shoulder coordinate relationship is involved, which is the spatial position relationship between the first shoulder key point and the second shoulder key point. The shoulder coordinate relationship can include relative position, distance, angle, etc., which is used to describe the horizontal state, twist state and other postures of the shoulder.
[0086] The coordinate difference value is involved. This coordinate difference value is the coordinate difference between the first shoulder keypoint and the second shoulder keypoint. The coordinate difference value includes the difference in the horizontal direction (abscissa), the vertical direction (ordinate), and the front-back direction (depth direction), and is used to quantify the positional relationship between the first shoulder keypoint and the second shoulder keypoint.
[0087] In the steps involved in this embodiment, when the current coordinate relationship includes a shoulder coordinate relationship and multiple sitting key points include a first shoulder key point and a second shoulder key point, the coordinate difference value between the key point coordinates corresponding to the first shoulder key point and the key point coordinates corresponding to the second shoulder key point is first determined, and then the shoulder coordinate relationship corresponding to the target object is determined based on the coordinate difference value.
[0088] When the current coordinate relationship includes the shoulder coordinate relationship, by determining the coordinate difference value between the first shoulder key point and the second shoulder key point (including the differences in the horizontal, vertical and depth directions), the spatial position relationship of the shoulder can be accurately quantified, thereby effectively identifying whether the shoulder is horizontal, whether there is twisting or other abnormal postures, thereby achieving accurate detection of the shoulder posture.
[0089] As an optional embodiment, determining the shoulder coordinate relationship corresponding to the target object based on the coordinate difference value, including: when the coordinate difference value includes a depth difference value and the shoulder coordinate relationship includes a shoulder depth relationship, determining the shoulder depth relationship corresponding to the target object based on the depth difference value.
[0090] In this embodiment, the specific steps of determining the coordinate relationship of the shoulder corresponding to the target object based on the coordinate difference value are described.
[0091] The depth difference value is used to indicate the relative difference between the first shoulder key point and the second shoulder key point in the depth direction. In other words, the depth difference value reflects the relative position difference between the first shoulder key point and the second shoulder key point in the front-back direction.
[0092] Among them, the shoulder depth relationship is involved, which is used to reflect the relative position relationship between the first shoulder key point and the second shoulder key point in the depth direction, and can be used to determine whether the shoulder is turned sideways.
[0093] In the steps involved in this embodiment, when the coordinate difference value includes a depth difference value and the shoulder coordinate relationship includes a shoulder depth relationship, the shoulder depth relationship corresponding to the target object is determined according to the depth difference value.
[0094] When the coordinate difference value includes the depth difference value and the shoulder coordinate relationship involves the shoulder depth relationship, the shoulder depth relationship is determined by the depth difference value, which can accurately quantify the position difference of the shoulder in the front-to-back direction, thereby effectively identifying whether there is an unhealthy posture such as side rotation or front-to-back tilt of the shoulder.
[0095] As an optional embodiment, determining multiple key point coordinates corresponding to the target object from the measurement point coordinates corresponding to multiple target measurement points includes: calling a key point determination model, wherein the key point determination model is obtained by training an initial model based on multiple sample measurement point coordinates, a deviation determination function, and an additional constraint function, the sample measurement point coordinates include multiple key sample coordinates, the deviation determination function is used to determine the degree of deviation between multiple output coordinates of the initial model and the multiple key sample coordinates, and the additional constraint function is used to constrain the coordinate relationship between the output measurement points corresponding to the multiple output coordinates; inputting the measurement point coordinates corresponding to the multiple target measurement points into the key point determination model to obtain multiple key point coordinates corresponding to the target object.
[0096] In this embodiment, specific steps of determining the coordinates of a plurality of key points corresponding to a target object from the coordinates of the measuring points corresponding to the plurality of target measuring points are described.
[0097] Among them, a key point determination model is involved, which is a model used to accurately identify the coordinates of multiple key points related to the target object from multiple target measurement points.
[0098] Therein, multiple sample measurement point coordinates are involved, and the multiple sample measurement point coordinates are the measurement point coordinates used to train the initial model, so that the initial model can learn how to accurately identify key points from the input data.
[0099] This involves multiple output coordinates, which are the coordinates of multiple sample points output after inputting them into the initial model during training. Through training and optimization, the output coordinates should be as close as possible to the actual key sample coordinates.
[0100] Among them, multiple key sample coordinates are involved, which are the measurement point coordinates among multiple sample measurement point coordinates that can accurately reflect the sitting posture of the target object, that is, the target output (the result of the expected final output of the initial model).
[0101] Among them, a deviation determination function is involved, which is a function used to evaluate the degree of deviation between multiple output coordinates of the initial model and multiple key sample coordinates, and is used to quantify the prediction error of the initial model to measure the accuracy of the initial model in identifying key points.
[0102] This involves an additional constraint function, which is used to constrain the relationship between output coordinates to ensure that the output keypoint coordinates meet certain predefined geometric or logical relationships, thereby improving training efficiency with a small number of samples. For example, the relative position relationship between keypoints.
[0103] Among them, the initial model is involved, which is the basic model before the model is determined at the training key points.
[0104] In the steps involved in this embodiment, first, a key point determination model is retrieved, and then the coordinates of the measurement points corresponding to the multiple target measurement points are input into the key point determination model to obtain the coordinates of the multiple key points corresponding to the target object.
[0105] The key point determination model is obtained by training the initial model based on the coordinates of multiple sample measurement points. During the training process, the prediction accuracy is optimized through the deviation determination function, and the additional constraint function is used to ensure that the output coordinates conform to the predefined geometric or logical relationship, which significantly improves the training efficiency and training effect. Therefore, by inputting the target measurement point coordinates into the key point determination model, the accuracy of the key point coordinate determination can be improved, which helps to ensure the accuracy and reliability of the sitting posture detection results.
[0106] As an optional embodiment, inputting the measurement point coordinates corresponding to the multiple target measurement points into the key point determination model to obtain the multiple key point coordinates corresponding to the target object includes: when the key point determination model includes multiple feature extraction modules and a feature fusion module, and the multiple feature extraction modules are connected in series, inputting the measurement point coordinates corresponding to the multiple target measurement points into the first feature extraction module in the order in which the multiple feature extraction modules are connected in series to obtain the first features corresponding to the multiple target measurement points corresponding to the first feature extraction module; inputting the first features corresponding to the multiple target measurement points into the next feature extraction module to obtain the next features corresponding to the multiple target measurement points corresponding to the next feature extraction module, until the multiple feature extraction modules complete processing to obtain the target features corresponding to the multiple target measurement points; inputting the target features corresponding to the multiple target measurement points into the feature fusion module to obtain the multiple key point coordinates corresponding to the target object.
[0107] In this embodiment, the specific steps of inputting the coordinates of the measurement points corresponding to the plurality of target measurement points into the key point determination model to obtain the coordinates of the plurality of key points corresponding to the target object are described.
[0108] Wherein, multiple feature extraction modules are involved. The multiple feature extraction modules are modules for extracting features from input (such as multiple target measurement points). The multiple feature extraction modules can be multiple residual modules.
[0109] Among them, a feature fusion module is involved. This feature fusion module is used to integrate the target features corresponding to multiple extracted target measurement points to obtain the coordinates of multiple key points. For example, the feature fusion module may include a multi-scale convolution fusion module, three convolution kernel pooling layers of different sizes (such as 1×1, 3×3, and 5×5), and a fully connected layer.
[0110] Among them, the first feature extraction module is involved. The first feature extraction module is the first module in the order in which multiple feature extraction modules are connected in series, and is responsible for extracting preliminary features (ie, first features) from the measurement point coordinates corresponding to multiple target measurement point coordinates.
[0111] Among them, the first feature is involved, and the first feature is a feature extracted by the first feature extraction module from the measurement point coordinates corresponding to the input multiple target measurement points.
[0112] Among them, the next feature extraction module is involved. The next feature extraction module is a module immediately following the first feature extraction module, which further extracts features based on the output of the first feature extraction module (such as the first features corresponding to multiple target measurement points), that is, further improves the abstract level of the features and provides a more advanced feature representation for subsequent modules.
[0113] Here, the next feature is involved, and the next feature is a feature extracted by the next feature extraction module from the input (such as the first features corresponding to multiple target measurement points respectively).
[0114] Among them, the target feature is involved, which is the final feature obtained after being processed by all feature extraction modules.
[0115] In the steps involved in this embodiment, in the key point determination model, the measurement point coordinates of multiple target measurement points are first input into the first feature extraction module to obtain the corresponding first features; then all the obtained first features are input into the next feature extraction module, and so on, until all feature extraction modules are processed to obtain the target features of each target measurement point; finally, these target features are input into the feature fusion module to obtain multiple key point coordinates of the target object.
[0116] By sequentially inputting the coordinates of multiple target points into multiple, serially connected feature extraction modules, features are extracted from lower to higher levels. Each module extracts information at varying levels of abstraction, leading to a more comprehensive understanding of the target object's structure and posture. Finally, these target features are fed into a feature fusion module, which fuses them at multiple levels and scales. This effectively captures the details and context of key upper body parts (such as the head, shoulders, and elbows), ensuring accurate identification of key points in varying sitting postures, thereby improving the accuracy and reliability of posture detection.
[0117] It should be noted that when multiple feature extraction modules are multiple residual modules, too many residual modules will significantly increase the computational complexity and parameter count of the model (i.e., the initial model mentioned above), resulting in longer training time and a higher risk of model overfitting. On the other hand, too few residual modules will not be sufficient to extract sufficient feature information, affecting model performance.
[0118] Therefore, multiple residual modules can be pre-set as three residual modules. Through verification, it is found that the combination of three residual modules performs best in terms of performance and efficiency. That is, the three residual modules can reduce the consumption of computing resources while maintaining a high accuracy rate, thereby achieving a better balance between model complexity and performance. Each residual module can extract features at different levels. For example, the first residual module extracts low-level features (same as the first feature mentioned above), the second residual module extracts mid-level features (same as the next feature mentioned above), and the third residual module extracts high-level features (same as the target feature mentioned above). This hierarchical feature extraction helps the model better understand and recognize the sitting posture of the target object. That is, by connecting the three residual modules in series, the abstraction level of the features can be gradually enhanced, enabling the model to more accurately identify key points.
[0119] In addition, when the feature fusion module can include a multi-scale convolution fusion module, three convolution kernel pooling layers of different sizes (such as 1×1, 3×3, 5×5), and a fully connected layer, by integrating the multi-scale convolution fusion module, the convolution kernel pooling layers of different sizes (1×1, 3×3, 5×5) and the fully connected layer, the extracted target features can be fused at multiple levels and scales.
[0120] In the context of sitting posture detection, convolution kernels of three different sizes—1×1, 3×3, and 5×5—are selected to better capture the features of key parts of the upper body (such as the head, shoulders, and elbows). The head is relatively large and has a more regular shape, making it suitable for extracting its overall features with a larger 5×5 convolution kernel. The shoulders and elbows are relatively small and have more varied shapes, so a 3×3 convolution kernel can capture the detailed features of these parts. The 1×1 convolution kernel is used to extract more detailed local information, such as the precise location of key points. Through this multi-scale feature extraction, the model (same as the initial model mentioned above) can more comprehensively understand the structure and posture of the upper body, thereby improving the accuracy and robustness of sitting posture detection.
[0121] As an optional embodiment, based on the depth values corresponding to the multiple initial measuring points, multiple target measuring points corresponding to the target object are determined from the multiple initial measuring points, including: determining a detection device and multiple current measuring points corresponding to the target object, wherein the multiple current measuring points are obtained by performing sitting posture detection on the target object based on the detection device at the current time; determining multiple historical detection times corresponding to the target object based on the detection fineness index corresponding to the detection device and the current time; determining multiple historical measuring points corresponding to the multiple historical detection times based on the detection device and the multiple historical detection times; and determining multiple target measuring points corresponding to the target object from the multiple current measuring points and the corresponding multiple historical measuring points based on the depth values corresponding to the multiple current measuring points and the depth values corresponding to the corresponding multiple historical measuring points.
[0122] In this embodiment, specific steps of determining a plurality of target measuring points corresponding to the target object from the plurality of initial measuring points according to the depth values respectively corresponding to the plurality of initial measuring points are described.
[0123] The present invention relates to a detection device, which is a device for detecting the sitting posture of a target object, such as a sensor (including a laser infrared sensor, etc.), for obtaining the depth value or other relevant data of the target object. The detection device can also be other devices that can measure distance.
[0124] The multiple current measurement points are obtained when the detection device detects the sitting posture of the target object at the current time. The multiple current measurement points reflect the sitting posture of the target object at the current time.
[0125] Among them, the detection fineness index is involved, which is the accuracy level (such as resolution) that the detection equipment can achieve during the detection process.
[0126] Among them, the current time is involved, and the current time is the time point for performing sitting posture detection.
[0127] Therein, multiple historical detection times are involved, and the multiple historical detection times are time points before the current time when the detection device performed sitting posture detection on the target object.
[0128] The plurality of historical measurement points involved are multiple measurement points acquired when the detection device detects the sitting posture of the target object at the corresponding historical detection time. The plurality of historical measurement points reflects the sitting posture of the target object at the corresponding historical detection time.
[0129] In the steps involved in this embodiment, first, a detection device corresponding to the target object and a plurality of current measurement points obtained by the detection device at the current time are determined; then, based on the detection refinement index of the detection device and the current time, a plurality of historical detection times corresponding to the target object are determined; then, based on the detection device and these historical detection times, a plurality of historical measurement points corresponding to each historical detection time are determined; finally, by combining the depth values of the plurality of current measurement points with the depth values of the plurality of historical measurement points, a plurality of target measurement points corresponding to the target object are screened out from these measurement points.
[0130] When multiple initial measurement points cover the current time point and multiple historical time points, by analyzing the depth values of the current measurement point and the historical measurement points, multiple target measurement points most relevant to the target object are determined. This helps to reduce misjudgments caused by instantaneous data anomalies, and effectively compensates for information missing or inaccurate due to insufficient measurement accuracy, ensuring stable and accurate detection of the target object's sitting posture even with low-resolution sensors.
[0131] Based on the above embodiment and optional embodiment, an optional implementation manner is provided, which is described in detail below.
[0132] In related technologies, it is necessary to detect sitting postures to promptly identify unhealthy sitting postures, such as crooked sitting or excessively leaning back, to prevent them from causing serious harm to health. However, in related technologies, there is a technical problem of inaccurate results when detecting sitting postures.
[0133] To address the above-mentioned problems, no effective solutions have been proposed so far.
[0134] In view of this, a sitting posture detection method is provided in an optional embodiment of the present invention, which can also be called a sitting posture detection method based on a laser infrared sensor, which can effectively solve the technical problem in related technologies that when detecting sitting posture, the sitting posture detection results are inaccurate.
[0135] Figure 2 This is a schematic diagram of the installation position of the sensor in an optional embodiment of the present invention. The following is a detailed description of the implementation of human sitting posture detection based on a low-resolution laser infrared ranging sensor.
[0136] As shown Figure 2 in the figure, the installation position of the sensor can be in the front of the desk, and the ranging field of view of the sensor faces the upper body of the user (the same as the above-mentioned target object), and the ranging content mainly includes the user's shoulders and head.
[0137] Figure 3 The following is the flowchart of sitting posture detection in the optional implementation manner of the present invention. As shown Figure 3 in the figure, the design process of the detection algorithm is to obtain distance matrix data in real time, and then obtain the coordinates of three key points, namely the shoulders (the same as the above-mentioned first shoulder key point and second shoulder key point) and the head center (the same as the above-mentioned head key point), through a deep learning network. Finally, analyze and determine whether the sitting posture is abnormal and what type of abnormality it belongs to. Specifically, it can be divided into three main steps: data preprocessing, key point detection, and sitting posture discrimination.
[0138] S1. Data preprocessing.
[0139] In order to improve the accuracy and robustness of human sitting posture detection, a systematic data preprocessing process is designed, which mainly includes the following three steps: background data removal, normalization processing, and multi-frame data fusion.
[0140] S11. Background data removal:
[0141] In order to reduce the interference of other objects in the irradiation area of the sensor, such as people at a long distance behind the seat or a water cup at a short distance on the desk, etc., spatial region screening (such as, screening can be performed manually or by a screening model) is performed on the distance data (the same as the depth values corresponding to the above-mentioned multiple initial measurement points) obtained by the sensor.
[0142] Specifically, for the region in the distance matrix where the distance value is greater than w + z and less than w - z, it is forced to be w + z. The formula is as follows:
[0143]
[0144] Where:
[0145] d(x, y) represents the distance value (the same as the above-mentioned depth value) at the position (x, y) (the same as the above-mentioned initial measurement point) in the distance matrix;
[0146] w represents the distance from the sensor to the edge of the tabletop;
[0147] z represents the reference value of the range of the effective detection area in the distance matrix;
[0148] d(x, y) < w - z represents the distance value of the too close area in the distance matrix;
[0149] d(x, y) > w + z represents the distance value of the background area in the distance matrix.
[0150] This processing method can effectively suppress the interference of the background area and the too-close area, highlighting the key features of the human sitting posture. Among them, z can be determined as 30 centimeters (cm), and then the detection range includes a distance range of 60 cm for the head to lean forward and backward.
[0151] S12, Normalization processing:
[0152] Normalize the processed distance matrix to accelerate the training and stability of the deep learning model. The specific normalization formula is as follows:
[0153] d(x,y) = (w + z - d(x,y)) ÷ (2×z)
[0154] Considering that the key point positions of the shoulders and the head need to be detected, and these positions are relatively close numerical points in the distance matrix, so when normalizing the close-distance points (i.e., the points between [-z, w + z]), they are inversely close to the value 1, while other distance points (such as the points where d(x,y) < w - z and d(x,y) > w + z) tend to the value 0, so as to weaken the influence of these areas on the deep learning model and at the same time highlight the characteristics of the key point areas. Correspondingly, the values outside the previously screened spatial area will also be converted to 0.
[0155] S13, Multi-frame data fusion:
[0156] Determine the detection device corresponding to the target object and multiple current measurement points. Among them, the multiple current measurement points are determined based on the detection of the sitting posture of the target object by the detection device at the current time; according to the detection precision index corresponding to the detection device and the current time, determine multiple historical detection times corresponding to the target object; according to the detection device and the multiple historical detection times, determine multiple historical measurement points corresponding to the multiple historical detection times respectively; according to the depth values corresponding to the multiple current measurement points respectively and the depth values corresponding to the multiple historical measurement points respectively, determine multiple target measurement points corresponding to the target object from the multiple current measurement points and the corresponding multiple historical measurement points.
[0157] For example, considering the accuracy limitation of the low-resolution sensor (the same as the above detection precision index) and the relatively slow sitting posture transformation speed, and allowing the multi-frame to be regarded as the same sitting posture state within a certain time window (the same as the above current time and multiple historical detection times), the information in the time dimension is introduced for multi-frame fusion.
[0158] Specifically, use the sliding window technique to stack the continuous k-frame data (the same as the above multiple current measurement points and the corresponding multiple historical measurement points) in the third dimension. This multi-frame fusion strategy can effectively improve the stability and accuracy of the detection results. For a sensor sampling rate of 10 Hertz (Hz), k can be set to 5.
[0159] S2, key point detection.
[0160] In order to achieve fast and accurate detection of human sitting posture, an efficient and simple key point detection model is designed (the same as the above key point determination model, hereinafter referred to as the model).
[0161] Figure 4 This is a schematic diagram of the key point detection model architecture in an optional embodiment of the present invention. Figure 4 As shown in the figure, the model mainly consists of the following parts: three residual blocks (the same as the multiple feature extraction modules mentioned above, that is, three residual modules) and a feature fusion module, where the feature fusion module includes a multi-scale convolutional fusion module, a pooling layer, and a fully connected layer. In other words, the model mainly consists of the following parts: three residual blocks, a multi-scale convolutional fusion module, a pooling layer, and a fully connected layer.
[0162] This model effectively extracts the coordinates of key points on the upper body, namely the shoulders and the center of the head (similar to the first shoulder key point, the second shoulder key point, and the head key point mentioned above), enabling accurate subsequent recognition of the person's sitting posture. The accuracy of the key point coordinates directly determines the accuracy of subsequent sitting posture judgment.
[0163] First, the model input is a feature block of scale [k, 8, 8] (corresponding to the coordinates of the target points mentioned above), where 8×8 represents the sensor resolution (same as the detection fineness index mentioned above), i.e., the height and width of the distance matrix. Given the low input resolution, spatial information should be preserved as much as possible. Therefore, when extracting features in the residual module, the height and width dimensions remain unchanged, while the channel dimension is increased.
[0164] Then it goes through a multi-scale convolution fusion module, where the input is combined with the original distance matrix by channel-dimensional merging to prevent excessive loss of original low-resolution information.
[0165] The outputs are then stacked in the channel dimension using convolution kernels of three different sizes: 1×1, 3×3, and 5×5. These kernels then pass through a channel attention mechanism to suppress features of certain sizes and highlight information useful for finding key points. The entire image then undergoes a 1×1 convolution to fuse features of different scales and reduce the channel dimension.
[0166] Finally, after the pooling layer and the fully connected layer, the features are reduced to 6 points, namely the coordinate values of the three key points (the same as the coordinates of the multiple key points mentioned above).
[0167] When training the detection model, the loss function (same as the deviation determination function mentioned above) is defined as the mean square error loss for coordinate regression, that is:
[0168]
[0169] in:
[0170] Loss indicates the degree of deviation between multiple output coordinates of the initial model and multiple key sample coordinates;
[0171] label represents a measurement point among multiple sample measurement points;
[0172] {shoulder left ,shoulder right ,head} represents the set of left shoulder, right shoulder and head center (same as the multiple sample measurement points mentioned above);
[0173] shoulder left Represents the left shoulder (same as the shoulder key point of the first sample above);
[0174] shoulder right Represents the right shoulder (same as the second sample shoulder key point above, where the abscissa of the first sample shoulder key point is smaller than that of the second sample shoulder key point);
[0175] head represents the center of the head (same as the head key point of the above sample);
[0176] The predicted horizontal coordinate (x-axis coordinate, corresponding to the horizontal coordinates of the above multiple output coordinates) representing the left shoulder, right shoulder, or head center;
[0177] is the true x-axis coordinate of the left shoulder, right shoulder, or head center (the horizontal coordinates corresponding to the aforementioned multiple key sample coordinates);
[0178] The predicted y-axis coordinate representing the left shoulder, right shoulder, or head center (the y-axis coordinate, which corresponds to the y-axis coordinates of the above multiple output coordinates).
[0179] Indicates the true y-axis coordinate of the left shoulder, right shoulder, or head center (the same vertical coordinates as the corresponding coordinates of the above multiple key sample coordinates).
[0180] Considering the small resolution of the distance matrix and the limited training samples, in order to reduce unnecessary searches in the early stages of training and to ensure model stability, some inherent constraints on the shoulder and head center coordinates (similar to the additional constraint function mentioned above) are added at the beginning of training. The specific constraints are as follows:
[0181]
[0182] in:
[0183] loss add Indicates the loss result of constraining the coordinate relationship between the output measurement points corresponding to multiple output coordinates;
[0184] λ1 represents The weight coefficient of the penalty term;
[0185] λ2 represents The weight coefficient of the penalty term;
[0186] λ3 represents The weight coefficient of the penalty term;
[0187] λ4 represents The weight coefficient of the penalty term.
[0188] This additional loss (similar to the additional constraint function described above) primarily takes advantage of the fact that the horizontal coordinate of the left shoulder is smaller than the right shoulder, the horizontal coordinate of the head center is as close as possible to the center of the shoulders, the vertical coordinates of the shoulders are as equal as possible, and the vertical coordinate of the head center is higher than the shoulders. This loss indicates the initial convergence direction for training. The weight coefficient is gradually reduced to zero in the middle and later stages, as some unusual sitting postures do not conform to this rule.
[0189] S3, sitting posture judgment.
[0190] During the usage phase, the distance matrix can obtain the coordinate information of the three key points of shoulders and head center after passing through the key point detection model. Combined with the distance values of these three position points in the distance matrix, the sitting posture can be judged, which can include multiple sitting posture detection types (such as left and right head tilt judgment, head lowering judgment, left and right body tilt judgment, forward leaning judgment, backward leaning judgment, side turning judgment, etc.).
[0191] (1) Determine the left and right tilt of the head:
[0192] The corresponding head coordinate relationship includes: whether the horizontal coordinate of the head center deviates from the corresponding threshold of the center position of the shoulder horizontal coordinate. The judgment formula is as follows:
[0193]
[0194] in:
[0195] is the horizontal coordinate corresponding to the key point of the head;
[0196] is the horizontal coordinate corresponding to the first shoulder key point;
[0197] is the horizontal coordinate corresponding to the second shoulder key point;
[0198] is the horizontal coordinate corresponding to the center point of the shoulder;
[0199] T1 is the threshold corresponding to the judgment of left and right tilt of the head. If the threshold is exceeded, it is considered as a sitting posture with the head tilted left and right.
[0200] (2) Looking down to judge:
[0201] The corresponding head coordinate relationship includes: the vertical coordinate of the center of the head is close to the average value of the vertical coordinates of the two shoulders. The judgment formula is as follows:
[0202]
[0203] in:
[0204] is the ordinate corresponding to the first shoulder key point;
[0205] is the ordinate corresponding to the second shoulder key point;
[0206] is the vertical coordinate corresponding to the center point of the shoulder;
[0207] is the vertical coordinate corresponding to the key point of the head;
[0208] T2 is the threshold corresponding to the judgment of head-down. If the threshold is exceeded, it is considered as a head-down sitting posture.
[0209] (3) Determine the left and right tilt of the body:
[0210] The corresponding shoulder coordinate relationship includes: whether the difference between the vertical coordinates of the two shoulders is large, that is, whether the two shoulders are in a horizontal state. The judgment formula is as follows:
[0211]
[0212] in:
[0213] is the coordinate difference between the key point coordinates corresponding to the first shoulder key point and the key point coordinates corresponding to the second shoulder key point;
[0214] T3 is the threshold corresponding to the judgment of the left and right tilt of the body. If the threshold is exceeded, it is regarded as a sitting posture with the body tilted left and right.
[0215] (4) Forward lean judgment:
[0216] Specifically, the distance between the center of the head and the distance sensor is less than a certain value between the shoulders and the distance sensor. The judgment formula is as follows:
[0217]
[0218] in:
[0219] Indicates the depth value corresponding to the first shoulder key point;
[0220] Indicates the depth value corresponding to the second shoulder key point;
[0221] Indicates the depth value corresponding to the center point of the shoulder;
[0222] Indicates the depth value corresponding to the key point of the head;
[0223] D1 represents the depth value corresponding to the forward leaning judgment. If the depth exceeds this threshold, it is considered as a forward leaning sitting posture.
[0224] (5) Backward judgment:
[0225] Specifically, the distance between the center of the head and the distance sensor is greater than the distance between the shoulders and the distance sensor by a certain value. The judgment formula is as follows:
[0226]
[0227] in:
[0228] D2 represents the threshold corresponding to reclining judgment. If the threshold is exceeded, it is regarded as reclining sitting posture.
[0229] (6) Side turn judgment:
[0230] Specifically, the distance between the two shoulders and the sensor is quite different. The judgment formula is as follows:
[0231]
[0232] in:
[0233] Indicates the depth difference value;
[0234] D3 represents the threshold corresponding to the side turn judgment. If the threshold is exceeded, it is regarded as a side turn sitting posture.
[0235] Figure 5 Schematic diagram of standard sitting posture in an optional embodiment of the present invention, as shown in FIG. Figure 5 The image shows the distance matrix obtained by the distance sensor for a typical sitting human (target subject). This matrix has been pre-processed to filter the spatial region, setting the coordinates of points outside the non-human detection range to 90 cm. The three dark dots, from left to right, represent the left shoulder, the center of the head, and the right shoulder. It can be seen that the head is positioned directly above the shoulders, and the distance values differ slightly.
[0236] Figure 6 Schematic diagram of abnormal sitting posture with head tilted to the left in an optional embodiment of the present invention, as shown in FIG. Figure 6 This shows an abnormal sitting posture with the head tilted to the left, meaning the center of the head is to the left of the center of the shoulders.
[0237] Figure 7 Schematic diagram of abnormal sitting posture with head down and forward leaning in an optional embodiment of the present invention, as shown in FIG. Figure 7 As shown in the figure, the distance matrix is obtained for a person (the same as the target object mentioned above) lying on the table. It can be seen that the vertical coordinate of the center of the head is almost flush with the shoulders. At the same time, the distance from the center of the head to the distance measurement sensor is 52 cm, which is much smaller than the distance between the shoulders. It is determined to be an abnormal sitting posture with the head lowered and leaning forward.
[0238] From the above, we can see that the three sitting posture judgments of head tilt left and right, head lowering, and body tilt left and right all use only the coordinate information of the key points, and do not use the distance information (the same as the depth value mentioned above). For the three sitting posture judgments of forward leaning, backward leaning, and side turning, distance information is the main reference information.
[0239] Through the above optional implementation, at least the following beneficial effects can be achieved:
[0240] (1) Compared with the related art, the present invention can eliminate background interference by screening out multiple target measuring points from multiple initial measuring points. On this basis, multiple key point coordinates are screened out from the measuring point coordinates corresponding to the multiple target measuring points, and the key features that can accurately describe the body posture of the target object are further extracted. Therefore, by analyzing the coordinates of multiple key points and the coordinate correlation between them, the sitting state of the target object can be judged, which helps to clarify whether the sitting state of the target object meets the standard sitting posture or whether there is a bad sitting posture and its specific type, thereby solving the technical problem in the related art that when the sitting posture is detected, the sitting posture detection result is inaccurate.
[0241] (2) Compared with related technologies, the present invention can specifically screen out multiple sitting posture key points related to the sitting posture detection type by clarifying the sitting posture detection type. These sitting posture key points can accurately and directly describe the sitting posture state corresponding to the sitting posture detection type. Further analysis of the current coordinate relationship of these sitting posture key points can reflect the current sitting posture state of the target object, and by comparing the current coordinate relationship with the standard coordinate relationship, it can directly and accurately determine whether the current sitting posture meets the standard sitting posture under the sitting posture detection type.
[0242] (3) Compared with the related art, the present invention can accurately quantify the position of the head relative to the shoulder by determining the shoulder center point between the first shoulder key point and the second shoulder key point when the current coordinate relationship includes the head coordinate relationship, and determining the head coordinate relationship based on the coordinates of the head key point and the shoulder center point, thereby providing a specific numerical basis for the judgment of the head posture, so as to accurately identify whether the head is leaning forward, backward or in other abnormal postures.
[0243] (4) Compared with the related art, the present invention can accurately quantify the spatial position relationship of the shoulder by determining the coordinate difference value (including the differences in the horizontal, vertical and depth directions) between the first shoulder key point and the second shoulder key point when the current coordinate relationship includes the shoulder coordinate relationship, thereby being able to effectively identify whether the shoulder is horizontal, whether there is twisting or other abnormal postures, and thus achieving accurate detection of the shoulder posture.
[0244] (5) Compared with related technologies, the present invention can gradually extract features from low to high levels by inputting the coordinates of the measurement points corresponding to multiple target measurement points into multiple series-connected feature extraction modules. Each module is responsible for extracting information at different levels of abstraction, thereby more comprehensively understanding the structure and posture of the target object. Finally, these target features are input into the feature fusion module, which can perform multi-level and multi-scale fusion processing on the features, thereby effectively capturing the details and contextual information of key parts of the upper body (such as the head, shoulders, and elbows), thereby ensuring that key points can be accurately identified in different sitting postures.
[0245] (6) Compared with related technologies, the present invention protects user privacy and reduces costs by using low-resolution ranging sensors for detection. It also detects sitting postures by distance, which is more intuitive and accurate than images. It can also detect various bad sitting postures such as the user's head tilting left and right, lowering the head, leaning forward, leaning back, the body tilting left and right, and turning sideways.
[0246] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited by the order of the actions described, because according to the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0247] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of various embodiments of the present invention.
[0248] Example 2
[0249] According to an embodiment of the present invention, a device for implementing the above-mentioned sitting posture detection method is also provided. Figure 8 : is a structural block diagram of a sitting posture detection device according to an embodiment of the present invention. Figure 8 As shown, the device includes: a receiving module 802, a responding module 804, a first determining module 806 and a second determining module 808. The device will be described in detail below.
[0250] A receiving module 802 is configured to receive a sitting posture detection request, wherein the sitting posture detection request carries depth values corresponding to a plurality of initial measurement points. A response module 804 is connected to the receiving module 802 and configured to respond to the sitting posture detection request and, based on the depth values corresponding to the plurality of initial measurement points, determine a plurality of target measurement points corresponding to the target object from the plurality of initial measurement points. A first determination module 806 is connected to the response module 804 and configured to determine, from the measurement point coordinates corresponding to the plurality of target measurement points, a plurality of key point coordinates corresponding to the target object, wherein the key points corresponding to the plurality of key point coordinates have a coordinate correlation relationship. A second determination module 808 is connected to the first determination module 806 and configured to determine a sitting posture detection result corresponding to the target object based on the plurality of key point coordinates.
[0251] It should be noted here that the above-mentioned receiving module 802, response module 804, first determination module 806 and second determination module 808 correspond to steps S102 to S108 in implementing the sitting posture detection method. The instances and application scenarios implemented by multiple modules and corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.
[0252] Example 3
[0253] According to another aspect of an embodiment of the present invention, an electronic device is provided, including: a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to execute the instructions to implement any of the above-mentioned sitting posture detection methods.
[0254] Example 4
[0255] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any of the above-mentioned sitting posture detection methods.
[0256] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0257] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0258] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0259] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0260] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0261] If the integrated unit is implemented in the form of 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, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.
[0262] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A sitting posture detection method, characterized in that: include: receiving a sitting posture detection request, wherein the sitting posture detection request carries depth values corresponding to a plurality of initial measurement points; In response to the sitting posture detection request, determining a plurality of target measuring points corresponding to the target object from the plurality of initial measuring points according to the depth values respectively corresponding to the plurality of initial measuring points; Determining a plurality of key point coordinates corresponding to the target object from the measurement point coordinates corresponding to the plurality of target measurement points, wherein the key points corresponding to the plurality of key point coordinates have a coordinate correlation relationship; A sitting posture detection result corresponding to the target object is determined based on the multiple key point coordinates.
2. The method according to claim 1, characterized in that Determining a sitting posture detection result corresponding to the target object based on the multiple key point coordinates includes: determining a sitting posture detection type corresponding to the target object; Determining, according to the sitting posture detection type, a plurality of sitting posture key points corresponding to the sitting posture detection type from the key points corresponding to the plurality of key point coordinates; Determining a current coordinate relationship between the plurality of sitting posture key points according to the key point coordinates respectively corresponding to the plurality of sitting posture key points; Determining a standard coordinate relationship between the plurality of sitting posture key points according to the sitting posture detection type; A sitting posture detection result corresponding to the sitting posture detection type is determined according to the standard coordinate relationship and the current coordinate relationship between the multiple sitting posture key points.
3. The method according to claim 2, characterized in that The determining of the current coordinate relationship between the plurality of sitting posture key points based on the key point coordinates respectively corresponding to the plurality of sitting posture key points includes: When the current coordinate relationship includes a head coordinate relationship, and multiple sitting key points include a head key point, a first shoulder key point and a second shoulder key point, the head coordinate relationship corresponding to the target object is determined based on the coordinates corresponding to the head key point, the coordinates corresponding to the first shoulder key point and the coordinates corresponding to the second shoulder key point.
4. The method according to claim 3, characterized in that The determining of a head coordinate relationship corresponding to the target object based on the coordinates corresponding to the head key point, the coordinates corresponding to the first shoulder key point, and the coordinates corresponding to the second shoulder key point includes: In a case where the coordinates are spatial coordinates and the head coordinate relationship includes a head depth relationship, determining a depth value corresponding to the head key point according to the spatial coordinates corresponding to the head key point; Determining a depth value corresponding to the first shoulder key point according to the spatial coordinates corresponding to the first shoulder key point; Determining a depth value corresponding to the second shoulder key point according to the spatial coordinates corresponding to the second shoulder key point; A depth relationship of the head corresponding to the target object is determined based on the depth value corresponding to the head key point, the depth value corresponding to the first shoulder key point, and the depth value corresponding to the second shoulder key point.
5. The method according to claim 3, characterized in that The determining of a head coordinate relationship corresponding to the target object based on the coordinates corresponding to the head key point, the coordinates corresponding to the first shoulder key point, and the coordinates corresponding to the second shoulder key point includes: Determining a shoulder center point between the first shoulder key point and the second shoulder key point based on the coordinates corresponding to the first shoulder key point and the coordinates corresponding to the second shoulder key point; The head coordinate relationship corresponding to the target object is determined based on the coordinates corresponding to the head key points and the coordinates corresponding to the shoulder center point.
6. The method according to claim 4, characterized in that Determining a depth relationship of the head corresponding to the target object based on the depth value corresponding to the head key point, the depth value corresponding to the first shoulder key point, and the depth value corresponding to the second shoulder key point includes: determining a shoulder center point between the first shoulder key point and the second shoulder key point; Determining a depth value corresponding to the shoulder center point based on the depth value corresponding to the first shoulder key point and the depth value corresponding to the second shoulder key point; A depth relationship of the head corresponding to the target object is determined based on the depth values corresponding to the head key points and the depth values corresponding to the shoulder center points.
7. The method according to claim 2, characterized in that The determining of the current coordinate relationship between the plurality of sitting posture key points based on the key point coordinates respectively corresponding to the plurality of sitting posture key points includes: In a case where the current coordinate relationship includes a shoulder coordinate relationship, and the plurality of sitting posture key points include a first shoulder key point and a second shoulder key point, determining a coordinate difference value between a key point coordinate corresponding to the first shoulder key point and a key point coordinate corresponding to the second shoulder key point, wherein the abscissa of the first shoulder key point is smaller than the abscissa of the second shoulder key point; The coordinate relationship of the shoulder corresponding to the target object is determined according to the coordinate difference value.
8. The method according to claim 7, characterized in that Determining the shoulder coordinate relationship corresponding to the target object based on the coordinate difference value includes: In a case where the coordinate difference value includes a depth difference value, and the shoulder coordinate relationship includes a shoulder depth relationship, the shoulder depth relationship corresponding to the target object is determined according to the depth difference value.
9. The method according to claim 1, characterized in that The step of determining the coordinates of a plurality of key points corresponding to the target object from the coordinates of the measurement points respectively corresponding to the plurality of target measurement points includes: Retrieving a key point determination model, wherein the key point determination model is obtained by training an initial model based on multiple sample measurement point coordinates, a deviation determination function, and an additional constraint function, the sample measurement point coordinates including multiple key sample coordinates, the deviation determination function is used to determine the degree of deviation between multiple output coordinates of the initial model and the multiple key sample coordinates, and the additional constraint function is used to constrain the coordinate relationship between the output measurement points corresponding to the multiple output coordinates; The coordinates of the measuring points corresponding to the plurality of target measuring points are input into the key point determination model to obtain the coordinates of the plurality of key points corresponding to the target object.
10. The method according to any one of claims 1 to 9, characterized in that The step of determining a plurality of target measuring points corresponding to the target object from the plurality of initial measuring points based on the depth values respectively corresponding to the plurality of initial measuring points includes: Determining a detection device and a plurality of current measurement points corresponding to the target object, wherein the plurality of current measurement points are determined based on a sitting posture detection performed on the target object by the detection device at a current time; Determining a plurality of historical detection times corresponding to the target object based on a detection refinement index corresponding to the detection device and the current time; Determining, based on the detection device and the multiple historical detection times, multiple historical measurement points corresponding to the multiple historical detection times; According to the depth values respectively corresponding to the multiple current measurement points and the depth values respectively corresponding to the multiple corresponding historical measurement points, multiple target measurement points corresponding to the target object are determined from the multiple current measurement points and the multiple corresponding historical measurement points.
11. A sitting posture detection device, characterized in that: include: a receiving module, configured to receive a sitting posture detection request, wherein the sitting posture detection request carries depth values corresponding to a plurality of initial measurement points; a response module, configured to respond to the sitting posture detection request and determine, from the plurality of initial measurement points, a plurality of target measurement points corresponding to the target object according to the depth values respectively corresponding to the plurality of initial measurement points; A first determining module is configured to determine a plurality of key point coordinates corresponding to the target object from the measurement point coordinates corresponding to the plurality of target measurement points, wherein the key points corresponding to the plurality of key point coordinates have a coordinate correlation relationship; The second determination module is used to determine a sitting posture detection result corresponding to the target object based on the multiple key point coordinates.
12. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the sitting posture detection method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the sitting posture detection method according to any one of claims 1 to 10.