COMPUTER-ASSISTED GASTRIC VOLUME REDUCTION PROCEDURES
A computer system with AI and neural networks addresses the challenges of endoscopic volume reduction procedures by generating stomach maps and guiding suture placement, improving the accuracy and consistency of these procedures.
Patent Information
- Authority / Receiving Office
- DE · DE
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2026-06-25
AI Technical Summary
Volume reduction procedures, such as endoscopic sleeve gastrectomy and endoscopic revision, face challenges due to limited visualization and tracking of the endoscope within the stomach, leading to inaccurate volume estimation and potential sutures being placed in incorrect locations, which can result in ineffective treatment of obesity and obesity-related comorbidities.
A computer system utilizing artificial intelligence and neural networks to generate a stomach map, track the endoscope and suture instrument, provide real-time volume calculations, and guide suture placement, thereby improving the accuracy and consistency of the procedure.
Enhances the success rate of volume reduction procedures by providing precise suture placement and real-time volume monitoring, reducing the likelihood of suture detachment and ensuring adequate stomach volume reduction for effective weight loss and metabolic benefits.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
TECHNICAL AREA This disclosure relates generally to gastric volume reduction procedures (e.g., endoscopic sleeve gastroplasty (ESG) and endoscopic revision procedures). Specifically, this disclosure relates to a computer system used during gastric volume reduction procedures. BACKGROUND Volume reduction procedures (e.g., endoscopic sleeve gastrectomy and endoscopic revision) are transoral endoscopic procedures that reduce the volume of a patient's stomach. During these procedures, sutures are placed on the inner wall of the stomach to tie it together and reduce its volume. In the case of an endoscopic sleeve gastrectomy, the procedure is performed primarily for weight loss and a secondary metabolic benefit. In the case of an endoscopic revision, prior bariatric surgery is performed, and the revision involves suturing to reduce the volume of the sleeve or pouch (gastric pouch) to achieve additional weight loss and metabolic benefit for the patient. In both cases, the stomach (or pouch) holds a reduced volume of food, which can decrease the patient's calorie intake. Thus, an endoscopic sleeve gastrectomy can be used to treat obesity and obesity-related comorbidities (e.g., heart failure, heart failure, urinary tract obstruction, and urinary tract obstruction).Endoscopic revision can be used to treat various conditions (e.g., cardiovascular disease, diabetes, sleep apnea, osteoarthritis, fatty liver, polycystic ovary syndrome, dyslipidemia, etc.). It can also be used to achieve additional weight loss in patients with a history of failed bariatric surgery (e.g., gastric bypass or sleeve gastrectomy) or to maintain a previous endoscopic revision itself. SUMMARY The present disclosure relates to a computer system and a method for estimating stomach volume. According to one embodiment, the computer system includes a memory and a processor that is communicatively coupled to the memory. The processor receives a video of the interior of a stomach and generates a map of the stomach based on the video. The processor also calculates the stomach volume based on the stomach map and detects a suture placed on the stomach during an endoscopic sleeve gastrectomy procedure, which causes a change in the shape of the stomach, based on the video and using a neural network. The processor further updates the stomach map based on the change in the shape of the stomach and updates the calculated stomach volume based on the update of the stomach map. According to another embodiment, a method includes receiving a video of the interior of a stomach and generating a map of the stomach based on the video. The method further includes calculating the stomach's volume based on the stomach map and detecting, based on the video and using a neural network, a suture placed on the stomach during an endoscopic sleeve gastrectomy procedure that causes a change in the stomach's shape. The method also includes updating the stomach map based on the change in the stomach's shape and updating the calculated stomach volume based on the updated stomach map. Other embodiments include a non-volatile, machine-readable medium that stores instructions which, when executed by a processor, cause the processor to perform the method. The preceding general description and the following detailed description are exemplary and illustrative in nature and are intended to provide an understanding of the present disclosure without limiting its scope. In this respect, additional aspects, features, and advantages of the present disclosure will be obvious to a person skilled in the art from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 illustrates an exemplary ESG system. Fig. 2 illustrates an exemplary hose in the system of Fig. 1. Fig. 3 illustrates an exemplary hose in the system of Fig. 1. Fig. 4A illustrates an exemplary tool in the system of Fig. 1. Fig. 4B illustrates an exemplary tool in the system of Fig. 1. Fig. 4C illustrates an exemplary tool in the system of Fig. 1. Fig. 4D illustrates an exemplary tool in the system of Fig. 1. Fig. 5 illustrates exemplary stages of an ESG intervention using the system of Fig. 1. Fig. 6 illustrates an exemplary computer system in the system of Fig. 1. Fig. 7 illustrates an exemplary computer system in the system of Fig. 1. Fig. 8 illustrates an exemplary computer system in the system of Fig. 1. Fig. 9 is a flowchart of an exemplary procedure carried out in the system of Fig. 1.Fig. 10 illustrates an exemplary computer system within the system of Fig. 1. Fig. 11 illustrates an exemplary computer system within the system of Fig. 1. Fig. 12 illustrates an exemplary computer system within the system of Fig. 1. Fig. 13 is a flowchart of an exemplary procedure carried out within the system of Fig. 1. Fig. 14 illustrates an exemplary computer system within the system of Fig. 1. Fig. 15 illustrates an exemplary computer system within the system of Fig. 1. Fig. 16 illustrates an exemplary computer system within the system of Fig. 1. Fig. 17 is a flowchart of an exemplary procedure carried out within the system of Fig. 1. DETAILED DESCRIPTION Volume reduction procedures (e.g., endoscopic sleeve gastroplasty (ESG) or endoscopic revision) can help treat certain conditions associated with obesity, including obesity-related comorbidities (e.g., cardiovascular disease, diabetes, sleep apnea, osteoarthritis, fatty liver, polycystic ovary syndrome, dyslipidemia, etc.). Endoscopic revision can be used to achieve additional weight loss in patients with a history of failed bariatric surgery (e.g., gastric bypass or sleeve gastrectomy) or to maintain the results of a previous ESG procedure itself. During a volume reduction procedure, an endoscope is inserted into a patient's stomach (or pouch). A healthcare provider (e.g., a physician, medical assistant, nurse, medical technician, surgeon, endoscopist, etc.) views the video obtained through the endoscope while operating a tool that places sutures (e.g., full-thickness oversuturings) on the anterior, lateral, and / or posterior walls of the stomach to reduce its volume. In the case of an endoscopic sleeve gastrectomy (ESG), the volume reduction decreases the amount of food the patient eats before feeling full, thus decreasing the patient's calorie intake and creating a calorie deficit for weight loss. In the case of an endoscopic revision gastric sleeve (ESG), the volume of the previous sleeve or pouch is reduced. However, certain technical challenges can negatively impact these volume reduction procedures. For example, the healthcare provider may be limited to working with only the crude direct view provided by the endoscope. As the endoscope moves within a patient's stomach during the procedure, it may rotate, twist, or turn, causing the view to rotate, twist, or turn as well. This movement can confuse the healthcare provider and make it more difficult for them to determine or track the position of the endoscope and instrument within the stomach.This confusion can also make it difficult for the healthcare provider to know where to place a suture and in which direction on the anterior, lateral, and / or posterior wall of the stomach, especially when volume is reduced. As another example, it can be difficult for the healthcare provider to determine by how much the stomach volume has been reduced and consequently rely on estimates. The healthcare provider may not know the overall shape and volume of the stomach before initiating the ESG procedure. Furthermore, during the ESG procedure, the healthcare provider may estimate or evaluate the stomach volume reduction based on a crude visualization, which may be inaccurate. Finally, the healthcare provider may not be aware of anatomical variations that result in volume reduction in specific areas (fundus, antrum, etc.).) could prevent. These challenges can limit the success or effectiveness of the volume reduction procedure. For example, the procedure may not achieve the desired or adequate volume reduction, resulting in an insufficient reduction in calorie intake and a failed treatment of the patient's obesity and obesity-related comorbidities. As another example, if the sutures are placed in incorrect locations or with the wrong direction or orientation, they may detach from the stomach wall, sag through it, or exhibit a cheese-wire effect during or after the procedure, causing the stomach volume to return to baseline and negatively impacting outcomes. This disclosure describes a computer system that supports or guides a volume reduction procedure. Generally, the system uses artificial intelligence (e.g., machine learning) during the procedure to provide information to the healthcare provider. For example, during a preoperative stage of the procedure, the computer system may use artificial intelligence (e.g., a neural network) to analyze a video (which may include medical images, such as computed tomography and magnetic resonance imaging scans) of the inside of a patient's stomach, along with a medical profile for the patient, to determine a plan for the procedure. The plan may indicate whether the patient is a good candidate for the procedure (e.g., a primary endoscopic gastric bypass for weight loss or a revision procedure for a failed previous bariatric surgery).The plan may also specify a volume reduction for the stomach, which can successfully treat the patient's medical condition. As another example, during an intraoperative stage of a volume reduction procedure, the computer system can use a simultaneous location and mapping (SLAM) process (or other process) and / or a neural network to generate a map of the patient's stomach from a video (which may include medical images such as computed tomography and magnetic resonance imaging) of the stomach's interior and to track the position of the endoscope and suture instrument within the map. The computer system can display the map and the position of the endoscope and instrument within the map to prevent confusion for the healthcare provider during the procedure. The computer system can also calculate the stomach's volume using the map (e.g., in real time or after the procedure). The computer system can update the map, along with the volume calculation, while sutures are being placed on the stomach during the volume reduction procedure. For example, the computer system can use the neural network to analyze the video to determine when and where a suture was placed and to identify any changes in the stomach's shape. The computer system can then update the stomach map to reflect this change in shape. Using the updated map, the computer system can then update the volume calculation. In this way, the computer system provides real-time volume calculations, making it easier for the healthcare provider to monitor the progress of the procedure and determine when to stop or continue it. As another example, the computer system can generate an overlay during the procedure indicating the positioning and direction of sutures to be placed on the stomach. For instance, the computer system can use the neural network to determine where sutures should be placed in the stomach to be consistent with existing best medical practices and to achieve the volume reduction specified in the preoperative plan. The computer system then generates the overlay indicating the suture placement. The computer system can then position the overlay (e.g., on a display) over a video taken from inside the stomach and / or a map of the stomach, so that the healthcare provider can see on the display, in a specific orientation, pattern, or step-by-step layout, where the sutures should be placed.For example, the overlay can present visual indicators on the video and / or map to indicate where sutures should be placed. The computer system can also present audio and / or text messages or indicators informing the healthcare provider where to place the sutures. The healthcare provider can then operate a tool to place a suture at a location indicated in the overlay. In some embodiments, the computer system can use the neural network to analyze the video to determine the position and direction of the suture to be placed. The computer system can then update the locations and directions of subsequent sutures in the overlay to account for changes caused by the suture being placed.In this way, the computer system directs the suturing process, which can reduce the number of sutures that detach from the stomach after the procedure is complete. During a postoperative stage of the procedure, the computer system collects data about the intervention. For example, the computer system can track the number of sutures placed during the procedure, as well as their locations and directions. As another example, the computer system can collect images or recordings (e.g., a preoperative image of the stomach map, an intraoperative image of the map, and a postoperative image of the map) that show the effect of the procedure on the stomach. As yet another example, the computer system can collect follow-up data for the patient that shows the effectiveness of the procedure (e.g., patient weight, number of sutures detached, reduction in stomach volume, etc.). In some embodiments, the computer system uses the collected data to support artificial intelligence (e.g.,The neural network is trained or updated by the computer system during the preoperative and intraoperative stages. In this way, the computer system uses the information from the procedure to inform subsequent procedures. In some embodiments, the computer system provides several technical advantages. For example, the computer system provides a map of the stomach and a map showing the position of the endoscope and instrument within the stomach, helping the healthcare provider maintain orientation as the endoscope moves, rotates, or twists during the procedure. As another example, the computer system provides a real-time volume calculation for the stomach, which can be more accurate than if the healthcare provider visually evaluates volume reduction. The computer system can also provide an overlay to guide the healthcare provider when placing sutures on the stomach to achieve a desired volume reduction, which can reduce the likelihood of a suture subsequently detaching from the stomach.The computer system can also collect data during or after the procedure and use that data to train and update the artificial intelligence used during the preoperative and intraoperative stages, further improving the AI's diagnostic and analytical capabilities. In this way, the computer system can increase the success rate of volume reduction procedures and improve the consistency of these procedures performed by different healthcare providers. Figure 1 illustrates an exemplary volume reduction system 100 that can be used during the preoperative, intraoperative, and postoperative stages. As shown in Figure 1, the system 100 includes a surgical cart 102, a control station 104, and a computer system 106. In general, the system 100 can be used during a volume reduction procedure to generate a video of the inside of a patient's stomach and / or to place sutures on the stomach. The sutures can tie sections of the stomach together, reducing its volume. As a result of the volume reduction, the patient may feel full after eating a smaller amount of food, thus reducing calorie intake. Therefore, the system 100 and the procedure can be used to treat certain conditions associated with the patient's obesity and obesity-related comorbidities (e.g.,It may be helpful for conditions such as cardiovascular disease, diabetes, sleep apnea, osteoarthritis, fatty liver, polycystic ovary syndrome, dyslipidemia, etc. The surgical cart 102 can include the tools and devices used to perform the volume reduction procedure. As shown in Fig. 1, the surgical cart 102 includes an actuator box 108, a tube 110, a camera 112, a tool 114, and a display 116. Generally, the tube 110, the camera 112, and the tool 114 are controlled by the actuator box 108. The actuator box 108 receives instructions for controlling the tube 110, the camera 112, and the tool 114 from the computer system 106. The surgical cart 102 can be positioned or moved alongside a subject or patient. A guidewire can then be inserted into or positioned within the subject's or patient's body and into an organ. The actuator box 108 can then advance the tube 110 (and the camera 112) along the guidewire and into the organ. Tool 114 can also be inserted through hose 110 and into the organ.The volume reduction procedure can then be performed using the camera 112 and the tool 114. After the procedure is completed, the actuator box 108 can retract the tool 114 and the hose 110. The camera 112 can be positioned at a distal end of the tube 110 (e.g., an end opposite the actuator box 108). The camera 112 can provide a video feed of the environment inside the stomach when the tube 110 is inserted. The video feed can show the movement of the tube 110 or the instrument 114 along with the progress of the procedure. Tool 114 can be inserted through tube 110 and into the stomach. Tool 114 can be used to apply sutures. For example, tool 114 can be moved toward the stomach wall. Tool 114 can grasp and clamp the stomach wall (e.g., along a fold). Tool 114 can then apply a suture to tie the clamped portion of the wall together. This process of clamping and suturing the stomach wall reduces the stomach's volume. Display 116 can show the video feed from camera 112 during the volume reduction procedure. An operator of the system 100 (e.g., a healthcare provider) can view display 116 to monitor the progress of the procedure. Display 116 can also present vital information about the subject or patient. In some embodiments, display 116 also presents a map of the stomach indicating the position or location of the tube 110 and the instrument 114 on the map. Additionally, display 116 can overlay the video feed to indicate where and how sutures should be placed on the stomach. For example, the overlay can show the locations on the stomach where the sutures should be placed and the directions of those sutures. Furthermore, display 116 can present messages or images indicating the progress of the procedure.For example, the display can present 116 messages or a progress bar indicating the percentage change in stomach volume, which can inform the healthcare provider whether to continue or stop the procedure. This information can support or guide the procedure, which can improve the consistency of the results. The operator of system 100 can use the control station 104 to control the surgical cart 102. As shown in Fig. 1, the control station 104 includes a display 118 and a controller 120. The display 118 can provide information about the procedure, similar to the display 116. For example, the display 118 can show the operator of system 100 the video feed from camera 112, a map of the stomach, an overlay indicating the suture sites and directions, and / or messages or images indicating the progress of the procedure. The operator of system 100 can use the controller 120 to control the movement of the surgical cart 102 or the operation of the actuator box 108. For example, the operator of system 100 can use the control 120 to control the movement of the surgical trolley 102, the movement of the hose 110, or the movement of the tool 114. The computer system 106 uses artificial intelligence to assist the operator of the system 100 during the procedure. In certain embodiments, the computer system 106 is separate from the surgical cart 102 and the control station 104. In some embodiments, the computer system 106 is partially or completely embodied within the surgical cart 102 and / or the control station 104. The computer system 106 can include any number of computers distributed across different locations. Different computers of the computer system 106 can be used during different stages of the procedure. As shown in Fig. 1, the computer system 106 includes a processor 122 and a memory 124, which perform the actions or functions of the computer system 106 described herein. The computer system 106 can include any number of processors 122 and memories 124. During a preoperative stage of the procedure, the computer system 106 can use artificial intelligence to classify the patient and determine a treatment plan. For example, the tube 110 and the camera 112 are inserted into the patient's stomach to record a video of the stomach's interior. The computer system 106 can use a neural network to analyze the video to determine one or more physical characteristics of the stomach. Examples of physical characteristics of the stomach include one or more of its size, topography, orientation, and shape. The computer system 106 can also compare the patient's health profile (along with one or more physical characteristics of the stomach) with health profiles (e.g., metabolic health profiles) of other patients to determine a treatment plan.The health profile can specify the patient's medical conditions (e.g., metabolic conditions). The patient's health profile and the health profiles of other patients can include anatomical information, genetic information, and / or responder information for the patient and the other patients. Computer System 106 can compare the patient's health profile with the health profiles of other patients to determine whether gastric volume reduction is an appropriate treatment for the patient, considering one or more physical characteristics of the patient's stomach and the patient's existing medical conditions. If Computer System 106 determines that a volume reduction procedure should be performed, it can also determine an appropriate gastric volume reduction to treat the patient's medical condition. In some embodiments, the computer system 106 uses the video from the preoperative stage and the plan developed during the preoperative stage to generate a simulation of the desired volume reduction procedure. For example, the simulation may be a virtual reality or augmented reality simulation of the procedure. The simulation may simulate one or more physical characteristics of the stomach that are determined during the preoperative stage. By performing the simulation, the healthcare provider can practice the procedure on a simulation of the patient's stomach before the actual procedure is performed on the patient. As a result, the healthcare provider can become more familiar with the patient's stomach and the maneuvers to be performed during the procedure, which can reduce errors during the actual procedure. During the intraoperative stage, computer system 106 can use artificial intelligence to assist the healthcare provider in implementing the plan developed during the preoperative stage. For example, computer system 106 can use a SLAM process (or other process) and a neural network to generate a map of the patient's stomach based on a video recorded by camera 112 during the intraoperative stage. Computer system 106 can also determine the location of camera 112 and instrument 114 within the stomach on the map. Displays 116 and 118 can present the map and the location of camera 112 and instrument 114 on the map, so that the healthcare provider is not confused during the procedure and / or has real-time information regarding the progress of the procedure. Furthermore, the computer system 106 can use sensor outputs on tube 110 to determine measurements of the stomach. The computer system 106 can use these measurements, along with the stomach map, to calculate the stomach volume. As the procedure progresses and sutures are placed, the computer system 106 can detect changes in the shape of the stomach and update the map accordingly. The computer system 106 can also update the volume calculation. In this way, the computer system 106 provides a real-time volume calculation, eliminating the need for the healthcare provider to visually estimate the volume reduction. Additionally, the computer system 106 can inform the healthcare provider when a desired or optimal volume reduction has been achieved and when the procedure should be stopped. Furthermore, Computer System 106 can use the map to generate an overlay indicating where sutures should be placed on the stomach. Computer System 106 can determine from the map where sutures should be placed within the stomach. For example, Computer System 106 can identify folds and flexures in the stomach (e.g., gastric tomography) and determine that sutures should be placed along or in accordance with these flexures and flexures in a manner consistent with standard medical practice. Computer System 106 can then generate the overlay and display it over the video of the stomach or as a separate image. The overlay can indicate on the video where the sutures should be placed. Additionally, the overlay can provide directions for the sutures.For example, these directions can be indicated visually using lines or markers drawn in a specific direction. These lines or markers can be presented in relation to the topography of the stomach or another coordinate system displayed to the healthcare provider. In some embodiments, the overlay can also include a guide showing where and in which direction the tool 114 should be maneuvered and directed (e.g., a tool 114 orientation) to place the sutures. The guide can specify a distance the tool 114 should be moved between suture stitches. The guide can also specify a speed for the tool 114. The healthcare provider can move the tool 114 according to the guide to place the sutures at the locations indicated in the overlay.The guidance system can include visual indicators displayed on the screen, audible instructions, or haptic feedback from the tool controls. In this way, the computer system 106 instructs the healthcare provider where and how to place sutures, reducing the chances of subsequent suture detachment from the stomach walls. During the postoperative phase, the Computer System 106 collects data related to the procedure (e.g., the number of sutures placed, their placement, images of the stomach, and / or the chart from the preoperative, intraoperative, and postoperative phases, etc.). The Computer System 106 can also collect information indicating the outcomes of the procedure during any follow-up examinations. For example, the Computer System 106 can collect information indicating whether any sutures have detached from the stomach, any improvements in the patient's medical condition (e.g., weight loss, blood sugar levels, etc.), or any unintended side effects of the procedure. The Computer System 106 can also collect information on healing or follow-up procedures based on the suture pattern, the final stomach geometry, and / or postoperative information.The computer system 106 can then use the collected data and information to update or train the artificial intelligence that the computer system 106 uses during the preoperative and intraoperative stages. For example, the computer system 106 can store the collected data and information in the patient profile. The computer system 106 can then train or update the artificial intelligence using the patient profile. In this way, the artificial intelligence can be improved for subsequent volume reduction procedures. The Processor 122 is any electronic circuit, including, but not limited to, one or a combination of microprocessors, microcontrollers, application-specific integrated circuits (ASICs), an application-specific instruction set processor (ASIP), and / or state machines, that communicatively couples to the Memory 124 and controls the operation of the Computer System 106. The Processor 122 can be of an 8-bit, 16-bit, 32-bit, 64-bit, or any other suitable architecture. The Processor 122 can include an Arithmetic Logic Unit (ALU) for performing arithmetic and logical operations, processor registers that supply operands to the ALU and store the results of ALU operations, and a control unit that retrieves instructions from memory and executes them by directing the coordinated operations of the ALU, the registers, and other components.The processor 122 may include other hardware that runs software for control and information processing. The processor 122 executes software stored on the memory 124 to perform any of the functions described herein. The processor 122 controls the operation and management of the computer system 106 by processing information (e.g., information received from the surgical cart 102, the control station 104, and the memory 124). The processor 122 is not limited to a single processing device and may span multiple processing devices, whether contained in the same device or computer, or distributed across multiple devices or computers.The processor 122 is considered to perform a set of functions or actions when the multiple processing devices together perform the set of functions or actions, even if different processing devices perform different functions or actions in the set. Memory 124 can store data, operating software, or other information for processor 122, either permanently or temporarily. Memory 124 can include any or a combination of volatile or non-volatile local or remote devices suitable for storing information. For example, Memory 124 can include random-access memory (RAM), read-only memory (ROM), magnetic storage devices, optical storage devices, or any other suitable information storage device, or a combination of these devices. Software represents any suitable set of instructions, logic, or code embodied in a computer-readable storage medium. For example, software can be embodied in Memory 124, a floppy disk, a CD, or a flash drive.In certain embodiments, the software may include an application executable by the processor 122 to perform one or more of the functions described herein. The memory 124 is not limited to a single memory and may span multiple memories contained in the same device or computer, or distributed across multiple devices or computers. The memory 124 is considered to store a set of data, operating software, or information when the multiple memories collectively store the set of data, operating software, or information, even if different memories store different portions of the data, operating software, or information in the set. Fig. 2 illustrates an exemplary tube 110 in the system 100 of Fig. 1. As can be seen in Fig. 2, the tube 110 can be a flexible tube that houses the camera 112. Furthermore, the tube 110 encloses one or more channels (which can also be called lumens). In the example of Fig. 2, the tube 110 encloses channels 202, 204, and 206. Various instruments can be inserted through the tube 110 and through channels 202, 204, and 206. For example, the tool 114 or a guide wire can be inserted through channels 202, 204, and 206. Additionally, the tube 110 can house or enclose lamps 208. The lamps 208 can illuminate the area in front of the tube 110 so that the camera 112 can record video footage of the region in front of the tube 110. Fig. 3 illustrates an exemplary tube 110 in the system 100 of Fig. 1. As can be seen in Fig. 3, the tube 110 can be a flexible tube that includes a distal end 302 (e.g., an end that is inserted into the organ) and a proximal end 304 (e.g., an end that is closest to the surgical trolley 102). The distal end 302 can include the camera 112 and the light 208, which illuminates the region in front of the tube 110 in the organ. The proximal end 304 can be connected to the actuator box 108. The tube 110 can be formed using segments 310. Each segment 310 can be connected to allow the tube 110 to bend or fold along the segments 310. In some cases, the hose 110 and the camera 112 together can be referred to as an endoscope. Furthermore, the hose 110 can incorporate several sensors that monitor or measure different aspects of the hose 110. As shown in Fig. 3, the hose 110 incorporates a position sensor 306, a kinematic sensor 307, and a shape sensor 308. Each of these sensors can be positioned on or inside the hose 110 and is coupled to one, one, or both of the actuator box 108 and the computer system 106. The position sensor 306 provides information to the computer system 106 that can be used to track or measure the position of the hose 110. For example, information from the position sensor 306 can be used to determine coordinates that represent a position or location of the hose 110. The kinematic sensor 307 can detect or measure movement or a sequence of motions of the hose 110.For example, information from the kinematic sensor 307 can be used to measure the acceleration or velocity of the hose 110. The kinematic sensor 307 and the position sensor 306 can include accelerometers that detect the movement or positioning of the hose 110. The shape sensor 308 can detect or measure the shape of the hose 110. For example, the shape sensor 308 can include an optical fiber used to detect when the hose 110 bends or folds. The hose 110 can also include other types of sensors, such as visual sensors, stereoscopic sensors, depth sensors, etc. Figures 4A to 4D illustrate different types of volume reduction procedures for which the tool 114 can be used. Figure 4A illustrates an exemplary tool 114 in the system 100 of Figure 1. Specifically, Figure 4A shows the tool 114 used during an ESG procedure. The tool 114 can be inserted through the tube 110 and into the stomach 402. The tool 114 can exit the tube 110 and enter the stomach. When the tool 114 is positioned on or near a wall of the stomach, it can grasp or clamp a section of the stomach wall. The tool 114 can then suture the grasped or clamped wall to tie that section of the wall together, thus reducing the volume of the stomach. Tool 114 can continue overstitching other sections of the stomach to further reduce the stomach's volume. Fig. 4B illustrates an exemplary tool 114 in the system 100 of Fig. 1. Specifically, Fig. 4B shows the tool 114 used during an endoscopic revision procedure. As can be seen in (a), a gastric bypass pouch and outlet have dilated. In (b), the tool 114 is used to place an interrupted suture to narrow and reduce the outlet. In (c), the tool 114 is used to reduce the volume of the dilated pouch. As can be seen in (d), the overall volume of the outlet and pouch is reduced. Fig. 4C illustrates an exemplary tool 114 in the system 100 of Fig. 1. Specifically, Fig. 4C shows the tool 114 used during an endoscopic revision procedure. As can be seen in (a), a dilated gastric remnant is present. In (b), the tool 114 is used to place an additional suture to reduce the volume of the stomach. As can be seen in (c), the overall volume of the stomach is reduced. Fig. 4D illustrates an exemplary tool 114 in the system 100 of Fig. 1. Specifically, Fig. 4D shows the tool 114 used during an endoscopic revision procedure. As can be seen in (a), a previous sleeve gastroplasty has been dilated. The tool 114 is used to place sutures to reduce the volume. As can be seen in (b), the overall volume of the stomach has been reduced. Figure 5 illustrates exemplary stages of a volume reduction procedure (an ESG procedure or a revision procedure) using the system 100 from Figure 1. The computer system 106 can perform certain actions or functions during each stage of the procedure. As shown in Figure 5, the procedure is divided into three distinct stages: the preoperative stage, the intraoperative stage, and the postoperative stage. The procedure may alternatively include other stages. The preoperative stage takes place before the intraoperative stage, and the postoperative stage takes place after the intraoperative stage. Generally, the preoperative stage includes screening to determine if a patient is a good candidate for the volume reduction procedure and, if so, to develop a plan for the procedure.During the intraoperative stage, the volume reduction procedure is performed to reduce the volume of the patient's stomach. During the postoperative stage, follow-up care and testing are conducted to assess the success of the procedure. The Computer System 106 can implement specific features during each of these stages to support the healthcare provider and improve the chances of a successful ESG procedure (e.g., based on optimal technique, suture pattern, suture density, suture spacing, etc.). During the preoperative stage, the computer system 106 can use artificial intelligence to evaluate the patient and develop a surgical plan. The computer system 106 can analyze a video of the inside of a patient's stomach and the patient's health or medical profile to determine the surgical plan. As shown in Fig. 5, the computer system 106 receives the video 502 of the inside of the patient's stomach. The video 502 can be generated by the camera 112 when the tube 110 is inserted into the patient's stomach during the preoperative stage. The video 502 can be recorded for screening purposes. In some embodiments, the computer system 106 can also generate recommendations regarding suture locations, the distance traveled between sutures, the orientation of oversutures, and / or directions to achieve the desired volume reductions. Computer System 106 also receives or retrieves the patient's Profile 504. Profile 504 can include health or medical information about the patient. For example, Profile 504 may specify the patient's height, weight, body composition, or body mass index. Profile 504 may also indicate any health or metabolic conditions the patient may have (e.g., conditions related to obesity). For example, Profile 504 may indicate whether the patient has hyperlipidemia, hypertension, diabetes, sleep apnea, arthritis, heart disease, etc. Profile 504 may also include data collected by the patient's wearable device, such as heart rate, calorie intake, blood glucose levels, snoring levels, etc.Profile 504 can also specify data collected using remote Bluetooth patient monitoring, such as smart scales that provide weight and body composition. Computer system 106 can use a neural network 506 (which may consist of one or more neural networks) to analyze video 502 and profile 504 to determine if the patient is a candidate for volume reduction surgery and, if so, to generate plan 508 for the procedure. Neural network 506 can be trained to identify any suitable information from video 502 and profile 504. For example, neural network 506 can be trained to identify landmarks and features of the stomach in a video. Neural network 506 can analyze video 502 to identify or recognize these landmarks or features. Based on the recognized landmarks or features, neural network 506 can determine the size, orientation, or shape of the patient's stomach from video 502. As another example, the neural network 506 can be trained to analyze information in the profile 504. The neural network 506 can be trained using profiles of different patients stored in a database. The neural network 506 can analyze these profiles to identify patterns or trends and learn whether these patterns or trends indicate that the patient is a candidate for ESG. For example, the neural network 506 can learn from these profiles which types of medical conditions are treatable using the volume reduction procedure and which types of medical conditions might suggest that the volume reduction procedure should not be performed.As another example, the neural network 506 can learn from these profiles which combinations of health or medical conditions make a patient a suitable candidate for volume reduction surgery and which combinations make a patient less suitable as a candidate for volume reduction surgery. The neural network 506 can also learn how to use the information in the profiles to determine a plan for the volume reduction procedure. For example, the neural network 506 can learn which types of tools have been successfully used to perform volume reduction on stomachs with different physical characteristics (e.g., stomach shapes, sizes, orientations, and typographies). As another example, the neural network 506 can learn which degree of volume reduction successfully treated certain medical conditions. The trained neural network 506 can then analyze the patient's profile 504 to determine if the patient is a candidate for volume reduction surgery. For example, neural network 506 can examine the patient's health and medical conditions listed in profile 504 to determine if the patient has any health or medical conditions that can be treated with volume reduction. As another example, neural network 506 can determine if profile 504 lists any health or medical conditions that would indicate the level of benefit (e.g., adverse, neutral, significant) the patient is likely to gain from undergoing volume reduction surgery.In this way, neural network 506 effectively compares profile 504 with the other profiles used to train neural network 506 to determine whether the volume reduction procedure will help or harm the patient. The trained neural network 506 can also use the information in profile 504 and the information obtained from video 502 to determine a plan 508 for the volume reduction procedure. As discussed previously, neural network 506 can analyze video 502 to determine the size, topography, orientation, and / or shape of the stomach. Neural network 506 can then determine the plan 508 for the procedure from one or more physical characteristics of the stomach (e.g., size, topography, orientation, and shape) and the health and medical conditions indicated in profile 504. For example, neural network 506 can determine a volume reduction for the stomach that would beneficially treat the patient's medical condition.As another example, the neural network 506 can determine the types of tools that should be used to perform the volume reduction procedure to treat the patient's medical condition. This information can be incorporated into Plan 508. For example, Plan 508 can specify whether the patient is a candidate for volume reduction, one or more physical characteristics of the stomach (such as size, topography, orientation, and shape), and which medical conditions will be treated by the procedure. As another example, Plan 508 can specify the desired volume reduction for the patient and the types of tools that should be used to perform the procedure. In certain embodiments, the computer system 106 generates a simulation 510 using the plan 508. The simulation 510 can simulate the procedure on the patient's stomach according to the plan 508. For example, the computer system 106 can use one or more of the physical characteristics of the stomach specified in the plan 508 to generate a virtual environment (e.g., a virtual reality or augmented reality environment) that simulates the patient's stomach. The computer system 106 can use a SLAM process or another three-dimensional reconstruction technique to build the virtual environment for the simulation 510. The healthcare provider can run the simulation 510 or perform it to practice the procedure on the stomach before the procedure is actually performed on the patient.This allows the healthcare provider to practice the procedure, reducing the chances of an error occurring during the actual procedure. Computer system 106 can record the maneuvers performed during simulation 510. The recorded maneuvers can be displayed as ghost images or visuals during the intraoperative stage to guide the healthcare provider. The healthcare provider can then review and replicate the recorded maneuvers during the intraoperative stage. In this way, the healthcare provider can practice the procedure during the simulation and create a ghost image or visuals to guide them during the intraoperative stage. In some embodiments, Plan 508 includes an overlay in which a model or image of the stomach is superimposed on a model or image of the stomach after the procedure has been performed. The overlay shows the change in the size, shape, and / or orientation of the stomach that can be expected after the procedure. During the intraoperative stage, the computer system 106 uses artificial intelligence to assist the healthcare provider in implementing the plan 508 developed during the preoperative stage. As shown in Fig. 5, the computer system 106 receives the video 512 during the intraoperative stage. The video 512 can be recorded by the camera 112 when the tube 110 and the camera 112 are inserted into the patient's stomach. The video 512 can be a separate video from the video 502 recorded during the preoperative stage. In some embodiments, the preoperative stage takes place immediately before the intraoperative stage. The healthcare provider does not need to remove the tube 110 or the camera 112 from the patient's stomach. The camera 112 records both the video 502 and the video 512. The video 512 is then a continuation of the video 502. Computer system 106 uses a neural network 514 (which may consist of one or more neural networks) to analyze video 512. Neural network 514 may be identical to neural network 506, or it may be separate from neural network 506. Neural network 514 may be trained to identify landmarks or features in videos of the stomach. For example, neural network 514 may be trained using different videos of stomachs. Neural network 514 can learn to identify different features (e.g., transitions, bends, folds, etc.) that appear in these videos. The trained neural network 514 can then analyze video 512 to identify landmarks 516 in the patient's stomach.For example, neural network 514 can identify landmarks 516 that can identify transitions from the stomach to other organs (e.g., the esophagus or duodenum). Neural network 514 can use these landmarks 516 to identify or mark the boundaries of the patient's stomach. As another example, neural network 514 can identify landmarks 516 that indicate bends or folds in the stomach, including wrinkles, which can serve as an anatomical fingerprint of that patient's anatomy. Neural Network 514 can identify landmarks 516 in different frames of Video 512. For example, Neural Network 514 can identify a landmark 516 appearing in one frame of Video 512, and Neural Network 514 can identify the same landmark 516 appearing in a subsequent frame of Video 512. Neural Network 514 can determine that the landmark 516 identified in the different frames is the same landmark 516 (e.g., based on the size and shape of the landmark 516). Neural Network 514 can then link these identifications of landmarks 516 in the different frames. Computer System 106 can then analyze the frames of Video 512 to see how these landmarks 516 move to different regions within the different frames of Video 512. Computer system 106 can use a SLAM process and landmarks 516 to generate a map 518 of the patient's stomach. The SLAM process can determine the stomach's boundaries from video 512. Computer system 106 can use these boundaries to generate map 518, which can be a two-dimensional or three-dimensional map of the stomach. The landmarks 516 can provide information about the stomach's boundaries on map 518. For example, the landmarks 516 can identify the transitions to the duodenum and esophagus. Computer system 106 can exclude regions beyond these transitions from map 518. Consequently, map 518 can omit the esophagus and duodenum. Computer system 106 can display map 518 of the stomach on display 116 or 118. In an exemplary process, the computer system 106 can use the landmarks 516 and other measurements from the sensors on the tube 110 to generate the map 518 of the stomach. For example, the computer system 106 can locate a landmark 516 in several frames of the video 512. The computer system 106 can analyze each of the frames to identify or match the landmark 516 in each of the frames. The landmark 516 may move to a different position in the frames due to movement of the tube 110 within the organ. The measurements from the sensors on the tube 110 can indicate the movement of the tube 110 that occurred between frames. Using this information, the computer system 106 can determine how the frames correspond to each other in three-dimensional space (e.g., the depth of one frame relative to another).The computer system 106 can then stitch the frames together according to the positioning of the reference points 516 and according to the sensor measurements to generate the map 518, which can be a three-dimensional map. In some embodiments, the computer system 106 also uses the neural network 514 to identify the tube 110, camera 112, and / or tool 114 (e.g., selected according to plan 508) that appear in the video 512. For example, the neural network 514 may be trained to recognize these elements in videos. The neural network 514 can identify these elements when the video 512 is analyzed. The computer system 106 can then use the SLAM process to determine the location of these elements on the map 518 of the stomach. The computer system 106 can present the map 518 and the location of the tube 110, camera 112, or tool 114 on the map 518 on the display 116 or 118 to prevent confusion for the healthcare provider during the volume reduction procedure. Computer System 106 can also generate an overlay 520 that guides the placement of sutures. For example, Computer System 106 can determine where to place sutures on the stomach from the map 518 of the stomach and / or from one or more physical characteristics of the stomach (e.g., size, topography, orientation, and / or shape) specified in the plan 508. For example, Computer System 106 can determine where bends and folds are in the stomach and determine that sutures should be placed along or in accordance with these bends and folds to reduce the chances of the sutures injuring the stomach or subsequently detaching from the stomach. In addition, Computer System 106 can determine the pattern or arrangement of the sutures and their directions. The determined locations, arrangement, and directions of the sutures may be consistent with established medical practices.The computer system 106 can then generate the overlay 520, which indicates the locations, arrangement and directions of the seams. In some embodiments, the computer system 106 also takes into account the desired volume reduction specified in Plan 508 when determining the locations, arrangement, or directions of the seams. For example, the computer system 106 can determine the locations, arrangement, or directions of the seams that will achieve the desired volume reduction. The computer system 106 can stop adding seam specifications to the overlay 520 if it determines that the desired volume reduction should be achieved with the seams specified in the overlay 520. Computer system 106 can overlay the overlay 520 onto video 512 and / or map 518 to indicate where and in which direction the sutures should be placed on the stomach. As the healthcare provider maneuvers the tube 110, camera 112, and / or tool 114 through the stomach, the healthcare provider can view video 512 and / or map 518 on display 116 or 118, along with the overlay 520, to understand where and in which direction to place sutures on the stomach. The healthcare provider can then place sutures in accordance with the overlay 520. In some embodiments, the overlay 520 may include a guide indicating to the healthcare provider how to position or orient the tool 114 to place the sutures specified in the overlay 520. For example, the guide may include a virtual representation of the tool pointing in a particular direction. The healthcare provider can maneuver the tool 114 according to the guide to position it near a suture site and in the correct orientation to place a suture in the direction specified by the overlay 520. For example, by following the guide, the healthcare provider can maneuver the tool 114 near the suture site and orient it so that the tool 114 is perpendicular or orthogonal to the stomach wall at that location.Tool 114 can then grasp or clamp the wall and apply the suture. In this way, Computer System 106 further assists the healthcare provider in correctly applying sutures, which can reduce the chances of the sutures detaching from the stomach. The guidance system can provide other information to help direct Tool 114. For example, the guidance system can specify a speed for Tool 114 or a distance the tool 114 should be moved. In certain embodiments, the computer system 106 can use the neural network 514 to update the map 518 and / or the plan 508 when a suture is placed on the stomach. For example, the neural network 514 can be trained to detect the presence of sutures in the video 512. Furthermore, the neural network 514 can be trained to detect movements of the stomach in the video 512. The computer system 106 can translate these movements into changes in the shape, orientation, and / or size (e.g., volume) of the stomach. The neural network 514 can analyze the video 512 to detect when a suture has been placed on the patient's stomach. The neural network 514 can also detect movements in the walls of the stomach in the video 512 once the sutures have been placed.Computer System 106 can determine changes in the shape, orientation, and / or size of the stomach based on these movements. Computer System 106 can then update Map 518 to reflect the change in the size, orientation, and / or shape of the stomach. In this way, Computer System 106 displays a real-time size or shape of the stomach as the procedure progresses. As another example, computer system 106 can compare the suture detected by neural network 514 with the information in overlay 520 to determine whether the suture is aligned or misaligned with overlay 520. Based on the alignment or misalignment of the suture with overlay 520, computer system 106 can adjust the locations or directions of subsequent sutures in overlay 520. Computer system 106 can update overlay 520 to show the healthcare provider the locations and directions of the subsequent sutures that will achieve the desired volume reduction. In this way, computer system 106 provides real-time instructions for suture placement during the procedure.If the healthcare provider places subsequent sutures according to the updated locations or directions, the healthcare provider can achieve the desired volume reduction in the stomach. In some cases, computer system 106 may determine that a misaligned, crossed, or incomplete suture should be removed in its entirety rather than leaving it in the stomach. In some embodiments, the plan 508 may specify different types of tools 114 to be used during different sections of the intraoperative stage. The computer system 106 may indicate to the healthcare provider when it is appropriate to change the tool 114 that the healthcare provider is using during the intraoperative stage. For example, the computer system 106 may determine when the healthcare provider has reached a section of the stomach that the plan 508 indicates should be sutured using a different type of tool 114. The computer system 106 may provide the healthcare provider with a message or indicator to change tools 114. During the postoperative stage, the computer system 106 collects data and information about the procedure. For example, the computer system 106 can generate images of the stomach during the different stages of the procedure. The computer system 106 can generate or collect a preoperative image 522 of the stomach and a postoperative image 524 of the stomach. The preoperative image 522 can be an image of the stomach during the preoperative stage, before sutures have been applied to the stomach. The postoperative image 524 of the stomach can be an image of the stomach after the sutures have been applied. By comparing the preoperative image 522 with the postoperative image 524, the computer system 106 can determine a percentage change in the size of the stomach as a result of the procedure. In some embodiments, the computer system 106 can also collect images of the stomach or the map 518 during the intraoperative stage.These images can show the progress of the procedure between the time the preoperative image 522 and the postoperative image 524 were taken. The computer system 106 also analyzes the preoperative image 522 and / or the postoperative image 524 to determine whether the desired volume reduction has been achieved. The computer system 106 can also collect operational statistics 526 for the procedure. These operational statistics can include any information related to the procedure. For example, the computer system 106 can collect or record the number of sutures placed on the stomach, the location of those sutures, and their directions. Furthermore, the computer system 106 can record the percentage change in the size of the stomach as a result of the procedure. The computer system 106 can also collect results 528 from the procedure. These results 528 can be collected or recorded during the patient's follow-up visits after the procedure and can indicate the patient's response to the procedure. Results 528 can indicate how successful the procedure was in treating health or medication conditions. For example, results 528 can include weight loss at various time points, the patient's blood glucose levels, any changes in medication, and / or whether the patient continues to snore. Additionally, results 528 can include the number of sutures that have detached from the stomach, failed, or come loose after the ESG procedure. Computer system 106 can use the information and data collected during the postoperative stage to further train the artificial intelligence used during the preoperative and / or intraoperative stages. For example, computer system 106 can store the collected data and information in the patient's profile 504. In the example shown in Fig. 5, computer system 106 includes the preoperative image 522, the postoperative image 524, the surgical statistics 526, and the results 528 in the patient's profile 504. Computer system 106 then uses the updated profile 504 to train neural network 506 or 514. Neural network 506 or 514 can analyze profile 504 to learn whether the ESG intervention successfully treated the patient's medical or health condition.The neural network 506 or 514 can also learn whether the placement and direction of the sutures achieved the desired reduction in stomach volume. The neural network 506 or 514 can then use this new information when analyzing future videos and profiles for subsequent ESG procedures. In this way, computer system 106 continues to improve the artificial intelligence used during the ESG procedure. Fig. 6 illustrates an exemplary computer system 106 within the system 100 of Fig. 1. In general, Fig. 6 shows a feature implemented by the computer system 106 to assist the healthcare provider during the intraoperative stage. As can be seen in Fig. 6, the computer system 106 includes the plan 508, which was developed during the preoperative stage. The plan 508 can specify any relevant information for the ESG procedure, including the desired volume reduction for the stomach, one or more physical characteristics of the stomach (e.g., size, topography, orientation, and / or shape), and the types of instruments 114 to be used for the procedure. The computer system 106 can also include the video 512, which is recorded by the camera 112 inside the stomach during the intraoperative stage. The computer system 106 generates the overlay 520, which includes information showing where the sutures should be placed in the stomach and the directions of those sutures. In some embodiments, the overlay 520 includes a guidance aid 602. The guidance aid 602 can provide information on the positioning and orientation (e.g., direction) of the tool 114 to correctly place the sutures at the locations and in the directions indicated by the overlay 520. For example, the guidance aid 602 can guide the tool 114 to be positioned orthogonally to a wall of the stomach so that the tool can more securely grasp and clamp the stomach wall, thus ensuring the suture is more securely placed against the stomach wall. The guidance aid 602 can also provide other information about the tool 114, such as the speed of the tool 114 and a distance by which the tool 114 should be moved.The computer system 106 can present the overlay 520 and the orientation aid 602 on the display 116 or 118. The overlay 520 and the orientation aid 602 can be positioned on the video 512, which is presented on the display 115 or 118. The healthcare provider can view the overlay 520 and the orientation aid 602 on the video 512 to determine how to maneuver the tool 114 and where to place the sutures. In some embodiments, the orientation aid 602 can indicate how to maneuver the tool 114 to reduce or minimize tissue trauma. For example, the orientation aid 602 can guide the healthcare provider on how to align or angle the tool 114 when inserting it into the stomach to minimize or reduce tissue trauma. Computer system 106 can use neural network 514 to analyze video 512 to detect when a suture 604 has been placed on the stomach wall. For example, neural network 514 can be trained using many videos recorded of the inside of stomachs. Neural network 514 can be trained to detect sutures placed on those stomachs. The trained neural network 514 can then analyze video 512 to determine when suture 604 has been placed on the stomach. Neural network 514 can detect suture 604 along with any corresponding movement or motion in the stomach wall resulting from the placement of suture 604. Computer system 106 can use the outputs of neural network 514 to determine changes in physical characteristics (e.g.,to determine the shape, orientation, and / or size of the stomach caused by suture 604. Computer system 106 can then update map 518 of the stomach to reflect that change in the stomach's physical characteristics. For example, if suture 604 caused a section of the stomach to fold inward, computer system 106 can update map 518 to show that folded section. Computer system 106 can then display the updated map 518 on display 116 or 118 so that the healthcare provider can see the result of applying suture 604. Figure 7 illustrates an exemplary computer system 106 within the system 100 of Figure 1. In general, Figure 7 shows a feature implemented by the computer system 106 to assist the healthcare provider during the intraoperative stage. As shown in Figure 7, the computer system 106 receives the video 512 recorded by the camera 112 positioned inside the patient's stomach. The computer system 106 uses the neural network 514 to analyze the video 512 in order to detect the tool 114. The neural network 514 can be trained during volume reduction procedures using different videos from inside the stomach. The neural network 514 can be trained to detect the tool 114 in those videos. The computer system 106 can then use the neural network 514 to analyze the video 512 in order to detect the tool 114 within the video 512.The neural network 514 can also detect an occlusion 704 caused by tool 114. The occlusion 704 could be a section of the stomach in video 512 whose view is blocked or occluded by tool 114. Computer system 106 can adjust video 512 to improve the visibility of the occluded region. For example, computer system 106 can segment tool 114 out of video 512, making the occluded region visible. Alternatively, computer system 106 can increase the transparency 706 of tool 114 in video 512, making the occlusion 704 by tool 114 more visible. In this way, computer system 106 makes the occlusion 704 more visible to the healthcare provider during the procedure without requiring the healthcare provider to move tool 114 to expose the portion of the stomach blocked by the occlusion 704. As a result, computer system 106 provides increased visibility of the stomach during the procedure.In some embodiments, the healthcare provider can control when the computer system 106 segments or removes the tool 114 from view, or when the computer system 106 increases the transparency 706 of the tool 114. For example, the computer system 106 can provide a setting or option for the healthcare provider to enable or disable segmentation or transparency. Figure 8 illustrates an exemplary computer system 106 within the system 100 of Figure 1. In general, Figure 8 shows a feature implemented by the computer system 106 to assist the healthcare provider during the intraoperative stage. As shown in Figure 8, the computer system 106 receives the plan 508, which was developed during the preoperative stage. The plan 508 may specify one or more physical characteristics of the stomach (e.g., size, topography, orientation, and / or shape) and / or a desired reduction in stomach volume. The computer system 106 also generates the map 518 of the stomach (e.g., by analyzing the video 512 of the stomach using the neural network 514). Computer System 106 can generate the overlay 520 using information from Plan 508 and Map 518. For example, Computer System 106 can locate bends and folds in the stomach using Map 518. Computer System 106 can also determine where sutures should be placed on the stomach to achieve a volume reduction specified in Plan 508. For example, Computer System 106 can determine that a specific number of sutures should be placed to achieve the desired volume reduction. Furthermore, Computer System 106 can determine that the sutures should be positioned in accordance with or along the bends or folds in the stomach to reduce the chances of the sutures detaching from the stomach.In some embodiments, the computer system 106 can also determine the directions of the seams to reduce the chances of the seams coming loose, locking, or crossing over. As shown in Fig. 8, the overlay 520 can include the suture locations 802, 804, and 806 that are to be placed on the stomach. In some embodiments, the overlay 520 can also include the directions for these sutures. The computer system 106 can overlay the overlay 520 onto the video 512, which is recorded by the camera 112 inside the patient's stomach. By overlaying the overlay 520 onto the video 512, the computer system 106 can introduce markings or indications at the suture locations 802, 804, and 806 into the video 512. The healthcare provider can view video 512 on display 116 or 118 to see overlay 520 and the indicators at locations 802, 804, and 806 to understand where to place the sutures. The healthcare provider can also understand the direction in which to align or guide the sutures. The neural network 514 can also identify areas where sutures should be avoided and incorporate those areas into the overlay 520. For example, the neural network 514 can be trained to identify scars, polyps, neoplasms, or ulcers in many videos recorded from other stomachs. The trained neural network 514 can then analyze the video 512 to identify scars, polyps, neoplasms, or ulcers in the stomach. The computer system 106 can then incorporate the locations of the scars, polyps, neoplasms, or ulcers as reference points 516 for the overlay 520. The overlay 520 can then indicate these locations as areas of the stomach where sutures should not be placed. The healthcare provider can view the overlay 520 during the volume reduction procedure to understand where on the stomach sutures should be avoided. Computer system 106 can use neural network 514 to analyze video 512 to detect when suture 808 has been placed on the stomach. Neural network 514 can be trained using many videos of volume reduction procedures to recognize a suture appearing in these videos. The trained neural network 514 can then be used to analyze video 512 to detect when suture 808 has been placed on the patient's stomach. Computer System 106 can use the output of neural network 514 to determine the location or direction of suture 808. Specifically, Computer System 106 can determine how suture 808 is aligned with an indicator at one of the locations 802, 804, or 806 included in overlay 520. Computer System 106 can then update overlay 520 based on how suture 808 is aligned with the indicators. For example, if suture 808 is aligned with one of the indicators in overlay 520, Computer System 106 might not adjust or change overlay 520 significantly for subsequent sutures. However, if seam 808 is misaligned with any of the indicators in overlay 520, computer system 106 can adjust or change overlay 520 to accommodate the misaligned seam 808.For example, Computer System 106 can adjust the locations or directions in overlay 520 for subsequent sutures to secure or reinforce suture 808. As another example, Computer System 106 can add additional locations or directions to overlay 520, allowing for the indication of additional sutures within overlay 520. These additional sutures can support or reinforce suture 808. In this way, Computer System 106 can adjust overlay 520 during the procedure to accommodate the sutures the healthcare provider places on the stomach. Consequently, Computer System 106 can improve the likelihood that the procedure will successfully treat the patient's health or medical condition. Fig. 9 is a flowchart of an exemplary procedure 900, which is carried out in the system 100 of Fig. 1. In certain embodiments, the computer system 106 carries out the procedure 900. By carrying out the procedure 900, the computer system 106 implements certain features that assist the healthcare provider during volume reduction procedures. These features can improve the chances that the procedure will successfully treat the patient's health or medical condition. In Block 902, Computer System 106 determines Plan 508 for the volume reduction procedure during the preoperative stage. For example, Computer System 106 can analyze Video 502 of the patient's stomach interior using Neural Network 506 to determine one or more physical characteristics of the stomach (e.g., size, topography, orientation, and / or shape). Furthermore, Computer System 106 can analyze the patient's Profile 504, which specifies the patient's health or medical conditions. Computer System 106 can use Neural Network 506 to compare Profile 504 with other profiles of previous patients to determine if the patient is a good candidate for the volume reduction procedure and, if so, what the desired volume reduction for the stomach is, considering the patient's health and medical conditions. In block 904, computer system 106 generates map 518 of the stomach during the intraoperative stage. Computer system 106 can use neural network 514 to analyze video 512, which was recorded from inside the patient's stomach. Neural network 514 can detect landmarks 516 that appear in video 512. These landmarks 516 can indicate the boundaries of the stomach as well as specific locations within the stomach. Computer system 106 can use these landmarks 516 to generate map 518 of the stomach. Map 518 can be a two-dimensional or three-dimensional map of the stomach. In block 906, computer system 106 displays video 512 and / or map 518. For example, computer system 106 can communicate video 512 and map 518 to display 116 or 118. The healthcare provider can view video 512 and map 518 on display 116 or 118 to understand where the healthcare provider works and to reduce the chances of confusion. In Block 908, Computer System 106 generates overlay 520 using Map 518 and Plan 508, which were developed during the preoperative stage. Overlay 520 can include indicators at the locations where sutures should be placed on the stomach. The indicators can also specify the directions of these sutures. In block 910, the computer system 106 displays the overlay 520 on the video 512 and / or the map 518 on the display 116 or 118. For example, the overlay 520 can display indicators or markers on the video 512 or the map 518 to show the healthcare provider where in the stomach the sutures should be placed and the directions of those sutures. The healthcare provider can then maneuver the instrument 114 to place sutures at these indicated locations. In this way, in certain embodiments, the computer system 106 increases the chances that the procedure will successfully treat the patient's health and medical conditions. In some embodiments, the overlay 520 also includes the orientation aid 602, which shows the healthcare provider how to maneuver the tool 114 that applies the sutures. For example, the orientation aid 602 may specify a position and an orientation (e.g., direction) of the tool 114. The healthcare provider can maneuver the tool 114 to align it with the orientation aid 602 in order to apply a suture at a location and in a direction specified in the overlay 520. During the postoperative phase, computer system 106 can collect information and data about the procedure, which are used to train neural network 506 and / or neural network 514 for subsequent volume reduction procedures. For example, computer system 106 can collect the preoperative images 522 of the stomach, the postoperative image 524 of the stomach, the surgical statistics 526, and the results 528. Computer system 106 can update the patient profile 504 with the collected information and data. Computer system 106 can then update or train neural network 506 and / or neural network 514 using the updated patient profile 504.Thus, computer system 106 continues to update and train the artificial intelligence used during the ESG intervention with the results of completed ESG interventions, which can improve the diagnostic and other capabilities of neural network 506 and / or neural network 514. Fig. 10 illustrates an exemplary computer system 106 within the system 100 of Fig. 1. In general, Fig. 10 shows the computer system 106 performing a volume calculation during the intraoperative stage. In certain embodiments, the computer system 106 can calculate the volume of the stomach during the intraoperative stage, thus eliminating the need for the healthcare provider to visually evaluate the stomach volume, which can be an inaccurate method of determining volume. Computer system 106 receives video 512, which can be recorded by camera 112 positioned inside the stomach during the intraoperative stage. Computer system 106 can then use neural network 514 to analyze video 512 in order to detect landmarks 516 within the stomach. Neural network 514 can be trained to recognize different landmarks in many videos recorded inside different stomachs. The trained neural network 514 can analyze video 512 to recognize these landmarks 516 when they appear in video 512. The landmarks 516 can include transitions 1002 and features 1004. The transitions 1002 can indicate the boundaries, entrances, or exits of the stomach. For example, one transition 1002 can indicate the boundary between the stomach and the esophagus. Another transition 1002 can indicate the boundary between the stomach and the duodenum. The neural network 514 can be trained to recognize these transitions 1002 when they appear in the video 512. The features 1004 can indicate parts or structures of the stomach. For example, the features 1004 can indicate bends or folds in the stomach wall. As another example, the features 1004 can include scars or polyps on the stomach wall. The features 1004 can also include the walls and geometry of the stomach. The computer system 106 uses these landmarks 516 to generate the map 518 of the stomach. For example, the landmarks 516 can indicate the boundaries, folds, and bends in the walls of the stomach. The computer system 106 can generate the map 518 in accordance with the recognized landmarks 516. As a result, the map 518 can be an accurate representation of one or more physical characteristics of the stomach (e.g., its size, topography, orientation, and / or shape) in the video 512. In some embodiments, the computer system 106 uses the transitions 1002 to determine some of the boundaries of the map 518. The computer system 106 can omit regions outside the transitions 1002 from the map 518. For example, if the transitions 1002 are boundaries between the stomach and the esophagus or the duodenum, the computer system 106 can omit the esophagus and the duodenum from map 518.In this way, computer system 106 can limit card 518 to the stomach. The computer system 106 can then calculate the volume 1006 of the stomach from the map 518. For example, the computer system 106 can calculate the volume 1006 of the stomach from one or more physical characteristics of the stomach (e.g., its size, topography, orientation, and / or shape) that appear in the map 518. In some embodiments, the computer system 106 uses measured values 1008 to calculate the volume 1006. The measured values 1008 can be measurements of a length or size of different sections of the stomach. These measured values 1008 can be determined from a sensor output 1010. The sensor output 1010 can be produced by one or more sensors on the tube 110. For example, the sensor output 1010 can be produced by one or more of the position sensor 306, the kinematic sensor 307 and the shape sensor 308, which are positioned on the hose 110.As tube 110 is moved through the stomach, sensor output 1010 can indicate the distance tube 110 has traveled. Sensor output 1010 can thus provide measurements 1008 from different regions of the stomach. Computer system 106 can use these measurements 1008 when calculating the stomach volume 1006. For example, computer system 106 can determine that tube 110 has moved from one region of the stomach to another region of the stomach on map 518. Computer system 106 can also determine measurements 1008 that measure the distance tube 110 has traveled. Using these measurements 1008, computer system 106 can determine the distance between the two points on map 518.The computer system 106 can then extrapolate the size, topography, orientation and / or shape of the stomach in the map 518 and calculate the volume 1006 from that size, topography, orientation and / or shape. As an example, computer system 106 and / or neural network 514 can identify a feature 1004 in video 512 and track how that feature 1004 transitions to different pixels in different frames of video 512 as tube 110 moves in the stomach. For instance, computer system 106 and / or neural network 514 can identify the feature in the first frame of video 512. Tube 110 can then move in the stomach, and computer system 106 and / or neural network 514 can identify the feature in the second frame of video 512. Due to the movement of tube 110, the feature can appear in different pixels of the first and second frames.Computer system 106 can determine the number of units by which tube 110 has moved in map 518 from the distance between the pixels where feature 1004 appears in the first and second frames. Computer system 106 can also determine the distance by which tube 110 has moved using one or more sensors on the tube 110. From this distance, computer system 106 can then determine measurement 1008 for the stomach. Computer system 106 can then extrapolate a dimension of the stomach from measurement 1008 and the number of units by which tube 110 has moved in map 518. Using this dimension, computer system 106 can calculate the volume 1006 of the stomach. Fig. 11 illustrates an exemplary computer system 106 within the system 100 of Fig. 1. In general, Fig. 11 shows the computer system 106, which updates the volume 1006 based on sutures placed on the stomach. When sutures are placed on the stomach, the computer system 106 can detect a change in the stomach volume 1006 caused by the sutures. The computer system 106 can then update the volume calculation. In this way, the computer system 106 provides the surgeon with a real-time volume of the stomach while sutures are being placed during the intraoperative stage. Computer system 106 receives video 512. Computer system 106 uses neural network 514 to analyze video 512 in order to detect when a suture 1102 has been placed on the stomach. Neural network 514 can be trained using many different videos of volume reduction procedures. Neural network 514 can be trained to recognize sutures that appear in those videos. The trained neural network 514 can then be used to analyze video 512 in order to detect when suture 1102 has been placed on the stomach. For example, neural network 514 can detect the location and direction of suture 1102. Neural network 514 can also be trained to detect a movement pattern 1104 in the stomach walls when suture 1102 is placed. The neural network 514 can also detect a direction and a distance for the detected movement sequence 1104. Computer system 106 can use the detected suture 1102 and the detected movement sequence 1104 to update map 518 in order to produce the updated map 1105. For example, based on the location and direction of suture 1102 and the direction of movement sequence 1104, computer system 106 can determine that a specific section of the stomach has been sutured together by suture 1102. Computer system 106 can then update map 518 so that that section of the stomach, according to suture 1102 and movement sequence 1104, has been sutured and moved in map 518. This update produces the updated map 1105. The computer system 106 can then recalculate the volume 1006 of the stomach in the updated map 1105. For example, the suture 1102 and the movement sequence 1104 can reduce the volume of the stomach. As a result, the computer system 106 can calculate a reduced volume 1006. In some embodiments, the computer system 106 also calculates a change 1106 of the volume 1006. For example, the change 1106 can be a percentage change in the volume 1006 caused by the suture 1102 and the movement sequence 1104. In some embodiments, the computer system 106 overlays the updated map 1105 onto the map 518, which was generated before the application of suture 1102 (or before the application of any sutures). By overlaying the updated map 1105 onto the original map 518 and presenting that overlay on the display 116 or 118, the healthcare provider can compare the size of the stomach after the application of suture 1102 and before the application of suture 1102. The healthcare provider can then understand the extent of the change resulting from suture 1102. The computer system 106 can continue to update the overlay as the healthcare provider applies more sutures to the stomach. Figure 12 illustrates an example computer system 106 within the system 100 of Figure 1. In general, Figure 12 shows the computer system 106, which uses the specified change 1106 in the volume 1006 of the stomach to determine the progress of the volume reduction procedure. As can be seen in Figure 12, the computer system 106 compares the change 1106 with a threshold 1202. The threshold 1202 may be the desired volume reduction in the plan 508 developed during the preoperative stage. If the change 1106 equals or exceeds the threshold 1202, the computer system 106 may determine that the procedure is complete and that the healthcare provider should stop. If the change 1106 does not exceed the threshold 1202, the computer system 106 can determine that the procedure can continue to further reduce the volume 1006 of the stomach.For example, if the threshold 1202 indicates a desired reduction of the stomach volume 1006 of 70%, the computer system 106 may allow the procedure to continue until the change 1106 equals or exceeds the threshold 1202 of 70-80%. In some embodiments, the computer system 106 provides a progress bar 1204 on the display 116 or 118. The progress bar 1204 can indicate the change 1106 and how close the change 1106 is to the threshold 1202. If the volume 1006 of the stomach is reduced during the intraoperative stage, the change 1106 can increase, and the computer system 106 can increase the progress shown by the progress bar 1204. In this way, the computer system 106 provides the healthcare provider with a visual indicator of the volume reduction of the stomach during the intraoperative stage. In certain embodiments, the computer system 106 provides a signal 1206 to the healthcare provider to indicate whether the procedure should continue or stop. The signal 1206 can be visual or audible. For example, the computer system 106 can present a displayed or audible message informing the healthcare provider whether to continue or stop reducing the volume of the stomach. If the change 1106 exceeds the threshold 1202, the computer system 106 can present a visual or audible signal 1206 indicating that the healthcare provider should stop because the desired volume reduction has been achieved. Fig. 13 is a flowchart of an exemplary procedure 1300 performed in the system 100 of Fig. 1. In certain embodiments, the computer system 106 performs the procedure 1300. By performing the procedure 1300, the computer system 106 provides a real-time volume calculation for the stomach during the intraoperative stage, which may be more accurate than if the healthcare provider visually evaluates the volume reduction of the stomach. In block 1302, computer system 106 receives video 512. Video 512 can be recorded by camera 112, which is positioned in the patient's stomach during the intraoperative stage. In block 1304, computer system 106 generates map 518 based on video 512. For example, computer system 106 can use a SLAM process to determine the boundaries of the stomach. Computer system 106 can also use neural network 514 to analyze video 512 in order to identify landmarks 516 that appear in video 512. These landmarks 516 can also indicate the boundaries, size, or shape of the stomach. Computer system 106 can use the information from the SLAM process and neural network 514 to generate map 518 of the stomach. The map 518 can be a two-dimensional or three-dimensional map of the stomach. In block 1306, the computer system 106 calculates the volume 1006 of the stomach based on the map 518 of the stomach. In some embodiments, the computer system 106 can calculate the volume 1006 using the map 518 and the measured values 1008 derived from the sensor outputs 1010. For example, the computer system 106 can determine or calculate the volume of the stomach by measuring the size, topography, orientation, and / or shape of the stomach on the map 518. The computer system 106 can then present the volume 1006 on the display 116 or 118 for the healthcare provider during the intraoperative stage. In block 1308, the computer system 106 detects the suture 1102, which was applied to the stomach during the intraoperative stage. For example, the computer system 106 can use the neural network 514 to analyze the video 512 to detect when and where the suture 1102 was applied to the stomach. In some embodiments, the computer system 106 can also use the neural network 514 to analyze the video 512 to detect the movement sequence 1104 in the walls of the stomach caused by the application of the suture 1102. In block 1310, the computer system 106 updates the map 518 to reflect the suture 1102 and the movement sequence 1104, producing the updated map 1105. For example, the suture 1102 and the movement sequence 1104 can indicate that a section of the stomach has been tied together.The computer system 106 can then update map 518 to produce the updated map 1105, which shows that section of the stomach that is bound together, which can cause the volume 1006 of the stomach to be reduced. In block 1312, computer system 106 updates or recalculates the stomach volume 1006 based on the updated map 1105. For example, computer system 106 can calculate the updated volume 1006 based on changes in the shape, orientation, and / or size of the stomach as shown on the updated map 1105. Computer system 106 can then display the updated volume 1006 on display 116 or 118 for the healthcare provider. In this way, computer system 106 provides the healthcare provider with a real-time calculation of the stomach volume 1006 during the intraoperative stage, which may be more accurate than if the healthcare provider visually evaluates the stomach volume while viewing video 512. Fig. 14 illustrates an exemplary computer system 106 in the system 100 of Fig. 1. In general, Fig. 14 shows the computer system 106, which generates the overlay 520 that can indicate the locations and directions of sutures that should be placed on the stomach to achieve a desired volume reduction. The computer system 106 receives the video 512, which can be recorded by the camera 112 positioned in the stomach during the intraoperative stage. The computer system 106 uses the neural network 514 to analyze the video 512 in order to identify landmarks 516 that appear in the video 512. The landmarks 516 may include features 1004 that appear in the stomach. For example, the features 1004 may include folds, flexures, scars, or polyps that appear in the stomach. In some embodiments, the neural network 514 also identifies the tool 114 that appears in the video 512. Computer System 106 can determine locations 1402 based on features 1004. Locations 1402 can be the locations of specific features 1004. For example, locations 1402 can be the locations of bends or folds in the stomach. As another example, locations 1402 can be the locations of scars, neoplasms, or polyps in the stomach. Computer System 106 can determine that locations 1402 are places where sutures should be placed or places where sutures should not be placed. For example, Computer System 106 can determine that sutures should be placed at locations 1402 of bends or folds, so that the sutures are placed along the bends or folds in accordance with the shape of the stomach, which can reduce the chances of the sutures subsequently detaching from the stomach.As another example, computer system 106 can determine that sutures should not be placed at locations 1402 of scars, neoplasms, or polyps, thus reducing the chances of the sutures injuring or damaging the stomach. Computer system 106 determines map 518 based on landmarks 516. Map 518 can be a two-dimensional or three-dimensional map of the stomach. Computer system 106 can determine the shape, topography, orientation, and / or size of the stomach from landmarks 516. Computer system 106 can also determine the positioning, shape, and arrangement of the stomach walls from locations 1402. Computer system 106 can then generate map 518 of the stomach in accordance with the determined size, topography, orientation, and / or shape. Computer System 106 can then generate overlay 520 using chart 518 and plan 508, which were developed during the preoperative stage. For example, Computer System 106 can determine a desired volume reduction from plan 508. Computer System 106 can also determine from chart 518 where sutures should be placed (e.g., at some of the locations 1402) and how many sutures should be placed to achieve the volume reduction. Computer System 106 can then generate overlay 520, which can be positioned on video 512 and / or chart 518. Overlay 520 can indicate the locations and directions of the sutures to be placed on the stomach. Computer System 106 can display video 512 and / or chart 518 with overlay 520 on display 116 or 118.The healthcare provider can refer to the overlay 520 on the video 512 or the map 518 to determine where to place the sutures. Fig. 15 illustrates an exemplary computer system 106 within the system 100 of Fig. 1. In general, Fig. 15 shows the computer system 106, which generates the overlay 520. As can be seen in Fig. 15, the computer system 106 can receive the video 512, which is recorded by the camera 112 in the stomach during the intraoperative stage. The computer system 106 can analyze the video 512 using the neural network 514 to determine landmarks 516 that appear in the stomach. The computer system 106 can also receive the plan 508, which was developed during the preoperative stage. The plan 508 can specify the desired volume reduction. The computer system 106 can also receive sensor outputs 1010 from the sensors on the tube 110 and the measured values 1008 taken based on these sensor outputs. Computer system 106 can consider the outputs of neural network 514, plan 508, and measurements 1008 to determine the locations 1502 and directions 1504 of sutures to be placed on the stomach during the intraoperative stage. For example, computer system 106 can determine specific locations 1502 for the sutures that correspond to the locations 1402 of the flexures and folds in the stomach. Computer system 106 can also determine the directions 1504 that correspond to the flexures and folds in the stomach. The locations 1502 of the sutures and the directions 1504 of the sutures can interlock or cross, causing the stomach to bind together along the flexures and folds, which can reduce the chances of the sutures detaching from the stomach in the future.As another example, computer system 106 can determine the locations 1502 so that the sutures are not placed on scars, neoplasms, or polyps in the stomach. In this way, computer system 106 avoids damaging or injuring the stomach. In some embodiments, the computer system 106 can determine the position or location of other organs adjacent to the stomach (e.g., from plan 508, which was determined during the preoperative stage, or from map 518). The computer system 106 can determine the locations 1502 so that the sutures are not placed near these adjacent organs. In this way, the computer system 106 can prevent the tool 114 from grasping the stomach wall and sections of the adjacent organ and unintentionally placing the suture on both the stomach and the adjacent organ(s) (e.g., gallbladder, intestine, etc.). In some embodiments, the computer system 106 or the neural network 514 can also determine the angle or rigidity of the stomach from the video 512 or the plan 508. The computer system 106 can determine the locations 1502 and the directions 1504 based on the angle or rigidity of the stomach. For example, the computer system 106 can determine the directions 1504 of the sutures so that the sutures align with the angle of the stomach, which can reduce the chances of the sutures detaching from the stomach. As another example, the computer system 106 can determine the locations 1502 so that the sutures are placed in less rigid sections of the stomach as opposed to more rigid sections. In this way, the computer system 106 reduces the chances of the sutures detaching from the stomach and decreases the chances of the stomach being damaged or injured by the sutures. Computer system 106 generates overlay 520 based on locations 1502 and directions 1504. Overlay 520 can indicate the locations 1502 where sutures should be placed and the directions 1504 of those sutures. Computer system 106 can then display overlay 520 on video 512 or map 518 of the stomach. The healthcare provider can view overlay 520 to determine where and in which direction sutures should be placed. Fig. 16 illustrates an exemplary computer system 106 within the system 100 of Fig. 1. In general, Fig. 16 shows the computer system 106, which updates the overlay 520 when sutures are applied to the stomach. As can be seen in Fig. 16, the computer system 106 receives the video 512, which is recorded by the camera 112 inside the stomach during the intraoperative stage. The computer system 106 uses the neural network 514 to analyze the video 512. The neural network 514 can detect the appearance of a suture 1602 in the video 512 when the suture 1602 has been applied by the healthcare provider. For example, the healthcare provider can use the tool 114 to apply the suture 1602 in accordance with the overlay 520. The neural network 514 can detect the presence of suture 1602 after suture 1602 has been applied. In certain embodiments, the neural network 514 can also detect a movement sequence 1604 of the stomach caused by the application of the suture 1602. For example, the suture 1602 can bind sections of the stomach together. The movement sequence 1604 can be the detected movement of these sections of the stomach when they are bound together. Computer system 106 can determine the positions 1502 and directions 1504 of subsequent sutures based on the detected suture 1602 and the movement sequence 1604. These positions 1502 and directions 1504 may have been determined before suture 1602 was applied. Computer system 106 can modify or adjust these positions 1502 and directions 1504 based on suture 1602 and the movement sequence 1604. For example, computer system 106 can determine that suture 1602 was slightly misaligned by the indicator in overlay 520. In response, the computer system 106 can adjust the locations 1502 and the directions 1504 of subsequent seams to account for the misalignment of the seam 1602 (e.g., to better support the seam 1602 to prevent future detachment). Computer System 106 can then update overlay 520 with the updated locations 1502 and directions 1504. Overlay 520 can then include indicators showing the updated locations 1502 and directions 1504 of subsequent sutures. The healthcare provider can review the updated overlay 520 to determine where and in which direction subsequent sutures should be placed on the stomach. In this way, Computer System 106 keeps the healthcare provider up-to-date on where and how to place subsequent sutures, increasing the likelihood of successful treatment. Fig. 17 is a flowchart of an exemplary method 1700, which is carried out in the system 100 of Fig. 1. In certain embodiments, the computer system 106 carries out the method 1700. By carrying out the method 1700, the computer system 106 determines where sutures should be placed on the stomach and generates an overlay 520 indicating the locations 1502 of those sutures. In block 1702, the computer system 106 receives the video 512 recorded by the camera 112, which is positioned in the stomach during the intraoperative stage. In block 1704, the computer system 106 determines suture locations 1502. For example, the computer system 106 can analyze the video 512 using the neural network 514 to determine landmarks 516 in the stomach. These landmarks 516 can indicate the locations 1402 of bends or folds in the stomach where sutures should be placed to reduce the chances of suture detachment. Furthermore, these landmarks 516 can indicate the locations 1402 of scars or polyps where sutures should not be placed to avoid damaging or injuring the stomach.The computer system 106 can also analyze the plan 508, developed during the preoperative stage, and sensor outputs 1010 and measurements 1008 derived from those sensor outputs 1010, to determine the suture sites 1502. For example, the plan 508 may specify a desired volume reduction. The computer system 106 can determine the number of sutures and the suture sites 1502 (e.g., in accordance with or along the specified sites 1402 of folds or flexures in the stomach) to achieve the volume reduction. In block 1706, the computer system 106 generates the overlay 520. The overlay 520 can indicate the locations 1502 where the sutures should be placed on the stomach. In some embodiments, the overlay 520 also indicates the directions 1504 of the sutures. In block 1708, the computer system 106 presents the overlay 520 on the video 512. Consequently, the display 116 or 118 can present the overlay 520 on the video 512. The healthcare provider can view the overlay 520 on the video 512 to understand where to place the sutures on the stomach to achieve a desired volume reduction during the ESG procedure. In summary, Computer System 106 supports or directs a volume reduction procedure (e.g., an ESG procedure or a revision procedure). Generally, Computer System 106 uses artificial intelligence (e.g., machine learning) during different stages of the procedure to provide information to the healthcare provider. For example, during a preoperative stage, Computer System 106 may use artificial intelligence (e.g., a neural network) to analyze a video 502 of the inside of a patient's stomach, along with a medical profile 504 for the patient, to determine a plan 508 for the procedure. The plan 508 may indicate whether the patient is a good candidate for the volume reduction procedure. The plan 508 may also specify a volume reduction for the stomach that can successfully treat the patient's medical condition. As another example, during an intraoperative stage, the computer system 106 can use a SLAM process and a neural network 514 to generate a map 518 of the patient's stomach from a video 512 of the stomach's interior and to track the position of the endoscope and suture-placement tool 114 within the map 518. The computer system 106 can display the map 518 and the position of the endoscope and tool 114 within the map 518 to prevent confusion for the healthcare provider during the procedure. Computer system 106 can also calculate a volume 1006 of the stomach using map 518. Computer system 106 can update map 518 along with the volume 1006 calculation while sutures are being placed on the stomach during the procedure. For example, computer system 106 can use neural network 514 to analyze video 512 to determine when and where a suture 1102 was placed and to determine any change in the shape, size, and / or orientation of the stomach. Computer system 106 can then update map 518 of the stomach to account for the change in shape. Computer system 106 can update the volume 1006 calculation using the updated map 518.In this way, the computer system 106 provides real-time volume calculations, making it easier for the healthcare provider to determine the progress of the procedure and when to stop or continue it. As another example, during the procedure, computer system 106 can generate an overlay 520 indicating the positioning and direction of sutures to be placed on the stomach. For instance, computer system 106 can use neural network 514 to determine where sutures should be placed in the stomach to be consistent with existing best medical practices and to achieve the volume reduction specified in preoperative plan 508. Computer system 106 then generates the overlay 520 indicating the suture placement. Computer system 106 can then position the overlay 520 (e.g., on a display 116 or 118) over a video 512 recorded from inside the stomach and / or a map 518 of the stomach, so that the healthcare provider can see on the display 116 or 118 where the sutures should be placed.For example, the overlay 520 can present visual indicators on the video 512 and / or the map 518 to indicate where the sutures should be placed. The healthcare provider can then operate a tool 114 to place a suture at a location indicated in the overlay 520. In some embodiments, the computer system 106 can use the neural network 514 to analyze the video 512 to determine the position and / or direction of the suture to be placed. The computer system 106 can then update the locations and directions of subsequent sutures in the overlay 520 to account for changes caused by the suture being placed. In this way, the computer system 106 guides the suturing process, which can advantageously reduce the number of sutures that detach from the stomach after the procedure is completed. During a postoperative stage, the computer system 106 collects data about the procedure. For example, the computer system 106 can track the number of sutures placed during the procedure, as well as their locations and directions. As another example, the computer system 106 can collect images or recordings (e.g., a preoperative image of the stomach map, an intraoperative image of the map, and a postoperative image of the map) that show the effect of the procedure on the stomach. As yet another example, the computer system 106 can collect follow-up data for the patient that demonstrates the effectiveness of the procedure (e.g., patient weight, number of sutures detached, reduction in stomach volume, etc.). In some embodiments, the computer system 106 uses the collected data to inform the artificial intelligence (e.g.,to train or update the neural network used by Computer System 106 during the preoperative and intraoperative stages. In this way, Computer System 106 uses the information from the procedure to inform subsequent volume reduction procedures. This description and the accompanying drawings, which illustrate aspects, embodiments, or modules, should not be considered restrictive. Various mechanical, compositional, structural, electrical, and operational modifications may be made without deviating from the meaning and scope of this description and the claims. In some cases, well-known circles, structures, or techniques have not been shown or described in detail so as not to obscure other features. Identical numerals in two or more figures represent the same or similar elements. This description sets forth specific details that describe some embodiments consistent with the present disclosure. Numerous specific details are set forth to provide a thorough understanding of the embodiments. However, it will be obvious to a person skilled in the art that some embodiments can be carried out without some or all of these specific details. The specific embodiments disclosed herein are intended to be illustrative, but not limiting. A person skilled in the art will recognize other elements which, although not specifically described here, are within the scope and meaning of this disclosure.Furthermore, to avoid unnecessary repetition, one or more features shown and described in connection with one embodiment may be incorporated into other embodiments unless otherwise specifically described or if the one or more features would not make an embodiment functional. Furthermore, the terminology in this description should not be restrictive. For example, spatially relative terms such as "below," "under," "lower," "above," "upper," "proximal," "distal," and the like can be used to describe a relationship of one element or feature to another, as illustrated in the figures. These spatially relative terms are intended to encompass different positions (i.e., locations) and orientations (i.e., rotational placements) of the elements or their operation, in addition to the position and orientation shown in the figures. For example, if the content of one of the figures is reversed, elements described as "below" or "underneath" other elements or features would then be "above" or "above" the other elements or features. Thus, the exemplary term "below" can encompass both positions and orientations of above and below.A device may be oriented differently (rotated by 90 degrees or in other orientations), and the spatially relative descriptors used herein may be interpreted accordingly. Likewise, descriptions of movement along and around various axes include various specific element positions and orientations. Furthermore, the singular forms "a" and "the" are intended to include the plural forms unless the context indicates otherwise. And the terms "includes," "comprehensive," "includes," and the like specify the presence of stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups.Components described as coupled can be directly coupled electrically or mechanically, or they can be indirectly coupled by means of one or more intermediate components. Elements that are described in detail with reference to one embodiment or module may, whenever practical, be incorporated into other embodiments or modules in which they are not specifically shown or described. For example, if an element is described in detail with reference to one embodiment and not with reference to a second embodiment, the element may nevertheless be claimed as being incorporated into the second embodiment.To avoid unnecessary repetition in the following description, one or more elements shown and described in connection with one embodiment or application may be incorporated into other embodiments or aspects unless specifically described otherwise, except where the one or more elements would render an embodiment or embodiments non-functional or where two or more elements provide opposing functions. In some cases, well-known procedures, processes, components and circuits were not described in detail in order to avoid unnecessarily obscuring aspects of the embodiments. This disclosure describes various devices, elements, and sections of computerized devices and elements with respect to their state in three-dimensional space. As used herein, the term "position" refers to the location of an element or a section of an element in three-dimensional space (e.g., three translational degrees of freedom along Cartesian x, y, and z coordinates). As used herein, the term "orientation" refers to the rotational placement of an element or a section of an element (three rotational degrees of freedom—e.g., roll, pitch, and yaw). As used herein, the term "shape" refers to a set of positions or orientations measured along an element.As used herein, and for a device with repositionable arms, the term “proximal” refers to a direction towards the base of the computer-controlled device along its kinematic chain, and “distal” refers to a direction away from the base along the kinematic chain. Aspects of this disclosure are described with reference to computerized systems and devices, which may include systems and devices that are teleoperated, remotely controlled, autonomous, semi-autonomous, robotic, and / or the like. Furthermore, aspects of this disclosure are described with reference to an embodiment using a medical system such as the DA VINCI SURGICAL SYSTEM or ION SYSTEM, which is marketed by Intuitive Surgical, Inc., of Sunnyvale, California. However, knowledgeable persons will understand that aspects disclosed herein may be embodied and implemented in various ways, including robotic and, where applicable, non-robotic embodiments. Techniques described with reference to surgical instruments and surgical procedures may be used in other contexts.Thus, the instruments, systems, and procedures described herein may be used for humans, animals, parts of human or animal anatomy, industrial systems, general robotic or teleoperation systems. Further examples include the use of the instruments, systems, and procedures described herein for non-medical purposes, including industrial applications, general robotic applications, the capture or manipulation of non-tissue workpieces, cosmetic enhancements, the mapping of human or animal anatomy, the collection of data from human or animal anatomy, the setup or dismantling of systems, the training of medical or non-medical personnel, and / or the like.Additional exemplary applications include use on procedures involving tissue harvested from human or animal anatomy (with or without reinsertion into a human or animal anatomy), and on human or animal cadavers. Furthermore, these techniques can also be used for medical treatment or diagnostic procedures, whether or not they involve surgical considerations. Although illustrative embodiments have been shown and described, a wide range of modifications, changes, and substitutions is considered in the foregoing disclosure, and in some cases, some features of the embodiments can be employed without the corresponding use of other features. A person skilled in the art would recognize many variations, alternatives, and modifications. Thus, the scope of the disclosure should be limited only by the following claims, and it is appropriate that the claims be interpreted broadly and in a manner consistent with the scope of the embodiments disclosed herein.
Claims
A computer system for estimating stomach volume, the computer system comprising: a memory; and a processor communicatively coupled to the memory, the processor being configured to: receive a video of the interior of a stomach; generate a map of the stomach based on the video; calculate a volume of the stomach based on the map of the stomach; detect a suture placed on the stomach during an endoscopic sleeve gastroplasty procedure that causes a change in the shape of the stomach, based on the video and using a neural network; update the map of the stomach based on the change in the shape of the stomach; and update the calculated volume of the stomach based on the update of the map of the stomach. Computer system according to claim 1, wherein generating the map of the stomach comprises using the neural network to detect a transition between an esophagus and the stomach in the video, wherein the map omits the esophagus. Computer system according to one of claims 1 to 2, wherein generating the map of the stomach comprises using the neural network to detect a transition between the stomach and a duodenum in the video, wherein the map omits the duodenum. Computer system according to one of claims 1 to 3, wherein calculating the volume comprises using the neural network to detect a feature of the stomach in a first frame of the video and to detect whether the feature appears in a second frame of the video. Computer system according to claim 4, wherein the processor is further configured to determine a measurement value for the stomach based on where the feature appears in the second frame of the video. Computer system according to claim 5, wherein the calculation of the volume of the stomach is based on the measured value. Computer system according to one of claims 5 to 6, wherein the determination of the measured value is further based on an output from a sensor of an endoscope that generates the video. Computer system according to any one of claims 1 to 7, wherein the processor is further configured to recognize in the video and using the neural network a tool that places the suture on the stomach. Computer system according to claim 8, wherein the processor is further configured to segment the tool from the video. Computer system according to any one of claims 1 to 9, wherein the processor is further configured to detect movement in a wall of the stomach in the video when the suture is applied to the stomach. Computer system according to claim 10, wherein the updating of the map of the stomach is further based on the detected movement in the wall of the stomach. Computer system according to any one of claims 1 to 11, wherein the processor is further configured to calculate a percentage change in the volume of the stomach after the suture has been applied. Computer system according to claim 12, wherein the processor is further configured to compare the percentage change with a threshold value. Computer system according to one of claims 12 to 13, wherein the processor is further configured to present a progress bar on a display indicating progress of the endoscopic sleeve gastroplasty procedure. Computer system according to claim 14, wherein the processor is further configured to update the progress bar based on the percentage change in the calculated volume of the stomach. Computer system according to any one of claims 1 to 15, wherein updating the map of the stomach comprises changing the shape of the map to represent the change in the shape of the stomach. Computer system according to any one of claims 1 to 16, wherein the processor is further configured to display the updated map of the stomach on a display over a map of the stomach that was generated prior to the endoscopic sleeve gastroplasty procedure. A method for estimating stomach volume, comprising: receiving a video of the interior of a stomach; generating a map of the stomach based on the video; calculating a stomach volume based on the stomach map; detecting a suture placed on the stomach during an endoscopic sleeve gastroplasty procedure that causes a change in the shape of the stomach, based on the video and using a neural network; updating the stomach map based on the change in the shape of the stomach; and updating the calculated stomach volume based on the update of the stomach map. Method according to claim 18, wherein generating the map of the stomach comprises using the neural network to detect a transition between an esophagus and the stomach in the video, wherein the map omits the esophagus. Method according to one of claims 18 to 19, wherein generating the map of the stomach comprises using the neural network to detect a transition between the stomach and a duodenum in the video, wherein the map omits the duodenum. Method according to any one of claims 18 to 20, wherein calculating the volume comprises using the neural network to detect a feature of the stomach in a first image of the video and to detect where the feature appears in a second image of the video. The method of claim 21, further comprising determining a measurement for the stomach based on where the feature appears in the second image of the video. Method according to claim 22, wherein the calculation of the volume of the stomach is based on the measurement. Method according to one of claims 22 to 23, wherein the determination of the measurement is further based on the output of a sensor of an endoscope that generates the video. Method according to one of claims 18 to 24, further comprising the detection of a tool applying the suture to the stomach in the video using the neural network. The method of claim 25, further comprising segmenting the tool from the video. Method according to one of claims 18 to 26, further comprising detecting movement in a wall of the stomach in the video when the suture is applied to the stomach. Method according to claim 27, wherein the updating of the map of the stomach is further based on the detected movement in the wall of the stomach. Method according to one of claims 18 to 28, further comprising calculating a percentage change in the volume of the stomach after the suture has been applied. The method according to claim 29, which further comprises comparing the percentage change with a threshold value. Method according to one of claims 29 to 30, further comprising displaying a progress indicator on a display showing the progress of the endoscopic sleeve gastrectomy procedure. The method of claim 31, further comprising updating the progress indicator based on the percentage change in the calculated volume of the stomach. Method according to any one of claims 18 to 32, wherein updating the map of the stomach comprises changing the shape of the map to represent the change in the shape of the stomach. Method according to any one of claims 18 to 33, further comprising overlaying the updated map of the stomach onto a map of the stomach created prior to the endoscopic sleeve gastrectomy procedure on a display. Non-volatile, machine-readable medium storing instructions for estimating stomach volume which, when executed by a processor, cause the processor to: perform the method according to any one of claims 18 to 34.