System and method for automatically detecting abnormal dressing of teacher based on key points of human body
By adopting a detection model based on human key points in teacher abnormal dress detection, combined with YOLOv8 object detection and YOLOv8-Pose pose estimation technology, the problem of large calculation volume and overlapping part grouping in the existing technology is solved, and efficient and accurate Abnormal dress detection.
Patent Information
- Application Number
- CN202411544777.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art has problems with large amount of calculation and overlapping part grouping in teacher abnormal dress detection.
Using a detection model based on human key points, combined with YOLOv8 object detection and YOLOv8-Pose pose estimation technology, automatic detection of teachers' abnormal dress is achieved through self-trained network model and skin color segmentation model.
It improves the accuracy and efficiency of detection, reduces the cost of manual monitoring, is suitable for different types of teaching scenarios, and provides a scalable technology platform.
Smart Images

Figure CN119479012A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to but is not limited to the field of deep learning and image processing technology, and in particular relates to an automatic detection system and method for abnormal teacher clothing based on key points of the human body. Background Art
[0002] With the rise of computer vision technology, it has become a trend to detect teacher dress standards through visual technology. The present invention realizes automatic detection of abnormal teacher dress based on human key points. Currently, there are two mainstream methods for human key point detection, top-down and bottom-up. The top-down method first identifies all human body contours, and then performs single-person posture estimation. Common algorithms include HRNet, CPN, CPM, etc. The bottom-up method is the opposite of the top-down method. First, the human body key points are detected, the features of the key points are extracted, and the candidate key points are predicted. Then the candidate key points are grouped. Common algorithms include OpenPose, Hourglass and HigherHRNet, etc. When using the top-down method, the more targets there are, the greater the amount of calculation. Although the bottom-up method is independent of the number of people and has a faster detection speed, if there are overlapping parts between people, it becomes more difficult to predict the grouping after the candidate key points.
[0003] As a new type of joint detection method without heat map, YOLO-Pose combines the advantages of top-down and bottom-up human posture estimation algorithms, so that each detected bounding box has a posture associated with it, and no additional steps are required to combine key points into a skeleton, eliminating the post-processing operations of the bottom-up method. Therefore, YOLO-Pose can complete the positioning and posture estimation of all people with only one forward pass. Taking into account the actual scenario of the present invention, the classroom teaching environment generally has only one teacher teaching, and the present invention has certain requirements on the computational efficiency of key point positioning, so the present invention uses the YOLO-Pose human posture estimation algorithm.
[0004] The human body detector of the present invention uses a high-precision YOLOv8 model, which is used to detect the human body target frame and provide it to the subsequent key point detection model. The key point detection model uses the YOLOv8-Pose model to obtain the teacher's human body key points. Then, the skin color segmentation information is obtained in the HSV color space, and the key parts such as the human body limbs are sampled at intervals, and the skin color information is combined to make a judgment, so as to effectively detect whether the teacher's dress meets the standard.
[0005] In view of the above analysis, the technical problems that need to be solved urgently in the prior art are:
[0006] When using the top-down approach, the more targets there are, the greater the amount of calculation; when using the bottom-up approach, if there is overlap between people, it becomes more difficult to predict the grouping after the candidate key points. Summary of the invention
[0007] In view of the problems existing in the prior art, the present invention provides a model and method for automatically detecting abnormal teacher clothing based on key points of the human body.
[0008] The present invention is implemented as follows: a model for automatically detecting abnormal teacher clothing based on key points of the human body, characterized in that the model for automatically detecting abnormal teacher clothing based on key points of the human body includes the following two models:
[0009] Self-trained YOLOv8 target detection network model: Use a large number of images with teachers and students in teaching scenarios as a data set, mark the position of the teacher on each image, and use the marked labels to train and tune the YOLOv8 target detection network model so that the model can detect the teacher in the image or video;
[0010] Skin color segmentation model: 1,000 skin color area blocks were manually captured from multiple teaching videos, mainly the skin color areas of the teacher's face, neck, arms, legs and other parts. By analyzing the histogram of skin color pixels on the chroma (H) component and saturation (S) component in the HSV color space, the skin color threshold suitable for the teacher in the teaching scenario was selected;
[0011] The automatic detection model for abnormal teacher clothing based on human body key points uses a self-trained YOLOv8 target detection network model and a YOLOv8-Pose model to obtain the teacher's position and human body key points in the video, obtains valid frames and saves them as jpg format files for subsequent detection, segments the color of the image in the HSV space to obtain skin color segmentation information, then performs interval sampling on the human limbs, and makes judgments based on the skin color information.
[0012] Another object of the present invention is to provide a method for automatically detecting abnormal teacher clothing based on key points of the human body, the steps comprising:
[0013] S1: Review several papers related to teacher dress code and determine the indicators of teacher dress code requirements;
[0014] S2: Use YOLOv8 target detection to train a network model that can identify teachers in teaching scenarios;
[0015] S3: Use the YOLOv8-Pose model to estimate the posture of the teacher target frame obtained by traversing each frame of the video in S2, obtain the coordinates of all the key points of the teacher, and then convert the coordinates of the key points to the original video;
[0016] S4: traverse each frame of the video until a valid frame is selected and saved as a jpg file for subsequent detection;
[0017] S5: Manually capture 1000 skin color area blocks from multiple teaching videos, and select the skin color threshold suitable for teachers in teaching scenarios by analyzing the histogram of skin color pixels on the chroma (H) component and saturation (S) component in the HSV color space;
[0018] S6: sampling the area of interest at equal intervals, comparing the sampling points with the skin color segmentation mask map at the corresponding position and counting which points are detected as abnormal;
[0019] S7: Verify the authenticity and accuracy of the model results.
[0020] Furthermore, S1 defines abnormal teacher attire as bare shoulders, bare thighs, bare armpits, and bare navel.
[0021] Furthermore, S2 collects a large number of images with teachers and students in teaching scenes as a data set, and marks the teacher's position on each image, uses the marked labels to train and tune the YOLOv8 target detection network model so that the model can detect the teacher in the video, and then traverses each frame of the video to obtain the coordinate information of the teacher's target box and the lower left corner of the target box for subsequent use.
[0022] Furthermore, S3 only requires posture estimation for the teacher and does not involve the students.
[0023] Furthermore, the S4 extracts valid frames from the video based on the screening criteria of no obstacles on the teacher's body and occlusion of hands and forearms.
[0024] Furthermore, the S5 manually captures 1,000 skin color area blocks from multiple teaching videos, mainly capturing skin color areas of the teacher's face, neck, arms, legs and other parts.
[0025] Furthermore, S7 collects the teacher's clothing information in the actual teaching scene as a test set for the algorithm. The data set contains the teacher's clothing information in different postures and positions. The data set has a total of 1,000 pictures, including 414 normal clothing pictures and 586 abnormal clothing pictures. The data set is manually marked, and then the model detection results are compared with the manual detection results.
[0026] In combination with the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solutions to be protected by the present invention are as follows:
[0027] First, by utilizing YOLOv8 target detection and posture estimation technology, the present invention can accurately and efficiently extract the teacher's body key points, which not only provides accurate basic data for subsequent skin color segmentation and anomaly detection, but also greatly improves the speed and accuracy of the entire processing flow.
[0028] According to the number of key points exposed by the teacher and the positional relationship between the arm and the shoulder, the present invention can automatically filter out valid frames from the video. This step effectively reduces the interference of irrelevant factors and improves the overall processing efficiency and accuracy.
[0029] By manually intercepting skin color blocks and analyzing their histograms on the chroma (H) component and saturation (S) component in the HSV color space, the present invention can select the skin color threshold that is most suitable for the actual application scenario. This adaptive skin color segmentation method enables the algorithm to maintain a good segmentation effect under different lighting conditions and skin color differences, thereby enhancing the practicability of the algorithm.
[0030] By sampling the focus area at equal intervals and comparing it with the skin color segmentation mask image at the corresponding position, the present invention improves the accuracy of detection and also makes the algorithm have a certain robustness when facing complex scenes.
[0031] The automatic detection method for abnormal teacher clothing based on human body key points proposed in the present invention can also be extended to other fields that require human posture recognition and skin color segmentation.
[0032] Second, the present invention provides an automatic detection method for abnormal teacher dressing based on human key points. By combining the YOLOv8 target detection network and the YOLOv8-Pose posture estimation model, it can efficiently and accurately detect abnormal teacher dressing behavior in teaching scenarios. The method steps cover the entire process from data collection, model training, posture estimation, valid frame extraction, skin color threshold determination, anomaly detection to model verification, ensuring the reliability and accuracy of the detection results.
[0033] Step S1 clarifies the norms and abnormal standards of teachers' attire by consulting relevant literature, providing clear technical indicators for subsequent testing.
[0034] Step S2 uses the YOLOv8 target detection model training to ensure that the teacher position in the video can be accurately identified, laying the foundation for posture estimation and anomaly detection.
[0035] Step S3 obtains the key point coordinates of the teacher through the posture estimation model to assist in subsequent abnormal clothing detection and improve the accuracy of detection.
[0036] Step S4 selects valid frames without obstacle occlusion to ensure the clarity and accuracy of the detection data.
[0037] Step S5 determines the skin color threshold suitable for the teacher in the teaching scenario by analyzing the skin color area block, thereby improving the accuracy of skin color segmentation.
[0038] Step S6 combines skin color information and human body key points to perform detailed detection of the teacher's clothing and accurately identify abnormal dressing behavior.
[0039] Step S7 ensures the authenticity and reliability of the model detection results through verification of actual scene data, thereby improving the practicality and credibility of the system.
[0040] The automatic detection method for abnormal teacher clothing based on key points of the human body of the present invention has the following significant technical effects in industrial applications:
[0041] 1. Improve detection accuracy and efficiency:
[0042] By combining the YOLOv8 target detection and YOLOv8-Pose posture estimation model, the teacher's position and key points of the human body can be accurately identified, significantly improving the accuracy of abnormal clothing detection. At the same time, the automated detection process greatly improves the detection efficiency and adapts to the real-time processing needs of large-scale video data.
[0043] 2. Enhance the robustness of the system:
[0044] Through skin color segmentation model and key point sampling, the system can operate stably under a variety of lighting and background conditions, reduce false detection and missed detection, and improve the robustness and adaptability of the system in complex teaching environments.
[0045] 3. Reduce manual monitoring costs:
[0046] The automated detection method reduces the reliance on manual monitoring and reduces labor costs, while improving the real-time and continuity of monitoring, making it suitable for the management needs of large-scale educational institutions.
[0047] 4. Support diverse teaching scenarios:
[0048] This method is suitable for different types of teaching scenarios, including traditional classrooms, online teaching, etc. It has broad application prospects and flexible adaptability, and can meet the security monitoring needs in different educational environments.
[0049] 5. Provide a scalable technology platform:
[0050] This detection method can be used as a core component of the smart campus security management system, supporting integration with other security monitoring systems to achieve comprehensive education environment security management and improve the overall education quality and safety level.
[0051] Through the above technical scheme, the present invention effectively solves the problems in the prior art that the detection of abnormal teacher dress relies on manual monitoring, is inefficient, and has low accuracy, and significantly improves the intelligence and automation level of teacher dress management, which has important industrial application value and promotion prospects.
[0052] Third, the expected benefits and commercial value of the technical solution of the present invention after transformation are: the technology can be embedded in existing education management software or platforms and sold as an additional module. Educational institutions or platforms can obtain the service through subscription or one-time purchase, increasing the revenue source of software manufacturers.
[0053] a. Subscription model benefits
[0054] Assume subscription pricing: The annual subscription fee for each school is RMB 10,000, and the specific pricing depends on the school size and functional requirements. Assume that in the first year of promotion, the technology covers 50 schools. The first year revenue of the subscription model: 50 schools × RMB 10,000 / year = RMB 500,000.
[0055] b. One-time purchase model benefits
[0056] Assume one-time purchase pricing: the one-time purchase price for each school is RMB 25,000 (subsequent maintenance costs are free). If 30 schools choose the one-time purchase model during the initial market promotion, the first-year income from the one-time purchase is: 30 schools × RMB 25,000 = RMB 750,000.
[0057] In addition to being an additional module for education management software, the commercial value of this invention can also be integrated into classroom monitoring equipment to form a "software and hardware combination" intelligent monitoring solution. This combination of software and hardware can be sold to educational institutions or schools as an independent solution. In addition, this technology can be promoted through cooperation with existing education technology companies and integrated into existing online classroom platforms and management systems, further expanding the application scenarios and market scope of the technology.
[0058] The technical solution of the present invention overcomes technical bias: previous technologies often only focus on the color or type of clothing, ignoring the relationship between human posture and clothing. This solution combines human key point information and skin color segmentation to comprehensively judge abnormal clothing from multiple dimensions, overcomes the limitations of clothing detection from a single perspective, and makes clothing detection more accurate, comprehensive and practical. Human key point information can accurately capture the wearer's posture and movement, while skin color segmentation can help identify the boundary between clothing and skin, and whether clothing covers the parts that should be covered. The combination of the two enables the system to more comprehensively evaluate the appropriateness of clothing.
[0059] Fourth, the blockchain smart medical Internet of Things authentication system resistant to cloud leakage attacks proposed in the present invention effectively solves many technical problems in the existing technology in industrial applications, and has achieved significant technical progress in data security, privacy protection, and system efficiency.
[0060] 1. Technical problems solved
[0061] Data leakage and privacy protection issues: The traditional smart medical IoT architecture is extremely vulnerable to attacks because data is mainly processed in the cloud, leading to the leakage of sensitive medical data. However, this invention uses blockchain and fog computing technology to distribute data and authentication processes in different fog nodes to prevent the leakage of information in the entire network caused by the loss of a single node.
[0062] Identity authentication and key management challenges: In the existing technology, identity authentication between medical IoT devices relies on a centralized authentication server, which has single point failure and complex management problems. This invention implements distributed authentication through decentralized blockchain storage, combined with key management based on elliptic curve encryption, which greatly simplifies the identity authentication process and improves security.
[0063] Insufficient anti-attack capability: The existing IoT system is weak in resisting data theft and cloud attacks, especially in the authentication link between devices and the cloud, which is subject to the risk of being attacked by a man-in-the-middle or data leakage after the cloud is compromised. The authentication mechanism proposed in this invention improves the anti-attack capability of the entire system through authentication and key negotiation between fog nodes and cloud servers, especially in resisting cloud-fog leakage attacks.
[0064] 2. Technological advancement
[0065] Improved distributed security: The system uses blockchain technology to record the public key and pseudo-identity of the registered authority in the blockchain, ensuring the security and non-tamperability of key authentication information. In addition, the system performs identity authentication and key negotiation in the fog computing node, avoiding the centralized risk of the cloud and ensuring the distributed security of the system.
[0066] Efficiency optimization and anti-attack enhancement: Through the PoS consensus mechanism, the system can effectively select the registration authority node, realize fast initialization and authentication, and reduce the computing overhead caused by the consensus mechanism. At the same time, the system uses elliptic curve encryption to improve the computing efficiency and security of the key, and effectively deal with the risk of data leakage in cloud fog attack scenarios.
[0067] Privacy protection and data security: This invention designs a method for generating and storing pseudo identities of registration authorities. The pseudo identities are generated through a one-way hash function, so that the real identities are not directly exposed in the blockchain, thus avoiding the leakage of sensitive information. In addition, data access rights are controlled by only registering blocks accessible by the authority on the blockchain, further enhancing the privacy protection of data.
[0068] 3. Significant progress in industrial applications
[0069] Enhanced secure transmission and access to smart medical data: The authentication system proposed in this invention is particularly suitable for the transmission and access of sensitive data involved in the field of smart medicine, such as patients' personal health data, diagnostic records, etc. This secure authentication system can significantly reduce the risk of data leakage in the medical Internet of Things industry and improve the trust and security of data interaction.
[0070] Scalability and reliability: Through the combination of blockchain and fog computing, the present invention builds a scalable distributed authentication system that supports identity authentication and secure communication between different medical devices and servers, reduces the maintenance cost of the system, and has good expansion potential.
[0071] In summary, this technical solution effectively solves the security and privacy issues of existing technologies through the innovative combination of blockchain and fog computing in the smart medical Internet of Things system, and significantly improves the system's anti-attack capabilities and operating efficiency, and has broad industrial application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 It is a schematic diagram of the overall process of the automatic detection model of abnormal teacher clothing based on key points of the human body provided by an embodiment of the present invention;
[0073] Figure 2 is a schematic diagram of a manually captured skin color area provided by an embodiment of the present invention;
[0074] Figure 3 is a histogram of skin color pixels with respect to H and S components provided by an embodiment of the present invention;
[0075] Figure 4 is a skin color segmentation effect diagram in the HSV color space provided by an embodiment of the present invention;
[0076] Figure 5 This is a schematic diagram of interval sampling of the teacher's attention area provided by an embodiment of the present invention;
[0077] Figure 6 The body regions of the teacher and the corresponding detection results provided by the embodiment of the present invention;
[0078] Figure 7This is a diagram showing the qualified results of the system detection provided by an embodiment of the present invention;
[0079] Figure 8 It is a rendering showing an unqualified system detection result provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0080] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0081] The blockchain smart medical Internet of Things authentication system resistant to cloud leakage attacks provided by the present invention comprises:
[0082] The initialization module is configured to select a registration authority through the PoS (Proof of Stake) consensus mechanism to initialize the smart medical Internet of Things system;
[0083] A registration module, configured to register all deployed medical devices, fog nodes, and cloud servers in the Internet of Things in a secure environment;
[0084] The authentication module is configured to respectively implement identity authentication between the medical device and the fog node, and between the fog node and the cloud server, and negotiate keys to ensure secure communication between them.
[0085] The initialization module further includes:
[0086] The elliptic curve selection submodule is used to select a non-singular elliptic curve, which is defined on a finite field consisting of a large prime number (the size is at least greater than 512 bits);
[0087] A key generation submodule, for selecting a base point on the elliptic curve and generating a unique identity of a registration authority, a system private key and a corresponding public key;
[0088] A hash calculation submodule, which is used to select a one-way cryptographic hash function and calculate the pseudo-identity of the registration authority;
[0089] The blockchain storage submodule is used to add the public key and pseudo identity of the registration authority to the blockchain, set blocks that are only accessible to the registration authority, and publish relevant parameters in the network.
[0090] The registration module further includes:
[0091] The medical device registration submodule is used to select a unique real identity and corresponding temporary identity for each deployed medical device, calculate its pseudo-random identity, public-private key pair, and load credentials for it before entering the network;
[0092] The fog node registration submodule is used to select a unique identity and a temporary identity for each fog node, calculate its pseudo-random identity, public and private key pair, generate a t-degree binary symmetric polynomial and calculate the polynomial share, store the registration credentials and publish the relevant parameters to the blockchain;
[0093] The cloud server registration submodule is used to select a unique identity for each cloud server, calculate its pseudo-random identity, public-private key pair, generate a t-degree binary symmetric polynomial and calculate the polynomial share, store the registration credentials and disclose the relevant parameters to the blockchain.
[0094] The blockchain smart medical IoT authentication system that resists cloud and fog leakage attacks uses blockchain and fog computing technologies, combined with the PoS consensus mechanism to protect data privacy and communication security in the smart medical IoT environment. The core of the system is to establish identity authentication and key negotiation for medical devices, fog nodes and cloud servers in a distributed and secure manner through initialization, registration and authentication modules to ensure the communication security between them.
[0095] First, the initialization module selects a registration authority through the PoS consensus mechanism, which will be responsible for the initialization of the smart medical IoT system. The nodes selected by the PoS consensus mechanism can not only effectively prevent malicious attacks, but also save computing resources. The registration authority is responsible for the basic security configuration and identity generation of the system, which is the starting point of the entire system and ensures that all subsequent devices and nodes are in a trusted network environment.
[0096] Secondly, in the initialization module, the elliptic curve selection submodule selects a non-singular elliptic curve defined over a large prime finite field. This elliptic curve selection has high computational security and can ensure that the key generated by the system is difficult to crack through reverse engineering, thus providing the system with anti-attack capabilities.
[0097] The key generation submodule selects base points on the elliptic curve to generate the unique identity of the registration authority and the corresponding public-private key pair. The system private key is used for internal security operations of the registration authority, while the public key is used for interaction with other devices and nodes to facilitate authentication and encrypted data transmission. The generated unique identity and key pair improve the system's tamper-proof capabilities and ensure that the registration authority has a unique authentication identity throughout the system.
[0098] The hash calculation submodule generates a pseudo-identity for the registration authority. This process uses a one-way hash encryption function to ensure that the generated pseudo-identity cannot be reversed to the real identity. Through the hash pseudo-identity, the system can hide the real identity information of the registration authority during the authentication process, further enhancing the privacy protection of the system.
[0099] Finally, the blockchain storage submodule stores the public key and pseudo-identity of the registration authority on the blockchain. To further improve security, the blockchain sets up blocks that can only be accessed by the registration authority, which ensures the safe storage of key parameters and provides a secure public key access mechanism for other nodes and devices in the entire network. This not only avoids single points of failure, but also ensures the distributed trustworthiness of authentication and communication.
[0100] The blockchain smart medical Internet of Things authentication system that is resistant to cloud and fog leakage attacks provided by the present invention ensures secure communication between medical devices, fog nodes and cloud servers in the smart medical Internet of Things environment through three main modules: initialization, registration and authentication. The system adopts the PoS consensus mechanism to elect registration authorities, uses blockchain technology to record and manage device identity information, and combines multiple encryption and authentication technologies to significantly improve data security and system protection capabilities.
[0101] The initialization module ensures the identity of the registration authority and the security foundation of the system by selecting a highly secure elliptic curve and generating a unique key pair. The use of a one-way hash function to generate a pseudo identity enhances the anonymity and tamper resistance of the system.
[0102] The registration module assigns unique identities and temporary identities to medical devices, fog nodes and cloud servers respectively through a hierarchical registration method, and uses polynomial secret sharing technology to improve the system's fault tolerance and data security.
[0103] The authentication module ensures the communication security between nodes through multi-step identity authentication and key negotiation to prevent unauthorized access and data leakage.
[0104] The blockchain smart medical IoT authentication system of the present invention has the following significant technical effects in industrial applications:
[0105] 1. Enhanced data security: Through blockchain technology and multi-level identity authentication mechanisms, the communication security between medical devices, fog nodes and cloud servers is ensured to prevent data leakage and illegal access.
[0106] 2. Improve system stability and reliability: Use the PoS consensus mechanism to elect registration authorities to ensure the stability and reliability of the system in the face of malicious attacks, while improving the system's fault tolerance through polynomial secret sharing technology.
[0107] 3. Real-time risk monitoring and dynamic adjustment: Combined with machine learning algorithms, the system can monitor data usage behavior in real time, dynamically evaluate and adjust data security levels, and improve the system's response speed and protection capabilities.
[0108] 4. Simplify the management process: The system automates the registration and authentication process, reduces manual intervention, improves management efficiency, and adapts to the needs of large-scale smart medical Internet of Things environments.
[0109] 5. Strong adaptability and wide application: The system is not only suitable for smart medical IoT environments, but can also be expanded to other IoT application scenarios that require high-security authentication, and has broad application prospects and market value.
[0110] Through the above technical solutions, the present invention effectively solves the deficiencies of data security management and identity authentication in the smart medical Internet of Things environment in the prior art, significantly improves the overall security and operating efficiency of the system, and has significant industrial application value and promotion prospects.
[0111] The embodiment of the present invention provides an automatic detection model for abnormal teacher clothing based on key points of the human body, including the following two models:
[0112] 1. Self-trained YOLOv8 target detection network model: Use a large number of images with teachers and students in teaching scenarios as the data set, mark the teacher's position on each image, and use the marked labels to train and tune the YOLOv8 target detection network model so that the model can detect teachers in images or videos.
[0113] 2. Skin color segmentation model: 1,000 skin color area blocks were manually captured from multiple teaching videos, mainly the skin color areas of the teacher's face, neck, arms, legs and other parts. By analyzing the histogram of skin color pixels on the chroma (H) component and saturation (S) component in the HSV color space, the skin color threshold suitable for the teacher in the teaching scenario was selected.
[0114] The deep learning technology uses the self-trained YOLOv8 target detection network model and the YOLOv8-Pose model to obtain the position of the teacher and the key points of the human body in the video, obtains the valid frame and saves it as a jpg format file for subsequent detection, segments the color of the image in the HSV space, obtains skin color segmentation information, and then performs interval sampling on the human limbs and makes judgments in combination with the skin color information.
[0115] like Figure 1 As shown, an embodiment of the present invention provides an automatic detection method for abnormal teacher clothing based on key points of the human body, the steps comprising:
[0116] S1: Review several papers related to teacher dress code and determine the indicators of teacher dress code requirements;
[0117] S2: Use YOLOv8 target detection to train a network model that can identify teachers in teaching scenarios;
[0118] S3: Use the YOLOv8-Pose model to estimate the posture of the teacher target frame obtained by traversing each frame of the video in S2, obtain the coordinates of all the key points of the teacher, and then convert the coordinates of the key points to the original video;
[0119] S4: traverse each frame of the video until a valid frame is selected and saved as a jpg file for subsequent detection;
[0120] S5: Manually capture 1000 skin color area blocks from multiple teaching videos, and select the skin color threshold suitable for teachers in teaching scenarios by analyzing the histogram of skin color pixels on the chroma (H) component and saturation (S) component in the HSV color space;
[0121] S6: sampling the area of interest at equal intervals, comparing the sampling points with the skin color segmentation mask map at the corresponding position and counting which points are detected as abnormal;
[0122] S7: Verify the authenticity and accuracy of the model results.
[0123] Teachers are engaged in a special kind of labor, and teachers' appearance has a more obvious educational function. In the book "ABC of Teachers' Posts - A Brief Discussion on the Dress and Behavior of Class Teachers", the importance of teachers' dress is clearly pointed out. The book believes that teachers' dress should be in line with the characteristics of the times and in season, and should be neat and generous, decent and elegant. At the same time, the dress should avoid being too exposed, such as not showing shoulders, thighs, armpits, and navels, so as not to mislead students unnecessarily. Hegel said: "Teachers are the most perfect idols in children's hearts." Young students, especially children, have strong plasticity, are full of imitation, and are curious, so they often like to imitate teachers' dress, speech and behavior. If teachers' dress is too revealing or avant-garde, it will convey a wrong aesthetic concept to students, making them mistakenly believe that "sexy" is beauty. This misleading is not only not conducive to students forming a correct aesthetic concept, but also has a profound negative impact on their physical and mental health. For underage students, this impact is even more serious because their minds are not yet fully mature and they lack sufficient judgment and self-control. In such a case, overly revealing clothing will distract their attention and prevent them from focusing on the classroom content, which will in turn affect the learning effect and teaching quality. Based on the above, S1 defines abnormal teacher clothing as exposed shoulders, exposed thighs, exposed armpits, and exposed navels.
[0124] The S2 uses YOLOv8 target detection to train a network model that can identify teachers in teaching scenarios. YOLOv8 consists of three parts: the trunk, the neck, and the head. The overall structure is similar to YOLOv5. However, the trunk and the neck refer to the ELAN structural design concept of YOLOv7, and the C3 module in YOLOv5 is replaced by the C2f structure with richer gradient flow, which enhances the feature fusion ability of the convolutional neural network and realizes the lightweight of the network compared with YOLOv5. The head of YOLOv8 has been greatly changed compared with YOLOv5, and has been replaced with the current mainstream decoupling head structure, separating the classification and detection heads, and replacing Anchor-Base with Anchor-Free. In terms of the calculation of the loss function, YOLOv8 abandons the IOU matching or unilateral ratio allocation method, uses the TaskAlignedAssigner positive sample allocation strategy, and introduces DistributionFocalLoss. A large number of images with teachers and students in teaching scenes are collected as data sets, and the teacher's position is marked on each image. The marked labels are used to train and tune the YOLOv8 target detection network model so that the model can detect the teacher in the video. Then, each frame of the video is traversed to obtain the coordinate information of the teacher's target frame and the lower left corner of the target frame for subsequent use.
[0125] The S3 only requires posture estimation for the teacher and does not involve the students.
[0126] In the above S4, in order to avoid errors in the experiment caused by occlusion of the teacher's body, the present invention designs a set of effective frame screening mechanisms, and extracts effective frames from the video based on the screening criteria of no obstacles on the teacher's body and occlusion of hands and forearms.
[0127] (1) No obstacles. If there are no obstacles in front of the teacher, it means that all the key points of the teacher can be detected. The YOLOv8-Pose model detects that the total number of key points of a single person is 17. After blocking the 5 key points of the teacher's head, if the total number of key points of the teacher is 12, it is determined that the key parts of the teacher's body are not blocked.
[0128] (2) The detected area is not blocked by hands and forearms. Since the teacher's hands and forearms are not required to be covered by clothes, the exposed skin of the hands and forearms will cover the area to be detected, so that the covered area is judged as abnormal. If the teacher's left and right hands are on both sides of the left and right shoulders, then the detected area will basically not be blocked by hands / arms. The present invention uses prior knowledge to infer the hand area. The hand area is an extension of the arm area. Generally, the length of the hand is proportional to the length of the arm. At the same time, the hand area can be represented by a circle, so you only need to determine the center position and radius to determine the hand area. The other two points of the arm, the elbow and wrist, are (x1, y1) and (x2, y2), respectively, and the center of the hand circle (x h ,y h ), the radius is r, and the corresponding relationship is as follows:
[0129] x h =x2+0.3*(x2-x1)y h =y2+0.3*(y2-y1)
[0130]
[0131] When the left-hand horizontal coordinate (x l ), right-hand horizontal coordinate (x r ) and the left shoulder horizontal coordinate (x left shoulder )、right shoulder horizontal coordinate (x right shoulder ) satisfies the following conditions, it can be proved that the left and right hands are on both sides of the left and right shoulders. l and r r are the radii of the left and right hand circles respectively.
[0132] x l -r l >x left shoulder
[0133] x r +r r <x right shoulder
[0134] S5, there are many color spaces commonly used in computer image processing. Since skin color is more sensitive to the H (hue) component of the HSV space, and compared with color spaces such as RGB, YCrCb, etc., the HSV color model is closer to human perception of color, so the present invention uses the HSV color model as the feature space for skin color classification. HSV is a relatively intuitive color space that uses three components of hue, saturation, and brightness to represent images, which is closer to the way humans perceive color than the RGB color space. The HSV color space is a nonlinear transformation of the RGB color space, and its specific algorithm flow is as follows:
[0135] (1) Normalize the R, G, and B values in the RGB color space. The normalization formula is as follows:
[0136]
[0137] (2) Calculate the value of V in the HSV color space, which is determined by the following formula
[0138] V = max(R, G, B) (2)
[0139] (3) Determine the value of S in the HSV color space. The formula is as follows:
[0140]
[0141] (4) Determine the value of H. Before determining the value of H, we need to determine a difference σ. The calculation formula of σ is as follows:
[0142] σ=V-min(R,G,B) (4)
[0143] The value of H can be determined by σ calculated from formula (4):
[0144]
[0145] The present invention manually captured 1000 skin color area blocks from multiple teaching videos, mainly capturing the skin color areas of the teacher's face, neck, arms, legs and other parts. Figure 2 As shown. By calculating the histogram of the image on the chroma (H) component and saturation (S) component in the HSV color space, as Figure 3 As shown in the figure, skin color pixels have good clustering characteristics in H and S components. Since the skin color area is captured under normal lighting, it can well reflect the distribution characteristics of skin color pixels. By analyzing the histogram of skin color pixels in different components, the threshold is taken as 0.03≤H≤0.1, 0.2≤S≤0.6. The skin color segmentation effect is shown in the figure Figure 4 As shown in the figure, the white area in the segmentation image is the skin, and the black area is other areas. Although the algorithm considers a small amount of background areas with similar colors as skin color areas in the second experimental result, it will not have a significant impact as long as the previous stage human key points are accurately located.
[0146] In S6, the limbs can be located through the previous human key points, but only the shoulders, hips, and knees can be located through the key points. The areas that need to be paid attention to in the dress code detection are the upper body (shoulders to hips, hips to hips) and thigh areas of the teacher, which are in the middle of the line connecting the relevant key points. In order to judge the area of interest and make the algorithm have a certain robustness, the present invention performs equal-interval sampling on the area of interest.
[0147] like Figure 5As shown in the figure, the number of interval sampling points added in the upper body (shoulder to hip, hip to hip) is 4, and the rest are 3, and the four key points of left and right shoulders and left and right hips are also used as sampling points. Normal points are marked in green, and abnormal points are marked in red. If there is one abnormal point, it is judged that the dress in this area is abnormal. From the figure, it can be seen that this method can distinguish between abnormal dress and normal areas.
[0148] In S7, since there is no public dress code detection data set, the present invention collects teachers' dressing conditions in actual teaching scenes as a test set for the algorithm of the present invention. The data set contains the teachers' dressing information in different postures and positions. The data set contains a total of 1,000 pictures, including 414 pictures of normal dress and 586 pictures of abnormal dress. The data set is manually marked, and then the model detection results are compared with the manual detection results.
[0149] The embodiment of the present invention firstly uses YOLOv8 target detection and posture estimation to extract the teacher's body key points based on the existing teaching video, and selects valid frames from the video for subsequent detection according to the number of key points exposed by the teacher and the positional relationship between the arm and the shoulder. In order to ensure that the skin color segmentation in the HSV color space is more suitable for teachers in teaching scenarios, the skin color blocks are manually intercepted and the histograms of the skin color pixels on the chroma (H) component and the saturation (S) component in the HSV color space are analyzed to select the skin color threshold that is most suitable for the actual application scenario of the present invention. In order to judge the area of interest and make the algorithm have a certain robustness, the present invention samples the area of interest at equal intervals, and the sampling points are compared with the skin color segmentation mask map of the corresponding position and statistics are counted which points are detected as abnormal.
[0150] In some educational institutions or platforms, teachers will record a large number of course videos as teaching materials. Before publishing these videos, the platform needs to ensure that the video content is compliant, especially the teacher's dress. In order to avoid the high cost and low efficiency of manually reviewing each video, the automatic detection technology of abnormal teacher dress based on human key points can be applied to the batch detection of the platform's teacher video library. The system automatically processes the videos in the teacher video library and batch analyzes the teacher's dress in each video. When the system detects that the teacher's dress does not comply with the regulations, in addition to outputting screenshots of abnormal dress, it will also automatically mark the abnormal position. For example, the system will mark the parts of the teacher's dress that are abnormal (such as shoulders, thighs, etc.) to clearly show the parts that do not comply with the regulations. This visual detection result greatly improves the efficiency of the review, allowing auditors to quickly determine whether the video needs to be modified or re-recorded, and improves the efficiency of content management.
[0151] The embodiment of the present invention uses a self-built video dataset to prove the effectiveness of the method. The dataset contains the teacher's clothing information in different postures and positions. The dataset contains a total of 1,000 pictures, including 414 pictures of normal clothing and 586 pictures of abnormal clothing.
[0152] The algorithm was tested on a self-built data set and the results were compared with the labeled results. The experiment tested the shoulder to hip, hip to hip, thigh, and whole body areas. The test results are as follows: Figure 6 As shown, it can be seen that the average accuracy of the model is 85%.
[0153] The present invention proposes a detection method based on human key points and skin color segmentation for detecting abnormal teacher clothing in teaching scenarios, which effectively detects abnormal teacher clothing, helps teachers adjust their clothing, and thus helps students form correct aesthetic views. The method of the present invention does not rely on data sets and has high accuracy, with an accuracy rate of 85% on self-built data sets.
[0154] The software simulation effect of the present invention:
[0155] If the user uploads a video, the system will select a frame of the video for analysis (the selection condition is that the teacher's body is not blocked). If the teacher is dressed normally, the system will judge that the detection is qualified. Figure 7 The "Qualified" message will be displayed on the right side of the page.
[0156] If the user uploads a picture, the system will directly analyze the picture. Once the system detects that the teacher's clothing does not meet the requirements, the system will mark the non-compliant areas with a striking red circle, such as Figure 8 , so that users can intuitively find the problem. This intuitive feedback method not only improves the user experience, but also ensures that problems can be quickly discovered and corrected.
[0157] It should be noted that the embodiments of the present invention can be implemented by hardware, software, or a combination of software and hardware. The hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. It can be understood by a person of ordinary skill in the art that the above-mentioned devices and methods can be implemented using computer executable instructions and / or contained in a processor control code, such as a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. Such code is provided on the carrier medium. The device and its modules of the present invention can be implemented by hardware circuits such as very large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above-mentioned hardware circuits and software, such as firmware.
[0158] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.
Claims
1. A blockchain smart medical Internet of Things authentication system that resists cloud leakage attacks, characterized in that: The system includes: The initialization module is configured to select a registration authority through the PoS consensus mechanism to initialize the smart medical Internet of Things system; A registration module, configured to register all deployed medical devices, fog nodes, and cloud servers in the Internet of Things in a secure environment; The authentication module is configured to respectively implement identity authentication between the medical device and the fog node, and between the fog node and the cloud server, and negotiate keys to ensure secure communication between them.
2. The blockchain smart medical Internet of Things authentication system against cloud leakage attacks as claimed in claim 1 is characterized in that: The initialization module further comprises: The elliptic curve selection submodule is used to select a non-singular elliptic curve defined over a finite field consisting of a large prime number; A key generation submodule, for selecting a base point on the elliptic curve and generating a unique identity of a registration authority, a system private key and a corresponding public key; A hash calculation submodule, which is used to select a one-way cryptographic hash function and calculate the pseudo-identity of the registration authority; The blockchain storage submodule is used to add the public key and pseudo identity of the registration authority to the blockchain, set blocks that are only accessible to the registration authority, and publish relevant parameters in the network.
3. The blockchain intelligent medical Internet of Things authentication system against cloud leakage attacks as claimed in claim 1 is characterized in that: The registration module further comprises: The medical device registration submodule is used to select a unique real identity and corresponding temporary identity for each deployed medical device, calculate its pseudo-random identity, public-private key pair, and load credentials for it before entering the network; The fog node registration submodule is used to select a unique identity and a temporary identity for each fog node, calculate its pseudo-random identity, public and private key pair, generate a t-degree binary symmetric polynomial and calculate the polynomial share, store the registration credentials and publish the relevant parameters to the blockchain; The cloud server registration submodule is used to select a unique identity for each cloud server, calculate its pseudo-random identity, public-private key pair, generate a t-degree binary symmetric polynomial and calculate the polynomial share, store the registration credentials and disclose the relevant parameters to the blockchain.
4. A method for automatically detecting abnormal teacher clothing based on key points of the human body, characterized in that: The method comprises the following steps: Step S1, reviewing materials and determining dress code: reviewing several documents related to teacher dress code and determining the teacher dress code requirements; Step S2, teacher target detection model training: use the YOLOv8 target detection network to train a network model that can identify the teacher in the teaching scene; Step S3, teacher pose estimation: Use the YOLOv8-Pose model to estimate the pose of the teacher target frame obtained by traversing each frame of the video in step S2, obtain the coordinates of all key points of the teacher, and convert the coordinates of the key points to the original video; Step S4, extract valid frames: traverse each frame of the video until a valid frame is selected and save it as a jpg format file for subsequent detection; Step S5, skin color threshold determination: manually intercept 1000 skin color area blocks from multiple teaching videos, and select the skin color threshold suitable for teachers in the teaching scenario by analyzing the histogram of skin color pixels on the chroma (H) component and saturation (S) component in the HSV color space; Step S6, abnormal clothing detection: sampling the area of interest at equal intervals, comparing the sampling points with the skin color segmentation mask map at the corresponding position and counting which points are detected as abnormal; Step S7, model verification: verify the authenticity and accuracy of the model results.
5. The method according to claim 4, characterized in that The step S1 defines abnormal dress of teachers as exposed shoulders, exposed thighs, exposed armpits, and exposed navel.
6. The method according to claim 4, characterized in that The step S2 comprises: Collect a large number of images with teachers and students in teaching scenarios as a dataset, and mark the teacher's position on each image; Use the labeled tags to train and fine-tune the YOLOv8 target detection network model so that the model can detect the teacher in the video; Traverse each frame of the video and obtain the coordinate information of the teacher's target frame and the lower left corner of the target frame for subsequent use.
7. The method according to claim 4, characterized in that The step S3 only estimates the posture of the teacher and does not involve the posture estimation of the student.
8. The method according to claim 4, characterized in that The step S4 extracts valid frames from the video using the teacher's body being free of obstacles and hand and forearm occlusion as screening criteria.
9. The method according to claim 4, characterized in that The step S5 manually captures 1,000 skin color area blocks from multiple teaching videos, mainly capturing skin color areas of the teacher's face, neck, arms, legs and other parts.
10. The method according to claim 4, characterized in that The step S7 comprises: Collect teachers' wearing conditions in actual teaching scenarios as a test set for the algorithm; The dataset contains 1,000 images of teachers wearing different postures and positions, including 414 images of normal clothing and 586 images of abnormal clothing. The dataset is manually labeled and the model detection results are compared with the manual detection results.
Citation Information
Cited By
Ultrasonic fin detection method and system based on key point decoupling detection and storage medium
CN120009421A