Online learning method, system and device for smart classroom and storage medium
By capturing facial images through student terminals and using recognition models to determine eye states and expressions, it solves the problem in existing technology of being unable to accurately obtain students' concentration and identify expression disguises, and achieves effective monitoring and reminders of students' learning status.
Patent Information
- Application Number
- CN202410938318.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-13
- Publication Date
- 2024-10-25
AI Technical Summary
Existing technology is difficult to accurately obtain students' concentration when they use mobile phones or tablets for online learning, and cannot identify students' facial expression disguises, making it impossible to effectively monitor students' learning concentration.
The student terminal captures facial images at predetermined intervals, locates facial areas, determines eye status, obtains facial expressions and performance values based on a pre-trained recognition model, and generates target expressions and target values. If the student's expression is different from the target or the performance value is If it is far less than the target, it will be included in the abnormal mark and a reminder will be sent to the teacher's terminal.
It is possible to accurately capture and obtain facial images of students during the learning process, determine expressions and performance values, identify students' concentration and expression disguise, and send reminders to teacher terminals, improving the accuracy of monitoring students' learning status.
Smart Images

Figure CN118840232A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image processing technology, and specifically relates to an online learning method, system, device and storage medium for a smart classroom. Background Art
[0002] Remote interactive education through the Internet is not limited by geography and time, and students can flexibly choose courses according to their own time and schedule. Students can intuitively see the teacher's explanation process, experimental operations, etc. This intuitiveness helps to deepen understanding and memory. However, since students and teachers are not in the same space, the teaching teacher may not be able to know the students' listening situation. To solve this problem, the following technical solutions are proposed in the prior art.
[0003] For example, Chinese patent application document 1 with publication number CN118097276A discloses a method for identifying online learner concentration and related devices, the method obtains online learner videos; extracts online learner facial behavior features and body posture features from online learner videos to obtain online learner facial behavior features and body posture features; based on the cross-attention fusion method, the online learner facial behavior features and body posture features are fused to obtain online learner fusion features; based on the online learner fusion features, concentration is identified to obtain the online learner concentration category. For another example, Chinese patent application document 2 with publication number CN116543446A discloses an online learning concentration identification and analysis method based on AI technology, the method obtains students' learning videos, analyzes the execution evaluation coefficient of each student for the target courseware instructions, analyzes the eye-level learning concentration evaluation coefficient corresponding to each student; analyzes the lip-level concentration evaluation coefficient corresponding to each student; and analyzes the comprehensive learning concentration evaluation coefficient corresponding to each student based on the above coefficients.
[0004] However, students usually use mobile phones or tablets to study, and the devices are too close to obtain the students' body posture characteristics. Therefore, the technical solution of patent application document 1 cannot obtain the students' concentration. During the learning process, students may disguise their expressions based on the reactions of other classmates. Therefore, the technical solution of patent application document 2 cannot identify disguised students. Summary of the invention
[0005] The present invention provides an online learning method, system, device and storage medium for a smart classroom to solve the problems existing in the above-mentioned background technology.
[0006] In order to achieve the above-mentioned invention object, the present invention proposes an online learning method for a smart classroom, comprising:
[0007] The student terminal captures a facial image at a predetermined interval, locates a facial region in the facial image, and standardizes the facial region into a first region;
[0008] Locate the center point of the first area, generate a second area with the center point as the center, and divide the second area into a first part and a second part;
[0009] Locating eye areas in the first part and the second part respectively, determining the states of the eye areas, and sending a first reminder to the teacher terminal and the student terminal if at least one of the eye areas is in a closed state;
[0010] Establishing a recognition model, and if both eyes are open, recognizing the first part and the second part based on the recognition model, and obtaining the facial expression of the facial area and the expression value of the facial expression;
[0011] Generate a target expression and a target value based on the facial expressions and the expression values captured by all student terminals at the same time, if the facial expression of the student terminal is different from the target expression, or is the same as the target expression but the difference between the expression value and the target value is greater than a first threshold, then an abnormal mark is counted in the corresponding learning terminal;
[0012] After the teacher terminal finishes learning, if the abnormal mark obtained by the student terminal is greater than the second threshold, a second reminder is sent to the teacher terminal and the corresponding student terminal.
[0013] 11. Further, determining the state of the eye region comprises the following steps:
[0014] Select a pixel point in the eye region as a target point, set a first direction and a second direction, calculate a first difference value after subtracting the pixel value of the target point from the pixel value of the adjacent pixel point in the first direction, and a second difference value after subtracting the pixel value of the target point from the pixel value of the adjacent pixel point in the second direction, determine a target type of the target point based on the first difference and the second difference, the target type includes a first type, a second type, a third type and a fourth type, and repeat this step until all the pixels in the eye region are marked with the corresponding target type;
[0015] Select the target point from the eye area again, define the pixel points below the target point as adjacent points, if the target point is of the first type and the adjacent point is of the second type, then re-determine the target point as the first object, if the target point is not of the second type and the adjacent point is not of the first type, and the target types of the target point and the adjacent point are different, then determine the target point as the second object, and repeat this step until all pixel points are traversed;
[0016] A target area is determined in the eye area, the target area has at least a first number of the first objects, and the first objects are adjacent to each other, and the target area containing the most first objects in the second direction is extracted as the judgment area, and if the number of the first objects included in the judgment area is greater than a third threshold, the eye area is judged to be in the eyes-closed state, otherwise it is judged to be in the eyes-open state.
[0017] Furthermore, the attribute value P of the target point is calculated based on a first formula, the first formula is: P=|U|-|R|, wherein U is the first difference, and R is the second difference. When the attribute value is greater than 0, if the first difference is less than 0, the target point is classified as the first type, otherwise it is classified as the second type. When the attribute value is less than 0, if the second difference is less than 0, the target point is classified as the third type, otherwise it is classified as the fourth type.
[0018] Furthermore, before determining the state of the eye region, the overall brightness of the eye region is obtained, and the eye region with higher overall brightness is determined preferentially.
[0019] Furthermore, if there are two target regions with the same extension direction, and the interval between the target regions by the second object is smaller than a fourth threshold, the two target regions are merged into a new target region.
[0020] 12. Further, dividing the second area into the first part and the second part comprises the following steps:
[0021] A dividing line in a vertical direction is drawn through the center point, the dividing line divides the second area into a third area and a fourth area, counting the pixel values with the largest number of occurrences in the third area and the fourth area, defining the corresponding number of occurrences as a first number and a second number, respectively, calculating a ratio of the first number to the second number, and using the ratio as a score value for the position of the dividing line;
[0022] The dividing line is rotated by a predetermined angle to re-divide the second area into the third area and the fourth area, the score value of the position is recalculated, and the dividing line is continued to be rotated until the dividing line returns to the initial position, and the third area and the fourth area corresponding to the position whose ratio is closest to 1 are set as the first part and the second part, respectively.
[0023] 13. Further, establishing the recognition model comprises the following steps:
[0024] Establishing a facial image library, the facial image library includes a plurality of facial images, each facial image is pre-labeled with the facial expression and the expression value;
[0025] Cropping the facial image in the facial image library based on a preset size, obtaining the first region, dividing the first region into the first part and the second part, respectively extracting local features of the first part and the second part based on a SIFT algorithm, clustering the local features based on a K-mans algorithm, and obtaining a visual dictionary;
[0026] The local features are matched with the visual dictionary to generate a histogram of the first area, the histogram is used as an input feature, the facial expression and the performance value are used as output features, and the recognition model is trained and established based on all the input features and the output features.
[0027] The present invention also provides an online learning system for a smart classroom, which is used to implement the online learning method for a smart classroom described above, and the system includes:
[0028] A preprocessing module, in which the student terminal takes a facial image at a predetermined interval, locates a facial region in the facial image, standardizes the facial region into a first region, locates a center point of the first region, generates a second region with the center point as the center, and divides the second region into a first part and a second part;
[0029] A first judgment module locates eye areas in the first part and the second part respectively, judges the states of the eye areas, and sends a first reminder to the teacher terminal and the student terminal if at least one of the eye areas is in a closed state;
[0030] The second judgment module establishes a recognition model. If both are in the eyes-open state, the first part and the second part are recognized based on the recognition model, the facial expression of the facial area and the expression value of the facial expression are obtained, and the target expression and target value are generated based on the facial expressions and the expression values taken by all student terminals at the same time. If the facial expression of the student terminal is different from the target expression, or is the same as the target expression, but the difference between the expression value and the target value is greater than the first threshold, an abnormal mark is counted in the corresponding learning terminal;
[0031] The statistics module sends a second reminder to the teacher terminal and the corresponding student terminal after the teacher terminal finishes learning if the abnormal mark obtained by the student terminal is greater than the second threshold.
[0032] The present invention also discloses an electronic device, which includes a processor and a memory, wherein the memory is used to store program instructions, and the processor is used to implement the above-mentioned online learning method for a smart classroom when executing a computer program stored in the memory.
[0033] The present invention also discloses a computer storage medium, which stores program instructions. When the program instructions are executed, the device where the computer storage medium is located is controlled to execute the above-mentioned online learning method for a smart classroom.
[0034] Compared with the prior art, the beneficial effects of the present invention are at least as follows:
[0035] During the learning process of students, the present invention first captures the facial image of the students, then uses a pre-trained recognition model to determine the expression of the facial image and the expression value, and then determines the target expression and target value that should appear at the same time by counting the expression types and expression values of all students in the classroom. If a student's expression is different from the target expression, it is considered that the student is not listening to the class carefully; if the student's expression is the same as the target expression, but the expression value is much smaller than the target value, it is considered that the student is just following others to make adaptive expression changes, that is, expression disguise, and the student is also judged as not listening to the class carefully. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A flowchart of the steps of an online learning method for a smart classroom of the present invention;
[0037] Figure 2 The present invention is a structural schematic diagram of an online learning system for a smart classroom. DETAILED DESCRIPTION
[0038] 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 accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0039] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0040] like Figure 1 As shown, an online learning method for a smart classroom includes:
[0041] Step S1: The student terminal captures a facial image at a predetermined time interval, locates a facial region in the facial image, and standardizes the facial region into a first region.
[0042] Student terminals include smart phones, tablet computers, and personal PCs, etc. The scheduled time can be set within the range of 1 to 30 minutes according to actual needs. During the course of the students listening to the lecture, the student terminal captures the facial image based on the front camera and locates the facial area in the facial image. The HOG feature and SVM classifier can be used to locate the facial shape and then obtain the facial area. The facial area is then cropped into the first area according to the preset size. Specifically, the first threshold is a rectangular area determined by the length and width.
[0043] Step S2: locate the center point of the first area, generate a second area with the center point as the center of the circle, and divide the second area into a first part and a second part.
[0044] The size of the first area is determined, so the center point can be quickly located, and then an elliptical second area is generated with the center point as the center. The size of the second area is also determined in advance. The second area is an area that only includes the face. By dividing the second area from the first area, interference from objects such as hair can be eliminated. Then, a dividing line is used to divide the second area into a first part and a second part, that is, the face is divided into a left half and a right half.
[0045] Step S3: locate the eye areas in the first part and the second part respectively, determine the state of the eye areas, and if at least one eye area is in a closed state, send a first reminder to the teacher terminal and the student terminal.
[0046] Step S4: Establish a recognition model. If both eyes are open, recognize the first part and the second part based on the recognition model to obtain the facial expression of the facial area and the expression value of the facial expression.
[0047] A rectangular positioning area can be preset as the area where the eyes are located. The positioning area can be drawn in the first part and the second part according to the positional relationship of the facial features in the human face shape. The eye area can also be positioned by a convolutional neural network. After positioning the eye area, the pixel value distribution of each pixel point in the eye area is used to determine whether the eyes are in an open state. If any eye is in a closed state, it is considered that the student is not listening to the class seriously, and a first reminder to remind the student to listen to the class is sent to the teacher terminal and the student terminal.
[0048] The recognition model is a pre-established SVM model. If both eyes are open, the recognition model is used to obtain the facial expression of the facial area. The facial expressions of this embodiment include joy, surprise, anger, disgust, indifference, etc. The corresponding expression values are 0-10, where for joy, 0 represents a smile and 10 represents laughter.
[0049] Step S5: Generate target expressions and target values based on the facial expressions and expression values captured by all student terminals at the same time. If the facial expression of the student terminal is different from the target expression, or is the same as the target expression but the difference between the expression value and the target value is greater than the first threshold, an abnormal mark is recorded in the corresponding learning terminal.
[0050] Step S6: After the teacher terminal finishes learning, if the abnormal mark obtained by the student terminal is greater than the second threshold, a second reminder is sent to the teacher terminal and the corresponding student terminal.
[0051] After obtaining the facial expressions and performance values of each student terminal at the same time, the type of facial expression that appears most frequently is used as the target expression that should appear at that moment, and the average of all target expression performance values is calculated, and the average value is used as the target value. If the facial expression of the student terminal is different from the target expression, such as the target expression is joy and the expression of the student terminal is dull, then an abnormal mark is counted in the student terminal; if the facial expression of the student terminal is the same as the target expression, for example, both are joy, but the performance value of the student terminal is 1, the target value is 6, and the first threshold is 4, it means that the student is not fully engaged in the course learning at this moment, and an abnormal mark is counted in the student terminal. Finally, if the abnormal mark of the learning terminal is greater than the second threshold, such as 10, after the class is over, a second reminder of poor listening effect is sent to the teacher terminal and the corresponding student terminal. Reminding after the class is completed can avoid too frequent reminders in the classroom affecting the teacher's teaching.
[0052] During the learning process of students, the present invention first captures the facial image of the students, then uses a pre-trained recognition model to determine the expression of the facial image and the expression value, and then determines the target expression and target value that should appear at the same time by counting the expression types and expression values of all students in the classroom. If a student's expression is different from the target expression, it is considered that the student is not listening to the class carefully; if the student's expression is the same as the target expression, but the expression value is much smaller than the target value, it is considered that the student is just following others to make adaptive expression changes, that is, expression disguise, and the student is also judged as not listening to the class carefully.
[0053] The present invention prioritizes the open and closed states of students' eyes before recognizing their facial expressions. If it is found that one eye is in a closed state, a reminder of inattention to study is directly issued, thereby eliminating the subsequent step of facial expression recognition. In addition, when performing open eye recognition, one eye is first recognized, and then the other eye is recognized when the eye is in an open state. If the first eye is in a closed state, the other eye is no longer recognized, thereby further improving the judgment efficiency.
[0054] It is particularly noteworthy that the present invention can not only obtain the concentration of students through facial images, but also identify students who are showing disguise.
[0055] In this embodiment, determining the state of the eye area includes the following steps:
[0056] A pixel point is selected in the eye area as a target point, a first direction and a second direction are set, a first difference value obtained by subtracting the pixel value of the target point from the pixel value of the adjacent pixel point in the first direction is calculated, and a second difference value obtained by subtracting the pixel value of the target point from the pixel value of the adjacent pixel point in the second direction is calculated, and a target type of the target point is determined based on the first difference and the second difference, the target type including a first type, a second type, a third type and a fourth type, and this step is repeated until all the pixel points in the eye area are labeled with corresponding target types.
[0057] First, a pixel point is extracted in the eye area as the target point, and then the first direction and the second direction are set. In this embodiment, the first direction is the vertical downward direction, and the second direction is the horizontal rightward direction. The first difference between the target point and the pixel point below it is calculated. The pixel value of this embodiment is a grayscale value. For example, if the pixel value of the target point is 25 and the pixel value of the pixel point below it is 50, then the first difference is 50-25=25. Similarly, the second difference can be calculated. Then, the target type of the target point is determined based on the first difference and the second difference. The method for determining the target type will be introduced in detail later.
[0058] Select the target point from the eye area again, define the pixel points below the target point as adjacent points, if the target point is of the first type and the adjacent point is of the second type, then the target point is re-determined as the first object, if the target point is not of the second type, the adjacent point is not of the first type, and the target point and the adjacent point have different target types, then the target point is determined as the second object, and this step is repeated until all pixel points are traversed.
[0059] After all target points in the eye area have been classified into target types, the target points are divided again. Specifically, if the target point is of the first type and the pixel points below it are of the second type, indicating that the target points at the upper position become darker downward and the pixel points at the lower position become brighter downward, the target point is marked as the first object. If the target point is not of the second type, the pixel points below it are of a type other than the first type, and the types of the target point and the pixel points are different, the target point is set as the second object.
[0060] A target area is determined in the eye area, where the target area has at least a first number of first objects, and the first objects are adjacent to each other. A target area containing the most first objects in the second direction is extracted as a judgment area. If the number of first objects included in the judgment area is greater than a third threshold, the eye area is judged to be in a closed eye state, otherwise it is judged to be in an open eye state.
[0061] After processing the eye area into a grayscale image, if the eyes are in a closed state, the position of the eye slit will be darker due to the absence of the eyeball, and the part of the skin around the eye will be brighter than the eye slit. Therefore, after processing using the above method, if the eyes are in a closed state, there will be a judgment area, and the judgment area will include multiple first objects along the second direction, that is, horizontally. Therefore, if there is a judgment area and the number of first objects is greater than the third threshold, it proves that the current eye area is in a closed state; if the eyes are in an open state, multiple target areas will appear in the eye area due to the interference of the eyeball, and under the interference of the eyeball, each target area will not include too many first objects in the second direction because they will be separated by the second objects. Therefore, this step can simply and quickly determine whether the eye area is in an open state.
[0062] This embodiment uses the following steps to classify the types of target points. The attribute value P of the target point is calculated based on the first formula. The first formula is: P=|U|-|R|, wherein U is the first difference and R is the second difference. When the attribute value is greater than 0, if the first difference is less than 0, the target point is classified as the first type, otherwise it is classified as the second type. When the attribute value is less than 0, if the second difference is less than 0, the target point is classified as the third type, otherwise it is classified as the fourth type.
[0063] The above steps are explained below. If the attribute value is greater than 0, it indicates that the degree of change of the pixel value in the vertical direction is greater than the degree of change in the horizontal direction. In this case, if the first difference is less than 0, it indicates that the pixel value changes from bright to dark downward, and the target point is divided into the first type that darkens downward. If the first difference is greater than 0, the target point is divided into the second type that brightens downward. Similarly, if the attribute value is less than 0, it indicates that the degree of change of the pixel value in the vertical direction is less than the degree of change in the horizontal direction. In this case, if the first difference is less than 0, the target point is divided into the third type that darkens to the right. If the first difference is greater than 0, the target point is divided into the fourth type that brightens to the right.
[0064] This embodiment obtains the overall brightness of the eye area before judging the state of the eye area, and preferentially judges the eye area with higher overall brightness.
[0065] The overall brightness can be obtained by the following method: first, the brightness of each pixel is obtained, and then the average brightness is calculated, and the average value is used as the overall brightness of the eye area. If the overall brightness of the eye area is higher, it indicates that the ambient light in this area is better, so the final judgment is more accurate.
[0066] In this embodiment, if there are two target areas with the same extension direction and the interval between the target areas by the second object is smaller than the fourth threshold, the two target areas are merged into a new target area.
[0067] If the number of the second objects in the interval is small, for example, one, it may be caused by the falling hair. Therefore, this interference factor is eliminated through this method, thereby further improving the accuracy of the judgment.
[0068] In this embodiment, dividing the second area into the first part and the second part includes the following steps:
[0069] A vertical dividing line is drawn through the center point, and the dividing line divides the second area into the third area and the fourth area. The pixel values that appear the most times in the third area and the fourth area are counted, and the corresponding number of occurrences are defined as the first number and the second number, respectively. The ratio of the first number to the second number is calculated, and the ratio is used as the score value of the dividing line position.
[0070] The dividing line is rotated by a predetermined angle to re-divide the second area into the third area and the fourth area, the score value of the position is recalculated, and the dividing line is continued to be rotated until the dividing line returns to the initial position, and the third area and the fourth area corresponding to the position with the ratio closest to 1 are set as the first part and the second part, respectively.
[0071] When students are listening to a class, their facial orientation is not always in one position. If a dividing line determined by a position is set, the two eyes may be divided into one area. To avoid this, after obtaining the second area, the present invention uses a dividing line to divide the second area into a third area and a fourth area along the vertical direction. Since the interference of hair is excluded in advance in the second area, if the dividing line is divided relatively evenly, the third area and the fourth area should be relatively symmetrical. To measure the symmetry effect, the pixel value with the most occurrences in the third area and the fourth area is obtained. The pixel point of this pixel value represents the skin, and the corresponding first and second occurrences are the number of skin pixels. Therefore, the closer the ratio of the first and second occurrences is to 1, the more evenly the dividing line is divided. By continuously rotating the dividing point at a predetermined angle, such as 1°, the score value of the dividing line position is continuously tested. After the dividing line returns to the initial position, the position with the highest effect of dividing the second area can be obtained. The dividing line is rotated to this position to achieve equal division of the second area.
[0072] In this embodiment, establishing a recognition model includes the following steps:
[0073] Establishing a facial image library, the facial image library includes multiple facial images, each facial image is pre-labeled with facial expressions and expression values;
[0074] The facial image in the facial image library is cropped based on a preset size to obtain a first region, the first region is divided into a first part and a second part, local features of the first part and the second part are extracted based on a SIFT algorithm, and the local features are clustered based on a K-mans algorithm to obtain a visual dictionary;
[0075] Match local features and visual dictionaries to generate a histogram of the first area, use the histogram as input features, facial expressions and performance values as output features, and train and establish a recognition model based on all input features and output features.
[0076] SIFT is a scale-invariant feature. The features found by SIFT are very prominent and will not change due to factors such as illumination, affine transformation and noise. When extracting local features through SIFT, the scale space is first constructed, and then the extreme points of the DOG scale space are detected. The extreme points located are screened, and the extreme points that do not meet the conditions are eliminated. After that, the reserved extreme points are used as feature points, and the feature point direction parameters are assigned to the feature points. Finally, local features are generated. After processing all facial images, a large number of local features can be obtained. These local features are clustered using the K-mans algorithm. After obtaining the visual dictionary using the K-mans algorithm, a histogram is generated based on the visual dictionary and the local features. The coordinate of the histogram on the Y axis is the number of elements included in the visual dictionary. Finally, the SVM model is trained using the histogram, facial expressions and performance values, and the trained model is used as the recognition model.
[0077] like Figure 2 As shown, the present invention also provides an online learning system for a smart classroom, which is used to implement the above-mentioned online learning method for a smart classroom, and the system includes:
[0078] A preprocessing module, in which the student terminal captures a facial image at a predetermined interval, locates a facial region in the facial image, standardizes the facial region into a first region, locates a center point of the first region, generates a second region with the center point as the center, and divides the second region into a first part and a second part;
[0079] A first judgment module locates eye regions in the first part and the second part respectively, judges the states of the eye regions, and sends a first reminder to the teacher terminal and the student terminal if at least one eye region is in a closed state;
[0080] The second judgment module establishes a recognition model. If both are in the open-eye state, the first part and the second part are recognized based on the recognition model to obtain the facial expression of the facial area and the expression value of the facial expression. The target expression and target value are generated based on the facial expressions and expression values captured by all student terminals at the same time. If the facial expression of the student terminal is different from the target expression, or is the same as the target expression, but the difference between the expression value and the target value is greater than the first threshold, an abnormal mark is counted in the corresponding learning terminal;
[0081] The statistics module sends a second reminder to the teacher terminal and the corresponding student terminal after the teacher terminal finishes learning if the abnormal mark obtained by the student terminal is greater than the second threshold.
[0082] The present invention also discloses an electronic device, which includes a processor and a memory, wherein the memory is used to store program instructions, and the processor is used to implement the above-mentioned online learning method for a smart classroom when executing a computer program stored in the memory.
[0083] The present invention also discloses a computer storage medium, which stores program instructions. When the program instructions are executed, the device where the computer storage medium is located is controlled to execute the above-mentioned online learning method for a smart classroom.
[0084] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0085] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0086] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0087] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An online learning method for smart classroom, characterized in that: include: The student terminal captures a facial image at a predetermined interval, locates a facial region in the facial image, and standardizes the facial region into a first region; Locate the center point of the first area, generate a second area with the center point as the center, and divide the second area into a first part and a second part; Locating eye areas in the first part and the second part respectively, determining the states of the eye areas, and sending a first reminder to the teacher terminal and the student terminal if at least one of the eye areas is in a closed state; Establishing a recognition model, and if both eyes are open, recognizing the first part and the second part based on the recognition model, and obtaining the facial expression of the facial area and the expression value of the facial expression; Generate a target expression and a target value based on the facial expressions and the expression values captured by all student terminals at the same time, if the facial expression of the student terminal is different from the target expression, or is the same as the target expression but the difference between the expression value and the target value is greater than a first threshold, then an abnormal mark is counted in the corresponding learning terminal; After the teacher terminal finishes learning, if the abnormal mark obtained by the student terminal is greater than the second threshold, a second reminder is sent to the teacher terminal and the corresponding student terminal.
2. The method according to claim 1, characterized in that Determining the state of the eye area includes the following steps: Select a pixel point in the eye region as a target point, set a first direction and a second direction, calculate a first difference value after subtracting the pixel value of the target point from the pixel value of the adjacent pixel point in the first direction, and a second difference value after subtracting the pixel value of the target point from the pixel value of the adjacent pixel point in the second direction, determine a target type of the target point based on the first difference and the second difference, the target type includes a first type, a second type, a third type and a fourth type, and repeat this step until all the pixels in the eye region are marked with the corresponding target type; Select the target point from the eye area again, define the pixel points below the target point as adjacent points, if the target point is of the first type and the adjacent point is of the second type, then re-determine the target point as the first object, if the target point is not of the second type and the adjacent point is not of the first type, and the target types of the target point and the adjacent point are different, then determine the target point as the second object, and repeat this step until all pixel points are traversed; A target area is determined in the eye area, the target area has at least a first number of the first objects, and the first objects are adjacent to each other, and the target area containing the most first objects in the second direction is extracted as the judgment area, and if the number of the first objects included in the judgment area is greater than a third threshold, the eye area is judged to be in the eyes-closed state, otherwise it is judged to be in the eyes-open state.
3. The method according to claim 2, characterized in that The attribute value P of the target point is calculated based on a first formula, the first formula is: P=|U|-|R|, wherein U is the first difference, and R is the second difference. When the attribute value is greater than 0, if the first difference is less than 0, the target point is classified into the first type, otherwise it is classified into the second type. When the attribute value is less than 0, if the second difference is less than 0, the target point is classified into the third type, otherwise it is classified into the fourth type.
4. The method according to claim 2, characterized in that: Before determining the state of the eye region, the overall brightness of the eye region is obtained, and the eye region with higher overall brightness is determined preferentially.
5. The method according to claim 2, characterized in that: If there are two target regions with the same extension direction, and the interval between the target regions and the second object is smaller than a fourth threshold, the two target regions are merged into a new target region.
6. The method according to claim 2, characterized in that Dividing the second area into the first part and the second part comprises the following steps: A dividing line in a vertical direction is drawn through the center point, the dividing line divides the second area into a third area and a fourth area, counting the pixel values with the largest number of occurrences in the third area and the fourth area, defining the corresponding number of occurrences as a first number and a second number, respectively, calculating a ratio of the first number to the second number, and using the ratio as a score value for the position of the dividing line; The dividing line is rotated by a predetermined angle to re-divide the second area into the third area and the fourth area, the score value of the position is recalculated, and the dividing line is continued to be rotated until the dividing line returns to the initial position, and the third area and the fourth area corresponding to the position whose ratio is closest to 1 are set as the first part and the second part, respectively.
7. The method according to claim 1, characterized in that Establishing the recognition model comprises the following steps: Establishing a facial image library, the facial image library includes a plurality of facial images, each facial image is pre-labeled with the facial expression and the expression value; Cropping the facial image in the facial image library based on a preset size, obtaining the first region, dividing the first region into the first part and the second part, respectively extracting local features of the first part and the second part based on a SIFT algorithm, clustering the local features based on a K-mans algorithm, and obtaining a visual dictionary; The local features are matched with the visual dictionary to generate a histogram of the first area, the histogram is used as an input feature, the facial expression and the performance value are used as output features, and the recognition model is trained and established based on all the input features and the output features.
8. An online learning system for a smart classroom, used to implement the method according to any one of claims 1 to 7, characterized in that: include: A preprocessing module, in which the student terminal takes a facial image at a predetermined interval, locates a facial region in the facial image, standardizes the facial region into a first region, locates a center point of the first region, generates a second region with the center point as the center, and divides the second region into a first part and a second part; A first judgment module locates eye areas in the first part and the second part respectively, judges the states of the eye areas, and sends a first reminder to the teacher terminal and the student terminal if at least one of the eye areas is in a closed state; The second judgment module establishes a recognition model. If both are in the eyes-open state, the first part and the second part are recognized based on the recognition model, the facial expression of the facial area and the expression value of the facial expression are obtained, and the target expression and target value are generated based on the facial expressions and the expression values taken by all student terminals at the same time. If the facial expression of the student terminal is different from the target expression, or is the same as the target expression, but the difference between the expression value and the target value is greater than the first threshold, an abnormal mark is counted in the corresponding learning terminal; The statistics module sends a second reminder to the teacher terminal and the corresponding student terminal after the teacher terminal finishes learning if the abnormal mark obtained by the student terminal is greater than the second threshold.
9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory is used to store program instructions, and the processor is used to implement the method described in any one of claims 1 to 7 when executing the computer program stored in the memory.
10. A computer storage medium, characterized in that: The computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
