Capsule Endoscope Control Method, Device, Equipment, System and Storage Medium
By establishing a three-dimensional position relationship model and adjusting the position and posture of the capsule endoscope using real-time images, automated scanning of the capsule endoscope is achieved, solving the problems of low control efficiency and high risk of missed detection in the prior art.
Patent Information
- Application Number
- CN202011098021.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-14
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2040-10-14
AI Technical Summary
Existing capsule endoscopic control methods have problems with risk of missed detection and low control efficiency, especially when it is necessary to actively control the magnetron device to drive the movement and rotation of the capsule endoscopic.
By establishing a three-dimensional positional relationship model between the nodes to be scanned in the target area, planning the cruise path of the capsule endoscope, and using the real-time captured images to determine the position of the target node, adjusting the position and posture of the capsule endoscope to achieve automated scanning.
Automatic scanning of capsule endoscopes in the target area is realized, which improves the effectiveness and efficiency of control and reduces the risk of missed detection.
Smart Images

Figure CN112089392B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical devices, and in particular, to a method, device, equipment, system and storage medium for controlling a capsule endoscope. Background Art
[0002] The passive inspection method of the capsule endoscope has the disadvantage of a relatively high risk of missed detection. There has emerged a magnetically controlled capsule endoscope system that can achieve active control. In this system, the operator manually controls the movement and rotation of a second magnet in the magnetic control device according to experience, and then drives the movement and rotation of the capsule endoscope provided with a first magnet. However, this control method has disadvantages such as poor control effect and low control efficiency for the capsule endoscope. Summary of the Invention
[0003] In order to solve the above technical problems existing in the prior art, the present invention provides a method, device, equipment, system and storage medium for controlling a capsule endoscope, aiming to achieve automatic control of the capsule endoscope to scan within a target area and improve the effectiveness and efficiency of controlling the capsule endoscope.
[0004] An embodiment of the present invention provides a method for controlling a capsule endoscope, including the steps of:
[0005] S11: According to the three-dimensional position relationship model between each node to be scanned within the target area, using the node to be scanned in the image captured by the capsule endoscope as the current node, plan the current cruise path of the capsule endoscope within the target area;
[0006] S12: Determine the target node to be scanned by the capsule endoscope from the current cruise path;
[0007] S13: Receive the first image captured in real time by the capsule endoscope within the target area, where the first image is an image captured when the target node appears within the field of view of the capsule endoscope;
[0008] S14: Determine the position of the target node in the first image to obtain the target node position information;
[0009] S15: According to the target node position information, adjust the position and attitude of the capsule endoscope so that the target node appears at the center of the second image captured by the capsule endoscope;
[0010] S16: Control the capsule endoscope to scan the target node.
[0011] In some embodiments, the method further includes the step of:
[0012] S17: When the scanning of the target node is completed, mark the target node as a scanned node;
[0013] Repeat steps S12 to S17 until the scanning of all the nodes to be scanned is completed.
[0014] In some embodiments, the method further includes the steps of:
[0015] S18: Determine whether the capsule endoscope deviates from the current cruise path, or whether the search for the target node exceeds a preset time;
[0016] When the capsule endoscope deviates from the current cruise path, or the search for the target node exceeds the preset time, repeat steps S11 to S18 until the scanning of all the nodes to be scanned is completed;
[0017] When the capsule endoscope does not deviate from the current cruise path and the search for the target node does not exceed the preset time, repeat steps S12 to S18 until the scanning of all the nodes to be scanned is completed.
[0018] In some embodiments, planning the current cruise path of the capsule endoscope in the target area according to the three-dimensional position relationship model between the nodes to be scanned in the target area, with the node to be scanned in the image captured by the capsule endoscope as the current node, includes:
[0019] Establish the three-dimensional position relationship model between the nodes to be scanned in the target area to obtain a three-dimensional network topology map;
[0020] With the node to be scanned in the image captured by the capsule endoscope as the current node, plan the optimal cruise path for traversing all the nodes to be scanned according to the three-dimensional network topology map. The optimal cruise path includes the scanning order of each node to be scanned, and use the optimal cruise path as the current cruise path. In some embodiments, before step S12, it further includes: controlling the capsule endoscope to scan the current node.
[0021] In some embodiments, before step S13, it further includes: adjusting the position and attitude of the capsule endoscope according to the position relationship between the current node and the target node in the three-dimensional position relationship model, so that the target node appears in the first image captured by the capsule endoscope.
[0022] In some embodiments, determining the position of the target node in the first image to obtain the target node position information includes:
[0023] Obtain the name, target node mask, and target node detection frame of the target node according to the AI model;
[0024] Determine the position of the target node in the first image based on the target node mask and the target node detection frame to obtain the target node position information, where the target node position information includes the target node position and the target node size, and the target node size is the number of pixels of the image within the target node detection frame.
[0025] In some embodiments, determining the position of the target node in the first image to obtain the target node position information includes:
[0026] Input the first image into a node detection AI model for node feature recognition and node name determination to identify the target node and the name of the target node in the first image;
[0027] Segment the identified target node through a node segmentation AI network model to generate a target node mask and a target node detection frame;
[0028] Determine the position of the target node in the first image based on the target node mask and the target node detection frame to obtain the target node position information, where the target node position information includes the target node position and the target node size, and the target node size is the number of pixels of the image within the target node detection frame.
[0029] In some embodiments, controlling the capsule endoscope to scan the target node includes: controlling the capsule endoscope to perform a cross scan and / or a circular scan on the target node.
[0030] A capsule endoscope control device includes:
[0031] A cruise path planning module, configured to plan the current cruise path of the capsule endoscope in the target area with the to-be-scanned node in the image captured by the capsule endoscope as the current node according to the three-dimensional position relationship model among the to-be-scanned nodes in the target area;
[0032] A first determination module, configured to determine the target node to be scanned by the capsule endoscope from the current cruise path;
[0033] A first receiving module, configured to receive the first image captured by the capsule endoscope in real time in the target area, where the first image is the image captured when the target node appears within the field of view of the capsule endoscope;
[0034] A second determination module, configured to determine the position of the target node in the first image to obtain the target node position information;
[0035] The first control module is used to adjust the position and attitude of the capsule endoscope according to the target node position information, so that the target node appears at the center of the second image captured by the capsule endoscope;
[0036] The second control module is used to control the capsule endoscope to scan the target node.
[0037] In some embodiments, the device further includes:
[0038] The marking module is used to mark the target node as a scanned node after the scanning of the target node is completed. In some embodiments, the device further includes:
[0039] The judging module is used to judge whether the capsule endoscope deviates from the current cruise path, or whether the time for finding the target node exceeds a preset time.
[0040] In some embodiments, the cruise path planning module includes:
[0041] The first establishing unit is used to establish the three-dimensional position relationship model between the to-be-scanned nodes in the target area, and obtain a three-dimensional network topology map;
[0042] The planning unit is used to take the to-be-scanned node in the image captured by the capsule endoscope as the current node, and plan the optimal cruise path for traversing all the to-be-scanned nodes according to the three-dimensional network topology map. The optimal cruise path includes the scanning order of each to-be-scanned node, and takes the optimal cruise path as the current cruise path.
[0043] In some embodiments, the second control module is further used to: control the capsule endoscope to scan the current node.
[0044] In some embodiments, the first control module is further used to: adjust the position and attitude of the capsule endoscope according to the position relationship between the current node and the target node in the three-dimensional position relationship model, so that the target node appears in the first image captured by the capsule endoscope.
[0045] In some embodiments, the second determining module includes:
[0046] The AI unit is used to obtain the name of the target node, the target node mask and the target node detection frame according to the AI model;
[0047] A first determination unit, configured to determine the position of the target node in the first image according to the target node mask and the target node detection frame, so as to obtain the target node position information, where the target node position information includes the target node position and the target node size, and the target node size is the number of pixels of the image within the target node detection frame.
[0048] In some embodiments, the second determination module includes:
[0049] An identification unit, configured to input the first image into a node detection AI model for node feature identification and node name determination, and identify the target node and the name of the target node in the first image;
[0050] A segmentation unit, configured to segment the identified target node through a node segmentation AI model to generate a target node mask and a target node detection frame;
[0051] A second determination unit, configured to determine the position of the target node in the first image according to the target node mask and the target node detection frame, so as to obtain the target node position information, where the target node position information includes the target node position and the target node size, and the target node size is the number of pixels of the image within the target node detection frame.
[0052] A capsule endoscope control device includes:
[0053] A memory, configured to store executable instructions;
[0054] A processor, configured to, when executing the executable instructions stored in the memory, call and execute the operations corresponding to the above-mentioned respective modules or units.
[0055] A capsule endoscope control system includes: a capsule endoscope, a magnetic control device, and a capsule endoscope control device; the capsule endoscope includes: an imaging module, a control module, a radio frequency module, and a first magnet, and the capsule endoscope is configured to collect image data through the imaging module and the control module, and send the image data to outside the target area through the radio frequency module, and the first magnet enables the capsule endoscope to be controlled by the magnetic control device through magnetic force;
[0056] The magnetic control device includes a transmission mechanism and a second magnet, and the capsule endoscope control device controls the position and posture of the second magnet in a three-dimensional working area through the transmission mechanism to realize the position and posture adjustment of the capsule endoscope;
[0057] A capsule endoscope control device is used to plan the current cruising path of the capsule endoscope in the target area with the to-be-scanned nodes in the image captured by the capsule endoscope as the current nodes according to the three-dimensional position relationship model among the to-be-scanned nodes in the target area, determine the target nodes to be scanned by the capsule endoscope from the current cruising path, receive the first image captured by the capsule endoscope in real time in the target area, where the first image is the image captured when the target nodes appear within the field of view of the capsule endoscope, determine the positions of the target nodes in the first image to obtain target node position information, and control the magnetic control device to change the position and attitude of the second magnet through the transmission mechanism according to the target node position information so as to adjust the position and attitude of the capsule endoscope, make the target nodes appear at the center of the second image captured by the capsule endoscope, and control the capsule endoscope to scan the target nodes. In some embodiments, the system further includes: a wireless transceiver device for receiving the image data sent by the capsule endoscope, combining the image data packets in the image data into a complete image, and sending the image to the capsule endoscope control device.
[0058] A computer-readable storage medium stores at least one instruction, at least one segment of program, a code set or an instruction set, and the instruction, the program, the code set or the instruction set is loaded and executed by the processor to implement the operations performed in the above method.
[0059] A capsule endoscope control method provided by an embodiment of the present invention plans the current cruising path of the capsule endoscope in the target area with the to-be-scanned nodes in the image captured by the capsule endoscope as the current nodes according to the three-dimensional position relationship model among the to-be-scanned nodes in the target area; determines the target nodes to be scanned by the capsule endoscope from the current cruising path; receives the first image captured by the capsule endoscope in real time in the target area, where the first image is the image captured when the target nodes appear within the field of view of the capsule endoscope; determines the positions of the target nodes in the first image to obtain target node position information; adjusts the position and attitude of the capsule endoscope according to the target node position information to make the target nodes appear at the center of the second image captured by the capsule endoscope and controls the capsule endoscope to scan the target nodes. It realizes the automatic control of the capsule endoscope to scan in the target area and improves the effectiveness and efficiency of controlling the capsule endoscope. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification, and are used to explain the embodiments of the present invention together with the following specific embodiments, but do not constitute a limitation to the embodiments of the present invention.
[0061] Figure 1 It is an application environment diagram of a capsule endoscope control method in an embodiment of the present invention;
[0062] Figure 2 It is a schematic flowchart of a capsule endoscope control method in an embodiment of the present invention;
[0063] Figure 3 It is a schematic flowchart of another capsule endoscope control method in an embodiment of the present invention;
[0064] Figure 4 It is a three-dimensional position relationship model between each node to be scanned in the target area in an embodiment of the present invention;
[0065] Figure 5 It is a feasible cruise path between each node to be scanned in the target area in an embodiment of the present invention;
[0066] Figure 6 It is the optimal cruise path between each node to be scanned in the target area in an embodiment of the present invention;
[0067] Figure 7 It is the mask and detection frame of the current node B and the mask and detection frame of the target node C generated in an embodiment of the present invention;
[0068] Figure 8 It is a schematic diagram of the target node C appearing in the first image captured by the capsule endoscope in an embodiment of the present invention;
[0069] Figure 9 It is a schematic diagram of the capsule endoscope already aligned with the target node C in an embodiment of the present invention;
[0070] Figure 10 It is a schematic diagram of the capsule endoscope in the best observation position in an embodiment of the present invention;
[0071] Figure 11 It is a schematic diagram of controlling the capsule endoscope to perform circular scanning on the target node C in an embodiment of the present invention;
[0072] Figure 12 It is a schematic diagram of the target node C and its adjacent area being completely scanned in an embodiment of the present invention;
[0073] Figure 13 It is a schematic diagram of controlling the capsule endoscope to perform cross scanning on the target node C in an embodiment of the present invention;
[0074] Figure 14 It is a schematic diagram of the target node C and its adjacent areas in four directions being completely scanned in an embodiment of the present invention;
[0075] Figure 15 It is a schematic structural diagram of a capsule endoscope control device in an embodiment of the present invention;
[0076] Figure 16 It is a schematic structural diagram of another capsule endoscope control device in an embodiment of the present invention. Specific embodiments
[0077] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0078] The capsule endoscope control method provided by the embodiment of the present invention can be applied to an application environment as Figure 1 shown. The application environment includes a capsule endoscope b1, a wireless transceiver device b2, a capsule endoscope control device b5, a magnetic control device b4, and a graphics processing device b3. The magnetic control device b4, the wireless transceiver device b2, and the capsule endoscope control device b5 can be directly or indirectly connected through wired or wireless communication methods, which are not limited herein. The capsule endoscope b1 includes: a camera module, a control module, a radio frequency module, and a first magnet. The magnetic control device b4 includes a transmission mechanism and a second magnet. Among them, the first magnet and the second magnet can be electromagnets, permanent magnets, or other types of magnets. The capsule endoscope control device b5 can be a local server, a cloud server, or a terminal device. The terminal device can be, but is not limited to, various smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, etc. The graphics processing device b3 can be a local server, a cloud server, or a terminal device. The terminal device can be, but is not limited to, various smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, etc. It should be noted that Figure 1 This is only an application environment of the capsule endoscope control method provided by the embodiment of the present invention. In other application environments, the graphics processing device and the wireless transceiver device may not be included, or the function of the graphics processing device may be replaced by the capsule endoscope control device, or the function of the wireless transceiver device may be replaced by other devices with data transmission functions, which are not limited herein.
[0079] As Figure 2 shown, the embodiment of the present invention provides a capsule endoscope control method. Taking the method applied to the Figure 1 capsule endoscope control device as an example, the method includes the following steps:
[0080] Step S11: According to the three-dimensional position relationship model among the to-be-scanned nodes in the target area, taking the to-be-scanned nodes in the image captured by the capsule endoscope as the current nodes, plan the current cruise path of the capsule endoscope in the target area.
[0081] Specifically, before executing the capsule endoscope control method of the embodiments of the present invention, the capsule endoscope enters the target area and starts to capture images of the target area, and the capsule endoscope sends out the images captured in real time. The capsule endoscope sends the images captured in real time to the wireless transceiver device, and the wireless transceiver device then sends the images to the capsule endoscope control device. In the embodiments of the present invention, the target area is a closed space, for example, it can be a bionic stomach, a stomach model, an ex vivo animal stomach, or a human stomach. When it comes to a bionic stomach, a stomach model, an ex vivo animal stomach, or a human stomach, the to-be-scanned nodes include the cardia, the fundus of the stomach, the body of the stomach, the angular incisure of the stomach, the antrum of the stomach, and the pylorus. In some embodiments, the to-be-scanned nodes may also include the cardia, the anterior wall under the cardia, the posterior wall under the cardia, the fundus of the stomach, the anterior wall of the upper part of the body of the stomach, the posterior wall of the upper part of the body of the stomach, the greater curvature of the upper part of the body of the stomach, the lesser curvature of the upper part of the body of the stomach, the anterior wall of the middle part of the body of the stomach, the posterior wall of the middle part of the body of the stomach, the greater curvature of the middle part of the body of the stomach, the lesser curvature of the middle part of the body of the stomach, the anterior wall of the lower part of the body of the stomach, the posterior wall of the lower part of the body of the stomach, the greater curvature of the lower part of the body of the stomach, the lesser curvature of the lower part of the body of the stomach, the angular incisure of the stomach, the anterior wall of the angular incisure of the stomach, the posterior wall of the angular incisure of the stomach, the anterior wall of the antrum of the stomach, the posterior wall of the antrum of the stomach, the greater curvature of the antrum of the stomach, the lesser curvature of the antrum of the stomach, and the pylorus.
[0082] According to the three-dimensional position relationship model among the to-be-scanned nodes in the target area, a path planning algorithm of a three-dimensional network topology graph can be adopted. Taking the to-be-scanned nodes in the image captured by the capsule endoscope as the current nodes, automatically plan an optimal cruise path that traverses all the to-be-scanned nodes as the current cruise path, and the current cruise path includes all the to-be-scanned nodes in the target area.
[0083] Step S12: Determine the target node to be scanned by the capsule endoscope from the current cruise path. Specifically, the to-be-scanned node closest to the current node in the current cruise path can be used as the target node. Step S13: Receive the first image captured in real time by the capsule endoscope in the target area, and the first image is the image captured when the target node appears within the field of view of the capsule endoscope.
[0084] Step S14: Determine the position of the target node in the first image to obtain the target node position information. Step S15: According to the target node position information, adjust the position and attitude of the capsule endoscope so that the target node appears at the center of the second image captured by the capsule endoscope.
[0085] Specifically, a force model composed of the first magnet in the preset capsule endoscope and the second magnet in the magnetic control device is established. That is, there is a mapping relationship between the position and attitude of the second magnet of the magnetic control device and the position and attitude of the capsule. According to this mapping relationship, the magnetic control device is controlled to change the position and attitude of the second magnet in the three-dimensional working area through a transmission mechanism, so as to adjust the position and attitude of the capsule endoscope.
[0086] Step S16: Control the capsule endoscope to scan the target node.
[0087] A capsule endoscope control method provided by an embodiment of the present invention plans a current cruising path of the capsule endoscope in a target area based on a three-dimensional position relationship model between each node to be scanned in the target area, with the node to be scanned in the image captured by the capsule endoscope as the current node; determines a target node to be scanned by the capsule endoscope from the current cruising path; receives a first image captured by the capsule endoscope in real time in the target area, where the first image is an image captured when the target node appears within the field of view of the capsule endoscope; determines the position of the target node in the first image to obtain target node position information; adjusts the position and attitude of the capsule endoscope according to the target node position information so that the target node appears at the center of a second image captured by the capsule endoscope; and controls the capsule endoscope to scan the target node. This realizes the automatic control of the capsule endoscope to scan in the target area, improving the effectiveness and efficiency of the control of the capsule endoscope.
[0088] As Figure 3 shown, in some embodiments, the capsule endoscope control method further includes step S17: when the scanning of the target node is completed, mark the target node as a scanned node. This can avoid repeated scanning and improve the efficiency of the control of the capsule endoscope.
[0089] After step S17 is executed, steps S12 to S17 are repeated until the scanning of all nodes to be scanned is completed. This realizes the automatic cruising of the capsule endoscope in the target area, completely scans all nodes to be scanned, and improves the effectiveness and efficiency of the control of the capsule endoscope.
[0090] In some embodiments, the capsule endoscope control method further includes the following steps:
[0091] Step S18: Determine whether the capsule endoscope deviates from the current cruising path, or whether the time for finding the target node exceeds a preset time. This step runs through the entire process of the automatic cruising and scanning of the capsule endoscope. That is, during the entire process of the automatic cruising and scanning of the capsule endoscope, the step of determining whether the capsule endoscope deviates from the current cruising path, or whether the time for finding the target node exceeds a preset time is executed in real time.
[0092] When the capsule endoscope deviates from the current cruising path or the search for the target node exceeds the preset time, steps S11 to S18 are repeated until the scanning of all the nodes to be scanned is completed; when the capsule endoscope does not deviate from the current cruising path and the search for the target node does not exceed the preset time, steps S12 to S18 are repeated until the scanning of all the nodes to be scanned is completed.
[0093] Specifically, the deviation of the capsule endoscope from the current cruising path is generally due to the subject's unexpected body position adjustment, which causes the capsule endoscope to move away from the previously scanned area (for example, moving from the upper part of the gastric body to the lower part of the gastric body). It can be judged according to the three-dimensional position relationship model of each node to be scanned. If the node to be scanned currently captured by the capsule endoscope and the target node are not in the same area, that is, the capsule endoscope can no longer scan according to the current cruising path, so a new cruising path needs to be re-planned. At this time, steps S11 to S18 are repeated until the scanning of all the nodes to be scanned is completed.
[0094] For example, when the scanning of the current node B is completed, the target node in the current cruising path is C. At this time, the position and posture of the capsule endoscope are adjusted according to the three-dimensional position relationship model, so that the target node C appears in the first image captured by the capsule endoscope in real time. However, in special cases (the subject's body position is incorrect or the gastric structure is abnormal), the target node C cannot appear in the first image captured by the capsule endoscope in real time. It is impossible to search for the target node C indefinitely. Therefore, when the search for the target node exceeds the preset time, a new cruising path needs to be re-planned. At this time, steps S11 to S18 are repeated until the scanning of all the nodes to be scanned is completed. This preset time can be set as needed, for example, set to 10s.
[0095] When the capsule endoscope does not deviate from the current cruising path and the search for the target node does not exceed the preset time, steps S12 to S18 are repeated until the scanning of all the nodes to be scanned is completed.
[0096] A method for controlling a capsule endoscope provided by an embodiment of the present invention monitors in real time whether the capsule endoscope deviates from the current cruise path or whether the search for a target node exceeds a preset time; when the capsule endoscope deviates from the current cruise path or the search for a target node exceeds the preset time, steps S11 to S18 are repeated until the scanning of all the nodes to be scanned is completed; when the capsule endoscope does not deviate from the current cruise path and the search for a target node does not exceed the preset time, steps S12 to S18 are repeated until the scanning of all the nodes to be scanned is completed. It realizes the automatic cruise of the capsule endoscope in the target area, fully scans all the nodes to be scanned, shortens the scanning duration of the capsule endoscope in the target area, and improves the effectiveness and efficiency of the control of the capsule endoscope.
[0097] In some embodiments, in step S11, according to the three-dimensional position relationship model between the nodes to be scanned in the target area, with the node to be scanned in the image captured by the capsule endoscope as the current node, the current cruise path of the capsule endoscope in the target area is planned, and the current cruise path including all the nodes to be scanned in the target area includes the following steps:
[0098] S111: Establish the three-dimensional position relationship model between the nodes to be scanned in the target area to obtain a three-dimensional network topology graph.
[0099] S112: With the node to be scanned in the image captured by the capsule endoscope as the current node, plan the optimal cruise path for traversing all the nodes to be scanned according to the three-dimensional network topology graph. The optimal cruise path includes the scanning order of each node to be scanned, and take the optimal cruise path as the current cruise path.
[0100] Specifically, establish the three-dimensional position relationship model between the nodes to be scanned in the target area (as Figure 4 shown). Taking the bionic stomach as an example in the embodiment of the present invention, establish the three-dimensional position relationship model of each part of the bionic stomach. Each part is represented by a coordinate point in a three-dimensional space. Therefore, the three-dimensional position relationship between each part can be represented by a position vector in a specific coordinate system. The three-dimensional position relationship model of each part can be regarded as a three-dimensional network topology graph, where each node represents a corresponding part, and the connection line between each node represents the feasible cruise path between the corresponding parts (as Figure 5As shown in the figure, the length of the connection line represents the distance of the cruise path. Select one of the nodes as the starting point. In the embodiment of the present invention, when the capsule endoscope enters the target area and the first node to be scanned captured is used as the starting point (the current node), a path planning algorithm of a three-dimensional network topology graph is adopted, such as a dynamic programming algorithm, a divide-and-conquer algorithm, or a constrained optimization algorithm. The depth-first traversal method is used to traverse the entire three-dimensional network topology graph to find all the cruise paths that can traverse all the nodes of the entire three-dimensional network topology graph, and select one of the paths with the smallest total weight as the optimal cruise path (as Figure 6 shown in the figure). The optimal cruise path is used as the current cruise path, and the optimal cruise path includes the scanning order of each node to be scanned. Using the optimal cruise path as the current cruise path means that the cruise scanning path of the capsule endoscope is the shortest, which improves the effectiveness of controlling the capsule endoscope and also improves the scanning efficiency of the capsule endoscope. In some embodiments, when the capsule endoscope enters the target area and the first node to be scanned captured is used as the starting point (the current node), a path planning algorithm of a three-dimensional network topology graph is adopted, such as a dynamic programming algorithm, a divide-and-conquer algorithm, or a constrained optimization algorithm. The depth-first traversal method is used to traverse the entire three-dimensional network topology graph to find all the cruise paths that can traverse all the nodes of the entire three-dimensional network topology graph, and any one of the cruise paths is selected as the current cruise path, and the current cruise path includes the scanning order of each node to be scanned. Further, in some embodiments, determining the target node to be scanned by the capsule endoscope from the current cruise path specifically means marking the target node after scanning as a scanned node, and selecting the target node according to the scanning order of each node to be scanned in the current cruise path. This can improve the control efficiency of the capsule endoscope, thereby improving the scanning efficiency of the capsule endoscope, and avoiding missed detections, and improving the effectiveness of controlling the capsule endoscope.
[0101] In some embodiments, before step S12, it further includes: controlling the capsule endoscope to scan the current node. In some embodiments, when the current node is scanned, the current node is marked as a scanned node.
[0102] In some embodiments, before step S13, it further includes: adjusting the position and attitude of the capsule endoscope according to the position relationship between the current node and the target node in the three-dimensional position relationship model, so that the target node appears in the first image captured by the capsule endoscope.
[0103] Specifically, when the capsule endoscope cruises from its current position to the target node, first, according to the position relationship between the current node and the target node in the three-dimensional position relationship model, the direction of the capsule endoscope towards the target node is adjusted so that the target node appears in the first image captured by the capsule endoscope.
[0104] In some embodiments, the step of determining the position of the target node in the first image to obtain the target node position information may also be performed by a graphics processing device. Before performing this step, the graphics processing device receives the first image taken in real time by the capsule endoscope in the target area sent by the wireless transceiver device.
[0105] Further, step S14 of determining the position of the target node in the first image to obtain the target node position information specifically includes the following steps:
[0106] S141: Input the first image into the node detection AI model for node feature recognition and node name determination, and identify the target node and the name of the target node in the first image.
[0107] S142: Segment the identified target node through the node segmentation AI model to generate a target node mask and a target node detection frame.
[0108] S143: Determine the position of the target node in the first image according to the target node mask and the target node detection frame to obtain the target node position information. The target node position information includes the target node position and the target node size, where the target node size is the number of pixels of the image within the target node detection frame.
[0109] Specifically, for the node detection AI model, any one of the AI models such as a recurrent network model, a convolutional network model, a deep neural network model, a deep generative model, and an autoencoder model can be selected. The selected model is trained with an image set of the capsule endoscope taken at different positions in the target area in advance. After obtaining a node detection AI model that meets one or a combination of recognition accuracy, sensitivity, and specificity, the first image is input into this node detection AI model for node feature recognition and node name determination, and the target node and the name of the target node in the first image are identified.
[0110] For the node segmentation AI model, any one of the AI models such as a recurrent network model, a convolutional network model, a deep neural network model, a deep generative model, and an autoencoder model can be selected. The selected model is trained with an image set of the capsule endoscope taken at different positions in the target area in advance. After obtaining a node segmentation AI model that meets one or a combination of recognition accuracy, sensitivity, and specificity, the first image is input into this node segmentation AI model for node segmentation to generate a target node mask and a target node detection frame. In the embodiments of the present invention, the node detection deep convolutional neural network model and the node segmentation deep convolutional neural network model are taken as examples for illustration, as follows:
[0111] Select an image set of the capsule endoscope taken in advance at different positions in the target area, such as a bionic stomach. Each image in the image set corresponds to a recognizable part, and at least one part can be completely contained in the image. Label all the parts in the selected image set, completely label each part, and generate a labeled box file according to the labeled area. Divide the labeled images into a training set and a test set, and there is no overlap between the images in the training set and the test set. Use the training set to train the initial node detection deep convolutional neural network model and the initial node segmentation deep convolutional neural network model respectively. The initial node detection deep convolutional neural network model is based on the natural scene detection network architecture, and its weights are initialized to the pre-trained model weights of the natural scene detection network. During the training process, the weights of this part are fixed. The initial node segmentation deep convolutional neural network model is directly trained using the labeled mask. During the training process of the initial node detection deep convolutional neural network model and the initial node segmentation deep convolutional neural network model, the feature maps generated by each network convolutional layer are transmitted to each other in a cascaded manner. At the same time, the detection boxes generated by the initial node detection deep convolutional neural network model act on the initial node segmentation deep convolutional neural network model, and finally the node mask is output. The node mask output by the initial node segmentation deep convolutional neural network model acts on the detection boxes output by the initial node detection deep convolutional neural network model, and the parameters of the initial node detection deep convolutional neural network model and the initial node segmentation deep convolutional neural network model are updated respectively through the gradient backpropagation of the loss function, and the current node detection deep convolutional neural network model and the current node segmentation deep convolutional neural network model are obtained.
[0112] The training set is used to train the current node detection deep convolutional neural network model and the current node segmentation deep convolutional neural network model respectively, and the test set is used to test the current node detection deep convolutional neural network model and the current node segmentation deep convolutional neural network model generated by single-iteration training, so as to obtain one or a combination of the recognition accuracy, sensitivity, and specificity of the current node detection deep convolutional neural network model and the current node segmentation deep convolutional neural network model respectively. Whether the indicators corresponding to the current node detection deep convolutional neural network model and the current node segmentation deep convolutional neural network model meet the predetermined requirements is judged respectively by one or a combination of the recognition accuracy, sensitivity, and specificity. If they meet the requirements, the training is terminated, and the current node detection deep convolutional neural network model and the current node segmentation deep convolutional neural network model at the termination time are used as the final node detection deep convolutional neural network model and the node segmentation deep convolutional neural network model respectively. If they do not meet the requirements, the training continues until the predetermined requirements are met, and the current node detection deep convolutional neural network model and the current node segmentation deep convolutional neural network model that finally meet the preset requirements are used as the final node detection deep convolutional neural network model and the node segmentation deep convolutional neural network model respectively.
[0113] When using a capsule endoscope for examination, the first image collected by the capsule endoscope is input into the node detection deep convolutional neural network model for node feature recognition and node name determination, and the target node and the name of the target node in the first image are recognized.
[0114] The first image is input into the node segmentation deep convolutional neural network model to segment the recognized target node, and a target node mask and a target node detection frame are generated. The target node detection frame can be a rectangle or a polygon. For example, see Figure 7 As shown, the mask and detection frame of the current node B and the mask and detection frame of the target node C are generated respectively by the node segmentation deep convolutional neural network model.
[0115] Taking the image center point of the first image as the origin, the positional relationship between the coordinates of the center point of the target node detection frame and the coordinates of the origin is the position of the target node in the first image, that is, the target node position is obtained; the number of pixels of the image within the target node detection frame is the size of the target node in the first image, that is, the target node size is obtained.
[0116] In some embodiments, the determining the position of the target node in the first image to obtain the target node position information includes:
[0117] Obtaining the name of the target node, the target node mask, and the target node detection frame according to the AI model;
[0118] Determine the position of the target node in the first image based on the target node mask and the target node detection frame, and obtain the target node position information, where the target node position information includes the target node position and the target node size, and the target node size is the number of pixels of the image within the target node detection frame.
[0119] It can be understood that node detection and node segmentation can be implemented through an AI model. Any one of the AI models such as a recurrent network model, a convolutional network model, a deep neural network model, a deep generative model, and an autoencoder model can be selected. The selected model is trained with the image set of the capsule endoscope pre-taken at different positions in the target area. After obtaining an AI model that meets one or a combination of recognition accuracy, sensitivity, and specificity, the first image is input into the AI model for node feature recognition, node name determination, generation of a node mask, and a node detection frame; determine the position of the target node in the first image based on the target node mask and the target node detection frame, and obtain the target node position information, where the target node position information includes the target node position and the target node size, and the target node size is the number of pixels of the image within the target node detection frame. For the specific implementation process, please refer to the detailed description in the above embodiments and will not be elaborated here.
[0120] In some embodiments, step S15: Based on the target node position and the target node size, control the magnetic control device to change the position and posture of the second magnet through the transmission mechanism, so as to adjust the position and posture of the capsule endoscope, and make the target node appear at the center of the second image captured by the capsule endoscope. Specifically, refer to Figure 8, taking B as the current node (scanned node) and C as the target node as an example, the capsule endoscope cruises from the scanned node B (current node) to the target node C. First, the direction vector (including direction and distance) from point B to point C is calculated according to the three-dimensional position relationship model of the target area to determine the positional relationship between the target node C and the scanned node B. Then, the position and posture of the capsule endoscope are adjusted, and the capsule endoscope is used to offset in the direction of the target node C so that the target node C appears in the first image taken by the capsule endoscope. This adjustment process may not be able to be adjusted in place in one go to make the target node C appear in the first image taken by the capsule endoscope, but it is necessary to correct the adjustment process according to the image taken by the capsule endoscope while adjusting the position and posture of the capsule endoscope so that the target node C appears in the first image taken by the capsule endoscope. The target node C appears in the first image taken by the capsule endoscope. When the first image is input into the node detection deep convolutional neural network model, the target node can be identified and the target node name can be output. When the first image is input into the node segmentation deep convolutional neural network model, the target node mask and the target node detection frame can be generated. This achieves the purpose of making the target node appear in the first image taken by the capsule endoscope. When the first image is input into the node detection deep convolutional neural network model, the target node cannot be identified and the target node name cannot be output. When the first image is input into the node segmentation deep convolutional neural network model, the target node mask and the target node detection frame cannot be generated, it is necessary to continue to adjust the position and posture of the capsule endoscope so that the target node appears in the first image of the capsule endoscope. Figure 8 As shown in the figure, the dotted box is the field of view of the capsule endoscope. Afterwards, according to the position of the target node in the first image, that is, according to the direction vector between the center point of the target node detection frame and the center point of the first image, the posture of the capsule endoscope is fine-tuned to make the capsule endoscope shift toward the center point of the target node detection frame until the distance between the center point of the target node detection frame and the center point of the first image is less than L / 8 pixels (assuming that the resolution of the first image is L*L). At this time, the capsule endoscope has been aligned with the target node C, as shown in FIG. Figure 9 As shown in FIG. 1 , the dotted box is the field of view of the capsule endoscope. At this time, the pixel area occupied by the target node detection frame in the first image is determined according to the size of the target node in the first image (compared with the verified value stored in the system). The pixel area occupied by the target node detection frame in the first image is used to determine whether the current position of the capsule endoscope is the best observation position. If it is the best observation position (such as Figure 10As shown, the capsule endoscope performs a coverage scan on the target node C at this optimal observation position. Otherwise, the position of the capsule endoscope is adjusted (approaching or moving away from the target node C) until the optimal observation position is found. After the above-mentioned search for and centering of the target node C, the target node C appears at the center of the field of view of the capsule endoscope, that is, the target node C appears at the center of the second image captured by the capsule endoscope. In the capsule endoscope control method provided by the embodiments of the present invention, the node detection deep convolutional neural network model and the node segmentation deep convolutional neural network model have learned in advance the features required for detecting and segmenting all nodes to be scanned in the target area. The node detection deep convolutional neural network model is used to identify the node features and determine the node names in the input image, so as to identify the target node and the name of the target node in the image. The node segmentation deep convolutional neural network model is used to segment the identified target node to generate a target node mask and a target node detection frame, and then the three-dimensional position relationship model is combined to obtain the position and size of the target node in the image. This method has high accuracy in identifying the target node and improves the effectiveness of controlling the capsule endoscope.
[0121] In some embodiments, step S16 of controlling the capsule endoscope to scan the target node includes: controlling the capsule endoscope to perform a cross scan and / or a circular scan on the target node.
[0122] Specifically, when the target node appears at the center of the second image captured by the capsule endoscope, according to the target node detection frame, calculate the pixel distances of the target node detection frame from the upper, lower, left, and right sides of the second image. Assume the resolution of the second image is R*R. If the pixel distances of the target node detection frame from the four sides of the second image are all ≥ R / 4 pixels, it means that the target node has completely fallen within the field of view of the capsule endoscope. At this time, the capsule endoscope directly scans the target node without performing additional scans (circular scan and / or cross scan) on this target node. If the distance of the target node detection frame from any one side of the second image is less than L / 4 pixels, it means that the boundary of the target node may exceed the field of view of the capsule endoscope. At this time, a circular scan and / or a cross scan still need to be performed on the target node.
[0123] As Figure 11 shown, the circular scan is specifically that the capsule endoscope control device controls the magnetic control device to change the attitude of the second magnet through the transmission mechanism to adjust the attitude of the capsule endoscope, so that the capsule endoscope deviates 15 - 30 degrees from the center of the target node and performs a 360-degree circular scan around the target node. Then the target node and its adjacent areas are completely scanned. As Figure 12 shown, the dashed box is the area scanned by the capsule endoscope.
[0124] As Figure 13As shown, the cross-scanning specifically means that the capsule endoscope control device controls the magnetic control device to change the attitude of the second magnet through the transmission mechanism to adjust the attitude of the capsule endoscope. The capsule endoscope performs scanning in four directions: up, down, left, and right in sequence, ensuring that when scanning in each direction, the distance between the target node detection frame and the image boundary in that direction exceeds R / 2 pixels, so that the target node and its adjacent regions in the four directions are completely scanned. As Figure 14 shown, the dashed box is the area scanned by the capsule endoscope.
[0125] In the capsule endoscope control method provided by the embodiment of the present invention, when the target nodes do not all fall within the field of view of the capsule endoscope, the capsule endoscope control device controls the magnetic control device to change the attitude of the second magnet through the transmission mechanism to adjust the attitude of the capsule endoscope. The capsule endoscope performs circular scanning and / or cross-scanning on the target nodes, thus ensuring the comprehensiveness and integrity of the capsule endoscope scanning, and further improving the effectiveness of the capsule endoscope control.
[0126] In some embodiments, step S12 takes the current node as the current node and controls the capsule endoscope to scan the current node. Specifically, the full-coverage scanning of the current node can also refer to the above scanning method for the target nodes.
[0127] It should be understood that although the steps in the above flowcharts are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above flowcharts may include sub-steps, and these sub-steps are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps in other steps.
[0128] Based on the same idea as the capsule endoscope control method in the above embodiments, the present invention also provides a capsule endoscope control device, which can be used to execute the above capsule endoscope control method. For the convenience of description, in the structural schematic diagram of the capsule endoscope control device embodiment, only the parts related to the embodiment of the present invention are shown. Those skilled in the art can understand that the illustrated structure does not constitute a limitation on the device, and it may include more or fewer components than those illustrated, or combine some components, or have different component arrangements.
[0129] As Figure 15As shown in the figure, an embodiment of the present invention provides a capsule endoscope control device. This device can be a software module, a hardware module, or a combination of both to become a part of a computer device. Specifically, the device includes: a cruise path planning module, a first determination module, a first reception module, a second determination module, a first control module, and a second control module, where:
[0130] The cruise path planning module is used to plan the current cruise path of the capsule endoscope in the target area with the to-be-scanned nodes in the image captured by the capsule endoscope as the current nodes according to the three-dimensional position relationship model among the to-be-scanned nodes in the target area.
[0131] The first determination module is used to determine the target nodes to be scanned by the capsule endoscope from the current cruise path.
[0132] The first reception module is used to receive the first image captured by the capsule endoscope in real time in the target area, and the first image is the image captured when the target nodes appear within the field of view of the capsule endoscope.
[0133] The second determination module is used to determine the positions of the target nodes in the first image to obtain the target node position information.
[0134] The first control module is used to adjust the position and posture of the capsule endoscope according to the target node position information so that the target nodes appear at the center of the second image captured by the capsule endoscope.
[0135] The second control module is used to control the capsule endoscope to scan the target nodes.
[0136] A capsule endoscope control device provided by an embodiment of the present invention plans the current cruise path of the capsule endoscope in the target area with the to-be-scanned nodes in the image captured by the capsule endoscope as the current nodes according to the three-dimensional position relationship model among the to-be-scanned nodes in the target area; determines the target nodes to be scanned by the capsule endoscope from the current cruise path; receives the first image captured by the capsule endoscope in real time in the target area, and the first image is the image captured when the target nodes appear within the field of view of the capsule endoscope; determines the positions of the target nodes in the first image to obtain the target node position information; adjusts the position and posture of the capsule endoscope according to the target node position information so that the target nodes appear at the center of the second image captured by the capsule endoscope;
[0137] controls the capsule endoscope to scan the target nodes. It realizes the automatic control of the capsule endoscope to scan in the target area, improving the effectiveness and efficiency of the control of the capsule endoscope.
[0138] In some embodiments, the capsule endoscope control device further includes a marking module, configured to mark the target node as a scanned node after the scanning of the target node is completed.
[0139] As Figure 16 shown, in some embodiments, the capsule endoscope control device further includes a judging module, configured to judge whether the capsule endoscope deviates from the current cruising path or whether the searching for the target node exceeds a preset time.
[0140] In some embodiments, the cruising path planning module includes:
[0141] A first establishing unit, configured to establish a three-dimensional position relationship model between each of the to-be-scanned nodes within the target area to obtain a three-dimensional network topology graph.
[0142] A planning unit, configured to use the to-be-scanned node in the image captured by the capsule endoscope as the current node, and plan an optimal cruising path for traversing all the to-be-scanned nodes according to the three-dimensional network topology graph. The optimal cruising path includes the scanning order of each of the to-be-scanned nodes, and use the optimal cruising path as the current cruising path.
[0143] In some embodiments, the second control module is further configured to: control the capsule endoscope to scan the current node.
[0144] In some embodiments, the first control module is further configured to: adjust the position and attitude of the capsule endoscope according to the position relationship between the current node and the target node in the three-dimensional position relationship model, so that the target node appears in the first image captured by the capsule endoscope.
[0145] In some embodiments, the second determining module includes:
[0146] An AI unit, configured to obtain the name of the target node, the target node mask and the target node detection frame according to an AI model;
[0147] A first determining unit, configured to determine the position of the target node in the first image according to the target node mask and the target node detection frame to obtain the target node position information, where the target node position information includes the target node position and the target node size, and the target node size is the number of pixels of the image within the target node detection frame.
[0148] In some embodiments, the second determining module includes:
[0149] An identification unit for inputting the first image into a node detection AI model to perform node feature recognition and node name determination, and identifying the target node and the name of the target node in the first image. A segmentation unit for segmenting the identified target node through a node segmentation AI model to generate a target node mask and a target node detection frame.
[0150] A determination unit for determining the position of the target node in the first image according to the target node mask and the target node detection frame to obtain the target node position information, where the target node position information includes the target node position and the target node size, and the target node size is the number of pixels of the image within the target node detection frame.
[0151] For the specific description of the capsule endoscope control device, reference can be made to the description of the capsule endoscope control method in the foregoing text, which will not be elaborated here. Each module or unit in the above capsule endoscope control device can be implemented in whole or in part by software, hardware, and their combination. The above modules or units can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so as to facilitate the processor to call and execute the corresponding operations of the above modules, units, or subunits. An embodiment of the present invention provides a capsule endoscope control device, which includes a memory and a processor, where: The memory is used to store executable instructions.
[0152] The processor is used to call and execute the corresponding operations of the above-mentioned modules or units when executing the executable instructions stored in the memory.
[0153] An embodiment of the present invention provides a capsule endoscope control system, which includes: a capsule endoscope, a magnetic control device, and a capsule endoscope control device, where:
[0154] The capsule endoscope includes: a camera module, a control module, a radio frequency module, and a first magnet. The capsule endoscope is used to collect image data through the camera module and the control module, and send the image data to the area outside the target area through the radio frequency module. The first magnet enables the capsule endoscope to be controlled by the magnetic control device through magnetic force.
[0155] The magnetic control device includes a transmission mechanism and a second magnet. The capsule endoscope control device controls the position and posture of the second magnet in the three-dimensional working area through the transmission mechanism to realize the adjustment of the position and posture of the capsule endoscope;
[0156] The capsule endoscope control device is used to call and execute the corresponding operations of the above-mentioned modules or units to realize the control of the capsule endoscope.
[0157] In some embodiments, the capsule endoscope control system further includes: a wireless transceiver device configured to receive the image data sent by the capsule endoscope, form the image data packets in the image data into a complete image, and send the image to the capsule endoscope control device.
[0158] In some embodiments, the capsule endoscope control system further includes: a graphics processing device configured to receive the image captured in real time by the capsule endoscope in the target area sent by the wireless transceiver device; determine the position of the target node in the image to obtain target node position information; and send the target node position information to the capsule endoscope control device.
[0159] The magnetic control device, the wireless transceiver device, the graphics processing device, and the capsule endoscope control device can be directly or indirectly connected through wired or wireless communication means.
[0160] The capsule endoscope control device can be a local server, a cloud server, or a terminal device. The terminal device can be, but is not limited to, various smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, etc.
[0161] The graphics processing device can be a local server, a cloud server, or a terminal device. The terminal device can be, but is not limited to, various smart phones, tablet computers, laptop computers, desktop computers, smart speakers, smart watches, etc.
[0162] The wireless transceiver device can receive and send image data and can also store image data. The specific structure and functions of the wireless transceiver device are not limited.
[0163] For the specific description of the capsule endoscope control system, reference can be made to the corresponding part of the description of the capsule endoscope control method in the foregoing text, which will not be elaborated here.
[0164] The embodiments of the present invention further provide a computer-readable storage medium storing at least one instruction, at least one segment of program, a code set, or an instruction set, which is loaded and executed by a processor to implement the operations in the capsule endoscope control method in the above embodiments.
[0165] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk, an optical disk, or the like. The optional implementation manners of the embodiments of the present invention have been described in detail above with reference to the drawings. However, the embodiments of the present invention are not limited to the specific details in the above implementation manners. Within the scope of the technical concept of the embodiments of the present invention, various simple modifications can be made to the technical solutions of the embodiments of the present invention, and these simple modifications all belong to the protection scope of the embodiments of the present invention.
[0166] In addition, it should be noted that, among the various specific technical features described in the above specific implementation manners, they can be combined in any suitable manner without conflict. To avoid unnecessary repetition, the embodiments of the present invention will not separately describe various possible combination manners.
[0167] Furthermore, any combination can be made among various different implementation manners of the embodiments of the present invention, as long as it does not violate the idea of the embodiments of the present invention, and it should also be regarded as the content disclosed by the embodiments of the present invention.
Claims
1. A capsule endoscope control device, characterized in that, Including: A cruise path planning module, configured to plan a current cruise path of the capsule endoscope in the target area with the to-be-scanned node in the image captured by the capsule endoscope as the current node according to the three-dimensional position relationship model between the to-be-scanned nodes in the target area, where the current cruise path includes all the to-be-scanned nodes in the target area; A first determination module, configured to select a target node to be scanned according to the scanning order of the to-be-scanned nodes in the current cruise path; A first control module, configured to adjust the position and posture of the capsule endoscope according to the position relationship between the current node and the target node in the three-dimensional position relationship model, so that the target node appears in the first image captured by the capsule endoscope; A first receiving module, configured to receive the first image captured by the capsule endoscope in real time in the target area, where the first image is an image captured when the target node appears within the field of view of the capsule endoscope; A second determination module, configured to determine the position of the target node in the first image to obtain target node position information, where the target node position information includes the position and size of the target node; The second determination module further includes: An identification unit, configured to input the first image into a node detection AI model for node feature identification and node name determination, and identify the target node and the name of the target node in the first image; A segmentation unit, configured to segment the identified target node through a node segmentation AI model to generate a target node mask and a target node detection frame; A second determination unit, configured to determine the position of the target node in the first image according to the target node mask and the target node detection frame to obtain the target node position information, where the target node position information includes the position and size of the target node, and the size of the target node is the number of pixels of the image within the target node detection frame; A first control module, configured to control the magnetic control device to change the position and posture of the second magnet through a transmission mechanism based on the target node position and the target node size, so as to adjust the position and posture of the capsule endoscope, and make the target node appear at the center of the second image captured by the capsule endoscope; A second control module, configured to control the capsule endoscope to scan the target node; 2. The capsule endoscope control device according to claim 1, wherein Further including: A marking module, configured to mark the target node as a scanned node after the target node is scanned; 3. The capsule endoscope control device according to claim 1, characterized in that Further including: A judgment module, configured to judge whether the capsule endoscope deviates from the current cruise path or whether the time for finding the target node exceeds a preset time; 4. The capsule endoscope control device according to claim 1, wherein The cruise path planning module includes: A first establishment unit, configured to establish the three-dimensional position relationship model between the to-be-scanned nodes in the target area to obtain a three-dimensional network topology map; A planning unit is configured to use the to-be-scanned node in the image captured by the capsule endoscope as the current node, and plan an optimal cruising path for traversing all the to-be-scanned nodes according to the three-dimensional network topology map. The optimal cruising path includes the scanning order of each to-be-scanned node, and the optimal cruising path is used as the current cruising path.
5. The capsule endoscope control device according to claim 3, wherein The second control module is further configured to: control the capsule endoscope to scan the current node.
6. The capsule endoscope control device according to claim 1, characterized in that, The second determination module includes: An AI unit is configured to obtain the name of the target node, the target node mask, and the target node detection frame according to an AI model; A first determination unit is configured to determine the position of the target node in the first image according to the target node mask and the target node detection frame, and obtain the target node position information, where the target node position information includes the target node position and the target node size, and the target node size is the number of pixels of the image within the target node detection frame.
7. A capsule endoscope control device, characterized in that, It includes: A memory is configured to store executable instructions; A processor is configured to, when executing the executable instructions stored in the memory, call and execute the operations corresponding to each module or unit of the capsule endoscope control device according to any one of claims 1 to 6.
8. A capsule endoscope control system, characterized in that, It includes: A capsule endoscope, a magnetic control device, and a capsule endoscope control device; The capsule endoscope includes a camera module, a control module, a radio frequency module, and a first magnet. The capsule endoscope is configured to collect image data through the camera module and the control module, and send the image data to outside the target area through the radio frequency module. The first magnet enables the capsule endoscope to be controlled by the magnetic control device through magnetic force. The magnetic control device includes a transmission mechanism and a second magnet. The capsule endoscope control device controls the position and posture of the second magnet in a three-dimensional working area through the transmission mechanism to realize the adjustment of the position and posture of the capsule endoscope. A capsule endoscope control device is used to plan the current cruising path of the capsule endoscope in the target area with the scanned node in the image captured by the capsule endoscope as the current node according to the three-dimensional position relationship model among the scanned nodes in the target area. The current cruising path includes all the scanned nodes in the target area. Select the target node to be scanned according to the scanning order of each scanned node in the current cruising path. Adjust the position and posture of the capsule endoscope according to the position relationship between the current node and the target node in the three-dimensional position relationship model so that the target node appears in the first image captured by the capsule endoscope. Receive the first image captured by the capsule endoscope in real time in the target area. The first image is the image captured when the target node is within the field of view of the capsule endoscope. Determine the position of the target node in the first image to obtain the target node position information. The target node position information includes the target node position and the target node size. Specifically, input the first image into the node detection AI model for node feature recognition and node name determination, identify the target node and the name of the target node in the first image, segment the identified target node through the node segmentation AI model to generate a target node mask and a target node detection frame, determine the position of the target node in the first image according to the target node mask and the target node detection frame to obtain the target node position information. The target node position information includes the target node position and the target node size, where the target node size is the number of pixels of the image within the target node detection frame. Based on the target node position and the target node size, control the magnetic control device to change the position and posture of the second magnet through the transmission mechanism to adjust the position and posture of the capsule endoscope so that the target node appears at the center of the second image captured by the capsule endoscope, and control the capsule endoscope to scan the target node.
9. The capsule endoscope control system according to claim 8, wherein, It further includes: A wireless transceiver device for receiving the image data sent by the capsule endoscope, combining the image data packets in the image data into a complete image, and sending the image to the capsule endoscope control device.
10. A computer-readable storage medium, characterized in that, At least one instruction, at least one program, a code set or an instruction set is stored in the computer-readable storage medium. The instruction, the program, the code set or the instruction set is loaded and executed by a processor to implement the operations performed in the method described in the following steps: S11: According to the three-dimensional position relationship model among the scanned nodes in the target area, with the scanned node in the image captured by the capsule endoscope as the current node, plan the current cruising path of the capsule endoscope in the target area. The current cruising path includes all the scanned nodes in the target area; S12: Select the target node to be scanned according to the scanning order of each scanned node in the current cruising path; Adjust the position and attitude of the capsule endoscope according to the positional relationship between the current node and the target node in the three-dimensional position relationship model, so that the target node appears in the first image captured by the capsule endoscope; S13: Receive the first image captured in real time by the capsule endoscope in the target area, where the first image is the image captured when the target node appears within the field of view of the capsule endoscope; S14: Determine the position of the target node in the first image to obtain target node position information, where the target node position information includes the target node position and the target node size; Step S14 includes: Input the first image into a node detection AI model for node feature recognition and node name determination to identify the target node and the name of the target node in the first image; Segment the identified target node through a node segmentation AI model to generate a target node mask and a target node detection frame; Determine the position of the target node in the first image based on the target node mask and the target node detection frame to obtain the target node position information, where the target node position information includes the target node position and the target node size, and the target node size is the number of pixels of the image within the target node detection frame; S15: Based on the target node position and the target node size, control the magnetic control device to change the position and attitude of the second magnet through a transmission mechanism to adjust the position and attitude of the capsule endoscope so that the target node appears at the center of the second image captured by the capsule endoscope; S16: Control the capsule endoscope to scan the target node; S17: When the scanning of the target node is completed, mark the target node as a scanned node; Repeat steps S12 to S17 until the scanning of all the nodes to be scanned is completed.
Citation Information
Patent Citations
Endoscope insertion control method and system
CN105902253A
Capsule type endoscope control method and device
CN107007242A
Virtual endoscopy automatic and interactive path planning and navigation method suitable for complex cavity
CN107248191A
Motion control method and device of capsule endoscope and terminal equipment
CN109044250A
Method for controlling endoscope system, equipment and storage medium
CN111067468A