Intelligent endoscope control method and device and computer readable storage medium

By collecting and analyzing the user's eye movements in real time, and using lightweight eye tracking and classification models, intelligent control of endoscopes is achieved, which solves the problems of inconvenient operation and infection risk in the existing technology, and improves control accuracy and efficiency.

CN118680494APending Publication Date: 2024-09-24SUN YAT SEN UNIVERSITY CANCER CENTER (CANCER HOSPITAL AFFILIATED TO SUN YAT SEN UNIVERSITY CANCER RESEARCH INSTITUTE OF SUN YAT SEN UNIVERSITY)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410739319.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

In existing endoscopy, users need to step on wired foot pedals to control image acquisition, water supply, flushing, or air supply, which results in inconvenient operation, fatigue, and risk of infection.

Method used

By collecting the user's eye movement trajectory vectors in real time, and using lightweight eye tracking models and eye movement trajectory classification models, intelligent control of the endoscope is achieved and the use of wired foot pedals is avoided.

Benefits of technology

It realizes wireless control of image acquisition, water supply and air supply operations, reduces user operating fatigue and risk of infection, improves control accuracy and efficiency, and has low hardware cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118680494A
    Figure CN118680494A
Patent Text Reader

Abstract

The invention relates to the technical field of instrument control, in particular to an intelligent endoscope control method and device and a computer readable storage medium, and control operation of image acquisition, water supply or air supply is achieved by drawing a preset eye movement track on an endoscope display through eyes. Compared with an existing method adopting a wired pedal control device, the intelligent endoscope control method has the advantages that operations such as image acquisition, water supply and air supply can be completed, and pedal switches of different devices are omitted; meanwhile, the defects caused by leads on the ground are avoided; the invention provides a lightweight eye movement tracking model to realize rapid acquisition of a user fixation point. Meanwhile, an eye movement track classification model is provided, and coordinate vectors are adopted to replace absolute coordinates to serve as input of a classifier, so that a high classification accuracy rate can still be kept when the eye movement positioning accuracy is not high. The combination of the lightweight eye movement tracking model and the eye movement trajectory classification model realizes faster and more accurate eye movement control operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of instrument control technology, and in particular to an endoscope intelligent control method, device and computer-readable storage medium. Background Art

[0002] When the endoscope user collects images, both hands are needed to perform operations such as changing the patient's posture and shifting the inspection probe. Therefore, when the user needs the endoscope to collect images, flush with water or supply air, the user often controls it by stepping on the corresponding wired foot pedal.

[0003] However, this control method has many disadvantages. First, when users perform endoscopic examinations on patients, they usually concentrate on looking at the endoscopic examination images. When they need to supply water for flushing, take pictures or record videos, they have to lower their heads to find the position of the wired pedal before they can step on it. Different operations require different wired pedals, which increases the inconvenience of user operation. Under this control method, users need to stand on one foot for a long time, and their lower limbs are prone to fatigue. Finally, the wires of the wired pedal on the ground not only interfere with the user's transfer of beds, but are also prone to bacterial infection. Summary of the invention

[0004] In view of the above problems, the embodiments of the present invention provide an intelligent control method and device for an endoscope and a computer-readable storage medium, which solves the problem that when an endoscope is required to capture images, flush water or deliver air, it is often controlled by stepping on a corresponding wired foot pedal.

[0005] According to one aspect of an embodiment of the present invention, there is provided an endoscope intelligent control method, the method comprising:

[0006] Collect the eye movement trajectory vector of the current user in real time, and determine whether the eye movement trajectory vector is valid data;

[0007] If yes, the eye movement trajectory vector is input into the eye movement trajectory classification model to obtain the prediction instruction, and the endoscope is processed according to the prediction instruction;

[0008] Otherwise no processing is performed.

[0009] In some optional methods, an eye tracking model is used to obtain an eye tracking vector of the current user on the eye tracking display board;

[0010] Wherein, the eye movement display board includes an eye movement track drawing board and a buffer area, and the buffer area is located outside the eye movement track drawing board.

[0011] In some optional ways, the step of obtaining the eye movement trajectory vector of the current user on the eye movement display board through the eye movement tracking model specifically includes the following steps:

