A sitting posture recognition system and method incorporating regional importance
Patent Information
- Application Number
- CN202311233504.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2043-09-22
AI Technical Summary
使用传感器带来了硬件成本和用户舒适度的问题,并且传感器的布局和数量可能影响识别性能
[0045] The above technical solution has the following advantages or beneficial effects: Traditional attention mechanisms often only focus on channel dimension features and ignore spatial dimension information. Before recognizing sitting posture, the captured sitting posture image is divided into multiple spatial patches, and the concept of regional importance is introduced, which can better utilize spatial features and improve the performance of sitting posture recognition.
Smart Images

Figure CN117333897B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of human health detection technology, and in particular to a sitting posture recognition system and method that incorporates regional importance. Background Technology
[0002] Posture has a significant impact on human health. Correct posture can reduce stress on the body and prevent health problems caused by bad habits. Sitting is one of the most common postures in daily life, and correct posture is crucial for health. Maintaining incorrect posture for a long time can lead to various health problems, such as spinal curvature, neck pain, and lower back pain.
[0003] First, improper posture can lead to muscle and ligament strain. Maintaining the same sitting posture for extended periods keeps muscles and ligaments in a state of tension, resulting in muscle fatigue and pain. This is common among people who spend long hours sitting in front of a computer or desk.
[0004] Secondly, poor posture can lead to spinal curvature. Prolonged slouching and rounded shoulders can cause spinal curvature, which in turn affects height and breathing. In severe cases, poor posture can also lead to conditions such as herniated discs and spinal stenosis.
[0005] In addition, incorrect posture can also affect cervical spine health. Prolonged periods of looking down or tilting the neck forward can lead to excessive cervical curvature, easily causing neck pain and neck muscle fatigue. These problems may further lead to headaches, dizziness, and other discomfort.
[0006] It is necessary to recognize user posture and remind users to adjust their posture when they are sitting incorrectly. However, traditional posture recognition methods have many drawbacks:
[0007] Posture recognition methods typically rely on sensors such as pressure sensors, accelerometers, and gyroscopes, which need to be placed directly on the seat or the user's body. Using sensors introduces hardware costs and user comfort issues, and the layout and number of sensors can affect recognition performance. Real-time limitations: Some sensor-based posture recognition methods have limitations in real-time performance; the speed of data acquisition and processing limits real-time performance. This is undesirable for applications requiring immediate feedback. Specific hardware requirements: Some sensor-based posture recognition methods require specific hardware devices, which inconveniences users and limits the application scope of the method.
[0008] Therefore, there is a need to provide a system that can recognize a user's sitting posture through a camera. Summary of the Invention
[0009] To address the problems existing in the prior art, the present invention provides a sitting posture recognition system that incorporates regional importance, comprising:
[0010] The camera module is oriented towards the user and is used to take pictures of the user to obtain a seated image;
[0011] An image adjustment module, connected to the camera module, is used to perform feature recognition on the seated image to obtain an original feature map associated with the original features. Then, multiple spatial patches are generated based on the original feature map. For each spatial patch, the regional importance of the spatial patch is evaluated based on the corresponding original features to obtain an evaluation value. Then, the corresponding original features of the spatial patch are adaptively adjusted based on the evaluation value. Finally, the adjusted spatial patches are stitched together to obtain the adjusted image.
[0012] A posture recognition module, connected to the image adjustment module, is used to perform posture recognition on the adjusted image and prompt the user to adjust their posture when an incorrect posture is detected.
[0013] Preferably, the image adjustment module includes:
[0014] The feature extraction unit is used to extract features from the sitting posture image to obtain the original feature map associated with the original features;
[0015] The region adjustment unit, connected to the feature extraction unit, is used to divide the original feature map into spatial patches according to a preset patch size. Then, for each spatial patch, the corresponding importance mask is obtained as the evaluation value based on the original feature corresponding to the spatial patch. The original feature corresponding to the spatial patch is adjusted according to the value of the importance mask to obtain the adjusted feature.
[0016] The image stitching unit, connected to the region adjustment unit, is used to fuse the corresponding adjusted feature and the corresponding original feature for each spatial patch to obtain the corresponding final feature, and then stitch all the spatial patches together to obtain the adjusted image.
[0017] Preferably, the region adjustment unit includes:
[0018] The image segmentation subunit is used to segment the original feature map according to a preset patch size to obtain each spatial patch;
[0019] A mask generation subunit, connected to the image segmentation subunit, is used to obtain the importance mask for each spatial patch by processing the corresponding original features through a depthwise deviable convolution operation and an activation function.
[0020] The feature adjustment subunit, connected to the mask generation subunit, is used to adaptively adjust the original features corresponding to each spatial patch by enhancing, weakening, or not adjusting them when the corresponding importance mask is positive, negative, or zero, to obtain the adjusted features.
[0021] Preferably, the image adjustment module further includes an image preprocessing unit connected to the feature extraction unit, used to crop the sitting posture image to a preset image size to obtain a processed image as the sitting posture image.
[0022] Preferably, the posture recognition module includes:
[0023] A storage unit for storing multiple correct sitting posture labels;
[0024] A posture recognition unit, connected to the storage unit, is used to input the adjusted image into a pre-trained posture recognition model to identify the user's posture label in the posture image, and prompt the user to adjust their posture when it is determined that the user's posture label is not the same as any of the correct posture labels.
[0025] Preferably, the posture recognition module further includes a model training unit connected to the posture recognition unit, comprising:
[0026] The data acquisition subunit is used to acquire several sample sitting posture images and associated sitting posture labels, and after cropping the images, generate a sample training set and a sample validation set. Then, all the sample sitting posture images are flipped and added to the sample training set.
[0027] The training subunit, connected to the data acquisition subunit, is used to construct an initial recognition model and take the sitting posture images of each sample in the sample training set as input, and take the associated sitting posture label as the target output to train the initial recognition model to obtain the trained recognition model.
[0028] An optimization subunit, connected to the training subunit, is used to input each of the samples in the sample validation set into the posture recognition model to obtain validation labels, calculate the loss value between each validation label and the corresponding sample posture label using the cross-entropy loss function, and update the trained recognition model after each validation using the stochastic gradient descent optimization algorithm until the loss value no longer decreases to obtain the posture recognition model.
[0029] The present invention also provides a sitting posture recognition method that incorporates regional importance, applied to the above-mentioned sitting posture recognition system, comprising:
[0030] Step S1: The posture recognition system takes a picture of the user to obtain a posture image;
[0031] Step S2: The sitting posture recognition system performs feature recognition on the sitting posture image to obtain an original feature map associated with the original features. Then, it generates multiple spatial patches based on the original feature map. For each spatial patch, it evaluates the regional importance of the spatial patch based on the corresponding original features. Then, it adaptively adjusts the corresponding original features of the spatial patch based on the evaluation value. Finally, it stitches the adjusted spatial patches together to obtain the adjusted image.
[0032] Step S3: The posture recognition system performs posture recognition on the adjusted image and prompts the user to adjust the posture when an incorrect posture is detected.
[0033] Preferably, step S2 includes:
[0034] Step S21, the sitting posture recognition system extracts features from the sitting posture image to obtain the original feature map associated with the original features;
[0035] Step S22: The sitting posture recognition system divides the original feature map into spatial patches according to a preset patch size. Then, for each spatial patch, the system processes the original feature corresponding to the spatial patch to obtain the corresponding importance mask. The system adjusts the original feature corresponding to the spatial patch according to the value of the importance mask to obtain the adjusted feature.
[0036] In step S23, the posture recognition system adds the corresponding adjusted feature and the corresponding original feature to each spatial patch to obtain the corresponding final feature, and then stitches all the spatial patches together to obtain the adjusted image.
[0037] Preferably, step S22 includes:
[0038] Step S221, the posture recognition system divides the original feature map into spatial patches according to a preset patch size;
[0039] Step S222: For each spatial patch, the posture recognition system obtains the importance mask by processing the corresponding original features through a depthwise deviable convolution operation and an activation function.
[0040] Step S223: For each spatial patch, the posture recognition system enhances, weakens, or does not adjust the original features corresponding to the spatial patch when the corresponding importance mask is positive, negative, or zero, respectively, to adaptively adjust and obtain the adjusted features.
[0041] Preferably, the posture recognition system stores multiple correct posture tags, then performing step S3 includes:
[0042] The posture recognition system inputs the adjusted image into a pre-trained posture recognition model to identify the user's posture label in the posture image and determines whether the user's posture label is the same as any of the correct posture labels:
[0043] If so, return to step S1;
[0044] If not, the user is prompted to adjust their sitting posture, and then the process returns to step S1.
[0045] The above technical solution has the following advantages or beneficial effects: Traditional attention mechanisms often only focus on channel dimension features and ignore spatial dimension information. Before recognizing sitting posture, the captured sitting posture image is divided into multiple spatial patches, and the concept of regional importance is introduced, which can better utilize spatial features and improve the performance of sitting posture recognition. Attached Figure Description
[0046] Figure 1 A schematic diagram of a posture recognition system that incorporates regional importance, as a preferred embodiment of the present invention;
[0047] Figure 2 A schematic diagram of the structure of the attention model with embedded region importance module in a preferred embodiment of the present invention;
[0048] Figure 3 A flowchart illustrating a sitting posture recognition method that incorporates regional importance, as a preferred embodiment of the present invention.
[0049] Figure 4 This is a schematic diagram of a sub-process of step S2 in a preferred embodiment of the present invention;
[0050] Figure 5 This is a schematic diagram of the sub-process of step S22 in a preferred embodiment of the present invention. Detailed Implementation
[0051] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. The present invention is not limited to this embodiment; other embodiments that conform to the spirit of the present invention may also fall within the scope of the present invention.
[0052] In a preferred embodiment of the present invention, based on the aforementioned problems existing in the prior art, a posture recognition system incorporating regional importance is provided, such as... Figure 1 As shown, it includes:
[0053] Camera module 1, oriented towards the user, is used to take photos of the user to obtain images of their seated posture;
[0054] Image adjustment module 2, connected to camera module 1, is used to perform feature recognition on the seated image to obtain an original feature map associated with the original features. Then, multiple spatial patches are generated based on the original feature map. For each spatial patch, the regional importance of the spatial patch is evaluated based on the corresponding original features to obtain an evaluation value. Then, the corresponding original features of the spatial patch are adaptively adjusted based on the evaluation value. Finally, the adjusted spatial patches are stitched together to obtain the adjusted image.
[0055] The posture recognition module 3 is connected to the image adjustment module 2 and is used to recognize the posture of the adjusted image. When the incorrect posture is detected, the user is prompted to adjust the posture.
[0056] Specifically, in this embodiment, as Figure 2 As shown, in image adjustment module 2, we adopt the MobileNetV3-large model, a lightweight attention model. However, traditional attention mechanisms mainly focus on channel-dimensional features while neglecting spatial information. To fully utilize spatial features, we propose a region importance module. Embedding the region importance module in this model introduces spatial information into the attention mechanism, enabling the network to better focus on key regions and extract key features. This design effectively improves the accuracy of posture recognition.
[0057] The MobileNetV3-large model includes a feature extraction module that extracts the raw features of the seated image. The SE module consists of a squeeze (compression layer) and an excitation (activation layer), which can be understood as a mechanism for automatically learning feature weights and importance. In the squeeze stage, global average pooling is used to compress the input features to capture global feature statistics. In the excitation stage, a pair of fully connected layers and an activation function are used to perform non-linear mapping and adjustment on the compressed features to learn the weight relationships between features. In this way, the SE module can adaptively select and emphasize important features, improving the discriminative power of the features.
[0058] The input of the region importance module is connected to the output of the feature extraction layer, and the output of the region importance module is connected to the output of the SE module for fusion (here, fusion is done by direct addition) to obtain the adjusted image. We introduce the region importance module to incorporate spatial information into the attention mechanism, enabling the network to better focus on key regions and extract key features.
[0059] In a preferred embodiment of the present invention, such as Figure 1 As shown, the image adjustment module 2 includes:
[0060] The feature extraction unit 21 is used to extract features from the sitting posture image to obtain an original feature map associated with the original features;
[0061] The region adjustment unit 22 is connected to the feature extraction unit 21. It is used to divide the original feature map into spatial patches according to the preset patch size. Then, for each spatial patch, the corresponding importance mask is obtained as the evaluation value based on the original feature processing of the spatial patch. The original feature corresponding to the spatial patch is adjusted according to the value of the importance mask to obtain the adjusted feature.
[0062] The image stitching unit 23 and the connection region adjustment unit 22 are used to fuse the corresponding adjusted features and the corresponding original features for each spatial patch to obtain the corresponding final features, and then stitch all spatial patches together to obtain the adjusted image.
[0063] Specifically, in this embodiment, the processing in the region adjustment unit 22 is implemented by the region importance module introduced in the MobileNetV3-large model. In the region importance module, the original feature map is divided into spatial patches according to the preset patch size. Then, for each spatial patch, the corresponding importance mask is obtained as the evaluation value based on the original feature processing of the spatial patch. The original feature corresponding to the spatial patch is adaptively adjusted according to the value of the importance mask to obtain the adjusted feature.
[0064] This approach incorporates spatial information into the attention mechanism, enabling the network to better focus on key regions and extract key features.
[0065] In a preferred embodiment of the present invention, such as Figure 1 As shown, the area adjustment unit 22 includes:
[0066] Image segmentation subunit 221 is used to segment the original feature map according to a preset patch size to obtain spatial patches;
[0067] The mask generation subunit 222 is connected to the image segmentation subunit 221. For each spatial patch, the corresponding original features are processed by depthwise deviable convolution and activation function to obtain an importance mask.
[0068] The feature adjustment subunit 223 and the connection mask generation subunit 222 are used to enhance, weaken or not adjust the original features corresponding to the spatial patch for each spatial patch when the corresponding importance mask is positive, negative or zero, respectively, in order to obtain the adjusted features.
[0069] Specifically, in this embodiment, as Figure 2As shown, the operations in the image segmentation subunit 221, mask generation subunit 222, and feature adjustment subunit 223 are all implemented by the region importance module we introduced. Therefore, the specific operations in the aforementioned image adjustment module 2 are as follows:
[0070] First, the region importance module divides the original feature map after feature recognition of the sitting posture image into multiple spatial patches. It is easy to imagine that each spatial patch after segmentation corresponds to a part of the original features.
[0071] Next, for each spatial patch, an importance mask is obtained by processing the original features corresponding to the spatial patch. The processing procedure is as follows: First, the original features are processed using an operation called Depthwise Separable Convolution (DWConv). Then, the processed original features are processed by a hard sigmoid activation function (σ) to obtain the corresponding importance mask. The calculated importance mask can be positive, negative, or zero. The original features corresponding to the spatial patch are enhanced according to the importance mask. For example, if the importance mask is +0.2, the original features are enhanced by 20%; if the importance mask is -0.3, the original features are weakened by 30%; if the importance mask is zero, no adjustment is made.
[0072] Next, all spatial patches adjusted by the region importance module are stitched together to restore a complete image, and then fused with the original feature map processed by the SE module to obtain the adjusted image. The order of stitching and fusion can be changed without affecting the final result.
[0073] In a preferred embodiment of the present invention, the image adjustment module 2 further includes an image preprocessing unit 24 connected to the feature extraction unit 21, used to crop the sitting posture image to a preset image size to obtain the processed image as the sitting posture image.
[0074] Specifically, in this embodiment, the captured sitting image needs to be cropped to keep the person centered and remove unnecessary background to improve the efficiency of image adjustment and sitting posture recognition.
[0075] In a preferred embodiment of the present invention, such as Figure 1 As shown, the posture recognition module 3 includes:
[0076] Storage unit 31 is used to store multiple correct sitting posture labels;
[0077] The posture recognition unit 32 is connected to the storage unit 32. It is used to input the adjusted image into the pre-trained posture recognition model to identify the user's posture label in the posture image. When it is determined that the user's posture label is not the same as any correct posture label, the user is prompted to adjust their posture.
[0078] In a preferred embodiment of the present invention, the posture recognition module 3 further includes a model training unit 33 connected to the posture recognition unit 32, comprising:
[0079] The data acquisition subunit 331 is used to acquire several sample sitting posture images and associated sitting posture labels, and after cropping the images, generate a sample training set and a sample validation set. Then, all sample sitting posture images are flipped and added to the sample training set.
[0080] Training subunit 332 is connected to data acquisition subunit 331, which is used to build an initial recognition model and take the sitting posture images of each sample in the sample training set as input, and take the associated sitting posture label as the target output to train the initial recognition model and obtain the trained recognition model.
[0081] The optimization subunit 333 is connected to the training subunit 332. It is used to input each sample in the sample validation set into the sitting posture recognition model to obtain the validation label. The cross-entropy loss function is used to calculate the loss value between each validation label and the corresponding sample sitting posture label. After each validation, the trained recognition model is updated by the stochastic gradient descent optimization algorithm until the loss value no longer decreases to obtain the sitting posture recognition model.
[0082] Specifically, in this embodiment, when the number of obtained sample pose images is insufficient, all sample pose images are flipped and added to the sample training set to achieve data augmentation and increase the number of samples.
[0083] The posture recognition model needs to be trained, validated, and optimized. The cross-entropy loss function is used to monitor the loss value between the actual output and the target output of the model. Then, the stochastic gradient descent optimization algorithm is used to update the network weights and adjust the parameters of the posture recognition model to minimize the loss function.
[0084] The adjusted image from the aforementioned embodiment is input into the trained posture recognition model to obtain the corresponding user posture label. Based on the user posture label and the correct posture label, it is determined whether the user is in the correct posture, so as to remind the user to adjust their posture and prevent health problems caused by bad habits.
[0085] Furthermore, the training process can involve training the MobileNetV3-large model with embedded region importance modules and the posture recognition model together. Specifically, the input of the initial recognition model is connected to the output of the MobileNetV3-large model with embedded region importance modules. The posture images from each sample in the training set are used as the input of the MobileNetV3-large model with embedded region importance modules, and the associated posture labels are used as the target output of the initial recognition model. This achieves overall training of both models. Similarly, during optimization, the posture images from each sample in the validation set are used as the input of the MobileNetV3-large model with embedded region importance modules. After training, validation labels are identified, and the cross-entropy loss function is used to calculate the loss value between each validation label and the corresponding sample posture label. After each validation, the trained recognition model is updated using a stochastic gradient descent optimization algorithm until the loss value no longer decreases, thus obtaining the posture recognition model. This achieves overall optimization of both models, improving the accuracy and recognition performance of the entire process from capturing posture images to image adjustment to posture recognition.
[0086] This invention also provides a sitting posture recognition method that incorporates regional importance, applied to the aforementioned sitting posture recognition system, such as... Figure 3 As shown, it includes:
[0087] Step S1: The posture recognition system takes a picture of the user to obtain a posture image;
[0088] Step S2: The sitting posture recognition system performs feature recognition on the sitting posture image to obtain an original feature map associated with the original features. Then, multiple spatial patches are generated based on the original feature map. For each spatial patch, the regional importance of the spatial patch is evaluated based on the corresponding original features. Then, the corresponding original features of the spatial patch are adaptively adjusted based on the evaluation value. Finally, the adjusted spatial patches are stitched together to obtain the adjusted image.
[0089] Step S3: The posture recognition system performs posture recognition on the adjusted image and prompts the user to adjust their posture when it detects an incorrect posture.
[0090] In a preferred embodiment of the present invention, such as Figure 4 As shown, step S2 includes:
[0091] Step S21: The sitting posture recognition system extracts features from the sitting posture image to obtain an original feature map associated with the original features;
[0092] Step S22: The sitting posture recognition system divides the original feature map into spatial patches according to the preset patch size. Then, for each spatial patch, the system processes the original features corresponding to the spatial patch to obtain the corresponding importance mask as the evaluation value. Based on the value of the importance mask, the system adaptively adjusts the original features corresponding to the spatial patch to obtain the adjusted features.
[0093] Step S23: For each spatial patch, the posture recognition system adds the corresponding adjusted feature and the corresponding original feature to obtain the corresponding final feature, and then stitches all spatial patches together to obtain the adjusted image.
[0094] In a preferred embodiment of the present invention, such as Figure 5 As shown, step S22 includes:
[0095] Step S221: The sitting posture recognition system divides the original feature map into spatial patches according to the preset patch size;
[0096] Step S222: For each spatial patch, the posture recognition system obtains an importance mask by processing the corresponding original features through depthwise deviable convolution and activation function.
[0097] Step S223: For each spatial patch, the posture recognition system enhances, weakens, or does not adjust the original features corresponding to the spatial patch when the corresponding importance mask is positive, negative, or zero, respectively, to obtain the adjusted features.
[0098] In a preferred embodiment of the present invention, the posture recognition system stores multiple correct posture tags, then step S3 includes:
[0099] The posture recognition system inputs the adjusted image into a pre-trained posture recognition model to identify the user's posture label in the image and determines whether the user's posture label is the same as any correct posture label.
[0100] If so, return to step S1;
[0101] If not, prompt the user to adjust their sitting posture, and then return to step S1.
[0102] The above are merely preferred embodiments of the present invention and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should recognize that any equivalent substitutions and obvious changes made using the content of this specification and illustrations should be included within the protection scope of the present invention.
Claims
1. A posture recognition system that incorporates regional importance, characterized in that, include: The camera module is oriented towards the user and is used to take pictures of the user to obtain a seated image; An image adjustment module, connected to the camera module, is used to perform feature recognition on the seated image to obtain an original feature map associated with the original features. Then, multiple spatial patches are generated based on the original feature map. For each spatial patch, the regional importance of the spatial patch is evaluated based on the corresponding original features to obtain an evaluation value. Then, the corresponding original features of the spatial patch are adaptively adjusted based on the evaluation value. Finally, the adjusted spatial patches are stitched together to obtain the adjusted image. A posture recognition module, connected to the image adjustment module, is used to perform posture recognition on the adjusted image and prompt the user to adjust the posture when an incorrect posture is detected. The image adjustment module includes: The feature extraction unit is used to extract features from the sitting posture image to obtain the original feature map associated with the original features; The region adjustment unit, connected to the feature extraction unit, is used to divide the original feature map into spatial patches according to a preset patch size. Then, for each spatial patch, the corresponding importance mask is obtained as the evaluation value based on the original feature corresponding to the spatial patch. The original feature corresponding to the spatial patch is adjusted according to the value of the importance mask to obtain the adjusted feature. An image stitching unit, connected to the region adjustment unit, is used to fuse the corresponding adjusted feature and the corresponding original feature for each spatial patch to obtain the corresponding final feature, and then stitch all the spatial patches together to obtain the adjusted image; The region adjustment unit includes: The image segmentation subunit is used to segment the original feature map according to a preset patch size to obtain each spatial patch; A mask generation subunit, connected to the image segmentation subunit, is used to obtain the importance mask for each spatial patch by processing the corresponding original features through a depthwise deviable convolution operation and an activation function. The feature adjustment subunit, connected to the mask generation subunit, is used to adaptively adjust the original features corresponding to each spatial patch by enhancing, weakening, or not adjusting them when the corresponding importance mask is positive, negative, or zero, to obtain the adjusted features.
2. The posture recognition system according to claim 1, characterized in that, The image adjustment module further includes an image preprocessing unit connected to the feature extraction unit, used to crop the sitting posture image to a preset image size to obtain a processed image as the sitting posture image.
3. The posture recognition system according to claim 1, characterized in that, The posture recognition module includes: A storage unit for storing multiple correct sitting posture labels; A posture recognition unit, connected to the storage unit, is used to input the adjusted image into a pre-trained posture recognition model to identify the user's posture label in the posture image, and prompt the user to adjust their posture when it is determined that the user's posture label is not the same as any of the correct posture labels.
4. The posture recognition system according to claim 3, characterized in that, The posture recognition module further includes a model training unit, connected to the posture recognition unit, including: The data acquisition subunit is used to acquire several sample sitting posture images and associated sitting posture labels, and after cropping the images, generate a sample training set and a sample validation set. Then, all the sample sitting posture images are flipped and added to the sample training set. The training subunit, connected to the data acquisition subunit, is used to construct an initial recognition model and take the sitting posture images of each sample in the sample training set as input, and take the associated sitting posture label as the target output to train the initial recognition model to obtain the trained recognition model. An optimization subunit, connected to the training subunit, is used to input each of the samples in the sample validation set into the posture recognition model to obtain validation labels, calculate the loss value between each validation label and the corresponding sample posture label using the cross-entropy loss function, and update the trained recognition model after each validation using the stochastic gradient descent optimization algorithm until the loss value no longer decreases to obtain the posture recognition model.
5. A sitting posture recognition method that combines regional importance, characterized in that, The posture recognition system as described in any one of claims 1-4 includes: Step S1: The posture recognition system takes a picture of the user to obtain a posture image; Step S2: The sitting posture recognition system performs feature recognition on the sitting posture image to obtain an original feature map associated with the original features. Then, it generates multiple spatial patches based on the original feature map. For each spatial patch, it evaluates the regional importance of the spatial patch based on the corresponding original features. Then, it adaptively adjusts the corresponding original features of the spatial patch based on the evaluation value. Finally, it stitches the adjusted spatial patches together to obtain the adjusted image. Step S3: The posture recognition system performs posture recognition on the adjusted image and prompts the user to adjust their posture when an incorrect posture is detected. Step S2 includes: Step S21, the sitting posture recognition system extracts features from the sitting posture image to obtain the original feature map associated with the original features; Step S22: The sitting posture recognition system divides the original feature map into spatial patches according to a preset patch size. Then, for each spatial patch, the system processes the original feature corresponding to the spatial patch to obtain a corresponding importance mask as the evaluation value. The system then adaptively adjusts the original feature corresponding to the spatial patch according to the value of the importance mask to obtain the adjusted feature. Step S23: For each spatial patch, the posture recognition system adds the corresponding adjusted feature and the corresponding original feature to obtain the corresponding final feature, and then stitches all the spatial patches together to obtain the adjusted image; Step S22 includes: Step S221, the posture recognition system divides the original feature map into spatial patches according to a preset patch size; Step S222: For each spatial patch, the posture recognition system obtains the importance mask by processing the corresponding original features through a depthwise deviable convolution operation and an activation function. Step S223: For each spatial patch, the posture recognition system enhances, weakens, or does not adjust the original features corresponding to the spatial patch when the corresponding importance mask is positive, negative, or zero, respectively, to adaptively adjust and obtain the adjusted features.
6. The sitting posture recognition method according to claim 5, characterized in that, If the posture recognition system stores multiple correct posture labels, then step S3 includes: The posture recognition system inputs the adjusted image into a pre-trained posture recognition model to identify the user's posture label in the posture image and determines whether the user's posture label is the same as any of the correct posture labels: If so, return to step S1; If not, the user is prompted to adjust their sitting posture, and then the process returns to step S1.