Intelligent desk lamp based on image data processing
Through smart desk lamps based on deep neural networks, multi-scale facial feature extraction and spatial information processing are used to assess students' fatigue status and automatically adjust the brightness, solving the problem that traditional desk lamps cannot be dynamically adjusted, providing a more suitable learning environment and improving learning efficiency. and vision health.
Patent Information
- Application Number
- CN202410453781.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-16
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-04-16
AI Technical Summary
Traditional desk lamps cannot dynamically adjust the lighting brightness according to students' individual needs and real-time status, resulting in the inability to effectively adapt to the learning needs of different students, lack of intelligence and adaptability, and affecting learning effects and visual health.
Design an intelligent desk lamp based on image data processing, which uses a deep neural network to extract facial multi-scale features, combines the spatial information multi-scale dense retention attention module and the feature fusion attention guidance module to evaluate the learner's fatigue status level and automatically adjust the desk lamp brightness.
It realizes real-time assessment of learners’ fatigue and attention levels, dynamically adjusts the brightness of desk lamps, provides a more comfortable and efficient learning environment, reduces eye fatigue and improves learning efficiency.
Smart Images

Figure CN118334724B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of smart desk lamps, and in particular, to a smart desk lamp based on image data processing. Background Art
[0002] Traditional desk lamps usually provide static lighting that cannot adapt to students' individual needs. In an educational environment, optimizing the learning experience is crucial. Lighting plays a vital role in the learning process of learners because it can affect students' attention, fatigue level and overall learning effect. Appropriate lighting conditions can improve students' learning efficiency and concentration, while reducing visual fatigue and stress, helping to enhance students' understanding and memory of learning content and protecting their eyesight. However, lighting conditions that are too dark or too bright may cause students to be distracted, affect learning effects, and affect the vision of learners.
[0003] During the learning process of the learning object, the traditional desk lamp control method usually relies on manual operation and static control, which is not only inconvenient, but also the manual static control method through the switch usually can only provide a fixed lighting brightness, and cannot be dynamically adjusted according to the real-time needs and status of the students, which makes it impossible to effectively adapt to the personalized learning needs of different students. In other words, the traditional desk lamp control method lacks intelligence and adaptability, and cannot adjust the lighting brightness according to the students' fatigue level or attention level, and cannot effectively optimize the learning environment.
[0004] Therefore, an intelligent desk lamp based on image data processing is desired. Summary of the invention
[0005] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0006] In a first aspect, the present disclosure provides a smart desk lamp based on image data processing, the desk lamp comprising:
[0007] A learning object facial image acquisition module, used to acquire a learning object facial image acquired by a camera deployed on a desk lamp;
[0008] A facial multi-scale feature extraction module, used for performing multi-scale feature extraction on the facial image of the learning object through a facial multi-scale feature extractor based on a deep neural network to obtain a facial shallow feature map and a facial deep feature map;
[0009] A facial deep semantic multi-scale feature enhancement module, used for obtaining a spatial multi-scale enhanced facial deep feature map by passing the facial deep feature map through a spatial information multi-scale intensive retention attention module;
[0010] A facial multi-scale feature fusion module, used for obtaining a facial multi-scale fusion feature map as a facial multi-scale fusion feature by passing the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map through a feature fusion attention guidance module;
[0011] The object fatigue state detection and desk lamp brightness control module is used to determine the fatigue state level label based on the multi-scale fusion features of the face and automatically adjust the brightness of the desk lamp.
[0012] Optionally, the facial multi-scale feature extraction module is used to: pass the facial image of the learning object through a facial multi-scale feature extractor based on a pyramid network to obtain the facial shallow feature map and the facial deep feature map.
[0013] Optionally, the facial deep semantic multi-scale feature enhancement module is used to: process the facial deep feature map through the spatial information multi-scale dense retention attention module with the following enhancement formula to obtain the spatial multi-scale enhanced facial deep feature map; wherein the enhancement formula is:
[0014]
[0015]
[0016] Wherein, F is the facial deep feature map, and Respectively represent the mean pooling feature map, the maximum pooling feature map and the random pooling feature map obtained by performing global mean pooling, global maximum pooling and global random pooling on each feature matrix along the channel dimension in the deep feature map of the face, W1(·) and W0(·) represent multi-layer perceptrons with different numbers of channels, C is the number of channels, σ is the Sigmoid activation function, M c (F) is the attention weight vector, represents the Hadamard product, and F0 is the spatial multi-scale enhanced facial deep feature map.
[0017] Optionally, the facial multi-scale feature fusion module includes: a feature distribution optimization unit, used to perform feature optimization on the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map to obtain an optimized facial shallow feature map and an optimized spatial multi-scale enhanced facial deep feature map; a facial feature multi-scale fusion unit, used to pass the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map through a feature fusion attention guidance module to obtain the facial multi-scale fused feature map.
[0018] Optionally, the feature distribution optimization unit includes: a weighted coefficient calculation subunit, used to respectively calculate the weighted coefficients of the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map to obtain a first weighted coefficient and a second weighted coefficient; a weighted optimization subunit, used to perform weighted optimization on the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map using the first weighted coefficient and the second weighted coefficient as weighting factors to obtain the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map.
[0019] Optionally, the facial feature multi-scale fusion unit is used to: process the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map through the feature fusion attention guidance module using the following attention fusion formula to obtain the facial multi-scale fusion feature map; wherein the attention fusion is:
[0020]
[0021] W c =Sigmoid(W i V+B i )
[0022] F c =attention(W c ,F2)+F1
[0023] Among them, U c (i, j) is the eigenvalue of the (i, j)th position of each feature matrix along the channel dimension in the optimized spatial multi-scale enhanced facial deep feature map, H and W are the height and width of the optimized spatial multi-scale enhanced facial deep feature map, respectively, S v is the eigenvalue of each position in the spatial multi-scale enhanced facial deep semantic pooling feature vector, V is the spatial multi-scale enhanced facial deep semantic pooling feature vector, W i represents the weight coefficient matrix, B i is the offset vector, Sigmoid(·) is the Sigmoid activation function, W cis a weight vector, attention(·,·) indicates that the weight vector is used to perform a weighted operation on the feature map, F1 is the optimized spatial multi-scale enhanced facial deep feature map, F4 is the optimized facial shallow feature map, and F c It is the facial multi-scale fusion feature map.
[0024] Optionally, the object fatigue state detection and desk lamp brightness control module includes: a learning object fatigue state level detection unit, used to pass the facial multi-scale fusion feature map through a classifier-based fatigue state evaluator to obtain an evaluation result, and the evaluation result is used to represent the fatigue state level label; a desk lamp brightness control unit, used to automatically adjust the desk lamp brightness based on the evaluation result.
[0025] Optionally, the learning object fatigue state level detection unit includes: a matrix expansion subunit, used to expand the facial multi-scale fusion feature map into a classification feature vector according to a row vector or a column vector; a fully connected encoding subunit, used to use multiple fully connected layers of the classifier-based fatigue state evaluator to fully connect encode the classification feature vector to obtain an encoded classification feature vector; and a classification subunit, used to pass the encoded classification feature vector through the Softmax classification function of the classifier-based fatigue state evaluator to obtain the evaluation result.
[0026] By adopting the above technical solution, a facial multi-scale feature extractor based on a deep neural network is used to extract multi-scale features from the acquired facial image of the learning object to obtain a facial shallow feature map and a facial deep feature map; the facial deep feature map is passed through a spatial information multi-scale intensive retention attention module to obtain a spatial multi-scale enhanced facial deep feature map; the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map are passed through a feature fusion attention guidance module to obtain a facial multi-scale fusion feature map as a facial multi-scale fusion feature to determine the fatigue state level label and automatically adjust the brightness of the desk lamp. In this way, the learner's fatigue level or attention level can be evaluated, and the brightness of the desk lamp can be dynamically adjusted accordingly, providing students with a more comfortable and efficient learning environment.
[0027] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:
[0029] Figure 1The figure is a block diagram of a smart desk lamp based on image data processing according to an exemplary embodiment.
[0030] Figure 2 It is a schematic diagram of a Remang smart diary desk lamp according to an exemplary embodiment.
[0031] Figure 3 The present invention is a flowchart of a method for using a smart desk lamp based on image data processing according to an exemplary embodiment.
[0032] Figure 4 It is a block diagram of an electronic device according to an exemplary embodiment.
[0033] Figure 5 This is a diagram showing an application scenario of a smart desk lamp based on image data processing according to an exemplary embodiment. DETAILED DESCRIPTION
[0034] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0035] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0036] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0037] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0038] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0039] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0040] First of all, in response to the above technical problems, in the technical solution of this application, a smart desk lamp based on image data processing is proposed. The design of the smart desk lamp stems from the pursuit of modern quality of life, especially in the environmental optimization of education and personal workspaces. The smart desk lamp can not only provide basic lighting, but also monitor the user's facial expressions through machine vision and image data processing technology to optimize the learning environment. For example, by analyzing the learner's facial state, the smart desk lamp can assess the learner's fatigue or attention level, and dynamically adjust the brightness of the desk lamp accordingly, providing students with a more comfortable and efficient learning environment.
[0041] In order to solve the above problems, the present disclosure provides an intelligent desk lamp based on image data processing, which performs multi-scale feature extraction on the acquired facial image of the learning object through a facial multi-scale feature extractor based on a deep neural network to obtain a facial shallow feature map and a facial deep feature map; the facial deep feature map is passed through a spatial information multi-scale intensive retention attention module to obtain a spatial multi-scale enhanced facial deep feature map; the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map are passed through a feature fusion attention guidance module to obtain a facial multi-scale fusion feature map as a facial multi-scale fusion feature, so as to determine the fatigue state level label and automatically adjust the brightness of the desk lamp. In this way, the learner's fatigue level or attention level can be evaluated, and the brightness of the desk lamp can be dynamically adjusted accordingly, providing students with a more comfortable and efficient learning environment.
[0042] The specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0043] Figure 1 FIG. 1 is a block diagram of a smart desk lamp based on image data processing according to an exemplary embodiment. Figure 1 As shown, the smart desk lamp 100 includes:
[0044] The learning object facial image acquisition module 101 is used to acquire the learning object facial image acquired by the camera deployed on the desk lamp;
[0045] A facial multi-scale feature extraction module 102, configured to perform multi-scale feature extraction on the facial image of the learning object by using a facial multi-scale feature extractor based on a deep neural network to obtain a facial shallow feature map and a facial deep feature map;
[0046] The facial deep semantic multi-scale feature enhancement module 103 is used to obtain a spatial multi-scale enhanced facial deep feature map by passing the facial deep feature map through a spatial information multi-scale intensive retention attention module;
[0047] A facial multi-scale feature fusion module 104 is used to obtain a facial multi-scale fusion feature map as a facial multi-scale fusion feature by passing the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map through a feature fusion attention guidance module;
[0048] The subject fatigue state detection and desk lamp brightness control module 105 is used to determine the fatigue state level label based on the facial multi-scale fusion features and automatically adjust the brightness of the desk lamp.
[0049] Specifically, in the technical solution of the present application, first, a facial image of a learning object collected by a camera deployed on a desk lamp is obtained. Next, considering that the facial image of the learning object contains a large amount of feature information about the face of the learning object, these feature information are relevant to the fatigue state detection of the learning object. In addition, it is also considered that the feature information about the fatigue state of the learning object in the image exists not only in the shallow and local features such as texture and edge of the facial image of the learning object, but also in the deep semantics and global features of the expression and state of the facial expression of the learning object in the image. Therefore, in order to make full use of the information in the image and obtain rich feature representations from different levels to improve the representation ability and accuracy of facial features, in the technical solution of the present application, the facial image of the learning object needs to be passed through a multi-scale facial feature extractor based on a pyramid network to obtain a shallow facial feature map and a deep facial feature map. It should be understood that the features in the face image have different scales and levels. By extracting multi-scale features of the facial image in the pyramid network, feature information of different scales and levels about the learning object can be captured, such as shallow and local feature information such as texture and edge of the learning object's face, as well as deep semantics and global feature information of expression and facial state. This can fuse the facial feature information of learning objects at different levels and scales to complement each other in the subsequent facial fatigue state detection process to provide richer information, improve the model's ability to capture and understand facial features, and help improve the discrimination and accuracy of facial features, thereby more accurately detecting the fatigue state of the learning object and controlling the brightness of the desk lamp.
[0050] In one embodiment of the present disclosure, the facial multi-scale feature extraction module is used to: pass the facial image of the learning object through a facial multi-scale feature extractor based on a pyramid network to obtain the facial shallow feature map and the facial deep feature map.
[0051] Furthermore, considering that different spatial position information has different associated semantics of importance and relevance in the deep facial feature map, in order to improve the expressive power of the network and the expressive power of the key facial semantic features, in the technical solution of the present application, the deep facial feature map is further subjected to a spatial information multi-scale dense retention attention module to obtain a spatial multi-scale enhanced deep facial feature map. In particular, the spatial information multi-scale dense retention attention module can add a random pooling process on the basis of the original maximum pooling and average pooling. The random pooling processing method can randomly select the elements in the feature map according to their probability values, which is different from the maximum value pooling that only takes the maximum value element. This not only maximizes the maximum value, but also ensures that not all elements are selected as the maximum value, thereby improving the generalization ability of the network. By introducing random pooling, the module can more comprehensively explore the semantic feature information in the deep facial feature map, thereby improving the stability and robustness of the model when processing different facial features, and helping to improve the model's ability to capture different facial expression semantic features.
[0052] In one embodiment of the present disclosure, the facial deep semantic multi-scale feature enhancement module is used to: process the facial deep feature map through the spatial information multi-scale dense retention attention module with the following enhancement formula to obtain the spatial multi-scale enhanced facial deep feature map; wherein the enhancement formula is:
[0053]
[0054]
[0055] Wherein, F is the facial deep feature map, and Respectively represent the mean pooling feature map, the maximum pooling feature map and the random pooling feature map obtained by performing global mean pooling, global maximum pooling and global random pooling on each feature matrix along the channel dimension in the deep feature map of the face, W1(·) and W0(·) represent multi-layer perceptrons with different numbers of channels, C is the number of channels, σ is the Sigmoid activation function, M c (F) is the attention weight vector, represents the Hadamard product, and F0 is the spatial multi-scale enhanced facial deep feature map.
[0056] In one embodiment of the present disclosure, the facial multi-scale feature fusion module includes: a feature distribution optimization unit, used to perform feature optimization on the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map to obtain an optimized facial shallow feature map and an optimized spatial multi-scale enhanced facial deep feature map; a facial feature multi-scale fusion unit, used to pass the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map through a feature fusion attention guidance module to obtain the facial multi-scale fused feature map.
[0057] Furthermore, the feature distribution optimization unit includes: a weighted coefficient calculation subunit, used to respectively calculate the weighted coefficients of the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map to obtain a first weighted coefficient and a second weighted coefficient; a weighted optimization subunit, used to perform weighted optimization on the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map using the first weighted coefficient and the second weighted coefficient as weighting factors to obtain the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map.
[0058] It should be understood that, considering that the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map respectively represent the shallow local features and deep semantic global features of the learning object in the facial image of the learning object, and the features of different levels and scales are of great significance for the recognition of the facial state and expression of the learning object and fatigue monitoring. Therefore, in order to effectively integrate the feature information of different levels and scales of the learning object's face and improve the model's ability to represent and recognize facial features, in the technical solution of the present application, the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map are further combined through a feature fusion attention guidance module to obtain a facial multi-scale fusion feature map. Specifically, after the optimized spatial multi-scale enhanced facial deep feature map is globally averaged pooled in the channel dimension, the two-dimensional feature matrix in the feature map will be compressed into a real number, which has the global receptive field of each feature in the high-level feature map. Then, this value is used as attention information and multiplied with different features of the optimized facial shallow feature map to guide the position information in the low-level shallow feature map to restore the expression category of the facial state, and obtain a low-level feature map containing different expression states and category information. Finally, the generated low-level feature map and high-level feature map are added and fused to obtain the facial multi-scale fusion feature map with richer semantic information. This can help the model automatically learn the importance between different facial state features, thereby obtaining a richer and more comprehensive facial feature representation of the learning object, which helps to improve the representation ability of facial features.
[0059] In one embodiment of the present disclosure, the facial feature multi-scale fusion unit is used to: process the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map through the feature fusion attention guidance module using the following attention fusion formula to obtain the facial multi-scale fusion feature map; wherein the attention fusion is:
[0060]
[0061] W c =Sigmoid(W i V+B i )
[0062] F c =attention(W c , F2)+F1
[0063] Among them, U c (i, j) is the eigenvalue of the (i, j)th position of each feature matrix along the channel dimension in the optimized spatial multi-scale enhanced facial deep feature map, H and W are the height and width of the optimized spatial multi-scale enhanced facial deep feature map, respectively, S v is the eigenvalue of each position in the spatial multi-scale enhanced facial deep semantic pooling feature vector, V is the spatial multi-scale enhanced facial deep semantic pooling feature vector, W i represents the weight coefficient matrix, B i is the offset vector, Sigmoid(·) is the Sigmoid activation function, W c is a weight vector, attention(·,·) indicates that the weight vector is used to perform a weighted operation on the feature map, F1 is the optimized spatial multi-scale enhanced facial deep feature map, F2 is the optimized facial shallow feature map, and F c It is the facial multi-scale fusion feature map.
[0064] In the technical solution described above, the facial shallow feature map and the facial deep feature map respectively express the image semantic features of different scales and different depths of the facial image of the learning object based on the pyramid network. Therefore, after the facial deep feature map passes through the spatial information multi-scale intensive retention attention module, the attention can be enhanced based on the spatial distribution of the scale and depth corresponding to the deep image semantics, so that the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map have more significant image semantic feature expression distinctiveness relative to the scale and depth differences.
[0065] In this way, when the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map are passed through a feature fusion attention guidance module to obtain a facial multi-scale fusion feature map, and the facial multi-scale fusion feature map is classified by a classifier, it is expected to improve the class probability certainty of the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map under the feature distribution distinctiveness, thereby improving the attention guidance fusion expression effect of the facial multi-scale fusion feature map for the predetermined class probability of the classifier.
[0066] Based on this, the applicant of the present application calculates the weighted coefficients of the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map respectively, which are expressed as follows: the weighted coefficients of the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map are calculated respectively by the following optimization formula to obtain a first weighted coefficient and a second weighted coefficient; wherein the optimization formula is:
[0067]
[0068]
[0069] Among them, f 1-max and f 2-max are the maximum eigenvalues of the facial shallow feature map F1 and the spatial multi-scale enhanced facial deep feature map F2, respectively, 1-j and f 2-j is the j-th eigenvalue of the facial shallow feature map F1 and the spatial multi-scale enhanced facial deep feature map F2, N is the scale of the feature map, log represents a logarithmic function with base 2, and α is a weight hyperparameter, ω1 is a first weighting coefficient, ω2 is a second weighting coefficient, exp[.] represents calculating the value of a natural exponential function with a numerical value as a power; the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map are weighted optimized with the first weighting coefficient and the second weighting coefficient as weighting factors to obtain the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map.
[0070] Specifically, the facial shallow feature map F1 and the spatial multi-scale enhanced facial deep feature map F2 are respectively represented by the majority voting mechanism in the form of temporal crowdsourcing to seek the maximization of the individual information expectation of the feature vectors under the distribution subordinate probability model of the facial shallow feature map F1 and the spatial multi-scale enhanced facial deep feature map F2 relative to the class probability space, so that the facial shallow feature map F1 and the spatial multi-scale enhanced facial deep feature map F2 are weighted by coefficients ω1 and ω1 to optimize the facial shallow feature map F1 and the spatial multi-scale enhanced facial deep feature map F2. The spatial multi-scale enhanced facial deep feature map F2 can be used to perform a joint estimation of the distribution relative to the class probability space based on the average information confidence of the characteristic values of the facial shallow feature map F1 and the spatial multi-scale enhanced facial deep feature map F2, so as to maintain the distinguishability of the characteristic distribution of the facial shallow feature map F1 and the spatial multi-scale enhanced facial deep feature map F2 while improving their class probability certainty relative to the class probability space, thereby improving the attention-guided fusion expression effect of the facial multi-scale fusion feature map for the classifier's predetermined class probability and improving the accuracy of the classification results. In this way, the degree of fatigue of the learning object can be identified by real-time monitoring of the learning object's facial expression and state changes, so as to dynamically adjust the brightness of the desk lamp and provide students with a more comfortable and efficient learning environment.
[0071] Then, the facial multi-scale fusion feature map is passed through a classifier-based fatigue state evaluator to obtain an evaluation result, and the evaluation result is used to represent the fatigue state level label. In other words, the multi-scale fusion feature information of the face of the learning object is used for classification processing to evaluate the fatigue state of the learning object, and based on the evaluation result, the brightness of the desk lamp is automatically adjusted. In this way, the user's facial expression can be monitored in real time to optimize the learning environment. For example, by analyzing the learner's facial state, the smart desk lamp can evaluate the learner's fatigue level or attention level, and dynamically adjust the brightness of the desk lamp accordingly to optimize the learning environment, reduce eyestrain and improve learning efficiency.
[0072] In one embodiment of the present disclosure, the object fatigue state detection and desk lamp brightness control module includes: a learning object fatigue state level detection unit, used to pass the facial multi-scale fusion feature map through a classifier-based fatigue state evaluator to obtain an evaluation result, and the evaluation result is used to represent the fatigue state level label; a desk lamp brightness control unit, used to automatically adjust the desk lamp brightness based on the evaluation result.
[0073] Furthermore, the learning object fatigue state level detection unit includes: a matrix expansion subunit, used to expand the facial multi-scale fusion feature map into a classification feature vector according to a row vector or a column vector; a fully connected encoding subunit, used to use multiple fully connected layers of the classifier-based fatigue state evaluator to fully connect encode the classification feature vector to obtain an encoded classification feature vector; and a classification subunit, used to pass the encoded classification feature vector through the Softmax classification function of the classifier-based fatigue state evaluator to obtain the evaluation result.
[0074] In one embodiment of the present disclosure, Figure 2 As shown, a Reman smart diary desk lamp is provided, which is an intelligent desk lamp integrating the features of lighting, image acquisition, and lamp wing rotation.
[0075] The light brightness and color temperature are adjustable in multiple levels to protect eyesight to the maximum extent in different brightness environments. The Ra color rendering index is as high as 95, and the light illumination / illuminance uniformity meets the country's highest standard for eye-protection lighting, the National AA level.
[0076] The desk lamp is equipped with two cameras, which respectively capture the desktop learning situation and the student's facial status, and form an image acquisition system through a high-performance image processing chip; Remang Technology has applications on both Apple and Android platforms. You can remotely watch the child's learning status, live broadcast playback, cloud services, cloud space, etc. on the Remang APP, providing a high-quality experience.
[0077] The desk lamp uses a tube as the storage body, and the two light panels can be stored in the tube, which greatly reduces the space occupied and is convenient for placement and storage; the two light panels can be rotated 270° respectively to minimize the shadow and best meet the learning conditions of students of different heights.
[0078] In summary, the above solution can not only provide basic lighting through the smart desk lamp, but also monitor the user's facial expressions through machine vision and image data processing technology to optimize the learning environment. For example, by analyzing the learner's facial state, the smart desk lamp can assess the learner's fatigue or attention level, and dynamically adjust the brightness of the desk lamp accordingly, providing students with a more comfortable and efficient learning environment.
[0079] Figure 3 is a flow chart showing a method for using a smart desk lamp based on image data processing according to an exemplary embodiment. Figure 3 As shown, the method includes:
[0080] Step 201: Obtain a facial image of a learning object collected by a camera deployed on a desk lamp;
[0081] Step 202: Perform multi-scale feature extraction on the facial image of the learning object by using a facial multi-scale feature extractor based on a deep neural network to obtain a facial shallow feature map and a facial deep feature map;
[0082] Step 203, the facial deep feature map is passed through a spatial information multi-scale dense retention attention module to obtain a spatial multi-scale enhanced facial deep feature map;
[0083] Step 204: The facial shallow feature map and the spatial multi-scale enhanced facial deep feature map are passed through a feature fusion attention guidance module to obtain a facial multi-scale fusion feature map as a facial multi-scale fusion feature;
[0084] Step 205: Based on the multi-scale fusion features of the face, determine the fatigue state level label and automatically adjust the brightness of the desk lamp.
[0085] Reference below Figure 4 , which shows a structural schematic diagram of an electronic device 600 suitable for implementing an embodiment of the present disclosure. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0086] like Figure 4 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0087] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0088] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0089] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0090] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0091] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, a test parameter acquisition module may also be described as a "module for acquiring device test parameters corresponding to a target device".
[0092] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0093] According to one or more embodiments of the present disclosure, Example 1 provides a smart desk lamp based on image data processing, the smart desk lamp comprising:
[0094] A learning object facial image acquisition module, used to acquire a learning object facial image acquired by a camera deployed on a desk lamp;
[0095] A facial multi-scale feature extraction module, used for performing multi-scale feature extraction on the facial image of the learning object through a facial multi-scale feature extractor based on a deep neural network to obtain a facial shallow feature map and a facial deep feature map;
[0096] A facial deep semantic multi-scale feature enhancement module, used for obtaining a spatial multi-scale enhanced facial deep feature map by passing the facial deep feature map through a spatial information multi-scale intensive retention attention module;
[0097] A facial multi-scale feature fusion module, used for obtaining a facial multi-scale fusion feature map as a facial multi-scale fusion feature by passing the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map through a feature fusion attention guidance module;
[0098] The object fatigue state detection and desk lamp brightness control module is used to determine the fatigue state level label based on the multi-scale fusion features of the face and automatically adjust the brightness of the desk lamp.
[0099] According to one or more embodiments of the present disclosure, Example 2 provides the smart desk lamp of Example 1, wherein the facial multi-scale feature extraction module is used to: pass the facial image of the learning object through a pyramid network-based facial multi-scale feature extractor to obtain the facial shallow feature map and the facial deep feature map.
[0100] According to one or more embodiments of the present disclosure, Example 3 provides the smart desk lamp of Example 2, wherein the facial deep semantic multi-scale feature enhancement module is used to: process the facial deep feature map through the spatial information multi-scale dense retention attention module with the following enhancement formula to obtain the spatial multi-scale enhanced facial deep feature map;
[0101] Wherein, the strengthening formula is:
[0102]
[0103]
[0104] Wherein, F is the facial deep feature map, and Respectively represent the mean pooling feature map, the maximum pooling feature map and the random pooling feature map obtained by performing global mean pooling, global maximum pooling and global random pooling on each feature matrix along the channel dimension in the deep feature map of the face, W1(·) and W0(·) represent multi-layer perceptrons with different numbers of channels, C is the number of channels, σ is the Sigmoid activation function, M c (F) is the attention weight vector, represents the Hadamard product, and F0 is the spatial multi-scale enhanced facial deep feature map.
[0105] According to one or more embodiments of the present disclosure, Example 4 provides the smart desk lamp of Example 3, wherein the facial multi-scale feature fusion module includes:
[0106] A feature distribution optimization unit, used for performing feature optimization on the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map to obtain an optimized facial shallow feature map and an optimized spatial multi-scale enhanced facial deep feature map;
[0107] The facial feature multi-scale fusion unit is used to obtain the facial multi-scale fusion feature map by passing the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map through a feature fusion attention guidance module.
[0108] According to one or more embodiments of the present disclosure, Example 5 provides the smart desk lamp of Example 4, wherein the feature distribution optimization unit includes:
[0109] A weighted coefficient calculation subunit, used to calculate the weighted coefficients of the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map respectively to obtain a first weighted coefficient and a second weighted coefficient;
[0110] A weighted optimization subunit is used to perform weighted optimization on the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map using the first weighting coefficient and the second weighting coefficient as weighting factors to obtain the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map.
[0111] According to one or more embodiments of the present disclosure, Example 6 provides the smart desk lamp of Example 5, wherein the facial feature multi-scale fusion unit is used to: process the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map through the feature fusion attention guidance module using the following attention fusion formula to obtain the facial multi-scale fusion feature map;
[0112] Wherein, the attention fusion is:
[0113]
[0114] W c =Sigmoid(W i V+B i )
[0115] F c =attention(W c , F2)+F1
[0116] Among them, U c (i, j) is the eigenvalue of the (i, j)th position of each feature matrix along the channel dimension in the optimized spatial multi-scale enhanced facial deep feature map, H and W are the height and width of the optimized spatial multi-scale enhanced facial deep feature map, respectively, S v is the eigenvalue of each position in the spatial multi-scale enhanced facial deep semantic pooling feature vector, V is the spatial multi-scale enhanced facial deep semantic pooling feature vector, W i represents the weight coefficient matrix, B i is the offset vector, Sigmoid(·) is the Sigmoid activation function, Wc is a weight vector, attention(·,·) indicates that the weight vector is used to perform a weighted operation on the feature map, F1 is the optimized spatial multi-scale enhanced facial deep feature map, F2 is the optimized facial shallow feature map, and F c It is the facial multi-scale fusion feature map.
[0117] According to one or more embodiments of the present disclosure, Example 7 provides the smart desk lamp of Example 6, wherein the object fatigue state detection and desk lamp brightness control module comprises:
[0118] A learning object fatigue state level detection unit, used for passing the facial multi-scale fusion feature map through a classifier-based fatigue state evaluator to obtain an evaluation result, wherein the evaluation result is used to represent a fatigue state level label;
[0119] The desk lamp brightness control unit is used to automatically adjust the brightness of the desk lamp based on the evaluation result.
[0120] According to one or more embodiments of the present disclosure, Example 8 provides the smart desk lamp of Example 7, wherein the learning object fatigue state level detection unit includes:
[0121] A matrix expansion subunit, used for expanding the facial multi-scale fusion feature map into a classification feature vector according to a row vector or a column vector;
[0122] a fully connected encoding subunit, configured to perform fully connected encoding on the classification feature vector using a plurality of fully connected layers of the classifier-based fatigue state evaluator to obtain an encoded classification feature vector; and
[0123] The classification subunit is used to pass the encoded classification feature vector through the Softmax classification function of the classifier-based fatigue state evaluator to obtain the evaluation result.
[0124] Figure 5 FIG. 1 is a diagram showing an application scenario of a smart desk lamp based on image data processing according to an exemplary embodiment. Figure 5 As shown, in this application scenario, first, a facial image of the learning object collected by a camera deployed on a desk lamp is obtained (for example, Figure 5 Then, the acquired facial image of the learning object is input to a server (for example, Figure 5 In S) shown in , the server is capable of processing the facial image of the learning object based on an intelligent algorithm for image data processing to determine the fatigue state level label and automatically adjust the brightness of the desk lamp.
[0125] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0126] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0127] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. An intelligent desk lamp based on image data processing, characterized in that: include: A learning object facial image acquisition module, used to acquire a learning object facial image acquired by a camera deployed on a desk lamp; A facial multi-scale feature extraction module, used for performing multi-scale feature extraction on the facial image of the learning object through a facial multi-scale feature extractor based on a deep neural network to obtain a facial shallow feature map and a facial deep feature map; A facial deep semantic multi-scale feature enhancement module, used for obtaining a spatial multi-scale enhanced facial deep feature map by passing the facial deep feature map through a spatial information multi-scale intensive retention attention module; A facial multi-scale feature fusion module, used for obtaining a facial multi-scale fusion feature map as a facial multi-scale fusion feature by passing the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map through a feature fusion attention guidance module; A subject fatigue state detection and desk lamp brightness control module, used to determine the fatigue state level label based on the multi-scale fusion features of the face and automatically adjust the brightness of the desk lamp; The facial multi-scale feature fusion module comprises: A feature distribution optimization unit, used for performing feature optimization on the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map to obtain an optimized facial shallow feature map and an optimized spatial multi-scale enhanced facial deep feature map; A facial feature multi-scale fusion unit, used for obtaining the facial multi-scale fusion feature map by passing the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map through a feature fusion attention guidance module; The feature distribution optimization unit comprises: A weighted coefficient calculation subunit, used to calculate the weighted coefficients of the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map respectively to obtain a first weighted coefficient and a second weighted coefficient; A weighted optimization subunit, configured to perform weighted optimization on the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map using the first weighting coefficient and the second weighting coefficient as weighting factors to obtain the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map; The weighted coefficient calculation subunit is used to calculate the weighted coefficients of the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map respectively according to the following optimization formula to obtain a first weighted coefficient and a second weighted coefficient; wherein the optimization formula is: ; ; in, and They are the superficial facial feature maps and spatial multi-scale enhanced facial deep feature map The maximum eigenvalue of and It is a superficial facial feature map and spatial multi-scale enhanced facial deep feature map No. Eigenvalues, is the scale of the feature map, represents the logarithmic function with base 2, and is the weight hyperparameter, is the first weighting coefficient, is the second weighting coefficient, It represents calculating the value of a natural exponential function with a numerical value as a power; using the first weighting coefficient and the second weighting coefficient as weighting factors, weighted optimization is performed on the facial shallow feature map and the spatial multi-scale enhanced facial deep feature map to obtain the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map.
2. The intelligent desk lamp based on image data processing according to claim 1, characterized in that: The facial multi-scale feature extraction module is used to: pass the facial image of the learning object through a facial multi-scale feature extractor based on a pyramid network to obtain the facial shallow feature map and the facial deep feature map.
3. The intelligent desk lamp based on image data processing according to claim 2, characterized in that: The facial deep semantic multi-scale feature enhancement module is used to: process the facial deep feature map through the spatial information multi-scale dense retention attention module with the following enhancement formula to obtain the spatial multi-scale enhanced facial deep feature map; Wherein, the strengthening formula is: ; ; in, is the facial deep feature map, , and Respectively represent the mean pooling feature map, the maximum pooling feature map and the random pooling feature map obtained by performing global mean pooling, global maximum pooling and global random pooling on each feature matrix along the channel dimension in the deep facial feature map, and Represents multi-layer perceptrons with different numbers of channels, C is the number of channels, for Sigmoid Activation function, is the attention weight vector, represents the Hadamard product, The facial deep feature map is enhanced at multiple scales in the space.
4. The intelligent desk lamp based on image data processing according to claim 3, characterized in that: The facial feature multi-scale fusion unit is used to: process the optimized facial shallow feature map and the optimized spatial multi-scale enhanced facial deep feature map through the feature fusion attention guidance module using the following attention fusion formula to obtain the facial multi-scale fusion feature map; Among them, the attention fusion formula is: ; ; ; in, The optimized spatial multi-scale enhanced facial deep feature map is the first feature matrix of each feature matrix along the channel dimension. The eigenvalues of the positions, and are the height and width of the optimized spatial multi-scale enhanced facial deep feature map, respectively. To enhance the feature values of each position in the deep semantic pooling feature vector of the face at multiple spatial scales, is the spatial multi-scale enhanced facial deep semantic pooling feature vector, represents the weight coefficient matrix, is the offset vector, for Activation function, is the weight vector, Indicates that the weighted operation is performed on the feature map using the weight vector. For the optimization space multi-scale enhanced facial deep feature map, For the optimization of the facial shallow feature map, It is the facial multi-scale fusion feature map.
5. The intelligent desk lamp based on image data processing according to claim 4, characterized in that: The object fatigue state detection and desk lamp brightness control module includes: A learning object fatigue state level detection unit, used for passing the facial multi-scale fusion feature map through a classifier-based fatigue state evaluator to obtain an evaluation result, wherein the evaluation result is used to represent a fatigue state level label; The desk lamp brightness control unit is used to automatically adjust the brightness of the desk lamp based on the evaluation result.
6. The intelligent desk lamp based on image data processing according to claim 5, characterized in that: The learning object fatigue state level detection unit includes: A matrix expansion subunit, used for expanding the facial multi-scale fusion feature map into a classification feature vector according to a row vector or a column vector; a fully connected encoding subunit, configured to perform fully connected encoding on the classification feature vector using a plurality of fully connected layers of the classifier-based fatigue state evaluator to obtain an encoded classification feature vector; and a classification subunit, which is used to pass the encoded classification feature vector through the Softmax classification function of the classifier-based fatigue state evaluator to obtain the evaluation result.
Citation Information
Patent Citations
Intelligent lamplight regulation and control method and system for table lamp
CN117315749A
High-resolution remote sensing image water body extraction network model and method
CN117809181A