[0012] The lightweight eye tracking model is divided into four parts: image acquisition, lightweight face and eye extraction, lightweight gaze point estimation, and gaze point display. Image acquisition is the original image data captured directly by the camera. Lightweight face and eye extraction uses the YOLOv5s target detection method to obtain all faces and eyes detected in the image. After matching the face with the eye, the final gaze estimation point needs to be obtained through the lightweight gaze estimation network. Finally, the gaze estimation point is displayed on the display.

[0013] The lightweight gaze estimation model mainly includes four modules, and the inputs of the four modules are left eye image, right eye image, face image and face position information respectively. The first module and the second module use a lightweight backbone network to extract left and right eye features. The network is a 10-layer MobileNetv3 network, and the left and right eye feature extraction networks share weights, and finally splice the output features and transform them into a 1-dimensional feature vector through a fully connected layer. The third module network uses a similar lightweight backbone network to extract facial features, and then outputs them as a 1-dimensional feature vector through a fully connected layer. The input of the fourth module is face position information, the picture is divided into 25*25 blocks and these areas are represented by a 25*25 matrix. If a block of the image contains a face, the value of the position corresponding to the matrix is ​​set to 1, otherwise it is set to 0, and then mapped to a 1-dimensional feature vector through a fully connected layer, and then spliced ​​with the 1-dimensional vector output by the third part and output as a 1-dimensional feature vector through a fully connected layer. Finally, the 1-dimensional vector is spliced ​​with the 1-dimensional vector output by the first two parts of the structure and finally mapped to the eye movement position coordinates through a fully connected layer.

[0014] Through the above-mentioned lightweight eye tracking model, the user's eye position coordinates can be quickly estimated, and the eye trajectory vector can be obtained by continuously acquiring images and estimating the eye position coordinates.

[0015] In some optional embodiments, the eye movement trajectory vector includes a set of eye-tracking point coordinates of the current user {(x0, y0), (x1, y1), (x2, y2), ..., (x N ,y N )}, N represents the number of coordinate points of the eye movement trajectory vector, requiring N ≥ N min,sample , N min,sample is the value with the minimum number of trajectory points of the current user in the training sample; let Δx i =x i -x i-1 , Δy i =y i -y i-1 , get the eye movement trajectory vector, Δx i and Δy i Respectively represent the changes in the horizontal and vertical coordinates of the i-th point, i∈1,2,3…N.

[0016] In some optional embodiments, determining whether the eye movement trajectory vector is valid data includes:

[0017] Get the starting point coordinates (x0, y0), the secondary starting point coordinates (x1, y1), and the secondary end point coordinates (x N-1 ,y N-1 )、end point coordinates (x N ,y N );

[0018] If the starting point coordinates (x0, y0) and the end point coordinates (x N ,y N ) is located in the buffer area, and the secondary starting point coordinate (x N-1 ,y N-1 ), the coordinates of the secondary endpoint (x1, y1) are located in the eye movement track drawing board area, then the eye movement track vector is valid data;

[0019] Otherwise, the eye movement trajectory vector is invalid data and will not be processed.

[0020] In some optional ways, inputting the eye movement trajectory vector into an eye movement trajectory classification model to obtain a prediction instruction includes:

[0021] The eye movement trajectory vector is input into the input layer of the eye movement trajectory classification model, where the eye movement trajectory vector is (Δx1, Δy1, Δx2, Δy2, …, Δx N ,Δy N ,0,0,…,0), where the 2*N+1 to 3*N max,sample The value is 0; the number of input layer units is 3*N max,sample , where N max,sample is the value with the largest number of trajectory points in the training sample for the current user;

[0022] Calculate the input layer through the hidden layer to obtain the hidden layer activation output h j is the hidden layer unit, j=1,2,…,N max,sample , where the hidden layer units are represented by the formula Calculate; i is the input layer unit, i=1,2,…,3*N max,sample ; is the weight from the input layer to the hidden layer, i=1,2,…,3*N max,sample ,j=1,2,…,N max,sample , is the bias value;

