# YOLO Model-Based Eye Movement Detection During Closed-Eye State
## 3 Experiments and Results
### Dataset  
To comprehensively capture the characteristics of eye movements under varying lighting conditions, we conducted data collection across multiple lighting environments, including natural light, indoor lighting, and other illumination scenarios. This approach ensures the dataset's diversity and robustness, enabling it to effectively represent a wide range of real-world conditions.  
We recruited five healthy volunteers with typical variations in ocular characteristics, including single/double eyelids, eyelash length, and eyelid thickness. Prior to formal experiments, each subject underwent a brief ocular examination to confirm the absence of conditions that might affect data acquisition. We implemented a standardized protocol: subjects first closed their eyes for 30 s to acclimize to the experimental environment, then performed three eye movement tasks with adequate rest intervals to prevent fatigue. Real-time camera monitoring ensured that captured eye trajectories matched expected patterns.  
The design of the eye-tracking tasks follows a progressive structure, evolving from simple to complex tasks to comprehensively capture eye movement characteristics. The basic task involves standard horizontal and vertical movements, establishing a foundation for analyzing fundamental eye movement patterns. Building upon this, the advanced tasks incorporate diagonal movements (top-left to bottom-right and top-right to bottom-left trajectories), as well as circular movements (clockwise and counterclockwise directions), which better reflect the dynamic nature of eye movements. Finally, the random trajectory task requires subjects to move their eyes unpredictably with their eyes closed, generating eye movement patterns that more closely resemble those observed in natural viewing conditions, thereby enhancing the ecological validity of the study.  
Each task included 10 repetition cycles to capture subtle movement variations. An image acquisition module recorded the entire process in an AVI format. Raw videos underwent frame extraction and keyframe selection, removing blurred and invalid frames to yield over 1,400 high-quality images of eyelid-covered eye movements.  
Figure 4: Placement of the camera.  
These images not only recorded the subtle changes in eyelid texture during eye movements but also encompassed the individual differences among the subjects, providing a comprehensive dataset for subsequent model training and validation.  
After the initial organization of the captured image data, each image was annotated using the LabelImg tool, an open-source image annotation tool that supports multiple annotation formats, including the YOLO format. We labeled the bounding box of the eye as the target region and saved the annotation information as a txt file in the YOLO format. The YOLO format labeling file includes the target category number, as well as the normalized center coordinates, width, and height of the bounding box, ensuring compatibility with model training requirements. The filename of each txt file corresponds one-to-one with the corresponding image filename, guaranteeing an unambiguous match between the annotation information and the image.  
Subsequently, we adhered to the data allocation principles commonly employed in machine learning to scientifically partition the dataset, thereby supporting model training, validation, and testing. Specifically, 80% of the data was allocated to the training set, 10% to the validation set, and the remaining 10% to the testing set. During the division process, care was taken to ensure that data from each experimenter was evenly distributed across the training, validation, and test sets, preventing model bias due to uneven data distribution. Additionally, images captured under different lighting conditions were uniformly distributed across each subset to ensure the model's robust performance across various illumination scenarios.