A method and system for intelligently monitoring blockage of a cerebral fluid drainage tube
By using a deep learning model with a spatial-temporal dual-stream fusion architecture to monitor the blockage status of cerebrospinal fluid drainage tubes in real time, the subjective and timeliness issues caused by reliance on manual observation in existing technologies are resolved, enabling early identification and timely warning, and reducing the burden on medical staff.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LANZHOU UNIV SECOND HOSPITAL
- Filing Date
- 2026-03-18
- Publication Date
- 2026-07-14
AI Technical Summary
In the current technology, monitoring of cerebral effusion drainage tube blockage relies on manual observation, which has problems such as strong subjectivity, poor timeliness, delayed early warning and large workload. Moreover, the existing equipment is not sensitive to early blockage and lacks non-contact real-time monitoring solutions.
A deep learning model based on a spatial-temporal dual-stream fusion architecture is adopted to obtain the regional features of the drainage tube through video stream, identify the sludge status in the drainage tube, including unobstructed, flocculent, intermediate and severe sludge, and use embedded AI devices for real-time monitoring and display the results through a human-computer interaction module.
It enables non-contact, real-time, and precise monitoring of cerebrospinal fluid drainage tube blockage, allowing for early identification of flocculent material, reducing the burden on medical staff, providing timely warnings, and avoiding missed intervention opportunities due to early blockage.
Smart Images