[0023] The hidden layer activation output H jOutput to the output layer unit v for calculation, the output of the output layer unit v V k is the probability of the k-th category trajectory; Among them, W j,k is the weight from the hidden layer to the output layer, j = 1, 2, ..., N max,sample ,k=1,2,3,4, is the offset;

[0024] According to V k The instruction corresponding to the maximum value is used as the predicted instruction.

[0025] In some optional embodiments, the output of the output layer unit v includes a maximum value maxV k 、The second largest value second,maxV k , when the maximum value maxV k and the second largest value second,maxV k When the difference between is greater than or equal to the preset threshold σ, the eye movement trajectory vector is the maximum value maxV k The corresponding category trajectory is a pre-stored instruction, otherwise the prediction is abandoned.

[0026] In some optional ways, the eye movement trajectory classification model is trained by setting the cost function Loss of the Softmax function, specifically including:

[0027] pass Perform the cost function, where V k is the true value, is the predicted value;

[0028] The cost function is minimized by the gradient descent method, and the weights from the hidden layer to the output layer and from the input layer to the hidden layer are updated: Get the optimized weight parameters.

[0029] In some optional embodiments, the prediction instructions include image control instructions, water pump control instructions, air supply control instructions, and meaningless instructions.

[0030] According to another aspect of an embodiment of the present invention, there is provided an endoscope intelligent control device, the device comprising:

[0031] The trajectory acquisition module is used to collect the eye movement trajectory vector of the current user in real time;

[0032] A trajectory judgment module, used to judge whether the eye movement trajectory vector is valid data;

[0033] A processing module is used to input the eye movement trajectory vector into an eye movement trajectory classification model, obtain a prediction instruction, and process the endoscope according to the prediction instruction.

[0034] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores at least one executable instruction, and when the executable instruction is executed on an endoscope intelligent control device such as the above-mentioned endoscope intelligent control device, the endoscope intelligent control device performs the operation of the endoscope intelligent control method such as the above-mentioned endoscope intelligent control method.

[0035] The embodiment of the present invention provides an endoscope intelligent control method, device and computer-readable storage medium, and its beneficial effect is that: the present invention realizes the control operation of image acquisition, water supply or gas supply by drawing a preset eye movement trajectory on the endoscope display through the eyes. Compared with the existing method using a wired foot control device, the endoscope intelligent control method of the present invention can complete operations such as image acquisition, water supply and gas supply, eliminating the foot switch of different devices; at the same time, it also avoids the disadvantages caused by the presence of leads on the ground; the present invention proposes a lightweight eye tracking model to obtain and realize the rapid acquisition of the user's gaze point; at the same time, an eye movement trajectory classification model is proposed, which uses coordinate vectors instead of absolute coordinates as the input of the classifier, so that when the eye movement positioning accuracy is not high, it can still maintain a high classification accuracy. The combination of the lightweight eye movement tracking model and the eye movement trajectory classification model realizes faster and more accurate eye movement control operations. At the same time, the hardware cost required to realize the present invention is low, and it can be realized by adding cameras and control lines on the basis of existing endoscope equipment.

[0036] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:

[0038] Figure 1 A schematic diagram of the process of the endoscope intelligent control method provided by the present invention is shown;

[0039] Figure 2 A schematic diagram of the process of the lightweight eye tracking model provided by the present invention is shown;

[0040] Figure 3 A schematic diagram of the process of the lightweight gaze estimation model provided by the present invention is shown;

[0041] Figure 4The structure diagram of the endoscope intelligent control device provided by the present invention is shown;

[0042] Figure 5 A schematic diagram showing the structure of the eye-movement display panel provided by the present invention is shown;

[0043] Figure 6 The figure shows a connection diagram of the endoscope intelligent control device provided by the present invention. DETAILED DESCRIPTION

[0044] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0045] Embodiment 1,

[0046] Figure 1 The first embodiment of an endoscope intelligent control method of the present invention is shown, and the method comprises:

[0047] 110, collecting the eye movement trajectory vector of the current user in real time, and determining whether the eye movement trajectory vector is valid data; in step 110, collecting the eye movement trajectory vector of the current user in real time, including: obtaining the eye movement trajectory vector of the current user on the eye movement display board through an eye movement tracking model.

