Intelligent eye protection method, device and computer readable storage medium
By capturing user images on a television set and using facial recognition and key point detection models to guide eye-protecting games, the problem of eye fatigue in children and teenagers after watching television for extended periods of time is solved, achieving a fun and effective eye-protection experience.
Patent Information
- Application Number
- CN202111527492.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2041-12-14
AI Technical Summary
In existing technologies, simply relaxing and resting after watching television for extended periods is not an effective way to relieve eye strain for children and adolescents, leading to vision problems.
By calling a preset camera to capture user images, recognizing user images, and selecting game objects through a pre-trained facial recognition model, the user is guided to play eye-protection games in the eye-protection game interface. The facial key point detection model monitors the eye status in real time to ensure that the user completes the opening and closing of eyes within a preset time.
It significantly increases the enjoyment of the eye care process, effectively relieves eye fatigue, reduces users' resistance to eye care, ensures that the eyes get enough rest, and improves the eye care effect.
Smart Images

Figure CN114210045B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of television sets, and more particularly to intelligent eye protection methods, devices, and computer-readable storage media. Background Art
[0002] Children and teenagers are the core group of families and also one of the core users of television. It is a well-known fact that using electronic products can cause eye fatigue and vision loss. How to make children watch television more safely and healthily, so as to reassure parents, is an urgent problem we need to solve.
[0003] The current practice is to remind users to take a break after watching TV for a certain period of time.
[0004] However, for children, simply relaxing and resting is not very effective in relieving eye fatigue. Summary of the Invention
[0005] The main objective of this invention is to provide an intelligent eye protection method, device, and computer-readable storage medium, aiming to solve the technical problem of how to significantly and effectively allow users' eyes to get sufficient rest after watching television.
[0006] To achieve the above objectives, the present invention provides an intelligent eye protection method, which includes the following steps:
[0007] A preset camera is used to capture user images, and the user images are then recognized to obtain recognition results.
[0008] The recognition results are analyzed using a pre-trained face recognition model to select game objects;
[0009] The game object is guided to play an eye-protection game in a preset eye-protection game interface.
[0010] Optionally, the step of parsing the recognition result using a pre-trained face recognition model to select game objects includes:
[0011] If the result of parsing the recognition result by the pre-trained face recognition model is that the user image contains only one face image, then the user corresponding to the face image is selected as the game object;
[0012] If the result of parsing the recognition result by the pre-trained face recognition model is that the user image contains multiple face images, then the game object is selected from the users corresponding to the multiple face images according to the completeness, area and distance between the face images and the camera.
[0013] Optionally, the step of guiding the game object to play an eye-protection game in a preset eye-protection game interface includes:
[0014] Once the eye-protection game starts, the facial status of the game object is detected in real time.
[0015] The pre-trained facial landmark detection model is invoked to detect and identify the facial state, so as to obtain the facial landmark coordinates of the game object in real time.
[0016] When the eyes are detected based on the coordinates of the facial key points, the game object is guided to enter the eye protection step;
[0017] If the eye opening and closing state of the game object always meets the preset requirements within the first preset time period, then the eye protection is determined to be successful, and the game object is prompted that the eye protection game has been completed.
[0018] Optionally, the step of guiding the game object into the eye protection step includes:
[0019] The game screen is displayed in its initial state, background music is played, and a voice prompt is given to the game character to close their eyes;
[0020] If the game object does not open its eyes within the second preset time period, a voice prompt will be given to the game object to open its eyes, and the game screen in the initial state will be dynamically switched to the game screen in the growth state.
[0021] Repeat the voice prompts for the game object to close and open its eyes multiple times until the game screen dynamically transitions to the completed state.
[0022] The steps that the game object has completed in this eye-protection game, as indicated by the prompt, include:
[0023] The voice broadcast displays praise-type text messages on the game screen when the game is complete, to indicate to the player that the eye-protecting game has been finished.
[0024] Optionally, the step of recognizing the user image to obtain a recognition result includes:
[0025] The current display screen is obtained, and a pre-trained face recognition model is invoked to detect and recognize the user image to obtain the face image recognition result;
[0026] The step of obtaining the identification result is followed by:
[0027] The facial image recognition result is sent to the display device so that the display device adjusts the image parameters and sound parameters according to the facial image recognition result.
[0028] Optionally, the step of parsing the recognition result using a pre-trained face recognition model to select a game object includes:
[0029] The identity of the game object is confirmed based on the facial image recognition result, and it is determined whether the game object is entering the eye-protection game for the first time on that day based on the identity of the game object;
[0030] If the game object is not entering the eye protection game for the first time on that day, then the step of guiding the game object to play the eye protection game in the eye protection game interface is executed;
[0031] If this is the first time the player is entering the eye-protection game on this day, the player will be guided to play the eye-protection game on the eye-protection game interface after the eye-protection game instructions are displayed.
[0032] Optionally, the step of guiding the game object to play an eye-protection game in a preset eye-protection game interface includes the following before:
[0033] Displays the number of times the game object has received eye protection that day and the number of times it still needs eye protection.
[0034] If the remaining number of eye protection attempts is greater than zero, then guide the game object into the eye protection step;
[0035] If there are zero remaining attempts to protect the eyes, but the game receives a command to continue playing, then the game object is guided into the eye protection step.
[0036] Optionally, the step of calling a preset camera to capture user images includes the following before:
[0037] When the viewing interface runs for a third preset duration, the viewing interface is hidden and an eye protection reminder interface is displayed.
[0038] After the eye protection reminder interface has been displayed for a certain period of time, the occupancy status of the preset camera is detected;
[0039] If the preset camera is not in use, the eye protection reminder interface is hidden and the preset eye protection game interface is displayed.
[0040] If the preset camera is occupied, prompt the user to exit other applications that are occupying the preset camera.
[0041] When a confirmation to exit is received, other applications occupying the preset camera are exited, the preset camera is accessed, the eye protection reminder interface is hidden, and the preset eye protection game interface is displayed.
[0042] In addition, to achieve the above objectives, the present invention also provides an intelligent eye protection device, the intelligent eye protection device comprising: a memory, a processor, and an intelligent eye protection program stored in the memory and executable on the processor, wherein the intelligent eye protection program, when executed by the processor, implements the steps of the intelligent eye protection method as described above.
[0043] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing an intelligent eye protection program, which, when executed by a processor, implements the steps of the intelligent eye protection method as described above.
[0044] This invention proposes an intelligent eye protection method, device, and computer-readable storage medium. In the intelligent eye protection method, a user image is captured by a preset camera, the user image is identified, and a recognition result is obtained. The recognition result is then analyzed using a pre-trained face recognition model to select a game object. The game object is guided to play an eye-protection game within a preset eye-protection game interface. By guiding the game object to play the eye-protection game, the fun of the eye-protection process is increased, significantly and effectively relieving eye fatigue, allowing the game object's eyes to rest fully, reducing children's resistance to eye protection, and ensuring the eye-protection effect. Attached Figure Description
[0045] Figure 1 This is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiments of the present invention;
[0046] Figure 2 This is a flowchart illustrating the first embodiment of the intelligent eye protection method of the present invention;
[0047] Figure 3 This is a flowchart illustrating the second embodiment of the intelligent eye protection method of the present invention.
[0048] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0049] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0050] The main solution of this invention is: an intelligent eye protection method, which includes the following steps:
[0051] When the viewing interface reaches the first preset duration, the viewing interface is hidden and the eye protection reminder interface is displayed.
[0052] Detect whether the camera is occupied. If the camera is not occupied, connect the camera, hide the eye protection reminder interface and display the eye protection game interface.
[0053] The camera is used to select a game object, which is then guided to play an eye-protection game on the eye-protection game interface.
[0054] Children and teenagers are the core group in families and also among the core users of television. It is a well-known fact that using electronic products can cause eye strain and vision loss. How to ensure children watch television more safely and healthily, thus giving parents peace of mind, is a problem we urgently need to solve. The current practice is to remind users to take a break after watching television for a certain period of time.
[0055] However, for children, simply relaxing and resting is not very effective in relieving eye fatigue.
[0056] To address this, the present invention provides an intelligent eye protection method. In this method, when the viewing interface's runtime reaches a first preset duration, the viewing interface is hidden, and an eye protection reminder interface is displayed. The method also detects whether a camera is occupied; if the camera is not occupied, it is connected, the eye protection reminder interface is hidden, and an eye protection game interface is displayed. A game object is selected via the camera, and the game object is guided to play an eye-protection game within the eye-protection game interface. By guiding the game object to play an eye-protection game, the fun of the eye-protection process is increased, significantly and effectively relieving eye fatigue in the game object, allowing the game object's eyes to rest fully, reducing children's resistance to eye protection, and ensuring the eye-protection effect.
[0057] like Figure 1 As shown, Figure 1 This is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiments of the present invention.
[0058] In this embodiment of the invention, the terminal can be a television set, or a terminal device with display function such as a PC, smartphone, tablet computer, or portable computer.
[0059] like Figure 1As shown, the terminal may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0060] Optionally, the terminal may also include a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, a WiFi module, and so on. Sensors may include light sensors, motion sensors, and other sensors. Specifically, light sensors may include ambient light sensors and proximity sensors. The ambient light sensor can adjust the display brightness according to the ambient light level, while the proximity sensor can turn off the display and / or backlight when the mobile terminal is moved to the ear. As a type of motion sensor, a gravity accelerometer can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity, and can be used for applications that identify the mobile terminal's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition functions (such as pedometers, taps), etc. Of course, the mobile terminal may also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, which will not be elaborated here.
[0061] Those skilled in the art will understand that Figure 1 The terminal structure shown does not constitute a limitation on the terminal and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0062] like Figure 1 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an intelligent eye protection program.
[0063] exist Figure 1 In the terminal shown, network interface 1004 is mainly used to connect to the backend server and communicate data with it; user interface 1003 is mainly used to connect to the client (user terminal) and communicate data with it; while processor 1001 can be used to call the intelligent eye protection program stored in memory 1005 and perform the following operations:
[0064] A preset camera is used to capture user images, and the user images are then recognized to obtain recognition results.
[0065] The recognition results are analyzed using a pre-trained face recognition model to select game objects;
[0066] The game object is guided to play an eye-protection game in a preset eye-protection game interface.
[0067] Furthermore, the processor 1001 can call the intelligent eye protection program stored in the memory 1005 and also perform the following operations:
[0068] The step of parsing the recognition results using a pre-trained face recognition model to select game objects includes:
[0069] If the result of parsing the recognition result by the pre-trained face recognition model is that the user image contains only one face image, then the user corresponding to the face image is selected as the game object;
[0070] If the result of parsing the recognition result by the pre-trained face recognition model is that the user image contains multiple face images, then the game object is selected from the users corresponding to the multiple face images according to the completeness, area and distance between the face images and the camera.
[0071] Furthermore, the processor 1001 can call the intelligent eye protection program stored in the memory 1005 and also perform the following operations:
[0072] The steps of guiding the game object to play an eye-protection game in a preset eye-protection game interface include:
[0073] Once the eye-protection game starts, the facial status of the game object is detected in real time.
[0074] The pre-trained facial landmark detection model is invoked to detect and identify the facial state, so as to obtain the facial landmark coordinates of the game object in real time.
[0075] When the eyes are detected based on the coordinates of the facial key points, the game object is guided to enter the eye protection step;
[0076] If the eye opening and closing state of the game object always meets the preset requirements within the first preset time period, then the eye protection is determined to be successful, and the game object is prompted that the eye protection game has been completed.
[0077] Furthermore, the processor 1001 can call the intelligent eye protection program stored in the memory 1005 and also perform the following operations:
[0078] The steps for guiding the game object into the eye protection step include:
[0079] The game screen is displayed in its initial state, background music is played, and a voice prompt is given to the game character to close their eyes;
[0080] If the game object does not open its eyes within the second preset time period, a voice prompt will be given to the game object to open its eyes, and the game screen in the initial state will be dynamically switched to the game screen in the growth state.
[0081] Repeat the voice prompts for the game object to close and open its eyes multiple times until the game screen dynamically transitions to the completed state.
[0082] The steps that the game object has completed in this eye-protection game, as indicated by the prompt, include:
[0083] The voice broadcast displays praise-type text messages on the game screen when the game is complete, to indicate to the player that the eye-protecting game has been finished.
[0084] Furthermore, the processor 1001 can call the intelligent eye protection program stored in the memory 1005 and also perform the following operations:
[0085] The step of recognizing the user image to obtain a recognition result includes:
[0086] The current display screen is obtained, and a pre-trained face recognition model is invoked to detect and recognize the user image to obtain the face image recognition result;
[0087] The step of obtaining the identification result is followed by:
[0088] The facial image recognition result is sent to the display device so that the display device adjusts the image parameters and sound parameters according to the facial image recognition result.
[0089] Furthermore, the processor 1001 can call the intelligent eye protection program stored in the memory 1005 and also perform the following operations:
[0090] The identity of the game object is confirmed based on the facial image recognition result, and it is determined whether the game object is entering the eye-protection game for the first time on that day based on the identity of the game object;
[0091] If the game object is not entering the eye protection game for the first time on that day, then the step of guiding the game object to play the eye protection game in the eye protection game interface is executed;
[0092] If this is the first time the player is entering the eye-protection game on this day, the player will be guided to play the eye-protection game on the eye-protection game interface after the eye-protection game instructions are displayed.
[0093] Furthermore, the processor 1001 can call the intelligent eye protection program stored in the memory 1005 and also perform the following operations:
[0094] Displays the number of times the game object has received eye protection that day and the number of times it still needs eye protection.
[0095] If the remaining number of eye protection attempts is greater than zero, then guide the game object into the eye protection step;
[0096] If there are zero remaining attempts to protect the eyes, but the game receives a command to continue playing, then the game object is guided into the eye protection step.
[0097] Furthermore, the processor 1001 can call the intelligent eye protection program stored in the memory 1005 and also perform the following operations:
[0098] When the viewing interface runs for a third preset duration, the viewing interface is hidden and an eye protection reminder interface is displayed.
[0099] After the eye protection reminder interface has been displayed for a certain period of time, the occupancy status of the preset camera is detected;
[0100] If the preset camera is not in use, the eye protection reminder interface is hidden and the preset eye protection game interface is displayed.
[0101] If the preset camera is occupied, prompt the user to exit other applications that are occupying the preset camera.
[0102] When a confirmation to exit is received, other applications occupying the preset camera are exited, the preset camera is accessed, the eye protection reminder interface is hidden, and the preset eye protection game interface is displayed.
[0103] Reference Figure 2 The first embodiment of the present invention provides an intelligent eye protection method, the intelligent eye protection method comprising:
[0104] Step S10: Call a preset camera to capture user images, and recognize the user images to obtain recognition results;
[0105] It should be noted that in this embodiment, the executing entity is a television set, and the preset camera is a ToF (Time of Flight) camera module, which is used to accurately acquire and model facial data. Combined with the model's recognition capabilities, it can accurately determine the state of a face, such as whether the eyes are open or closed.
[0106] The step S10, which involves recognizing the user image to obtain a recognition result, includes:
[0107] The current display screen is obtained, and a pre-trained facial landmark detection model is invoked to detect and recognize the user image to obtain the facial image recognition result.
[0108] The step of obtaining the identification result is followed by:
[0109] The facial image recognition result is sent to the display device so that the display device adjusts the image parameters and sound parameters according to the facial image recognition result.
[0110] It should be noted that the currently displayed screen refers to the screen shown on the television. The training prerequisite for the facial landmark detection model in this embodiment is that, in scene recognition, images of different scenes are collected as input data for the network model to train it. First, a `train_picture` directory is created. Within this directory, scene subdirectories such as `open_your_eyes`, `close_your_eyes`, `open_left_close_right_eye`, `open_right_close_left_eye`, and `unknown` are created. The names of these subdirectories are crucial; they serve as new label names, defining the classification label for each image. These scene images are played on the television, and the command "screencap -p image_name" is used to capture images. The captured images are stored in the corresponding scene directories. Each scene directory can only contain images of its corresponding scene. Alternatively, images of various scenes can be obtained from a server as scene data. The `unknown` directory must exist; this directory stores the unknown dataset to facilitate feature extraction during model training. The `unknown` directory must store the unknown dataset to facilitate feature extraction during model training. Positive and negative feature values are crucial for high scene recognition accuracy. Besides training the AI chip with the correct model and data to obtain positive feature values, it's also necessary to train it with incorrect models and data to obtain negative feature values. This allows the AI chip to recognize differences and improves recognition accuracy. For example, we can't just train the AI chip with the correct models for "both eyes open," "both eyes closed," "left eye open," "right eye closed," and "right eye open," "left eye closed." We also need to store the "unknown" dataset in the "unknown" directory to improve recognition accuracy. Each directory should contain at least 1000 images; otherwise, the training script will report errors. The more images, the higher the accuracy of the trained model.
[0111] In this embodiment, the AI function implementation is divided into a host side and a platform side. The host side mainly compiles runtime library files and trains models, while the platform side mainly takes a screenshot of the currently playing content and then calls the trained model to identify scenes with open or closed eyes in the screenshot image. AI eye protection is then implemented through a combination of a camera and an eye-protection game. After receiving the facial recognition result corresponding to the current display screen sent by the TV, the image parameters of the current display screen and the sound parameters of the background music are adjusted according to the facial recognition result. It can be understood that the adjusted image and sound parameters are directly applied to the TV, so that the TV's playback image and sound conform to the adjusted image and sound parameters.
[0112] In this embodiment, the steps preceding step S10 include:
[0113] When the viewing interface runs for a third preset duration, the viewing interface is hidden and an eye protection reminder interface is displayed.
[0114] After the eye protection reminder interface has been displayed for a certain period of time, the occupancy status of the preset camera is detected;
[0115] If the preset camera is not in use, the eye protection reminder interface is hidden and the preset eye protection game interface is displayed.
[0116] If the preset camera is occupied, prompt the user to exit other applications that are occupying the preset camera.
[0117] When a confirmation to exit is received, other applications occupying the preset camera are exited, the preset camera is accessed, the eye protection reminder interface is hidden, and the preset eye protection game interface is displayed.
[0118] It should be noted that the third preset duration is set to 2 hours.
[0119] Understandably, when the television detects that the viewing interface has been running for 2 hours, it will hide the viewing interface and display an eye protection reminder interface to remind the user watching the television: "You have been watching television for too long; it's time to give your eyes a rest." In this embodiment, the eye protection game requires the cooperation of a camera to function properly. When the camera is not occupied by other applications, the AI (Artificial Intelligence) eye protection program is activated. The AI eye protection game relies on the camera; when the camera is currently connected, the eye protection interface is hidden, and the AI eye protection game entry point, i.e., the eye protection game interface, is displayed.
[0120] In this embodiment, after detecting whether the camera is occupied, the method further includes:
[0121] If the camera is occupied, prompt the user to exit other applications that are using the camera.
[0122] When a confirmation to exit is received, other applications occupying the camera are closed, the camera is accessed, the eye protection reminder interface is hidden, and the eye protection game interface is displayed.
[0123] It is understandable that the camera may be occupied during TV use. If the camera is being used by other applications, a prompt box should pop up. After the user selects "OK", they can exit the other applications and allow the current application, namely the AI eye protection program, to use the camera.
[0124] Step S20: Analyze the recognition results using a pre-trained face recognition model to select a game object;
[0125] In this embodiment, step S20, which involves parsing the recognition result using a pre-trained face recognition model to select a game object, includes:
[0126] Step S21: If the result of parsing the recognition result by the pre-trained face recognition model is that the user image contains only one face image, then the user corresponding to the face image is selected as the game object.
[0127] Step S22: If the result of parsing the recognition result by the pre-trained face recognition model is that the user image contains multiple face images, then the game object is selected from the users corresponding to the multiple face images according to the completeness, area and distance between the face image and the camera.
[0128] Understandably, before the eye-protection game starts, it is necessary to select the target users for the eye-protection game. In this embodiment, users appearing in the image captured by the camera will be identified first. When multiple users appear at the same time, the integrity of the portrait and the area of the portrait frame will be judged first. If the difference is not significant, the user who is closer will be selected as the game object.
[0129] Step S30: Guide the game object to play an eye-protection game in a preset eye-protection game interface.
[0130] Understandably, after selecting a game object, guiding that object to complete an eye-friendly game can help protect the eyes, reduce eye fatigue, and allow the eyes to rest fully.
[0131] In this embodiment, when the viewing interface reaches a first preset duration, the viewing interface is hidden and an eye-protection reminder interface is displayed. Simultaneously, it checks if the camera is occupied. If the camera is not occupied, it is connected, the eye-protection reminder interface is hidden, and an eye-protection game interface is displayed. A game object is selected via the camera, and the game object is guided to play an eye-protection game within the eye-protection game interface. Guiding the game object to play an eye-protection game increases the fun of the eye-protection process, significantly and effectively relieving eye fatigue, allowing the game object's eyes to rest fully, reducing children's resistance to eye protection, and ensuring the eye-protection effect. The AI chip and a pre-trained facial landmark detection model identify the user, and the corresponding images and music are displayed based on the identification results, ensuring the accuracy of the eye-protection process.
[0132] Furthermore, refer to Figure 3 The second embodiment of the intelligent eye protection method of the present invention is proposed, based on the above. Figure 2 In the embodiment shown, step S30, which guides the game object to play an eye-protection game in a preset eye-protection game interface, includes:
[0133] Step S31: After the eye-protection game starts, the facial status of the game object is detected in real time;
[0134] Step S32: Call the facial key point detection model to detect and identify the facial state, so as to obtain the facial key point coordinates of the game object in real time;
[0135] Step S33: When the eyes are detected based on the coordinates of the facial key points, guide the game object into the eye protection step;
[0136] Step S34: If the eye opening and closing state of the game object always meets the preset requirements within the first preset time period, then the eye protection is determined to be successful, and the game object is prompted that the eye protection game has been completed.
[0137] It should be noted that in this embodiment, the detection of the face state focuses on the detection of the open and closed state of the eyes. The first preset duration is set to 30 seconds. The preset requirement is to close the eyes for 5 seconds, then open the eyes to watch the eye-protection game animation, then close the eyes again for 5 seconds, and then open the eyes again to watch the eye-protection game animation. This step is repeated until the 30-second eye-protection game ends.
[0138] In this embodiment, user images are continuously acquired through a camera, and a pre-trained facial landmark detection model is called to detect and recognize the images (the model is trained for each user's face with both eyes open, both eyes closed, left eye open and right eye closed, and right eye open and left eye closed), so as to obtain the set of key point coordinates of the user's face in real time for each user image; the system continuously acquires 1080P (1920*1080) resolution user images through the camera on the TV, and calls the pre-trained facial landmark detection model to detect and recognize the images, so as to obtain the coordinates of 106 key points of the user's face in real time.
[0139] The pre-trained facial landmark detection model is a convolutional neural network, with the base network being the MobileNet neural network based on TensorFlow (a symbolic mathematics system based on dataflow programming). The training process of this neural network is as follows:
[0140] To address the characteristics of neural network inputs, approximately 100,000 facial image samples were collected and organized, and uniformly set to an image size of 224*224*3, which is an RGB color image with a length and width of 224 pixels.
[0141] For each facial image sample, 106 key facial points were extracted through software and manual processing.
[0142] For the image samples and their information obtained in the above two steps, training files and validation files in the tflite format supported by TensorFlow are generated. The images in the training files and validation files are different, but the image format and image information format stored in them are the same.
[0143] The model is trained using training files to generate a pre-defined facial landmark detection model, and the generated facial landmark detection model is validated using validation files.
[0144] Training is complete when the model loss drops to 0.1 or the number of training steps reaches a certain number (e.g., 20,000 steps).
[0145] If the model loss does not drop to 0.1, add more face image samples or adjust the model parameters, and repeat steps A, B, C, D, and E above until training is complete.
[0146] The system uses points 104 and 105 out of these 106 key points to determine whether the user's current facial state is open, closed, left eye open and right eye closed, or right eye open and left eye closed. Points 104 and 105 are the coordinates of the key points for the left and right eyes, respectively. The system then uses the identified facial state to create an eye-protection game interaction.
[0147] In this embodiment, the step S33, which guides the game object into the eye protection step, includes the following:
[0148] Displays the number of times the game object has received eye protection that day and the number of times it still needs eye protection.
[0149] If the remaining number of eye protection attempts is greater than zero, then guide the game object into the eye protection step;
[0150] If there are zero remaining attempts to protect the eyes, but the game receives a command to continue playing, then the game object is guided into the eye protection step.
[0151] In this embodiment, step S33, guiding the game object into the eye protection step, includes:
[0152] Step S331: Display the game screen in its initial state, play background music, and give a voice prompt to the game object to close its eyes;
[0153] Step S332: If the game object does not open its eyes within the second preset time period, a voice prompt is given to the game object to open its eyes, and the game screen in the initial state is dynamically switched to the game screen in the growth state.
[0154] Step S333: Repeat the voice prompts for the game object to close and open its eyes multiple times until the game screen dynamically transitions to the completed state;
[0155] In this embodiment, step S34, which prompts the game object that the current eye-protection game has been completed, includes:
[0156] The voice broadcast displays praise-type text messages on the game screen when the game is complete, to indicate to the player that the eye-protecting game has been finished.
[0157] When the TV enters the AI eye-protection game page, background music begins to play. This AI eye-protection game page is the game's main page, which includes options such as "Start Game," "Continue Game," and "Game Instructions." If this is the user's first time entering the eye-protection game that day, a prompt page will appear indicating that eye protection has not been performed that day, prompting the user to start eye protection. If this is not the user's first time entering the eye-protection game that day and they have successfully completed one eye-protection session, a page will appear recording the number of times the user has performed eye protection that day and the number of sessions still needed. If the user has completed 10 eye-protection sessions that day, a "Continue Eye Protection" option will appear. Clicking "Continue Eye Protection" will initiate another eye-protection game. After the user clicks "Start Game" or "Continue Game," an instruction page for testing both eyes and game rules will appear. The instruction page includes a 10-second audio explanation. While the audio is playing, the user can click the "Skip" button at any time to jump to the next page, or wait 10 seconds for automatic redirection. After entering the next page, the TV will raise its camera to search for the user's eyes. The search time is a maximum of 10 seconds and a minimum of 2 seconds. If the user's eyes are found, the game will start directly. If the eyes are not found, a prompt feedback box will appear.
[0158] During the eye-protection game, users need to close their eyes. The initial page contains a small sapling, which grows larger over time. The game lasts 30 seconds and dynamically displays six tree pages, including the initial state, growth state, and completion state. For every 5 seconds the user keeps their eyes closed (the second preset duration), the sapling grows to the next stage. If the user continues to keep their eyes closed, the next tree page plays. When the 30-second game ends, the tree has grown from a sapling to a large tree, and a success message appears: "Eye protection successful, a tree has been planted on your homepage," a praise message. When the user clicks "Complete Eye Protection," the number of eye protection attempts increases by 1, and the user returns to the game's homepage, where a new tree is added. Clicking "Continue Eye Protection" starts the next round of the game and redirects to the game instructions page.
[0159] The following error handling is implemented in the game: If the user's eyes are not detected within 10 seconds, "Retry" and "Back" options will appear. When the user clicks "Retry," the camera will search for the eyes again; when the user clicks "Back," they will return to the game's main page. If the user's eyes / face are not detected for 2 consecutive seconds, the timer will stop and the game will pause. A pop-up window will appear to inform the user, "We can't find your eyes~," and the camera will search for the user's eyes again. Once found, the player will return to the game page and the countdown will continue. If the user's closed eyes are not detected for 5 consecutive seconds, the player will go back one game page to return to the previous stage of the sapling's growth. If the user's eyes / face are not detected for a cumulative total of 10 seconds, the current stage will end, the eye protection will be deemed a failure, and the player will return to the game's main page. If the user opens their eyes during the game (either one or both eyes), the following steps are taken: If the user's eyes remain open for 2 seconds, the timer stops and the game pauses, displaying a message saying "Don't peek!" The game then re-searches for the user's eyes. If both eyes are found, the game returns to the main page and the countdown continues. If the game does not detect the user's eyes being closed for 5 seconds, the game skips to the previous stage of the sapling's growth. If the user's eyes remain open for a cumulative total of more than 10 seconds, the current stage ends, the game is deemed to have failed to protect the eyes, and the user is returned to the main game page.
[0160] In this embodiment, a deep learning-based method is used for facial landmark detection. By combining a camera with an eye-protection game and pre-set rules for the game, it is ensured that users can complete eye-protection tasks under a well-defined game guidance mechanism. This allows users to exercise their eyes in a relaxed and pleasant atmosphere, giving their eyes a full rest and relieving fatigue.
[0161] Furthermore, embodiments of the present invention also propose a computer-readable storage medium storing an intelligent eye protection program, wherein the intelligent eye protection program, when executed by a processor, implements the steps of the intelligent eye protection method in any of the embodiments described above.
[0162] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0163] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0164] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0165] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A smart eye protection method, characterized in that, The intelligent eye protection method includes the following steps: A preset camera is used to capture user images, and the user images are then recognized to obtain recognition results. The recognition results are analyzed using a pre-trained face recognition model to select game objects; Guide the game object to play eye-friendly games in a preset eye-friendly game interface; The intelligent eye protection method also includes: The intelligent eye protection function is implemented in two parts: the host side and the platform side. The host side is used to compile the runtime library files and train the model, while the platform side is used to take a screenshot of the currently playing content and then call the trained model to identify the scene of open or closed eyes in the screenshot image to obtain a trained facial landmark detection model. The facial landmark detection model is used to detect and recognize the facial state in the eye protection game. The step of parsing the recognition results using a pre-trained face recognition model to select game objects includes: If the result of parsing the recognition result by the pre-trained face recognition model is that the user image contains only one face image, then the user corresponding to the face image is selected as the game object; If the result of parsing the recognition result by the pre-trained face recognition model is that the user image contains multiple face images, then the game object is selected from the users corresponding to the multiple face images according to the completeness, area and distance between the face image and the camera; The steps of guiding the game object to play an eye-protection game in a preset eye-protection game interface include: Once the eye-protection game starts, the facial status of the game object is detected in real time. The pre-trained facial landmark detection model is invoked to detect and identify the facial state, so as to obtain the facial landmark coordinates of the game object in real time. When the eyes are detected based on the coordinates of the facial key points, the game object is guided to enter the eye protection step; If the eye opening and closing state of the game object always meets the preset requirements within the first preset time period, it is determined that the eye protection is successful and the game object is prompted that the eye protection game has been completed. The steps for guiding the game object into the eye protection step include: The game screen is displayed in its initial state, background music is played, and a voice prompt is given to the game character to close their eyes; If the game object does not open its eyes within the second preset time period, a voice prompt will be given to the game object to open its eyes, and the game screen in the initial state will be dynamically switched to the game screen in the growth state. Repeat the voice prompts for the game object to close and open its eyes multiple times until the game screen dynamically transitions to the completed state. The steps that the game object has completed in this eye-protection game, as indicated in the prompt, include: The voice broadcast displays praise-type text messages on the game screen when the game is complete, to indicate to the player that the eye-protecting game has been finished.
2. The intelligent eye protection method as described in claim 1, characterized in that, The step of recognizing the user image to obtain a recognition result includes: The current display screen is obtained, and a pre-trained face recognition model is invoked to detect and recognize the user image to obtain the face image recognition result; The step of obtaining the identification result is followed by: The facial image recognition result is sent to the display device so that the display device adjusts the image parameters and sound parameters according to the facial image recognition result.
3. The intelligent eye protection method as described in claim 2, characterized in that, The step of parsing the recognition result using a pre-trained face recognition model to select a game object includes: The identity of the game object is confirmed based on the facial image recognition result, and it is determined whether the game object is entering the eye-protection game for the first time on that day based on the identity of the game object; If the game object is not entering the eye protection game for the first time on that day, then the step of guiding the game object to play the eye protection game in the eye protection game interface is executed; If this is the first time the player is entering the eye-protection game on this day, the player will be guided to play the eye-protection game on the eye-protection game interface after the eye-protection game instructions are displayed.
4. The intelligent eye protection method as described in claim 3, characterized in that, Prior to the step of guiding the game object into the eye protection step, the following are included: Displays the number of times the game object has received eye protection that day and the number of times it still needs eye protection. If the remaining number of eye protection attempts is greater than zero, then guide the game object into the eye protection step; If there are zero remaining attempts to protect the eyes, but the game receives a command to continue playing, then the game object is guided into the eye protection step.
5. The intelligent eye protection method as described in claim 4, characterized in that, Before the step of calling the preset camera to capture the user's image, the following steps are included: When the viewing interface runs for a third preset duration, the viewing interface is hidden and an eye protection reminder interface is displayed. After the eye protection reminder interface has been displayed for a certain period of time, the occupancy status of the preset camera is detected; If the preset camera is not in use, the eye protection reminder interface is hidden and the preset eye protection game interface is displayed. If the preset camera is occupied, prompt the user to exit other applications that are occupying the preset camera. When a confirmation to exit is received, other applications occupying the preset camera are exited, the preset camera is accessed, the eye protection reminder interface is hidden, and the preset eye protection game interface is displayed.
6. A smart eye protection device, characterized in that, The intelligent eye protection device includes: a memory, a processor, and an intelligent eye protection program stored in the memory and executable on the processor. When the intelligent eye protection program is executed by the processor, it implements the steps of the intelligent eye protection method as described in any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an intelligent eye protection program, which, when executed by a processor, implements the steps of the intelligent eye protection method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Intelligent terminal eye protection exercise processing method, device, intelligent terminal and storage medium
CN112870035A