Stereo vision training method and system based on reinforcement learning
By using a reinforcement learning-based approach to collect EEG and eye-tracking signals in real time, constructing a ring-shaped frequency band mask and a PPO agent, and dynamically adjusting the visual stimulus frequency band, the problems of poor adaptability and insufficient safety in stereo vision training are solved, achieving efficient and safe visual function recovery.
Patent Information
- Application Number
- CN202611562611.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-10
- Publication Date
- 2026-11-27
AI Technical Summary
Existing stereoscopic vision training suffers from poor adaptability, low efficiency, and insufficient safety. Furthermore, reinforcement learning has difficulty in optimizing convergence, making it impossible to dynamically balance training efficiency and safety, and thus failing to meet personalized rehabilitation needs.
A reinforcement learning-based approach is used to collect user EEG and eye-tracking signals in real time. A comprehensive reward signal is generated through a pre-trained model, and a ring-shaped frequency band mask and PPO agent are constructed to dynamically adjust the visual stimulus frequency band, thereby achieving adaptive control of image frequency domain features and balancing training efficiency with visual safety.
It significantly improves the adaptability and safety of rehabilitation training for stereoscopic visual impairment, enhances training effectiveness, and achieves personalized and safe rehabilitation of visual function.
Smart Images

Figure CN123166869A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of reinforcement learning technology, and relates to a stereo vision training method and system based on reinforcement learning. Background Technology
[0002] Rehabilitation training for stereoscopic visual impairment often employs fixed-pattern binocular stimulation schemes, which suffer from poor adaptability, low efficiency, and insufficient safety. Existing technologies struggle to dynamically adjust stimulation content based on individual user differences, failing to balance real-time stereoscopic visual activation levels with visual fatigue, easily leading to poor training results or eye strain, and failing to meet personalized and safe rehabilitation needs. While current EEG and eye-tracking monitoring technologies can assess visual activation and fatigue, they only reach the level of state perception and do not form a feedback loop. Traditional methods cannot effectively convert physiological signals into stimulation control strategies, lacking refined adaptive adjustment methods for image frequency domain features, and cannot dynamically balance efficiency and safety, thus hindering the precise implementation of intelligent rehabilitation training. When reinforcement learning is used for visual control, directly optimizing continuous image space faces bottlenecks such as convergence difficulties and high computational costs. Therefore, there is an urgent need for a method that can integrate EEG and eye-tracking physiological feedback to achieve adaptive control of image frequency domain features. Summary of the Invention
[0003] The purpose of this invention is to solve the problems of poor adaptability of stereo vision training in the prior art, inability to dynamically balance efficiency and safety, and difficulty in convergence of reinforcement learning optimization, and to provide a stereo vision training method and system based on reinforcement learning.
[0004] To achieve the above objectives, the present invention employs the following technical solution: Reinforcement learning-based stereo vision training methods include: S1: Real-time acquisition of user's EEG signals, eye movement signals, and raw binocular images; input of EEG signals into a pre-trained EEG stereo vision binary classification model, outputting an efficiency score; simultaneously using eye movement signals and an EEG fatigue classification model to obtain a safety score; based on the obtained efficiency and safety scores, generating a comprehensive reward signal; S2: Extract the left-eye and right-eye images from the original binocular images respectively, preprocess each monocular image; and perform two-dimensional fast Fourier transform and spectrum centering on the preprocessed monocular images to obtain centered frequency domain data. S3: Construct a ring-shaped frequency band mask based on frequency domain data, and divide the spectrum into several ring-shaped frequency bands evenly according to the radius, mapping the continuous image space into a discrete action space; S4: Construct a reinforcement learning agent based on PPO, wherein the agent's state space is EEG signal and preprocessed monocular image, and the action space is N-dimensional binary discrete action space; the optimization objective is the comprehensive reward signal, and an adaptive frequency transformation network is used as the policy network; S5: Based on the selection probability of N frequency bands output by the reinforcement learning agent, a preset threshold is set to filter out K effective frequency bands with a probability greater than the threshold; the effective frequency bands are synthesized in the frequency domain in each RGB channel, and then inverse spectrum centering and two-dimensional inverse fast Fourier transform are performed to reconstruct the monocular image. S6: Repeat S1 to S5, dynamically adjust the visual stimulation frequency band based on the user's real-time EEG and eye movement feedback, balance training efficiency and visual safety during the training process, until the user's stereoscopic vision function reaches the preset recovery standard.
[0005] A further improvement of the present invention is that: Furthermore, the pre-trained EEG stereoscopic binary classification model specifically involves: collecting EEG data from multiple testers observing stereoscopic images as a sample dataset, labeling it with corresponding stereoscopic vision activation and inactivation tags; preprocessing the original EEG data by denoising, filtering, and feature extraction, and dividing it into training and testing sets; inputting the processed samples into the binary classification network for supervised training, continuously correcting the network parameters until the model's classification accuracy meets the set requirements, thus completing the model pre-training; The training expression for the EEG stereo binary classification model is as follows: in, For network parameters, For loss function, For the true labels of the samples, For the model to be trained, This is a single set of EEG feature samples.
[0006] Furthermore, the EEG signal is input into a pre-trained EEG stereoscopic binary classification model, which outputs an efficiency score; simultaneously, eye-tracking signals and an EEG fatigue classification model are used to obtain a safety score, representing training efficiency and visual safety risk, respectively. Specifically: in, This is a pre-trained EEG stereo binary classification model. EEG signal For efficiency scores, the closer the value is to 1, the higher the degree of stereo vision activation and the better the training efficiency. in, For EEG fatigue classification model, This is an eye movement signal. For safety scores, the closer the value is to 1, the lower the level of visual fatigue and the higher the safety of eye use; The process of generating a comprehensive reward signal based on the obtained efficiency and security scores is as follows: in, For efficiency weighting, For safety weights; , The scores are efficiency and safety, respectively.
[0007] Furthermore, the step of extracting the left-eye and right-eye images from the original binocular images and preprocessing each monocular image specifically involves: splitting each monocular image into three independent channels: red, green, and blue, and linearly normalizing the pixel values of each channel to the [0,1] interval; Each monocular image is split into three independent channels: red, green, and blue. Specifically: in, These are the red, green, and blue channels, respectively. The pixel values of each channel are linearly normalized to the [0,1] interval, specifically as follows: in, This is the normalized monocular RGB channel image; The preprocessed monocular images are subjected to two-dimensional fast Fourier transform and spectral centering to obtain centered frequency domain data, specifically as follows: Two-dimensional fast Fourier transform is performed on each RGB channel image after preprocessing to convert the spatial domain image into frequency domain data; then the frequency domain data is spectral centered, that is, the zero-frequency components located at the four corners of the spectrum after the two-dimensional fast Fourier transform are moved to the center of the spectrum. in, The image is a normalized monocular RGB channel image; This represents a two-dimensional Fast Fourier Transform. This refers to the transformed, uncentered frequency domain data. in, Indicates spectrum centralization, This refers to the centered frequency domain data.
[0008] Furthermore, the construction of a ring-shaped frequency band mask based on frequency domain data, which uniformly divides the spectrum into several ring-shaped frequency bands according to the radius, maps the continuous image space into a discrete action space, specifically as follows: Calculate the distance from each point on the frequency domain graph to the center, and divide the entire spectrum evenly from the center to the outermost circle into several concentric rings; generate a binary mask 0 / 1 for each ring, where the positions in the mask belonging to that ring are set to 1 and the rest are set to 0; transform the entire continuous frequency domain graph into N independent selectable "band switches", thereby transforming the continuous image space into a discrete action space. The step of generating a binary mask 0 / 1 for each ring specifically involves constructing a distance matrix. Calculate the maximum radius and bandwidth , and then construct the first A ring-shaped frequency band mask; The calculation of the maximum radius and bandwidth Specifically: in, The maximum radius of the spectrum, The preset total number of frequency bands, The width of each ring band, Frequency domain location Distance to the center; The construction of the first A ring-shaped frequency band mask, specifically: in, For the first A binary mask for a ring-shaped frequency band, where a value of 1 indicates that the position belongs to the current frequency band, and a value of 0 indicates that it does not belong to the current frequency band.
[0009] Furthermore, the construction of the PPO-based reinforcement learning agent specifically involves: combining the acquired EEG signal features with the preprocessed monocular images to form the agent's input state; defining N-dimensional binary discrete actions based on whether or not each ring frequency band is selected, corresponding to the image frequency domain adjustment behavior; using the real-time generated comprehensive reward signal as the basis for iterative optimization, building an adaptive frequency transformation network as the policy network, and outputting the selection probability of each frequency band based on the network mapping relationship.
[0010] Furthermore, the step of selecting K effective frequency bands with probabilities greater than the threshold based on the selection probability of N frequency bands output by the reinforcement learning agent is specifically as follows: in, For the first The probability of selecting each frequency band Let S be the preset threshold, and S be the set of valid frequency band indices. and ; The process involves frequency domain synthesis of the effective frequency band in each RGB channel, followed by inverse spectrum centering and two-dimensional inverse fast Fourier transform to reconstruct the monocular image. Specifically: in, To center the inverse spectrum, It is a two-dimensional inverse fast Fourier transform. Take the real part, This is the reconstructed monocular channel image; To extract the first from the complete frequency domain One frequency component in the ring band, and the rest of the components are set to zero; This is the synthesized frequency domain data; For the first A binary mask for a ring-shaped frequency band; To restore the original frequency domain data arrangement; The process of combining the reconstructed left-eye image with the right-eye image to create a new binocular stimulation image specifically involves: in, , The reconstructed RGB images of the left and right eyes are combined and output as a binocular stimulation image.
[0011] Furthermore, the step of dynamically adjusting the visual stimulation frequency band based on the user's real-time EEG and eye-tracking feedback, balancing training efficiency and visual safety during the training process, until the user's stereoscopic vision function reaches the preset recovery standard, specifically involves: continuously collecting the user's EEG signals, eye-tracking signals, and original binocular images in real time; dynamically adjusting the frequency band selection strategy for the next round based on real-time efficiency and safety scores in each round of interaction, ensuring that the visual stimulation always matches the user's current stereoscopic vision activation level and fatigue state; iterating the training process repeatedly and monitoring and recording the efficiency and safety scores for each round of training in real time; when the user's efficiency score is not lower than the preset activation threshold, and the safety score is not lower than the preset safety threshold; after continuously meeting the above dual threshold conditions, it is determined that the user's stereoscopic vision function has reached the preset recovery standard, and the stereoscopic vision training is completed.
[0012] A reinforcement learning-based stereo vision training system includes: The generation module collects the user's EEG signals, eye movement signals, and original binocular images in real time; inputs the EEG signals into a pre-trained EEG stereo vision binary classification model and outputs an efficiency score; simultaneously, it uses the eye movement signals and the EEG fatigue classification model to obtain a safety score; and generates a comprehensive reward signal based on the obtained efficiency score and safety score. The acquisition module extracts the left-eye and right-eye images from the original binocular images, preprocesses each monocular image, and performs two-dimensional fast Fourier transform and spectrum centering on the preprocessed monocular images to obtain centered frequency domain data. The mapping module constructs a ring-shaped frequency band mask based on frequency domain data, and divides the spectrum into several ring-shaped frequency bands evenly according to the radius, thus mapping the continuous image space into a discrete action space. The construction module constructs a reinforcement learning agent based on PPO, wherein the agent's state space is EEG signal and preprocessed monocular image, and the action space is N-dimensional binary discrete action space; the optimization objective is the comprehensive reward signal, and an adaptive frequency transformation network is used as the policy network; The reconstruction module is based on the selection probability of N frequency bands output by the reinforcement learning agent, sets a preset threshold, and filters out K effective frequency bands with a probability greater than the threshold; the effective frequency bands are synthesized in the frequency domain in each RGB channel, and then inverse spectrum centering and two-dimensional inverse fast Fourier transform are performed to reconstruct the monocular image. The balancing module dynamically adjusts the visual stimulation frequency band based on the user's real-time EEG and eye-tracking feedback, balancing training efficiency and visual safety during the training process until the user's stereoscopic vision function reaches the preset recovery standard.
[0013] Compared with the prior art, the present invention has the following beneficial effects: This invention acquires user EEG, eye-tracking signals, and binocular images in real time. It generates a comprehensive reward signal by outputting efficiency and safety scores through a pre-trained model. After preprocessing the monocular images, it performs a two-dimensional fast Fourier transform and spectrum centering to construct a ring-shaped frequency band mask mapping to a discrete action space. A PPO-based reinforcement learning agent is built to output frequency band selection probabilities and filter effective frequency bands. The monocular images are then reconstructed through frequency domain synthesis and inverse transform. The stimulation frequency bands are dynamically adjusted iteratively to balance training efficiency and visual safety until the user's stereoscopic vision function reaches the required level. This invention effectively solves the problems of poor adaptability, low efficiency, and insufficient safety in traditional fixed-mode training, significantly improving the effectiveness and practicality of stereoscopic vision impairment rehabilitation training. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a flowchart illustrating the reinforcement learning-based stereo vision training method of the present invention. Figure 2 Images reconstructed from different numbers of frequency band signals; Figure 3 This is a schematic diagram of the structure of the reinforcement learning-based stereo vision training system of the present invention. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0017] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0018] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0019] In the description of the embodiments of the present invention, it should be noted that if terms such as "upper," "lower," "horizontal," or "inner" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of the invention is in use, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Furthermore, terms such as "first" and "second" are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0020] Furthermore, the use of the term "horizontal" does not imply that the component must be absolutely horizontal, but rather that it can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0021] In the description of the embodiments of the present invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention according to the specific circumstances.
[0022] The present invention will now be described in further detail with reference to the accompanying drawings: See Figure 1 This invention discloses a stereo vision training method based on reinforcement learning, comprising: S101: Real-time acquisition of user's EEG signals, eye movement signals, and raw binocular images; input of EEG signals into a pre-trained EEG stereo vision binary classification model, outputting an efficiency score; simultaneously using eye movement signals and an EEG fatigue classification model to obtain a safety score; based on the obtained efficiency and safety scores, generating a comprehensive reward signal; The pre-trained EEG stereo vision binary classification model is specifically designed as follows: collecting EEG data from multiple testers observing stereo images as a sample dataset, labeling it with corresponding stereo vision activation and inactivation tags; performing noise reduction, filtering, and feature extraction preprocessing on the original EEG data, and dividing it into training and test sets; inputting the processed samples into the binary classification network for supervised training, continuously correcting the network parameters until the model classification accuracy meets the set requirements, thus completing the model pre-training. The training expression for the EEG stereo binary classification model is as follows: in, For network parameters, For loss function, For the true labels of the samples, For the model to be trained, This is a single set of EEG feature samples.
[0023] The process involves inputting EEG signals into a pre-trained EEG stereoscopic binary classification model to output an efficiency score; simultaneously, eye-tracking signals and an EEG fatigue classification model are used to obtain a safety score, representing training efficiency and visual safety risk, respectively. Specifically: in, This is a pre-trained EEG stereo binary classification model. EEG signal For efficiency scores, the closer the value is to 1, the higher the degree of stereo vision activation and the better the training efficiency. in, For EEG fatigue classification model, This is an eye movement signal. For safety scores, the closer the value is to 1, the lower the level of visual fatigue and the higher the safety of eye use; The process of generating a comprehensive reward signal based on the obtained efficiency and security scores is as follows: in, For efficiency weighting, For safety weights; , The scores are efficiency and safety, respectively.
[0024] S102: Extract the left-eye and right-eye images from the original binocular images respectively, preprocess each monocular image; and perform two-dimensional fast Fourier transform and spectrum centering on the preprocessed monocular images to obtain centered frequency domain data. The process involves extracting the left-eye and right-eye images from the original binocular images and preprocessing each monocular image. Specifically, each monocular image is divided into three independent channels: red, green, and blue, and the pixel values of each channel are linearly normalized to the [0,1] interval. Each monocular image is split into three independent channels: red, green, and blue. Specifically: in, These are the red, green, and blue channels, respectively. The pixel values of each channel are linearly normalized to the [0,1] interval, specifically as follows: in, The image is a normalized monocular RGB channel image; The preprocessed monocular images are subjected to two-dimensional fast Fourier transform and spectral centering to obtain centered frequency domain data, specifically as follows: Two-dimensional fast Fourier transform is performed on each RGB channel image after preprocessing to convert the spatial domain image into frequency domain data; then the frequency domain data is spectral centered, that is, the zero-frequency components located at the four corners of the spectrum after the two-dimensional fast Fourier transform are moved to the center of the spectrum. in, The image is a normalized monocular RGB channel image; This represents a two-dimensional Fast Fourier Transform. This refers to the transformed, uncentered frequency domain data. in, Indicates spectrum centralization, This refers to the centered frequency domain data.
[0025] S103: Construct a ring-shaped frequency band mask based on frequency domain data, and divide the spectrum into several ring-shaped frequency bands evenly according to the radius, mapping the continuous image space into a discrete action space; Calculate the distance from each point on the frequency domain graph to the center, and divide the entire spectrum evenly from the center to the outermost circle into several concentric rings; generate a binary mask 0 / 1 for each ring, where the positions in the mask belonging to that ring are set to 1 and the rest are set to 0; transform the entire continuous frequency domain graph into N independent selectable "band switches", thereby transforming the continuous image space into a discrete action space. The step of generating a binary mask 0 / 1 for each ring specifically involves constructing a distance matrix. Calculate the maximum radius and bandwidth , and then construct the first A ring-shaped frequency band mask; The calculation of the maximum radius and bandwidth Specifically: in, The maximum radius of the spectrum, The preset total number of frequency bands, The width of each ring band, Frequency domain location Distance to the center; The construction of the first A ring-shaped frequency band mask, specifically: in, For the first A binary mask for a ring-shaped frequency band, where a value of 1 indicates that the position belongs to the current frequency band, and a value of 0 indicates that it does not belong to the current frequency band.
[0026] S104: Construct a reinforcement learning agent based on PPO, wherein the agent's state space is EEG signal and preprocessed monocular image, and the action space is N-dimensional binary discrete action space; the optimization objective is the comprehensive reward signal, and an adaptive frequency transformation network is used as the policy network; The construction of the PPO-based reinforcement learning agent specifically involves: using the acquired EEG signal features and preprocessed monocular images to form the agent's input state; defining N-dimensional binary discrete actions based on whether or not each ring frequency band is selected, corresponding to the image frequency domain adjustment behavior; using the real-time generated comprehensive reward signal as the basis for iterative optimization, building an adaptive frequency transformation network as the policy network, and outputting the selection probability of each frequency band based on the network mapping relationship.
[0027] S105: Based on the selection probabilities of N frequency bands output by the reinforcement learning agent, a preset threshold is set, and K effective frequency bands with probabilities greater than the threshold are selected; the effective frequency bands are synthesized in the frequency domain of each RGB channel, and then inverse spectrum centering and two-dimensional inverse fast Fourier transform are performed to reconstruct the monocular image; see [link to documentation]. Figure 2 , Figure 2 The resulting images are constructed from different numbers of frequency band signals.
[0028] The method involves selecting N frequency bands based on the output probability of the reinforcement learning agent, setting a preset threshold, and filtering out K effective frequency bands with probabilities greater than the threshold. Specifically: in, For the first The probability of selecting each frequency band Let S be the preset threshold, and S be the set of valid frequency band indices. and ; The process involves frequency domain synthesis of the effective frequency band in each RGB channel, followed by inverse spectrum centering and two-dimensional inverse fast Fourier transform to reconstruct the monocular image. Specifically: in, To center the inverse spectrum, It is a two-dimensional inverse fast Fourier transform. Take the real part, This is the reconstructed monocular channel image; To extract the first from the complete frequency domain One frequency component in the ring band, and the rest of the components are set to zero; This is the synthesized frequency domain data; For the first A binary mask for a ring-shaped frequency band; To restore the original frequency domain data arrangement; The process of combining the reconstructed left-eye image with the right-eye image to create a new binocular stimulation image specifically involves: in, , The reconstructed RGB images of the left and right eyes are combined and output as a binocular stimulation image.
[0029] S106: Repeatedly execute S101 to S105, dynamically adjust the visual stimulation frequency band based on the user's real-time EEG and eye movement feedback, balance training efficiency and visual safety during the training process, until the user's stereoscopic vision function reaches the preset recovery standard.
[0030] The system continuously collects the user's EEG signals, eye-tracking signals, and original binocular images in real time. Each round of interaction dynamically adjusts the frequency band selection strategy based on real-time efficiency and safety scores, ensuring that visual stimuli always match the user's current stereoscopic visual activation level and fatigue state. The training process iterates repeatedly, monitoring and recording the efficiency and safety scores for each round of training in real time. When the user's efficiency score is not lower than a preset activation threshold, and the safety score is not lower than a preset safety threshold, and these two threshold conditions are consistently met, the user's stereoscopic visual function is deemed to have reached a preset recovery standard, thus completing stereoscopic visual training.
[0031] See Figure 3 This invention discloses a stereo vision training system based on reinforcement learning, comprising: The generation module collects the user's EEG signals, eye movement signals, and original binocular images in real time; inputs the EEG signals into a pre-trained EEG stereo vision binary classification model and outputs an efficiency score; simultaneously, it uses the eye movement signals and the EEG fatigue classification model to obtain a safety score; and generates a comprehensive reward signal based on the obtained efficiency score and safety score. The acquisition module extracts the left-eye and right-eye images from the original binocular images, preprocesses each monocular image, and performs two-dimensional fast Fourier transform and spectrum centering on the preprocessed monocular images to obtain centered frequency domain data. The mapping module constructs a ring-shaped frequency band mask based on frequency domain data, and divides the spectrum into several ring-shaped frequency bands evenly according to the radius, thus mapping the continuous image space into a discrete action space. The construction module constructs a reinforcement learning agent based on PPO, wherein the agent's state space is EEG signal and preprocessed monocular image, and the action space is N-dimensional binary discrete action space; the optimization objective is the comprehensive reward signal, and an adaptive frequency transformation network is used as the policy network; The reconstruction module is based on the selection probability of N frequency bands output by the reinforcement learning agent, sets a preset threshold, and filters out K effective frequency bands with a probability greater than the threshold; the effective frequency bands are synthesized in the frequency domain in each RGB channel, and then inverse spectrum centering and two-dimensional inverse fast Fourier transform are performed to reconstruct the monocular image. The balancing module dynamically adjusts the visual stimulation frequency band based on the user's real-time EEG and eye-tracking feedback, balancing training efficiency and visual safety during the training process until the user's stereoscopic vision function reaches the preset recovery standard.
[0032] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A stereo vision training method based on reinforcement learning, characterized in that, include: S1: Real-time acquisition of user's EEG signals, eye movement signals, and raw binocular images; input of EEG signals into a pre-trained EEG stereo vision binary classification model, outputting an efficiency score; simultaneously using eye movement signals and an EEG fatigue classification model to obtain a safety score; based on the obtained efficiency and safety scores, generating a comprehensive reward signal; S2: Extract the left-eye and right-eye images from the original binocular images respectively, and preprocess each monocular image; The preprocessed monocular images were then subjected to two-dimensional fast Fourier transform and spectral centering to obtain centered frequency domain data. S3: Construct a ring-shaped frequency band mask based on frequency domain data, and divide the spectrum into several ring-shaped frequency bands evenly according to the radius, mapping the continuous image space into a discrete action space; S4: Construct a reinforcement learning agent based on PPO, wherein the agent's state space is EEG signal and preprocessed monocular image, and the action space is N-dimensional binary discrete action space; the optimization objective is the comprehensive reward signal, and an adaptive frequency transformation network is used as the policy network; S5: Based on the selection probability of N frequency bands output by the reinforcement learning agent, a preset threshold is set to filter out K effective frequency bands with a probability greater than the threshold; the effective frequency bands are synthesized in the frequency domain in each RGB channel, and then inverse spectrum centering and two-dimensional inverse fast Fourier transform are performed to reconstruct the monocular image. S6: Repeat S1 to S5, dynamically adjust the visual stimulation frequency band based on the user's real-time EEG and eye movement feedback, balance training efficiency and visual safety during the training process, until the user's stereoscopic vision function reaches the preset recovery standard.
2. The stereo vision training method based on reinforcement learning according to claim 1, characterized in that, The pre-trained EEG stereo vision binary classification model is specifically designed as follows: collecting EEG data from multiple testers observing stereo images as a sample dataset, labeling it with corresponding stereo vision activation and inactivation tags; performing noise reduction, filtering, and feature extraction preprocessing on the original EEG data, and dividing it into training and test sets; inputting the processed samples into the binary classification network for supervised training, continuously correcting the network parameters until the model classification accuracy meets the set requirements, thus completing the model pre-training. The training expression for the EEG stereo binary classification model is as follows: in, For network parameters, For loss function, For the true labels of the samples, For the model to be trained, This is a single set of EEG feature samples.
3. The stereo vision training method based on reinforcement learning according to claim 2, characterized in that, The process involves inputting EEG signals into a pre-trained EEG stereoscopic binary classification model to output an efficiency score; simultaneously, eye-tracking signals and an EEG fatigue classification model are used to obtain a safety score, representing training efficiency and visual safety risk, respectively. Specifically: in, This is a pre-trained EEG stereo binary classification model. EEG signal For efficiency scores, the closer the value is to 1, the higher the degree of stereo vision activation and the better the training efficiency. in, For EEG fatigue classification model, Eye movement signal For safety scores, the closer the value is to 1, the lower the level of visual fatigue and the higher the safety of eye use; The process of generating a comprehensive reward signal based on the obtained efficiency and security scores is as follows: in, For efficiency weighting, For safety weights; , The scores are efficiency and safety, respectively.
4. The stereo vision training method based on reinforcement learning according to claim 3, characterized in that, The process involves extracting the left-eye and right-eye images from the original binocular images and preprocessing each monocular image. Specifically, each monocular image is divided into three independent channels: red, green, and blue, and the pixel values of each channel are linearly normalized to the [0,1] interval. Each monocular image is split into three independent channels: red, green, and blue. Specifically: in, These are the red, green, and blue channels, respectively. The pixel values of each channel are linearly normalized to the [0,1] interval, specifically as follows: in, The image is a normalized monocular RGB channel image; The preprocessed monocular images are subjected to two-dimensional fast Fourier transform and spectral centering to obtain centered frequency domain data, specifically as follows: Two-dimensional fast Fourier transform is performed on each RGB channel image after preprocessing to convert the spatial domain image into frequency domain data; then the frequency domain data is spectral centered, that is, the zero-frequency components located at the four corners of the spectrum after the two-dimensional fast Fourier transform are moved to the center of the spectrum. in, The image is a normalized monocular RGB channel image; This represents a two-dimensional Fast Fourier Transform. This refers to the transformed, uncentered frequency domain data. in, Indicates spectrum centralization, This refers to the centered frequency domain data.
5. The stereo vision training method based on reinforcement learning according to claim 4, characterized in that, The method of constructing a ring-shaped frequency band mask based on frequency domain data, uniformly dividing the spectrum into several ring-shaped frequency bands according to the radius, and mapping the continuous image space into a discrete action space, specifically: Calculate the distance from each point on the frequency domain graph to the center, and divide the entire spectrum evenly from the center to the outermost circle into several concentric rings; generate a binary mask 0 / 1 for each ring, where the positions in the mask belonging to that ring are set to 1 and the rest are set to 0; transform the entire continuous frequency domain graph into N independent selectable "band switches", thereby transforming the continuous image space into a discrete action space. The step of generating a binary mask 0 / 1 for each ring specifically involves: constructing a distance matrix. Calculate the maximum radius and bandwidth , and then construct the first A ring-shaped frequency band mask; The calculation of the maximum radius and bandwidth Specifically: in, The maximum radius of the spectrum, The preset total number of frequency bands, The width of each ring band, Frequency domain location Distance to the center; The construction of the first A ring-shaped frequency band mask, specifically: in, For the first A binary mask for a ring-shaped frequency band, where a value of 1 indicates that the position belongs to the current frequency band, and a value of 0 indicates that it does not belong to the current frequency band.
6. The stereo vision training method based on reinforcement learning according to claim 5, characterized in that, The construction of the PPO-based reinforcement learning agent specifically involves: combining the acquired EEG signal features with the preprocessed monocular image to form the agent's input state; defining N-dimensional binary discrete actions based on whether each ring frequency band is selected, corresponding to image frequency domain adjustment behavior; Using the real-time generated comprehensive reward signal as the basis for iterative optimization, an adaptive frequency transformation network is built to serve as the policy network, and the selection probability of each frequency band is output based on the network mapping relationship.
7. The stereo vision training method based on reinforcement learning according to claim 6, characterized in that, The method involves selecting N frequency bands based on the output probability of the reinforcement learning agent, setting a preset threshold, and filtering out K effective frequency bands with probabilities greater than the threshold. Specifically: in, For the first The probability of selecting each frequency band Let S be the set of valid frequency band indices, where S is the preset threshold. and ; The process involves frequency domain synthesis of the effective frequency band in each RGB channel, followed by inverse spectrum centering and two-dimensional inverse fast Fourier transform to reconstruct the monocular image. Specifically: in, To center the inverse spectrum, It is a two-dimensional inverse fast Fourier transform. Take the real part, This is the reconstructed monocular channel image; To extract the first from the complete frequency domain One frequency component in the ring band, and the rest of the components are set to zero; This is the synthesized frequency domain data; For the first A binary mask for a ring-shaped frequency band; To restore the original frequency domain data arrangement; The process of combining the reconstructed left-eye image with the right-eye image to create a new binocular stimulation image specifically involves: in, , The reconstructed RGB images of the left and right eyes are combined and output as a binocular stimulation image.
8. The stereo vision training method based on reinforcement learning according to claim 7, characterized in that, The method involves dynamically adjusting the visual stimulation frequency band based on the user's real-time EEG and eye movement feedback, balancing training efficiency and visual safety during the training process, until the user's stereoscopic vision function reaches the preset recovery standard. Specifically, this involves continuously collecting the user's EEG signals, eye movement signals, and original binocular images in real time. Each round of interaction is based on real-time efficiency and safety feedback to dynamically adjust the frequency band selection strategy for the next round, so that the visual stimulation is always adapted to the user's current stereoscopic vision activation level and fatigue state. The training process is iterated repeatedly, and the efficiency score and safety score of each round of training are monitored and recorded in real time. When the user's efficiency score is not lower than the preset activation threshold and the safety score is not lower than the preset safety threshold, the user's stereo vision function is determined to have reached the preset recovery standard after continuously meeting the above two threshold conditions, and the stereo vision training is completed.
9. A stereo vision training system based on reinforcement learning, characterized in that, include: The generation module collects the user's EEG signals, eye movement signals, and original binocular images in real time; inputs the EEG signals into a pre-trained EEG stereo vision binary classification model and outputs an efficiency score; simultaneously, it uses the eye movement signals and the EEG fatigue classification model to obtain a safety score; and generates a comprehensive reward signal based on the obtained efficiency score and safety score. The acquisition module extracts the left-eye and right-eye images from the original binocular images and preprocesses each monocular image. The preprocessed monocular images were then subjected to two-dimensional fast Fourier transform and spectral centering to obtain centered frequency domain data. The mapping module constructs a ring-shaped frequency band mask based on frequency domain data, and divides the spectrum into several ring-shaped frequency bands evenly according to the radius, thus mapping the continuous image space into a discrete action space. The construction module constructs a reinforcement learning agent based on PPO, wherein the agent's state space is EEG signal and preprocessed monocular image, and the action space is N-dimensional binary discrete action space; the optimization objective is the comprehensive reward signal, and an adaptive frequency transformation network is used as the policy network; The reconstruction module is based on the selection probability of N frequency bands output by the reinforcement learning agent, sets a preset threshold, and filters out K effective frequency bands with a probability greater than the threshold; the effective frequency bands are synthesized in the frequency domain in each RGB channel, and then inverse spectrum centering and two-dimensional inverse fast Fourier transform are performed to reconstruct the monocular image. The balancing module dynamically adjusts the visual stimulation frequency band based on the user's real-time EEG and eye-tracking feedback, balancing training efficiency and visual safety during the training process until the user's stereoscopic vision function reaches the preset recovery standard.