[0048] The present application also defines an eye movement trajectory vector, wherein the eye movement trajectory vector includes a set of eye measurement point coordinates of the current user {(x0, y0), (x1, y1), (x2, y2), ..., (x N ,y N )}, N represents the number of coordinate points of the eye movement trajectory vector, requiring N ≥ N min,sample , N min,sample is the value with the minimum number of trajectory points of the current user in the training sample; let Δx i =x i -x i-1 , Δy i =y i -y i-1 , get the eye movement trajectory vector, Δx i and Δy i Respectively represent the changes in the horizontal and vertical coordinates of the i-th point, i∈1,2,3…N.

[0049] The eye movement display board includes an eye movement track drawing board and a buffer area, and the buffer area is located outside the eye movement track drawing board. Determining whether the eye movement track vector is valid data specifically includes: obtaining the starting point coordinates, the secondary starting point coordinates, the secondary end point coordinates, and the end point coordinates in the eye movement track vector; if the starting point coordinates and the end point coordinates are located in the buffer area and the secondary starting point coordinates and the secondary end point coordinates are located in the eye movement track drawing board area, then the eye movement track vector is valid data; otherwise, the eye movement track vector is invalid data and is not processed. Figure 5 The rectangular ABCD area 1 of the display is used to display the inspection image collected by the endoscope in real time. The rectangular A in the upper right corner of the display 1 B 1 C 1 Area D 2 is used as an eye tracking display board to display the user's eye position calculated by the workstation and represented by a red dot. 2 B 2 C 2 D 2 Area 3 is used for the eye movement track drawing board. The user can draw eye movement tracks on the eye movement track drawing board by shifting his / her gaze. The area between the eye movement display board and the eye movement track drawing board is called buffer area 4. A camera 5 is placed directly above the eye movement display board to capture the eye information of the endoscope user. In order not to affect the endoscope user's viewing of the image, the eye movement display board A 1 B 1 C 1 Area D is a transparent area, just the solid line A 1 B 1 C 1 D. Separate the eye-tracking display board from the display. It is recommended that the length and width of the eye-tracking display board can be set to 1 / 4 of the endoscopic display. The advantage of this is that the eye-tracking display board can be divided from the original endoscopic image display, and there is no need to add an additional display, which saves costs and facilitates application and promotion.

[0050] 120, if yes, input the eye movement trajectory vector into the eye movement trajectory classification model, obtain the prediction instruction, and process the endoscope according to the prediction instruction; in step 120, input the eye movement trajectory vector into the eye movement trajectory classification model, obtain the prediction instruction, including:

[0051] The eye movement trajectory vector is input into the input layer of the eye movement trajectory classification model, where the eye movement trajectory vector is (Δx1, Δy1, Δx2, Δy2, …, Δx N ,Δy N ,0,0,…,0), where the 2*N+1 to 3*N max,sample The value is 0; the number of input layer units is 3*N max,sample , where N max,sample is the value with the largest number of trajectory points in the training sample for the current user;

[0052] Calculate the input layer through the hidden layer to obtain the hidden layer activation output h j is the hidden layer unit, j=1,2,…,N max,sample , where the hidden layer units are represented by the formula Calculate; i is the input layer unit, i=1,2,…,3*N max,sample ; is the weight from the input layer to the hidden layer, i=1,2,…,3*N max,sample ,j=1,2,…,N max,sample , is the bias value;

[0053] The hidden layer activation output H j Output to the output layer unit v for calculation, the output of the output layer unit v V k is the probability of the k-th category trajectory; Among them, W j,k is the weight from the hidden layer to the output layer, j = 1, 2, ..., N max,sample ,k=1,2,3,4, is the bias, and the hidden layer is set to N max,sample units, and the activation function of the hidden layer uses the ReLU function;

[0054] According to V k is the instruction corresponding to the maximum value, which is used as the prediction instruction. Among them, 4 trajectory numbers are defined, and the corresponding control operations represent V1 as the probability of map acquisition, V2 as the probability of water delivery, V3 as the probability of air delivery, and V4 as the probability of meaningless operation. k is the maximum value, and the value of k is the predicted instruction.

