Pupil diameter automatic detection method based on infrared imaging
Automatic pupil diameter detection is achieved by using infrared imaging equipment and ResUNet-CBAM neural network, which solves the problems of manual operation and light effects in traditional methods, and realizes rapid and standardized pupil diameter measurement, which is suitable for a variety of medical scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-04-14
AI Technical Summary
Traditional pupil detection methods require manual operation for patients with closed eyes or in a coma, and are greatly affected by reflection and illumination in visible light environments, making boundary recognition difficult. Existing infrared pupil detection methods do not involve robust pupil segmentation and diameter measurement.
An automatic pupil diameter detection method based on infrared imaging is adopted. The method uses an infrared imaging device to acquire images and uses a ResUNet-CBAM neural network to perform pupil segmentation and diameter measurement, thereby realizing an automated detection process, including image acquisition, preprocessing, segmentation and visualization output.
It enables rapid and standardized pupil diameter measurement without human intervention, reducing human variation. It is applicable to both mobile and computer devices, improving detection efficiency and safety, and is suitable for scenarios such as intensive care, emergency care, and anesthesia.
Smart Images

Figure CN121845512A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical imaging and artificial intelligence detection technology, specifically to an automatic pupil diameter detection method based on infrared imaging. Background Technology
[0002] Pupil detection with eyes closed involves observing the morphology, size, and response to stimuli using specific equipment while the eyelids are closed. Its core purpose is to assess ocular function, nervous system status, or assist in the diagnosis of related diseases. Pupil size and response are primarily regulated by the sympathetic nervous system (pupil dilation) and the parasympathetic nervous system (pupil constriction), and are closely related to the retina, optic nerve, and central nervous system. Detection with eyes closed eliminates interference from direct light stimulation, allowing for more accurate assessment. Traditional pupil detection methods mostly rely on visible light cameras and manual eyelid opening for imaging, which has the following drawbacks: 1. For patients with closed eyes or in a coma, manual operation is required to observe the pupils, posing risks and inconvenience; 2. Visible light is significantly affected by reflection and illumination, making boundary identification difficult. In clinical practice, infrared pupil detectors are commonly used for non-invasive detection. These detectors emit infrared light that penetrates the eyelids or passes through the eyelid slits to capture pupil images in real time, measuring pupil diameter and morphology. However, achieving robust pupil segmentation and diameter measurement from the acquired images remains a pressing issue.
[0003] The prior art disclosure number CN120412065A discloses an infrared pupil detection method, system, device and storage medium based on improved YOLOv8n. It obtains the detection results by constructing the first and second infrared pupil detection models improved by YOLOv8n and realizes eye movement analysis, but does not involve through-hole detection. Summary of the Invention
[0004] 1. The technical problem to be solved: To address the aforementioned technical problems, this invention provides an automatic pupil diameter detection method based on infrared imaging, achieving an integrated workflow from image acquisition and automatic interpretation to visualized result output. Compared to traditional manual measurement, this system is not only faster but also provides standardized measurement, reducing human error.
[0005] 2. Technical Solution: An automatic pupil diameter detection method based on infrared imaging, characterized in that it includes: Step 1: Acquire eye images; use infrared imaging equipment to acquire grayscale images of the patient's closed eyes; Step 2: Image preprocessing; The acquired infrared eye images are subjected to size unification and normalization processing to obtain standardized input images; Step 3: Pupil segmentation; Input the preprocessed image into a deep learning-based image segmentation network, and the network outputs a binarized mask image of the pupil region; Step 4: Obtain the mask pixel area of the binarized mask image and convert it into the equivalent diameter of the pupil region; Step 5: The equivalent diameter data of the pupil region within the period and other relevant image features will be used to generate a visualization output.
[0006] Furthermore, the infrared imaging device includes a near-infrared light source and a near-infrared imaging camera; during the acquisition process, the near-infrared light source changes the intensity of infrared light at a preset frequency or by manual control, while the near-infrared imaging camera acquires multiple images at a preset sampling frequency.
[0007] Further, step two specifically includes: determining a reference point or reference region, and using the reference point or reference region as a reference, scaling up or down all acquired images proportionally to obtain a uniformly sized image set containing the pupil region; the reference point or reference region is the pixel region corresponding to the same part of the patient in the image; and normalizing the uniformly sized grayscale image.
[0008] Furthermore, the deep learning-based image segmentation network is the ResUNet-CBAM neural network model.
[0009] Furthermore, in step four, the formula for obtaining the equivalent diameter based on the mask pixel area is: ; In the above formula, d represents the equivalent diameter of the pupil in the image, and area is the area of the mask pixels in the image.
[0010] Furthermore, in step five, by mapping the equivalent diameter of the pupil at different sampling times to the actual diameter, the pupil diameter at that sampling time can be determined; by obtaining the equivalent diameter of the pupil under different infrared light intensities, the degree of pupil reaction can be determined; the visualization output is a visualization overlay and a structured data file for medical analysis.
[0011] 3. Beneficial effects: (1) The present invention discloses an automatic pupil diameter detection method based on infrared imaging, which can be run on a mobile device or a computer. The module can directly read eye photos or infrared imaging data and call the backend deep learning model to complete pupil segmentation and diameter measurement. The interpretation process is completed automatically, taking about 0.1 seconds, which greatly improves the detection efficiency.
[0012] (2) The present invention discloses an automatic pupil diameter detection method based on infrared imaging. The system includes an infrared imaging device, an artificial intelligence algorithm module, and a front-end application interface, realizing an integrated workflow from image acquisition and automatic interpretation to result visualization output. Compared with traditional manual measurement, this system is not only faster, but also has a unified measurement standard, reducing human differences.
[0013] (3) The present invention discloses an automatic pupil diameter detection method based on infrared imaging, which can obtain the pupil diameter without the patient opening his eyes and avoid human intervention; it is robust: based on infrared imaging, it is less affected by ambient light interference and can still image even when the eyes are closed; it has wide applications: it is suitable for scenarios such as intensive care, emergency care, anesthesia, and nerve monitoring, which improves detection efficiency and safety; software interpretation avoids human subjective error and the results are highly consistent. Attached Figure Description
[0014] Figure 1 This is a flowchart of the method; Figure 2 This is a structural diagram of the deep learning-based image segmentation network involved in this method; Figure 3 The infrared imaging device is a specific embodiment; Figure 4 The image shows the eye and the output pupil diagram obtained in a specific embodiment. Detailed Implementation
[0015] The present invention will now be described in detail with reference to the accompanying drawings.
[0016] As attached Figure 1 The method for automatic pupil diameter detection based on infrared imaging is shown, characterized by comprising: Step 1: Acquire eye images; use infrared imaging equipment to acquire grayscale images of the patient's closed eyes; Step 2: Image preprocessing; The acquired infrared eye images are subjected to size unification and normalization processing to obtain standardized input images; Step 3: Pupil segmentation; Input the preprocessed image into a deep learning-based image segmentation network, and the network outputs a binarized mask image of the pupil region; Step 4: Obtain the mask pixel area of the binarized mask image and convert it into the equivalent diameter of the pupil region; Step 5: The equivalent diameter data of the pupil region within the period and other relevant image features will be used to generate a visualization output.
[0017] Furthermore, the infrared imaging device includes a near-infrared light source and a near-infrared imaging camera; during the acquisition process, the near-infrared light source changes the intensity of infrared light at a preset frequency or by manual control, while the near-infrared imaging camera acquires multiple images at a preset sampling frequency.
[0018] Further, step two specifically includes: determining a reference point or reference region, and using the reference point or reference region as a reference, scaling up or down all acquired images proportionally to obtain a uniformly sized image set containing the pupil region; the reference point or reference region is the pixel region corresponding to the same part of the patient in the image; and normalizing the uniformly sized grayscale image.
[0019] Furthermore, the deep learning-based image segmentation network is the ResUNet-CBAM neural network model.
[0020] Furthermore, in step four, the formula for obtaining the equivalent diameter based on the mask pixel area is: ; In the above formula, d represents the equivalent diameter of the pupil in the image, and area is the area of the mask pixels in the image.
[0021] Furthermore, in step five, by mapping the equivalent diameter of the pupil at different sampling times to the actual diameter, the pupil diameter at that sampling time can be determined; by obtaining the equivalent diameter of the pupil under different infrared light intensities, the degree of pupil reaction can be determined; the visualization output is a visualization overlay and a structured data file for medical analysis.
[0022] Example 1: As attached Figure 1 The figure shown is an overall flowchart of this embodiment, which includes: S1: Acquire eye images; acquire grayscale images of the patient's eyes with eyes closed using infrared imaging equipment; as shown in the attached image. Figure 3 The device, during the acquisition process, obtains different images by adjusting the intensity of the near-infrared light source.
[0023] S2: Image preprocessing; The acquired infrared eye image is cropped to ensure that the size of the pupil area in the image is uniform, and then normalization is performed to obtain a standardized input image.
[0024] S3: Pupil segmentation; Input the preprocessed image into a deep learning-based image segmentation network. In this embodiment, the segmentation network uses the ResUNet-CBAM network, and the network outputs a binarized mask image of the pupil region.
[0025] S4: Obtain the equivalent diameter of the pupil by acquiring the binarized mask pixel area.
[0026] S5: Convert the obtained equivalent diameter of the pupil into the equivalent diameter of the physical size of the pupil region.
[0027] S6: The equivalent diameter data of the pupil region within the period and other relevant image features will be used to generate a visualization output.
[0028] Example 2: As attached Figure 2 As shown, this embodiment illustrates the deep learning-based image segmentation network used. In this embodiment, the ResUNet-CBAM pupil segmentation network structure uses a two-row layout. The input image passes through a 4-layer encoder to the bottleneck layer, and then through a 4-layer decoder to output a pupil mask. The network's loss function uses a combination of Dice and BCE; the CBAM attention mechanism uses a channel + attention mechanism; and the physical conversion uses r... real =r p *s*d / f, where r p : The equivalent pixel radius of the pupil in the segmentation mask, in pixels, calculated from the binarized mask of the pupil region; 𝑠: The physical pixel size of the image sensor, in millimeters (mm / pixel), determined by the camera chip specifications; d: The working distance between the tested eye and the camera lens, i.e., the distance from the surface of the eyeball to the principal plane of the lens during imaging, in millimeters (mm); 𝑓: The equivalent focal length of the lens, in millimeters (mm).
[0029] Example 3: As attached Figure 4 The image shown is an example of the visualization output of this method. In each pair of images, the left image is the obtained grayscale image, and the pink part of the right image is the obtained pupil position and size.
[0030] Although the present invention has been disclosed above with reference to preferred embodiments, these are not intended to limit the invention. Any person skilled in the art can make various changes or modifications without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention should be defined by the scope of the claims of this application.
Claims
1. An automatic pupil diameter detection method based on infrared imaging, characterized in that: include: Step 1: Acquire images of the eyes; Grayscale images of the eyes of patients with closed eyes were acquired using infrared imaging equipment; Step 2: Image preprocessing; The acquired infrared eye images are subjected to size unification and normalization processing to obtain standardized input images; Step 3: Pupil segmentation; The preprocessed image is input into a deep learning-based image segmentation network, and the network outputs a binarized mask image of the pupil region. Step 4: Obtain the mask pixel area of the binarized mask image and convert it into the equivalent diameter of the pupil region; Step 5: The equivalent diameter data of the pupil region within the period and other relevant image features will be used to generate a visualization output.
2. The automatic pupil diameter detection method based on infrared imaging according to claim 1, characterized in that: The infrared imaging device includes a near-infrared light source and a near-infrared imaging camera; during the acquisition process, the near-infrared light source changes the intensity of infrared light at a preset frequency or is manually controlled, while the near-infrared imaging camera acquires multiple images at a preset sampling frequency.
3. The automatic pupil diameter detection method based on infrared imaging according to claim 1, characterized in that: Step two specifically includes: determining a reference point or reference region; using the reference point or reference region as a reference, scaling up or down all acquired images proportionally to obtain a uniformly sized image set containing the pupil region; the reference point or reference region is the pixel region corresponding to the same part of the patient in the image; and normalizing the uniformly sized grayscale image.
4. The automatic pupil diameter detection method based on infrared imaging according to claim 1, characterized in that: The deep learning-based image segmentation network is the ResUNet-CBAM neural network model.
5. The automatic pupil diameter detection method based on infrared imaging according to claim 1, characterized in that: In step four, the formula for obtaining the equivalent diameter based on the mask pixel area is: ; In the above formula, d represents the equivalent diameter of the pupil in the image, and area is the area of the mask pixels in the image.
6. The automatic pupil diameter detection method based on infrared imaging according to claim 1, characterized in that: In step five, the equivalent diameter of the pupil at different sampling times is mapped to the actual diameter to determine the pupil diameter at that sampling time; by obtaining the equivalent diameter of the pupil under different infrared light intensities, the degree of pupil reaction can be determined; the visualization output is a visualization overlay and a structured data file for medical analysis.
Citation Information
Patent Citations
Infrared pupil detection method, system and equipment based on improved YOLOv8n and storage medium
CN120412065A