Figure CN122391940A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of medical equipment monitoring and artificial intelligence technology, and in particular to an intelligent monitoring method and system for clogging of cerebrospinal fluid drainage tubes. Background Technology
[0002] Hydrocephalus is divided into two types: obstructive hydrocephalus and hydrocephalus caused by secretory changes. Obstructive hydrocephalus can cause ataxia, dementia, and urinary and fecal incontinence. In severe cases, external ventricular drainage can be used to improve cerebrospinal fluid circulation and intracranial pressure, thus alleviating symptoms caused by increased intracranial pressure due to hydrocephalus. Therefore, external ventricular drainage is primarily used to treat hydrocephalus, aiming to improve symptoms of ataxia, dementia, and urinary and fecal incontinence.
[0003] During the drainage of cerebrospinal fluid, blockage of the drainage tube due to the aggregation of blood cells, proteins, fibrin, and other fibrous materials is a common and dangerous complication. Currently, clinical practice mainly relies on medical staff to periodically observe the characteristics, flow rate, and tube transparency of the drainage fluid, which presents the following challenges: Highly subjective: Relies on personal experience, with varying judgment standards; Poor timeliness: It cannot achieve 24-hour uninterrupted monitoring, making it difficult to detect early and slowly forming blockages; Delayed warning: It is usually only discovered when drainage has completely stopped or the patient develops clinical symptoms, thus missing the opportunity for early intervention; Heavy workload: Increased the burden of rounds for medical staff.
[0004] While existing technologies utilize pressure sensors to monitor flow changes, they are insensitive to early and intermediate blockages (such as flocculent adhesion) and involve invasive or contact-based measurements. Currently, there is a lack of automated solutions capable of non-contact, real-time, and accurate identification of early flocculent formation and blockage trends within pipes. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and to design and implement an intelligent monitoring method and system for cerebral effusion drainage tube blockage.
[0006] This invention is achieved through the following technical solution: This invention provides an intelligent monitoring method for cerebrospinal fluid drainage tube blockage: A video stream containing key segments of the drainage tube is acquired. This video stream is then input into a deep learning model based on a spatial-temporal dual-stream fusion architecture. The model first extracts the drainage tube region from the video frames, and then extracts in parallel spatial static features representing the texture, color, and shape of the flocculent material in the sequence of images of the drainage tube region, as well as temporal dynamic features representing slowed flow and stagnant flocculent movement. Through feature fusion and a classifier, four states are identified: unobstructed flow, flocculent adhesion, moderate blockage, and severe blockage. Finally, the identification results are displayed through a human-computer interaction module, enabling medical personnel to promptly obtain information on the flocculent blockage status within the drainage tube.
[0007] In the above technical solution, the construction and training of the deep learning model includes the following steps: Step 1: Collect video data of the cerebrospinal fluid drainage tube under different blockage conditions, and label the blockage condition of each video frame image to construct a video frame image dataset for training a deep learning model. Step 2: Build a deep learning model and train it using the dataset from Step 1; The architecture of the deep learning model includes a drainage tube region extraction module, a spatial flow network, a temporal flow network, and a feature fusion and classifier. The drainage tube region extraction module is used to automatically identify and segment the drainage tube region image in each frame of the video segment input to the deep learning model; The spatial flow network is used to extract features from the drainage tube region image in each frame of the video clip after the drainage tube region extraction module is processed, and to extract the spatial static features of texture, color and shape related to the flocculent material. The temporal flow network includes a grayscale processing module, an optical flow graph calculation module, and a temporal convolutional network. First, the grayscale processing module converts the drainage tube region image in each frame of the video segment processed by the drainage tube region extraction module into a grayscale image. Then, the optical flow graph calculation module calculates the optical flow graph between consecutive frames to characterize the fluid flow and flocculent motion information within the drainage tube. The optical flow graph is input into the temporal convolutional network, which captures the temporal dynamic features of flow velocity slowdown and flocculent oscillation stagnation. The feature fusion and classifier is used to fuse the spatial static features output by the spatial flow network and the temporal dynamic features output by the temporal flow network in a multimodal manner. The fused features are then input into the temporal aggregation module to learn the evolution of the clogging state within the entire time window. Finally, through a fully connected layer and a Softmax layer, the probabilities of four categories are output: unobstructed, flocculent, intermediate clogging, and severe clogging.
[0008] In the above technical solution, image annotation includes the following operations: For consecutive video frames, each image is labeled with a category label, corresponding to four categories: unobstructed, flocculated, moderate blockage, and severe blockage. For consecutive video frames, mark the drainage tube region and the outline of the flocculent material contained in the drainage tube region in each image; For consecutive video frames, the clogging evolution process of flocculent material is quantitatively labeled by the coverage of the pipe diameter; and correspondingly, the changes in the liquid flow rate in the drainage tube are quantitatively labeled.
[0009] In the above technical solution, the drainage tube region extraction module uses a lightweight segmentation model based on U-Net.
[0010] In the above technical solution, the spatial flow network adopts a lightweight CNN network.
[0011] In the above technical solution, the backbone feature extraction function of the spatial flow network is expressed as: ; In the formula, : Represents the extracted spatial static features of the t-th frame image; : Represents a convolutional neural network function; : The image of the drainage tube region in the t-th frame of the video clip after processing by the drainage tube region extraction module; : Represents the convolution kernel weight tensor; : Represents the bias vector of the convolutional layer.
[0012] In the above technical solution, for optical flow calculation in the time-domain flow network, the Farneback Optical Flow dense optical flow algorithm is used to calculate the optical flow field tensors in the horizontal and vertical directions, which are used as optical flow maps to characterize the motion information of the liquid flow and flocculent material in the drainage tube; as shown below: ; In the formula, FarnebackOpticalFlow represents the dense optical flow algorithm; : Represents the optical flow field tensor, which includes the horizontal displacement components of pixels. Vertical displacement components of pixels ; : The image of the drainage tube region in the t-th frame of the video clip after processing by the drainage tube region extraction module; : The image of the drainage tube region in the (t+1)th frame of the video clip after processing by the drainage tube region extraction module; : indicates the Gaussian smoothing standard deviation; levels: indicates the number of pyramid levels, which is a parameter for multi-scale optical flow calculation; winsize: indicates the neighborhood size for local optical flow calculation.
[0013] Another aspect of the present invention provides a system for implementing the above-mentioned intelligent monitoring method for clogging of cerebrospinal fluid drainage tubes, comprising: an image acquisition module, an edge computing module, and a human-computer interaction module; The image acquisition module uses an industrial RGB camera to acquire video streams containing key segments of the drainage tube. The edge computing module uses an embedded AI computing device to run the deep learning model used to identify blockages in the cerebrospinal fluid drainage tube. The human-computer interaction module is used to display the output results of the edge computing module; furthermore, the human-computer interaction module provides corresponding alarms of different levels based on the four types of states output by the edge computing module.
[0014] The advantages and beneficial effects of this invention are as follows: This invention, by integrating spatiotemporal features, can intelligently and accurately identify four states of cerebrospinal fluid drainage tubes: "patent," "flocculated," "intermediate blockage," and "severe blockage." Based on the identified state, it issues corresponding alarms of different levels, enabling medical staff to promptly detect the extent of flocculent blockage within the drainage tube. It can also accurately identify early-stage flocculent deposits, allowing for preventative measures. Furthermore, it enables 24 / 7 unattended monitoring, significantly reducing the burden on medical staff. This invention does not affect existing drainage systems and poses no risk of infection. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is an architecture diagram of the deep learning model of the present invention. Detailed Implementation
[0017] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the invention. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the invention for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0018] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0019] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0020] To overcome the problems of relying on medical staff to visually observe the drainage tube periodically to determine the blockage of flocculent material during cerebrospinal fluid drainage, which suffers from high subjectivity, poor timeliness, delayed early warning, and heavy workload, this invention provides an intelligent monitoring method and system for cerebrospinal fluid drainage tube blockage. This method acquires a video stream containing key segments of the drainage tube (such as drip chambers or transparent tube segments) through an image acquisition module. The video stream is then input into a specially designed deep learning model based on a spatial-temporal dual-stream fusion architecture. This model first extracts the drainage tube region (i.e., the region of interest) from the video frames, and then extracts spatial static features (such as texture, color, and shape) and temporal dynamic features (such as flocculent material swaying and fluid flow rate changes) from the sequence of images of the drainage tube region in parallel. Through feature fusion and a classifier, it identifies and outputs four states: "unobstructed," "flocculent material attached," "moderate blockage," and "severe blockage." Finally, the identification results are displayed through a human-computer interaction module, enabling medical staff to promptly obtain information on the flocculent material blockage status of the drainage tube.
[0021] Specifically, the intelligent monitoring method for clogging of cerebrospinal fluid drainage tubes provided by this invention includes the following steps: Step 1: Collect video data of the cerebrospinal fluid drainage tube under different blockage conditions, and label the blockage condition of each video frame image to construct a video frame image dataset for subsequent training and validation of deep learning models.
[0022] Video data can be acquired in the following two ways: 1. In a laboratory environment, a simulated intracranial effusion drainage system was built. Different concentrations of blood, cerebrospinal fluid, protein solution, etc. were used to simulate the entire process of the drainage tube from unobstructed to severely blocked. The drainage tube was recorded, and the blockage of each video frame was finely annotated. Second, in accordance with ethical guidelines and with the authorization of the clinical patients, real videos of the cerebrospinal fluid drainage tubes of the clinical patients were collected (the faces and privacy information of the clinical patients were completely desensitized), and several senior medical experts meticulously annotated the blockage of each video frame.
[0023] Furthermore, to address the scarcity of medical data, techniques such as color jitter (simulating different lighting conditions), Gaussian noise (simulating image noise), random rotation / scaling (simulating minute changes in installation angle), and simulating different backgrounds can be employed to enrich the dataset and improve the robustness of the training model.
[0024] To elaborate further, the specific steps for annotating images are as follows: 1. Define the label category (tag) Four states are predefined, corresponding to the four output categories of the deep learning model during subsequent training: ① Unobstructed: No visible flocculent material in the drainage tube, smooth fluid flow, and clear fluid surface. ② Flocculent Adhesion: A small amount of flocculent, filamentous, or film-like adhesion appears on the inner wall of the tube, but fluid can still pass through, and the flow rate may not be significantly reduced. ③ Intermediate Blockage: Increased accumulation of flocculent material, forming a network or clumps, partially blocking the lumen, obstructing fluid flow, significantly reducing the flow rate, and possibly accompanied by air bubbles. ④ Severe Blockage: The lumen is severely blocked, with virtually no fluid flow, and the tube is filled with blood clots or dense flocculent material. 2. Labeling method a) Image-level classification annotation: For consecutive video frames, each image is labeled with an integer label (0, 1, 2, 3), corresponding to the four categories mentioned above; b) Pixel-level segmentation annotation: For consecutive video frames, the outlines of the drainage tube region and the flocculent material contained within it are annotated in each image. Specifically, for scattered flocculent material: the outline of each flocculent material is annotated individually; for network-like flocculent material: the entire network region is annotated; for clumps and agglomerates: the overall outline of the agglomerate is annotated. The purpose is to: train an auxiliary segmentation model (such as U-Net), automatically extract the drainage tube region, and provide supervision signals to the model, helping it learn the texture and shape features of the flocculent material. c) Timing evolution annotation: For consecutive video frames, the clogging evolution process of flocculants is quantitatively labeled by the coverage rate of the pipe diameter: for example, the flocculants first adhere to the pipe wall, covering 25% of the pipe diameter; then the flocculants connect to form a network structure, covering 40% of the pipe diameter; finally, the lumen is completely blocked, covering 100% of the pipe diameter. Correspondingly, the changes in the fluid flow rate in the drainage tube are also quantitatively labeled. This provides a supervisory signal to the model, helping it learn the clogging evolution of flocculants and understand the corresponding changes in fluid flow rate. 3. Annotation tools General-purpose image annotation tools can be used, such as LabelImg (rectangle), LabelMe (polygon), and VIA (VGGImage Annotator). For segmentation annotation, specialized tools such as CVAT and EISeg are more efficient.
[0025] Step 2: Construct a deep learning model for identifying blockage of the cerebrospinal fluid drainage tube, and train and validate it using the dataset from Step 1.
[0026] The input to the deep learning model is a video clip containing T consecutive frames, each frame being an RGB image with dimensions H x W x 3. The output of the deep learning model is a four-dimensional vector representing the probabilities of four categories: unobstructed, flocculated, moderately blocked, and severely blocked.
[0027] The architecture of the deep learning model is as follows: it adopts a spatial-temporal dual-stream fusion architecture, see appendix. Figure 1 Specifically, it includes: a drainage tube region extraction module (also known as a preprocessing module or region of interest extraction module), a spatial flow network, a temporal flow network, and a feature fusion and classifier.
[0028] The drainage tube region extraction module uses a lightweight segmentation model based on U-Net to automatically identify and segment the drainage tube region image in each frame of the video segment input to the deep learning model, thereby effectively eliminating background interference.
[0029] The Spatial Flow Network employs a lightweight CNN network (such as EfficientNet-B0 or MobileNetV3) to extract features from the drainage tube region images in each frame of the video clip processed by the drainage tube region extraction module, extracting spatial static features such as texture, color, and shape related to the flocculated material.
[0030] The temporal flow network includes a grayscale processing module, an optical flow graph calculation module, and a temporal convolutional network (TCN). First, the grayscale processing module converts the drainage tube region image in each frame of the video segment processed by the drainage tube region extraction module into a grayscale image (the video segment here is the same video segment input to the spatial flow network). Then, the optical flow graph calculation module calculates the optical flow graph between consecutive frames to represent the fluid flow and flocculent motion information in the drainage tube. The optical flow graph is input into the temporal convolutional network (TCN), which captures temporal dynamic features such as flow rate slowdown and stagnant flocculent oscillation.
[0031] The feature fusion and classifier is used to perform multimodal fusion of the spatial static features output by the spatial flow network and the temporal dynamic features output by the temporal flow network (which can be achieved by concatenation, weighted summation, or attention-based fusion). The fused features are then input into a temporal aggregation module (such as Transformer Encoder or Bi-LSTM) to learn the evolution of clogging status within the entire time window. Finally, through fully connected layers and Softmax layers, the probabilities of four categories are output: unobstructed, flocculent, intermediate clogging, and severe clogging.
[0032] Furthermore, the backbone feature extraction function of the spatial flow network is expressed as: ; In the formula, : Represents the extracted spatial static features of the t-th frame image; : Represents a convolutional neural network function, using the EfficientNet-B0 structure; : The image of the drainage tube region in the t-th frame of the video clip after processing by the drainage tube region extraction module; : Represents the convolution kernel weight tensor; : Represents the bias vector of the convolutional layer.
[0033] Furthermore, for optical flow calculation in the time-domain flow network, the Farneback Optical Flow dense optical flow algorithm is used to calculate the optical flow field tensors in the horizontal and vertical directions, which are then used as optical flow maps to characterize the fluid flow and flocculent motion information within the drainage tube; as shown below: ; In the formula, FarnebackOpticalFlow represents the dense optical flow algorithm; : Represents the optical flow field tensor, which includes horizontal displacement components. (i.e., the amount of pixel movement in the x-direction) and vertical displacement component (That is, the amount of movement of a pixel in the y-direction); : The image of the drainage tube region in the t-th frame of the video clip after processing by the drainage tube region extraction module; : The image of the drainage tube region in the (t+1)th frame of the video clip after processing by the drainage tube region extraction module; : indicates the Gaussian smoothing standard deviation; levels: indicates the number of pyramid levels, which is a parameter for multi-scale optical flow calculation; winsize: indicates the window size, i.e. the size of the neighborhood for local optical flow calculation.
[0034] Step 3: Acquire a video stream containing key segments of the drainage tube (such as drip chambers or transparent tube segments) through the image acquisition module; input the video stream into the deep learning model constructed in Step 2 for identifying the blockage of the cerebrospinal fluid drainage tube. This model first extracts the drainage tube region (i.e., region of interest) from the video frames, then extracts the spatial static features and temporal dynamic features from the sequence images of the drainage tube region in parallel, and then performs feature fusion and classification to identify four states: unobstructed, flocculent, moderate blockage, and severe blockage; finally, display the model's recognition results through the human-computer interaction module so that medical staff can promptly learn about the blockage of flocculent material in the drainage tube.
[0035] Furthermore, the system for realizing the above-mentioned intelligent monitoring method for cerebral effusion drainage tube blockage includes: an image acquisition module, an edge computing module, and a human-computer interaction module.
[0036] The image acquisition module employs a fixed-focal-length, high-resolution (e.g., 1080p or higher) industrial RGB camera to ensure clear images. Preferably, it is equipped with an LED fill light to provide stable and uniform illumination, eliminate reflections, and highlight details within the tube. Furthermore, the camera and fill light are integrated into an adjustable mounting bracket, vertically or at a slight angle, aimed at the drainage tube area.
[0037] The edge computing module, employing an embedded AI computing device deployed at the patient's bedside, is responsible for running the deep learning model used to identify blockages in the cerebrospinal fluid drainage tube. Its advantages include low latency, local data processing to ensure privacy, and no reliance on unstable networks.
[0038] The human-computer interaction module is used to display the calculation results of the edge computing module (i.e., the calculation identifies four states: unobstructed, flocculated, moderate blockage, and severe blockage), enabling medical staff to promptly obtain information on the flocculated blockage status within the drainage tube. The human-computer interaction module uses a human-computer interaction screen, preferably a mobile phone, to promptly send the identification results of the flocculated blockage status within the drainage tube to the medical staff's mobile phone. Furthermore, the human-computer interaction module generates corresponding alarms of different levels based on the four identified states. For example, a primary alarm is triggered when flocculated material is identified; a secondary important alarm is triggered when moderate blockage is identified; and a tertiary emergency alarm is triggered when severe blockage is identified.
[0039] The embodiments of the present invention have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of the invention. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of the invention, and all such substitutions and modifications should fall within the scope of the invention.
Claims
1. A method for intelligent monitoring of blockage in a cerebrospinal fluid drainage tube, characterized in that: A video stream containing key segments of the drainage tube is acquired and input into a deep learning model based on a spatial-temporal dual-stream fusion architecture. This model first extracts the drainage tube region from the video frames, and then extracts in parallel the spatial static features representing the texture, color, and shape of the flocculent material in the sequence of images of the drainage tube region, as well as the temporal dynamic features representing the slowdown of flow velocity and the stagnation of flocculent material. Then, through feature fusion and a classifier, four states are identified: unobstructed flow, flocculent material adhesion, intermediate blockage, and severe blockage. Finally, the identification results are displayed through a human-computer interaction module.
2. The intelligent monitoring method for clogging of the cerebrospinal fluid drainage tube according to claim 1, characterized in that: The construction and training of the deep learning model includes the following steps: Step 1: Collect video data of the cerebrospinal fluid drainage tube under different blockage conditions, and label the blockage condition of each video frame image to construct a video frame image dataset for training a deep learning model; Step 2: Build a deep learning model and train it using the dataset from Step 1; The architecture of the deep learning model includes a drainage tube region extraction module, a spatial flow network, a temporal flow network, and a feature fusion and classifier. The drainage tube region extraction module is used to automatically identify and segment the drainage tube region image in each frame of the video segment input to the deep learning model; The spatial flow network is used to extract features from the drainage tube region image in each frame of the video clip after the drainage tube region extraction module is processed, and to extract the spatial static features of texture, color and shape related to the flocculent material. The temporal flow network includes a grayscale processing module, an optical flow graph calculation module, and a temporal convolutional network. First, the grayscale processing module converts the drainage tube region image in each frame of the video segment processed by the drainage tube region extraction module into a grayscale image. Then, the optical flow graph calculation module calculates the optical flow graph between consecutive frames to characterize the fluid flow and flocculent motion information within the drainage tube. The optical flow graph is input into the temporal convolutional network, which captures the temporal dynamic features of flow velocity slowdown and flocculent oscillation stagnation. The feature fusion and classifier is used to fuse the spatial static features output by the spatial flow network and the temporal dynamic features output by the temporal flow network in a multimodal manner. The fused features are then input into the temporal aggregation module to learn the evolution of the clogging state within the entire time window. Finally, through a fully connected layer and a Softmax layer, the probabilities of four categories are output: unobstructed, flocculent, intermediate clogging, and severe clogging.
3. The intelligent monitoring method for cerebral effusion drainage tube blockage according to claim 2, characterized in that: Image annotation includes the following operations: For consecutive video frames, each image is labeled with a category label, corresponding to four categories: unobstructed, flocculated, moderate blockage, and severe blockage. For consecutive video frames, mark the drainage tube region and the outline of the flocculent material contained in the drainage tube region in each image; For consecutive video frames, the clogging evolution process of flocculent material is quantitatively labeled by the coverage of the pipe diameter; and correspondingly, the changes in the liquid flow rate in the drainage tube are quantitatively labeled.
4. The intelligent monitoring method for occlusion of cerebrospinal fluid drainage tube according to claim 2, characterized in that: The drainage tube region extraction module uses a lightweight segmentation model based on U-Net.
5. The intelligent monitoring method for occlusion of cerebrospinal fluid drainage tube according to claim 2, characterized in that: The spatial flow network employs a lightweight CNN network.
6. The intelligent monitoring method for occlusion of cerebrospinal fluid drainage tube according to claim 2, characterized in that: The backbone feature extraction function of the spatial flow network is expressed as: ; In the formula, : Represents the extracted spatial static features of the t-th frame image; : Represents a convolutional neural network function; : The image of the drainage tube region in the t-th frame of the video clip after processing by the drainage tube region extraction module; : Represents the convolution kernel weight tensor; : Represents the bias vector of the convolutional layer.
7. The intelligent monitoring method for clogging of the cerebrospinal fluid drainage tube according to claim 2, characterized in that: For optical flow calculations in the time-domain flow network, the Farneback Optical Flow dense optical flow algorithm is used to calculate the optical flow field tensors in the horizontal and vertical directions, which are then used as optical flow maps to characterize the motion information of the liquid flow and flocculent material within the drainage tube; as shown below: ; In the formula, FarnebackOpticalFlow represents the dense optical flow algorithm; : Represents the optical flow field tensor, which includes the horizontal displacement components of the pixels. Vertical displacement components of pixels ; : The image of the drainage tube region in the t-th frame of the video clip after processing by the drainage tube region extraction module; : The image of the drainage tube region in the (t+1)th frame of the video clip after processing by the drainage tube region extraction module; : indicates the Gaussian smoothing standard deviation; levels: indicates the number of pyramid levels, which is a parameter for multi-scale optical flow calculation; winsize: indicates the neighborhood size for local optical flow calculation.
8. A system for implementing the intelligent monitoring method for clogging of cerebrospinal fluid drainage tubes as described in claim 1, characterized in that, include: Image acquisition module, edge computing module, and human-computer interaction module; The image acquisition module uses an industrial RGB camera to acquire video streams containing key segments of the drainage tube. The edge computing module uses an embedded AI computing device to run the deep learning model used to identify blockages in the cerebrospinal fluid drainage tube. The human-computer interaction module is used to display the output results of the edge computing module and to generate alarms of different levels according to the four types of states output by the edge computing module.