[0055] The output of the output layer unit v includes the maximum value maxV k 、The second largest value second,maxV k , when the maximum value maxV k and the second largest value second,maxV k When the difference between is greater than or equal to the preset threshold σ, the eye movement trajectory vector is the maximum value maxV k The corresponding category trajectory is a pre-stored instruction, otherwise the prediction is abandoned.

[0056] The eye movement classification model is trained by setting the cost function Loss of the Softmax function, including: Perform the cost function, where V k is the true value, is the predicted value; the cost function is minimized by the gradient descent method, and the weights from the hidden layer to the output layer and from the input layer to the hidden layer are updated: The optimized weight parameters are obtained. The predicted instructions include image control instructions, water pump control instructions, air supply control instructions, and meaningless instructions.

[0057] 130, otherwise no processing is performed. In step 130, if the eye movement trajectory vector is not the starting point coordinates and the end point coordinates are located in the eye movement trajectory drawing area and the secondary starting point coordinates and the secondary end point coordinates are located in the buffer area; the obtained eye movement trajectory vector is identified as mis-scanning data and no data processing is performed.

[0058] In some optional embodiments, see Figure 2 The eye tracking model is a lightweight mathematical model. The eye tracking model is used to obtain the eye trajectory vector of the current user on the eye display board. Specifically, the following steps are included: the original image data captured by the camera; the face data and eye data detected in the image are obtained by the YOLOv5s target detection method; the face and eye are input into the gaze estimation model to obtain the gaze estimation point, and the gaze estimation point is displayed on the eye display board;

[0059] Among them, see Figure 3 The method for obtaining the gaze estimation point through the gaze estimation model specifically includes four modules: the input of the first module is the left eye image, the input of the second module is the right eye image, and the left eye features and the right eye features are extracted through a lightweight backbone network. The lightweight backbone network is a 10-layer MobileNetv3 network, and the left eye feature and the right eye feature extraction network share weights. Finally, the output features are spliced ​​together and converted into the first 1-dimensional feature vector through a fully connected layer. The input of the third module is a facial image, which is extracted through a lightweight backbone network and then output as a second 1D feature vector through a fully connected layer; the facial position is described, the facial features are found in the facial data and the area where the facial features are located is marked; the input of the fourth module is facial position information, the original image is divided into a two-dimensional matrix, and the facial features are marked, and the output is a third 1D feature vector through a fully connected layer mapping, the third 1D feature vector is first concatenated with the second 1D feature vector and a fourth 1D feature vector is generated through a fully connected layer, the fourth 1D feature vector is concatenated with the first 1D feature vector and finally mapped into eye movement position coordinates through a fully connected layer; the eye movement trajectory vector is obtained by continuously acquiring images and estimating eye movement position coordinates.

[0060] In this embodiment, the lightweight eye tracking model is divided into four parts, image acquisition, lightweight face and eye extraction, lightweight gaze point estimation and gaze point display. Image acquisition is the original image data extracted directly by the camera. Lightweight face and eye extraction is to obtain all faces and eyes detected in the image through the YOLOv5s target detection method. After the face and the eye are matched, the final gaze estimation point needs to be obtained through a lightweight gaze estimation network. Finally, the gaze estimation point is displayed on the display screen. The lightweight gaze estimation model mainly includes four modules, and the inputs of the four modules are left eye image, right eye image, face image and face position information respectively. The first two module structures use a lightweight backbone network to extract left and right eye features. The network is a 10-layer MobileNetv3 network, and the left and right eye feature extraction networks share weights. Finally, the output features are spliced ​​together and converted into a 1-dimensional feature vector through a fully connected layer. The third module network uses a similar lightweight backbone network to extract facial features, and then outputs them as a 1-dimensional feature vector through a fully connected layer. The fourth module is the input that describes the face position. The image is divided into 25*25 blocks and these areas are represented by a 25*25 matrix. If a block of the image contains a face, the value of the corresponding position in the matrix is ​​set to 1, otherwise it is set to 0. It is then mapped to a 1-dimensional feature vector through a fully connected layer, and then concatenated with the 1-dimensional vector output by the third module and output as a 1-dimensional feature vector through a fully connected layer. Finally, this 1-dimensional vector is concatenated with the 1-dimensional vectors output by the first two modules and finally mapped into eye position coordinates through a fully connected layer. Through the above-mentioned lightweight eye tracking model, the user's eye position coordinates can be quickly estimated, and the eye trajectory vector can be obtained by continuously acquiring images and estimating eye position coordinates.

[0061] The present invention can be applied to medical endoscopes to perform intelligent control of the endoscope system. By drawing a preset eye trajectory on the endoscope display with the eyes, control operations such as image acquisition, water delivery or gas delivery can be achieved. Compared with the existing method of using a wired foot control device, the endoscope intelligent control method of the present invention can complete operations such as image acquisition, water delivery and gas delivery, eliminating the need for foot switches of different devices; at the same time, it also avoids the disadvantages caused by the presence of leads on the ground; the present invention uses an eye trajectory classification model as a classification method, which is faster and more accurate than traditional eye movement positioning methods. Coordinate vectors are used instead of absolute coordinates as the input of the classifier, so the accuracy of eye tracking is not required; at the same time, the hardware cost required to implement the present invention is low, and it can be achieved by simply adding a camera and a control line to the existing endoscope equipment.

[0062] Embodiment 2:

[0063] Figure 5The first embodiment of an endoscope intelligent control device of the present invention is shown, and the device includes: a trajectory acquisition module 210, which is used to collect the eye trajectory vector of the current user in real time; a trajectory judgment module 220, which is used to judge whether the eye trajectory vector is valid data; a processing module 230, which is used to input the eye trajectory vector into the eye trajectory classification model, obtain the prediction instruction, and process the endoscope according to the prediction instruction. In this embodiment, the hardware system of the present application includes an image control device, an endoscope display, an endoscope workstation, a water supply pump device, an air supply device, an endoscope pendant, a camera, and a control line. The image control device is used to receive the image signal of the endoscope, and transmit it to the endoscope display after digital processing. The endoscope display is used to display the endoscopic examination image in real time. The endoscope workstation transmits the control signal to the image control device. When the user finds an endoscopic image with clinical significance, it is timely collected and saved to the local workstation. The water pump device is used to flush the sticky bubbles, blood, dirt and other substances that affect the field of vision in the patient's endoscopic examination area, which can improve the clarity of the field of vision of the gastroenteroscope. The gas supply device sends carbon dioxide gas into the patient's body to make room for the examination area to improve the endoscopic field of vision. The endoscope pendant is used to carry the above-mentioned endoscopic equipment and provide power, network cables and cable tubes for the equipment. In particular, in general, the endoscopic examination room has the above devices. The only additional equipment required for the patent of this invention is the camera and the control line. The camera is installed above the endoscope display to collect the user's facial image and transmit it to the endoscope workstation through the signal line. The signal line passes through the cable tube of the endoscope pendant to the ceiling and then to the endoscope workstation, thereby avoiding the presence of leads on the ground.

[0064] See also Figure 4 , the control line connects the endoscope workstation with the image control device, the water pump device and the air supply device, and is used for the endoscope workstation to send control signals to the image control device, the water pump device and the air supply device. The control line is a USB to two-core wire, in which the USB interface is connected to the endoscope workstation, and the two-core wire is connected to the image control device, the water pump device and the air supply device. The specific wiring scheme is to extract the data positive and data negative two-core wires from the power supply terminal 1, the data negative pole 2, the data negative pole 3 and the ground terminal 4 in the USB four-core, in which the data positive pole wire is connected to the switch potential of the device, and the switch potential is generally at a pin of the device switch button 5, and the data negative pole wire is connected to the ground terminal 6 of the device. The control line passes through the cable tube of the endoscope pendant to the ceiling, connecting the endoscope workstation and each device, thereby avoiding the presence of leads on the ground.

[0065] The face image captured by the camera is used to measure the position, speed, direction and other information of the eyeball through image processing technology, so as to calculate the person's gaze point. The eye tracking software requires the user to calibrate in advance and save the calibration parameters in the user software. The eye track classification software classifies the acquired eye tracks through the eye track classifier and transmits the classification results to the control signal sending software. The control signal sending software sends a control signal to the corresponding device based on the classification results. The control signal is generally set as a falling edge level signal.

[0066] Embodiment 3:

[0067] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which at least one executable instruction is stored. When the executable instruction is executed on an endoscope intelligent control device as described above, the endoscope intelligent control device performs the operation of the endoscope intelligent control method as described above.

[0068] Specifically, the computer readable storage medium executes:

[0069] Collect the eye movement trajectory vector of the current user in real time, and determine whether the eye movement trajectory vector is valid data;

[0070] If yes, the eye movement trajectory vector is input into the eye movement trajectory classification model to obtain the prediction instruction, and the endoscope is processed according to the prediction instruction;

[0071] Otherwise no processing is performed.

[0072] The present invention realizes the control operation of image acquisition, water supply or gas supply by drawing a preset eye trajectory on the endoscope display with the eyes. Compared with the existing method of using a wired foot control device, the endoscope intelligent control method of the present invention can complete operations such as image acquisition, water supply and gas supply, eliminating the foot switch of different devices; at the same time, it also avoids the disadvantages caused by the presence of leads on the ground; the present invention adopts an eye movement trajectory classification model as a classification method, which is faster and more accurate than the traditional eye movement positioning method. Coordinate vectors are used instead of absolute coordinates as the input of the classifier, so the accuracy of eye tracking is not required; at the same time, the hardware cost required to realize the present invention is low, and it can be realized by simply adding a camera and a control line to the existing endoscope equipment.

[0073] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. Similarly, in order to simplify the present invention and help understand one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Wherein, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself is a separate embodiment of the present invention.

[0074] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.

[0075] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

Claims

1. An endoscope intelligent control method, characterized in that: The method comprises: Collect the eye movement trajectory vector of the current user in real time, and determine whether the eye movement trajectory vector is valid data; If yes, the eye movement trajectory vector is input into the eye movement trajectory classification model to obtain the prediction instruction, and the endoscope is processed according to the prediction instruction; Otherwise no processing is performed.

2. The endoscope intelligent control method according to claim 1, characterized in that: The real-time acquisition of the eye movement trajectory vector of the current user includes: Obtain the eye movement trajectory vector of the current user on the eye movement display board through the eye movement tracking model; Wherein, the eye movement display board includes an eye movement track drawing board and a buffer area, and the buffer area is located outside the eye movement track drawing board.

3. The endoscope intelligent control method according to claim 2, characterized in that: The step of obtaining the eye movement trajectory vector of the current user on the eye movement display board through the eye movement tracking model specifically includes the following steps: Raw image data captured by a camera; Use the YOLOv5s target detection method to obtain the face data and eye data detected in the image; Inputting the face and eye data into the gaze estimation model to obtain the gaze estimation point, and displaying the gaze estimation point through the eye movement display board; The method of obtaining the gaze estimation point through the gaze estimation model specifically includes four modules: The input of the first module is the left eye image, and the input of the second module is the right eye image. The left eye features and the right eye features are extracted through a lightweight backbone network. The lightweight backbone network is a 10-layer MobileNetv3 network, and the left eye feature and right eye feature extraction networks share weights. Finally, the output features are spliced ​​together and converted into the first 1-dimensional feature vector through a fully connected layer; The input of the third module is a facial image, which is extracted through a lightweight backbone network and then output as a second 1-dimensional feature vector through a fully connected layer; The input of the fourth module is the facial position information. The original image is divided into a two-dimensional matrix, and the facial features are marked. The output is mapped to a third 1-dimensional feature vector through a fully connected layer. The third 1-dimensional feature vector is first concatenated with the second 1-dimensional feature vector and a fourth 1-dimensional feature vector is generated through a fully connected layer. The fourth 1-dimensional feature vector is then concatenated with the first 1-dimensional feature vector and finally mapped to eye movement position coordinates through a fully connected layer. The eye movement trajectory vector is obtained by continuously acquiring images and estimating the eye movement position coordinates.

4. The endoscope intelligent control method according to claim 2 or 3, characterized in that: The eye movement trajectory vector includes the current user's eye measurement point coordinate set {(x0, y0), (x1, y1), (x2, y2), ..., (x N ,y N )}, N represents the number of coordinate points of the eye movement trajectory vector, requiring N ≥ N min,sample , N min,sample is the value with the minimum number of trajectory points of the current user in the training sample; Let Δx i =x i -x i-1 , Δy i =y i -y i-1 , get the eye movement trajectory vector, Δx i and Δy i Respectively represent the changes in the horizontal and vertical coordinates of the i-th point, i∈1,2,3…N.

5. The endoscope intelligent control method according to claim 2 or 3, characterized in that: The determining whether the eye movement trajectory vector is valid data includes: Get the starting point coordinates (x0, y0), the secondary starting point coordinates (x1, y1), and the secondary end point coordinates (x N-1 ,y N-1 )、end point coordinates (x N ,y N ); If the starting point coordinates (x0, y0) and the end point coordinates (x N ,y N ) is located in the buffer area, the secondary starting point coordinates (x1, y1) and the secondary end point coordinates (x N-1 ,y N-1 ) is located in the eye movement track drawing board area, the eye movement track vector is valid data; Otherwise, the eye movement trajectory vector is invalid data and will not be processed.

6. The endoscope intelligent control method according to claim 2, characterized in that: Inputting the eye movement trajectory vector into an eye movement trajectory classification model to obtain a prediction instruction includes: The eye movement trajectory vector is input into the input layer u of the eye movement trajectory classification model, where the input layer is set to (Δx1, Δy1, Δx2, Δy2, …, Δx N ,Δy N ,0,0,…,0), where the 2*N+1 to 3*N max,sample The value is 0; the number of input layer units is 3*N max,sample , where N max,sample is the value with the largest number of trajectory points in the training sample for the current user; Calculate the input layer through the hidden layer to obtain the hidden layer activation output h j is the hidden layer unit, j=1,2,…,N max,sample , where the hidden layer units are represented by the formula Calculate; i is the input layer unit, i=1,2,…,3*N max,sample ; is the weight from the input layer to the hidden layer, i=1,2,…,3*N max,sample , j = 1, 2, ..., N max,sample , is the bias value; The hidden layer activation output H j Output to the output layer unit v for calculation, the output of the output layer unit v V k is the probability of the k-th category trajectory; Among them, W j,k is the weight from the hidden layer to the output layer, j = 1, 2, .., N max,sample , k = 1, 2, 3, 4, is the offset; According to V k The instruction corresponding to the maximum value is used as the prediction instruction; wherein the prediction instruction includes image control instructions, water pump control instructions, air supply control instructions, and meaningless instructions.

7. The endoscope intelligent control method according to claim 6, characterized in that: The output of the output layer unit v includes the maximum value V max , the second largest value V second,max , when the maximum value V max With the second largest value V second,max When the difference between is greater than or equal to the preset threshold σ, the eye movement trajectory vector is the maximum value V max The corresponding category trajectory is a pre-stored instruction, otherwise the prediction is abandoned.

8. The endoscope intelligent control method according to claim 6, characterized in that: The eye movement trajectory classification model is trained by setting the cost function Loss of the Softmax function, specifically including: pass Perform the cost function, where V k is the true value, is the predicted value; The cost function is minimized by the gradient descent method, and the weights from the hidden layer to the output layer and from the input layer to the hidden layer are updated: Get the optimized weight parameters.

9. An endoscope intelligent control device, characterized in that: The device comprises: The trajectory acquisition module is used to collect the eye movement trajectory vector of the current user in real time; A trajectory judgment module, used to judge whether the eye movement trajectory vector is valid data; A processing module is used to input the eye movement trajectory vector into an eye movement trajectory classification model, obtain a prediction instruction, and process the endoscope according to the prediction instruction.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction. When the executable instruction is executed on the endoscope intelligent control device as described in any one of claims 9, the endoscope intelligent control device executes the operation of the endoscope intelligent control method as described in any one of claims 1-8.