Carpal tunnel syndrome prediction method and device based on B-type ultrasonic video
By employing an automated prediction method based on B-mode ultrasound video, utilizing video segmentation and support vector machine classification models, this method addresses the issues of strong subjectivity, time-consuming and labor-intensive processes, and insufficient standardization in existing ultrasound prediction methods. It achieves efficient and accurate prediction of carpal tunnel syndrome, reduces the complexity of doctor operations, and improves the interpretability and consistency of prediction results.
Patent Information
- Application Number
- CN202410965064.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-07-18
AI Technical Summary
Existing ultrasound methods for predicting carpal tunnel syndrome rely on manual operation by doctors, which is highly subjective, time-consuming, labor-intensive, and lacks standardization. Automated prediction technologies lack the utilization of global information from ultrasound videos, resulting in insufficient prediction accuracy and poor interpretability.
An automated prediction method based on B-mode ultrasound video is adopted. The median nerve region is automatically segmented through a video segmentation model. Multi-scale feature extraction is performed by combining encoder and decoder modules, and a support vector machine classification model is used for prediction, so as to achieve automatic and accurate prediction of carpal tunnel syndrome.
It improves the efficiency and consistency of predictions, reduces the workload of doctors, provides a scientific and objective basis for predictions, enhances the accuracy and interpretability of prediction results, and ensures the standardization of the prediction process.
Smart Images

Figure CN118983075A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical imaging technology, and in particular to a method and device for predicting carpal tunnel syndrome based on B-type ultrasound video. Background Art
[0002] Carpal tunnel syndrome is one of the most common peripheral neuropathy, with the main feature being compression of the median nerve at the wrist. The traditional method for predicting carpal tunnel syndrome is electrophysiological prediction examination, which, although widely regarded as the gold standard for prediction, has practical problems such as high cost, time-consuming and invasive nature.
[0003] In recent years, with the development of ultrasound technology, especially the innovation of high-frequency ultrasound transducers, the application of ultrasound technology in the prediction of carpal tunnel syndrome has gradually increased. Ultrasound prediction has the advantages of being non-invasive, simple to operate, and radiation-free. It can provide a basis for prediction by measuring parameters such as the cross-sectional area and swelling rate of the median nerve.
[0004] However, existing ultrasound prediction methods usually require doctors to manually find the frames with the largest and smallest cross-sectional areas of the median nerve in the ultrasound video, and manually outline and measure the ROI (region of interest). This method is not only time-consuming and laborious, but the prediction results are highly dependent on the doctor's experience, and there is a large degree of subjectivity and uncertainty. In addition, there are currently no clear standards to guide the specific operating steps and evaluation criteria for ultrasound prediction of carpal tunnel syndrome, resulting in poor standardization and consistency of the prediction process and results. Although there are some automated prediction technologies based on deep learning, these technologies are usually based on the classification of static images, requiring doctors to manually select specific frames, and lack the use of global information in ultrasound videos. This may lead to insufficient prediction accuracy, and the interpretability of these automatic prediction systems is also insufficient. Summary of the invention
[0005] The technical problem to be solved by the present application is to provide a method and device for predicting carpal tunnel syndrome based on B-type ultrasound video in view of the shortcomings of the existing technology, so as to solve the existing problem of how to provide an efficient and automated method for predicting carpal tunnel syndrome to reduce the subjectivity and uncertainty of the prediction.
[0006] In order to solve the above technical problems, the first aspect of the embodiment of the present application provides a method for predicting carpal tunnel syndrome based on B-type ultrasound video, the method comprising:
[0007] Acquire B-mode ultrasound video of the target carpal tunnel;
[0008] Inputting the target ultrasound video into a trained video segmentation model, determining the median nerve area of the carpal tunnel of each video frame in the target carpal tunnel B-type ultrasound video through the video segmentation model, and determining a target prediction parameter based on the median nerve area of the carpal tunnel of each video frame;
[0009] The target prediction parameters are input into a trained carpal tunnel syndrome classification model, and the prediction result of the target carpal tunnel B-type ultrasound video is determined by the carpal tunnel syndrome classification model.
[0010] In an implementable manner of this embodiment, the process of acquiring the target carpal tunnel B-type ultrasound video specifically includes:
[0011] Obtain B-mode ultrasound video of the carpal tunnel;
[0012] A preprocessing operation is performed on the carpal tunnel B-type ultrasound video to obtain a target carpal tunnel B-type ultrasound video, wherein the preprocessing operation includes a desensitization operation and / or a pre-cropping operation.
[0013] In an implementable manner of this embodiment, the pre-cropping operation includes:
[0014] The position range in which the median nerve area appears is determined based on all video frames in the carpal tunnel B-type ultrasound video, and each frame of the carpal tunnel B-type ultrasound video is cropped based on the position range, wherein the position range includes the coordinates of the upper left corner, upper right corner, lower left corner and lower right corner of the video frame.
[0015] In an implementable manner of this embodiment, the process of determining the target prediction parameter based on the median nerve area of the carpal tunnel of each video frame specifically includes:
[0016] Determine a first prediction parameter based on the median nerve region of the carpal tunnel of each video frame, wherein the first prediction parameter includes: the circumference, cross-sectional area, anterior-posterior diameter, and flattening rate of the median nerve;
[0017] Target prediction parameters are determined based on the first prediction parameters, and the target prediction parameters include: maximum-minimum circumference ratio, swelling rate, maximum flattening rate, maximum-minimum anterior-posterior diameter ratio, and maximum cross-sectional area.
[0018] In one implementation of this embodiment, the trained video segmentation model includes an encoder module, a decoder module and a target perceptron module, the encoder module includes several Transformer blocks, the Transformer blocks include several encoding layers and merging layers, the encoding layer includes a self-attention layer and a hybrid feedforward neural network layer, and the decoder module includes an upsampling layer and a multi-layer perceptron layer.
[0019] In an implementable manner of this embodiment, the process of determining the median nerve area of the carpal tunnel of each video frame in the target carpal tunnel B-type ultrasound video by using the video segmentation model specifically includes:
[0020] Acquire an initial image of each video frame in the target carpal tunnel B-type ultrasound video, and overlap and crop the initial image to obtain a plurality of image blocks with preset resolutions;
[0021] Converting the plurality of image blocks of preset resolutions into first feature vectors corresponding to the image blocks through a convolution operation;
[0022] Inputting the first feature vector into the encoder module for processing to obtain a second feature vector, where the second feature vector is a multi-scale image feature vector;
[0023] Performing an upsampling operation and a concatenation operation on the second feature vector based on the upsampling layer of the decoder module to obtain a third feature vector;
[0024] The target sensor module performs fusion processing on the third feature vector to obtain the median nerve area of the carpal tunnel in each video frame in the target carpal tunnel B-type ultrasound video.
[0025] In an implementable manner of this embodiment, the process of performing upsampling and concatenating operations on the second feature vector based on the upsampling module to obtain a third feature vector specifically includes:
[0026] The multi-layer perceptron layer of the decoder module performs feature fusion processing on the second feature vector to obtain a low-dimensional feature vector;
[0027] Performing linear difference processing on the low-dimensional feature vector to obtain a third feature vector.
[0028] The second aspect of the present application provides an automatic prediction device for carpal tunnel syndrome based on B-type ultrasound video, and the automatic prediction device for carpal tunnel syndrome based on B-type ultrasound video specifically includes:
[0029] A video acquisition module, used to acquire a B-type ultrasound video of a target carpal tunnel;
[0030] a parameter determination module, configured to input the target ultrasound video into a trained video segmentation model, determine the median nerve area of the carpal tunnel of each video frame in the target carpal tunnel B-type ultrasound video through the video segmentation model, and determine the target prediction parameter based on the median nerve area of the carpal tunnel of each video frame;
[0031] The prediction module is used to input the target prediction parameters into a trained carpal tunnel syndrome classification model, and determine the prediction result of the target carpal tunnel B-type ultrasound video through the carpal tunnel syndrome classification model.
[0032] A third aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in any of the above-described methods for predicting carpal tunnel syndrome based on B-type ultrasound video.
[0033] A fourth aspect of the present application provides a terminal device, comprising: a processor, a memory and a communication bus; the memory stores a computer-readable program that can be executed by the processor;
[0034] The communication bus realizes the connection and communication between the processor and the memory;
[0035] When the processor executes the computer-readable program, the steps in any one of the above-mentioned methods for predicting carpal tunnel syndrome based on B-type ultrasound video are implemented.
[0036] Beneficial effects:
[0037] Compared with the prior art, the present application provides a method and device for predicting carpal tunnel syndrome based on B-type ultrasound video. The method obtains the target carpal tunnel B-type ultrasound video through a video acquisition module, providing a non-invasive, low-cost, and easy-to-obtain carpal tunnel syndrome prediction data source, thereby solving the problem of high invasiveness and high cost of traditional electrophysiological examinations.
[0038] Secondly, the method automatically segments the median nerve region of the carpal tunnel in each video frame by inputting the target ultrasound video into a trained video segmentation model, thereby achieving automatic and accurate segmentation of the median nerve region and improving the consistency and efficiency of prediction, thereby solving the problem of strong subjectivity, time-consuming and labor-intensive manual delineation of ROI in traditional methods;
[0039] Furthermore, the method automatically determines target prediction parameters including circumference, cross-sectional area, anteroposterior diameter, flattening rate, etc. based on the median nerve area of the carpal tunnel of each video frame, and provides a quantitative and standardized prediction parameter, thereby improving the scientificity and objectivity of the prediction, thereby solving the problem of high subjectivity and insufficient accuracy of manual measurement parameters in the prior art.
[0040] Thirdly, the method automatically generates prediction results by inputting target prediction parameters into a trained carpal tunnel syndrome classification model, thereby achieving automated and accurate prediction of carpal tunnel syndrome, thereby improving the consistency and repeatability of the prediction;
[0041] In addition, the method also ensures the accuracy of feature extraction by using encoder modules and decoder modules to perform multi-scale feature extraction and upsampling splicing, thereby solving the problems of information loss and insufficient precision in the feature extraction process. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without inventive work.
[0043] Figure 1 A flowchart of a method for predicting carpal tunnel syndrome based on B-type ultrasound video provided in this application.
[0044] Figure 2 A flow chart of a method for predicting carpal tunnel syndrome based on B-type ultrasound video provided in this application.
[0045] Figure 3 This is a structural diagram of a video segmentation model of a carpal tunnel syndrome prediction method based on B-type ultrasound video provided in this application.
[0046] Figure 4 This is a structural principle diagram of a carpal tunnel syndrome prediction method based on B-type ultrasound video provided in this application.
[0047] Figure 5 This is a schematic diagram of the structure of the terminal device provided in this application. DETAILED DESCRIPTION
[0048] The present application provides a method and device for predicting carpal tunnel syndrome based on B-type ultrasound video. In order to make the purpose, technical solution and effect of the present application clearer and more specific, the present application is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0050] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0051] It should be understood that the sequence numbers and sizes of the steps in this embodiment do not mean the order of execution. The execution order of each process is determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0052] The existing technology has made significant progress in the prediction of carpal tunnel syndrome. Although the traditional electrophysiological prediction examination method is widely regarded as the gold standard for prediction, it has some practical problems, such as high cost, time-consuming and invasive process. These problems have greatly limited the popularity and application of electrophysiological prediction.
[0053] In recent years, with the development of ultrasound technology, especially the innovation of high-frequency ultrasound transducers, ultrasound technology has been widely used in the prediction of carpal tunnel syndrome. Ultrasound technology has the advantages of being non-invasive, simple to operate, and radiation-free. It can provide a basis for prediction by measuring parameters such as the cross-sectional area and swelling rate of the median nerve. However, although ultrasound prediction has solved the invasiveness and high cost of traditional electrophysiological examinations to a certain extent, the existing ultrasound prediction technology still has some shortcomings.
[0054] Existing ultrasound prediction methods usually require doctors to manually find the frames with the largest and smallest cross-sectional areas of the median nerve in the ultrasound video, and manually outline and measure the ROI (region of interest). This method is not only time-consuming and laborious, but the prediction results are highly dependent on the doctor's experience, and there is a large degree of subjectivity and uncertainty. In addition, there are currently no clear standards to guide the specific operating steps and evaluation criteria for ultrasound prediction of carpal tunnel syndrome, resulting in poor standardization and consistency of the prediction process and results.
[0055] In order to overcome these problems, some automated prediction technologies based on deep learning have been proposed. These technologies usually rely on image classification methods, automatically extracting image features through training models for classification prediction. However, these automated technologies also have limitations. First, these technologies usually require doctors to manually select specific frames, which increases the complexity and subjectivity of the operation. Secondly, existing automated prediction methods often lack the use of global information of ultrasound videos, and only make predictions based on static images, which may lead to insufficient prediction accuracy. In addition, the interpretability of these systems is also problematic, making them difficult for doctors to trust and accept.
[0056] Therefore, although existing technologies have made some progress in the prediction of carpal tunnel syndrome, there are still some problems that need to be solved. These problems include strong subjectivity of prediction, lack of standardization, insufficient interpretability of automatic prediction technology, and insufficient use of global information. The technical solutions to these problems need to ensure the objectivity and standardization of the prediction process while improving the accuracy and efficiency of prediction, so as to provide doctors with more reliable auxiliary prediction tools.
[0057] In order to solve the above problems, a method for predicting carpal tunnel syndrome based on B-type ultrasound video is disclosed in an embodiment of the present application, the method comprising obtaining a target carpal tunnel B-type ultrasound video; inputting the target ultrasound video into a trained video segmentation model, determining the carpal tunnel median nerve area of each video frame in the target carpal tunnel B-type ultrasound video through the video segmentation model, and determining target prediction parameters based on the carpal tunnel median nerve area of each video frame; inputting the target prediction parameters into a trained carpal tunnel syndrome classification model, and determining the prediction result of the target carpal tunnel B-type ultrasound video through the carpal tunnel syndrome classification model. The method realizes non-invasive, efficient, accurate and explainable carpal tunnel syndrome prediction through automated segmentation and classification models, thereby improving prediction efficiency and consistency, thereby reducing the workload of doctors and optimizing the use of medical resources.
[0058] The application content is further explained below through the description of embodiments in conjunction with the accompanying drawings.
[0059] This embodiment provides a method for predicting carpal tunnel syndrome based on B-type ultrasound video. Figure 1 and Figure 2 As shown, the method includes:
[0060] S100: Obtain a B-type ultrasound video of the target carpal tunnel.
[0061] Specifically, the process of obtaining the target carpal tunnel B-type ultrasound video specifically includes:
[0062] S110, obtaining a B-type ultrasound video of the carpal tunnel.
[0063] Specifically, the B-type ultrasound video is a sequence video of a two-dimensional image generated by emitting ultrasound waves through an ultrasound probe and receiving echo signals. The two-dimensional image is used to display the anatomical structure in the carpal tunnel, including the median nerve. The acquisition process of the target carpal tunnel B-type ultrasound video can be obtained by performing an ultrasound scan on the patient's wrist using a B-type ultrasound device.
[0064] S120, performing a preprocessing operation on the carpal canal B-type ultrasound video to obtain a target carpal canal B-type ultrasound video, wherein the preprocessing operation includes a desensitization operation and / or a pre-cropping operation.
[0065] Specifically, the desensitization operation refers to desensitizing the ultrasound video before data processing in order to protect the privacy of the patient. The desensitization operation includes removing the patient's personal information that may be contained in the video, such as name, medical record number, etc. After desensitization, the video only retains the necessary medical imaging data to ensure the privacy of the patient.
[0066] The pre-cutting operation includes:
[0067] Based on all video frames in the carpal tunnel B-type ultrasound video, the position range where the median nerve region appears is determined, and each frame of the carpal tunnel B-type ultrasound video is clipped based on the position range, wherein the position range includes the coordinates of the upper left corner, the upper right corner, the lower left corner, and the lower right corner of the video frame. Each frame of the video is clipped using the coordinate range to retain the region where the median nerve may appear, thereby reducing the amount of video data and reducing the computational complexity of subsequent processing.
[0068] S200, inputting the target ultrasound video into a trained video segmentation model, determining the carpal tunnel median nerve area of each video frame in the target carpal tunnel B-type ultrasound video through the video segmentation model, and determining the target prediction parameters based on the carpal tunnel median nerve area of each video frame.
[0069] Specifically, Figure 3 As shown, the trained video segmentation model includes an encoder module, a decoder module and a target perceptron module.
[0070] The encoder module includes several Transformer blocks, which include several encoding layers and merging layers. The encoding layer includes a self-attention layer and a hybrid feedforward neural network layer. The encoder module extracts multi-scale features of the input image through multi-layer stacking. Among them, the self-attention layer is used to calculate the correlation between each position and other positions in the input feature sequence to capture global information, and the hybrid feedforward neural network layer is used to perform nonlinear transformation on the features of each position to enhance the feature expression capability.
[0071] The decoder module includes an upsampling layer and a multi-layer perceptron layer, which are used to upsample and fuse the multi-scale features extracted by the encoder module. The upsampling layer uses a bilinear interpolation method to upsample the low-resolution feature map to a high resolution, and the MLP layer further processes the upsampled features to generate the final segmentation result.
[0072] The target sensor module performs fusion processing on the features output by the decoder module to obtain an accurate segmentation result of the median nerve in each frame of the image.
[0073] Before the trained video segmentation model is trained, the image data used for training can also be subjected to data enhancement. The data enhancement operation refers to the process of performing a series of transformations and expansions on the training image data before model training to generate a diverse data set, which can improve the generalization ability of the model and avoid overfitting problems. In the field of medical image processing, data enhancement can simulate different imaging conditions and variations, and improve the adaptability of the model to actual clinical scenarios.
[0074] The data enhancement operation specifically includes:
[0075] Translation: Translate the image horizontally and vertically. The translation operation can simulate different ultrasound probe positions and enhance the model's ability to recognize the median nerve at different positions. By randomly translating the image horizontally and vertically by a certain number of pixels (for example, ±10 pixels), ensure that the median nerve area remains within the image range.
[0076] Horizontal flip and vertical flip: Flip the image horizontally and vertically. Flipping can increase the diversity of the data and avoid the model's preference for a specific direction. By randomly selecting a certain proportion of images for horizontal and vertical flipping (e.g. 50%), the consistency of the flipped image with the original image in anatomical structure is ensured.
[0077] Rotation: Rotate the image by a certain angle. The rotation operation can enhance the adaptability of the model to different scanning angles. The image is randomly rotated by a certain angle (for example, ±15 degrees) and the rotated image is appropriately cropped or padded to keep the image size consistent.
[0078] Scaling: Scale the image. Scaling can simulate different probe distances and enhance the model's ability to recognize median nerves of different sizes. Scaling is performed by randomly selecting a certain proportion of the image (for example, 0.8 to 1.2 times), and appropriately cropping or padding the scaled image to keep the image size consistent.
[0079] Stretch: Stretch the image. Stretching can enhance the model's adaptability to different deformations, especially the deformation of the median nerve under different compression states. The image is randomly stretched horizontally and vertically (for example, ±10%), and the stretched image is appropriately cropped or padded to keep the image size consistent.
[0080] Random cropping: Randomly crop the image to obtain different local areas. Random cropping can simulate different fields of view and enhance the model's ability to handle some missing information. By randomly selecting a certain proportion of the image for cropping (for example, cropping 90% of the original image), ensure that the cropped image still contains the median nerve area.
[0081] Through the above-mentioned data enhancement operations, a diverse training data set can be generated, significantly improving the generalization ability and robustness of the model. The specific effects include:
[0082] Enhance the model's adaptability to different imaging conditions: Through translation, flipping, rotation, scaling, and stretching operations, the model can adapt to different ultrasound probe positions, directions, and distances, improving the ability to identify the median nerve.
[0083] Reduce overfitting: By increasing the diversity of data, we can prevent the model from overfitting the training data and improve the accuracy of predictions on unseen data.
[0084] Simulating clinical scenario variations: Data augmentation operations can simulate imaging variations under different operating conditions in actual clinical practice and improve the performance of the model in real application scenarios.
[0085] In addition, the image data used for training is handed over to an experienced ultrasound doctor to annotate the images frame by frame and pixel by pixel, so as to obtain the training image data and its corresponding labels. The training image data and the corresponding labels are then sent to the video segmentation model for training. Under the supervision of the labels, the video segmentation model can learn the mapping relationship between each pixel and the corresponding label in each image, that is, the category corresponding to each pixel is the median nerve or the background. After training, the video segmentation model can automatically outline the median ROI of the input image data, and the median nerve data of the input image data can be obtained by calculating the ROI.
[0086] Specifically, the process of determining the median nerve area of the carpal tunnel of each video frame in the target carpal tunnel B-type ultrasound video by using the video segmentation model specifically includes:
[0087] S210, obtaining an initial image of each video frame in the target carpal tunnel B-type ultrasound video, and overlapping and cropping the initial image to obtain a plurality of image blocks with preset resolutions;
[0088] S211, converting the plurality of image blocks of preset resolutions into first feature vectors corresponding to the image blocks through a convolution operation;
[0089] S212: Input the first feature vector into the encoder module for processing to obtain a second feature vector, where the second feature vector is a multi-scale image feature vector.
[0090] Specifically, in step S210, the target carpal tunnel B-type ultrasound video is first extracted frame by frame to obtain the initial image of each frame. The initial image has a fixed resolution, such as H×W (height×width). Subsequently, the size of the cropping window is set to a fixed value (for example, 4×4 pixels), and sliding cropping is performed according to a certain step size. The step size is usually smaller than the size of the cropping window to ensure that there is a certain overlapping area between the image blocks. A typical step size setting can be half the size of the cropping window (for example, 2 pixels). The overlapping cropping method can ensure that the boundaries of the image blocks do not lose information, which helps to maintain the local continuity of the image, thereby capturing more detail information and improving the effect of subsequent feature extraction. Through the above-mentioned overlapping cropping operation, each frame of the initial image is converted into a number of image blocks with a preset resolution. The image blocks will be used for subsequent convolution operations and feature extraction.
[0091] In step S211, a convolution operation is first applied to each image block of preset resolution obtained in step S210. The convolution operation uses a convolution kernel of a fixed size (such as 3×3 or 5×5) and is performed on the image block by means of a sliding window. The convolution operation can extract local feature information in the image block, such as edges, textures, and shapes. It should be noted that the convolution result of each image block is usually a multi-channel feature map. The feature map is expanded into a one-dimensional vector to obtain the corresponding first feature vector.
[0092] In step S212, these feature vectors are processed by the encoder module to obtain multi-scale image feature vectors. Specifically:
[0093] The encoder module adopts a Transformer block-based architecture. Each Transformer block contains several self-attention layers and mixed feedforward neural network layers (Mix-FFN).
[0094] Among them, the self-attention layer is used to calculate the correlation between each position in the input feature vector and other positions, capture global dependencies, and help the model understand the contextual information between image blocks; the hybrid feedforward neural network layer is used to perform nonlinear transformation on the feature vector of each position to enhance the expressive ability of the model.
[0095] The first input feature vector is first processed by multiple Transformer blocks of the encoder, each of which performs self-attention calculations and feedforward neural network transformations. The encoder module extracts multi-scale image feature vectors by downsampling layer by layer. For example, the first feature vector is input into the first Transformer block to obtain a processed feature vector; the processed feature vector is continuously input into the next Transformer block, and the above operation is repeated until all Transformer blocks are traversed; the output results of each Transformer block are feature vectors of different scales, which capture the information of the image at different scales.
[0096] The feature vector finally output by the encoder module is the second feature vector. The second feature vector contains multi-scale image information and can describe the details and global structure of the median nerve area.
[0097] S213, performing an upsampling operation and a concatenation operation on the second feature vector based on the upsampling layer of the decoder module to obtain a third feature vector;
[0098] Specifically, the process of performing upsampling and concatenation operations on the second feature vector based on the upsampling module to obtain the third feature vector specifically includes:
[0099] S2131, performing feature fusion processing on the second feature vector based on the multi-layer perceptron layer of the decoder module to obtain a low-dimensional feature vector;
[0100] S2132. Perform linear interpolation processing on the low-dimensional feature vector to obtain a third feature vector.
[0101] Specifically, in step S213, the upsampling operation refers to the process of restoring a low-resolution feature map to a high-resolution one. Through the upsampling operation, the information in the feature map can be refined to make it closer to the resolution of the original image; the splicing operation refers to merging multiple feature maps in the channel dimension. Through splicing, feature information of different scales can be combined together to enhance the model's ability to capture image details.
[0102] In step S2131, the feature fusion refers to integrating multiple feature maps, extracting key information therein, removing redundant features, and thus obtaining a more representative low-dimensional feature vector. The multi-layer perceptron (MLP) layer of the decoder module is used for feature fusion processing, specifically: the spliced high-resolution feature map is input into the MLP layer. The MLP layer includes multiple fully connected layers, each of which performs weighted summation on the input features and transforms them through a nonlinear activation function. Through the combination of multiple layers of full connection and activation functions, the MLP layer can fully fuse the feature maps and extract the most representative low-dimensional feature vector. The low-dimensional feature vector refers to the feature representation after feature fusion processing, which has fewer dimensions but contains richer semantic information.
[0103] In step S2132, the linear interpolation is an interpolation method that generates new data points by performing linear interpolation calculations between existing data points. Linear interpolation can improve the resolution while maintaining data smoothness. The process of performing linear interpolation processing on the low-dimensional feature vector specifically includes:
[0104] For each low-dimensional feature vector, find its corresponding position in the original image, and use the linear combination of adjacent data points to calculate the new eigenvalue; through multiple linear interpolation operations, gradually increase the low-dimensional feature vector to a high resolution to obtain a third feature vector. The third feature vector refers to a high-resolution feature representation after linear interpolation processing, which contains rich detail information and precise semantic information. It should be noted that the third feature vector after linear interpolation processing has high resolution and accuracy, and can provide high-quality feature support for subsequent segmentation tasks.
[0105] S214. Perform fusion processing on the third feature vector through the target sensor module to obtain the median nerve area of the carpal tunnel in each video frame in the target carpal tunnel B-type ultrasound video.
[0106] Specifically, the process of determining the target prediction parameter based on the median nerve area of the carpal tunnel of each video frame specifically includes:
[0107] S220, determining a first prediction parameter based on the median nerve region of the carpal tunnel of each video frame, the first prediction parameter comprising: a circumference, a cross-sectional area, an anteroposterior diameter, and a flattening rate of the median nerve;
[0108] S221. Determine target prediction parameters based on the first prediction parameters, wherein the target prediction parameters include: maximum-to-minimum circumference ratio, swelling rate, maximum flattening rate, maximum-to-minimum anteroposterior diameter ratio, and maximum cross-sectional area.
[0109] After obtaining the median nerve regions of each video frame output by the video segmentation model, it is necessary to further analyze these regions to determine preliminary prediction parameters. The process of determining the first prediction parameters specifically includes:
[0110] Determine the circumference of the median nerve: perform boundary detection on the median nerve region obtained by segmentation in each frame and calculate its circumference. The circumference of the median nerve refers to the total length of the outer contour of the median nerve, which can be obtained by an accurate boundary detection algorithm.
[0111] Determine the cross-sectional area of the median nerve: The cross-sectional area of the median nerve is obtained by calculating the total number of pixels in the median nerve region. The cross-sectional area refers to the projection area of the median nerve in the frame image, which is used to reflect the degree of nerve compression.
[0112] Determine the anteroposterior diameter of the median nerve: The anteroposterior diameter is obtained by detecting the longest and shortest diameters of the median nerve region. The anteroposterior diameter is used to reflect the degree of deformation of the median nerve.
[0113] Determine the flattening rate of the median nerve, which refers to the ratio of the long diameter to the short diameter of the median nerve region, and is used to determine the flattening degree of the median nerve. The calculation method of the flattening rate is the ratio of the longest diameter to the shortest diameter.
[0114] After determining the first prediction parameters of each frame, the target prediction parameters for final prediction can be calculated by comprehensively analyzing the first prediction parameters. The process of determining the target prediction parameters specifically includes:
[0115] The maximum and minimum circumference ratio is determined by calculating the ratio of the maximum value to the minimum value of the median nerve circumference in all frames of the ultrasound video. The maximum and minimum circumference ratio can be obtained. The ratio reflects the change amplitude of the median nerve during the entire scanning process, which helps to determine its compression condition.
[0116] The swelling rate is determined, which refers to the percentage increase in the cross-sectional area of the median nerve in a certain frame relative to its cross-sectional area in an uncompressed state. By comparing the cross-sectional areas in a normal state and a compressed state, the degree of swelling of the nerve can be assessed.
[0117] The maximum flattening rate is determined by calculating the maximum value of the median nerve flattening rates of all frames in the ultrasound video. The maximum flattening rate reflects the degree of deformation of the median nerve when it is most severely compressed.
[0118] The ratio of the maximum and minimum anterior-posterior diameters is determined by calculating the ratio of the maximum and minimum anterior-posterior diameters of the median nerve in all frames of the ultrasound video. The ratio of the maximum and minimum anterior-posterior diameters can describe the dynamic changes of the median nerve during the scanning process and help determine its compression condition.
[0119] The maximum cross-sectional area is determined by taking the maximum value of the median nerve cross-sectional area in all frames in the ultrasound video. The maximum cross-sectional area usually appears in the frame where the median nerve is most severely compressed and is a key parameter reflecting the degree of nerve swelling.
[0120] S300, inputting the target prediction parameters into a trained carpal tunnel syndrome classification model, and determining a prediction result of the target carpal tunnel B-type ultrasound video through the carpal tunnel syndrome classification model.
[0121] Based on the above steps, the first prediction parameters including perimeter, cross-sectional area, anteroposterior diameter and flattening rate have been extracted from the median nerve segmentation region of each frame. And based on the first prediction parameters, the target prediction parameters for prediction are calculated, such as the maximum to minimum perimeter ratio, swelling rate, maximum flattening rate, maximum to minimum anteroposterior diameter ratio and maximum cross-sectional area.
[0122] The embodiment of the present application adopts support vector machine (SVM) as a classification model for carpal tunnel syndrome. SVM is a supervised learning model, which is suitable for classification tasks of high-dimensional data and has strong generalization ability.
[0123] In step S300, the target prediction parameters extracted from the new ultrasound video are first input into the trained SVM classification model.
[0124] Subsequently, the SVM classification model processes the input prediction parameters and calculates the classification results based on the mapping relationship learned during the training process:
[0125] Map the input target prediction parameters to a high-dimensional space;
[0126] According to the classification boundary of the hyperplane, it is determined whether the input sample belongs to the normal category or the carpal tunnel syndrome category.
[0127] The output of the classification model is normal or carpal tunnel syndrome full syndrome status.
[0128] In addition, before training the video segmentation model and the carpal tunnel syndrome classification model, the model also needs to perform the following:
[0129] Hyperparameter settings for the model: select preset hyperparameters, such as learning rate, batch size, and number of training rounds;
[0130] Loss function setting for the model: use cross entropy loss function or Di ce loss function to measure the difference between the model segmentation result and the label;
[0131] Optimization algorithm setting for the model: Use Adam optimizer or other advanced optimization algorithms to gradually adjust model parameters and minimize the loss function;
[0132] The training process of the video segmentation model and the carpal tunnel syndrome classification model also includes:
[0133] Initialization: Randomly initialize model parameters;
[0134] Forward propagation: forward propagation of input data through the model to calculate the output result;
[0135] Calculate loss: Calculate the loss function value based on the model output and label data;
[0136] Back propagation: Calculate the gradient of the loss function relative to the model parameters through the back propagation algorithm;
[0137] Parameter update: Use optimization algorithm to update model parameters;
[0138] Repeat iteration: Repeat the above steps until the training loss converges or the preset number of training rounds is reached.
[0139] The optimization and evaluation process of the video segmentation model and the carpal tunnel syndrome classification model includes:
[0140] During the training process of the model, the model performance can be optimized by:
[0141] Use L2 regularization or Dropout technology to prevent model overfitting; adopt a learning rate decay strategy to gradually reduce the learning rate to ensure that the model is more stable in the later stages of training; save model parameters regularly to prevent model loss due to training interruptions, and select the best model parameters for subsequent applications.
[0142] During the evaluation of the model, the effect of the model can be evaluated by the following methods:
[0143] Regularly evaluate the performance of the model on the validation set, calculate indicators such as segmentation accuracy, Di ce coefficient, IoU, etc., to ensure that the model performs well on unseen data; use cross-validation technology to further verify the generalization ability and stability of the model.
[0144] Specifically, the training process of the classification model of carpal tunnel syndrome specifically includes:
[0145] During training data preparation:
[0146] First, the data source is determined, and the training data set includes median nerve prediction parameters obtained by ultrasound video segmentation and parameter extraction. The median nerve prediction parameters cover a variety of conditions of different patients, including normal people and patients with carpal tunnel syndrome.
[0147] Secondly, the label data is determined, and the label data is annotated by experienced doctors for each sample based on electrophysiological measurement results, clinical manifestations and medical records. The annotated results are divided into two categories: normal and carpal tunnel syndrome complete syndrome state.
[0148] During model training:
[0149] First, feature standardization is performed. In order to improve the effect of model training, the input target prediction parameters are first standardized to make their mean zero and variance one.
[0150] Secondly, SVM training is performed, and the standardized prediction parameters and corresponding label data are input into the SVM classifier. The SVM classifier divides the data into two categories: normal and carpal tunnel syndrome by finding an optimal hyperplane to maximize the classification interval.
[0151] The hyperplane selection is performed again, and the SVM searches for a hyperplane in the high-dimensional space so that the distance between the sample points on both sides of the classification boundary is maximized, thereby distinguishing normal samples from carpal tunnel syndrome samples.
[0152] Then, a kernel function is selected. In a specific embodiment of the present application, a radial basis function (RBF) is selected as the kernel function of the SVM to handle nonlinear classification problems.
[0153] Finally, parameter optimization is performed, and the hyperparameters of SVM (such as penalty parameter C and kernel function parameter γ) are optimized through cross-validation method to ensure that the model achieves the best performance.
[0154] During the training results evaluation process:
[0155] First, a validation set evaluation is performed. The trained SVM model is evaluated using an independent validation set, and indicators such as classification accuracy, precision, recall, and F1 score are calculated.
[0156] Cross-validation is then performed to further verify the generalization ability of the model through cross-validation technology to ensure that the model can still maintain efficient classification performance on unseen data.
[0157] In summary, this embodiment provides a method for predicting carpal tunnel syndrome based on B-type ultrasound video, by obtaining a B-type ultrasound video of the carpal tunnel, and performing a preprocessing operation on the B-type ultrasound video of the carpal tunnel to ensure data integrity and privacy protection. The preprocessing operation ensures data privacy security and processing efficiency, which helps to reduce the computational complexity of subsequent processing.
[0158] And by inputting the target ultrasound video into the trained video segmentation model, frame-by-frame processing is performed to determine the median nerve area. With the help of the encoder module and decoder module, especially the design based on the Transformer block, multi-scale features can be efficiently extracted, and the median nerve area can be automatically and accurately segmented, reducing the subjectivity and uncertainty of manual operation. In addition, through a variety of data enhancement operations, such as translation, flipping, rotation, scaling and stretching, a diverse training data set is generated to improve the generalization ability and robustness of the model and enhance the model's adaptability to different imaging conditions and clinical scenarios. The support vector machine (SVM) classification model is used to achieve automatic and accurate classification rate of carpal tunnel syndrome through supervised learning and optimization training, reducing dependence on the doctor's subjective judgment and ensuring the objectivity and standardization of the prediction process.
[0159] In other words, this application significantly reduces the prediction time by adopting data enhancement technology, multi-scale feature extraction, convolution operation and support vector machine classification model with the help of automated processing flow. Compared with traditional methods, it improves prediction efficiency and can provide prediction services to more patients more quickly. It also reduces the subjectivity of manual operation by automating the segmentation and quantification of prediction parameters, provides a scientific and objective prediction basis, and improves the accuracy and consistency of prediction results. In addition, it adopts clinically significant target prediction parameters and interpretable SVM classification models to ensure the interpretability and standardization of the prediction process, which helps to improve the consistency and repeatability of the prediction. The automated segmentation and classification steps significantly reduce the workload of doctors in ultrasound video analysis, reduce the complexity of operations, and improve clinical work efficiency.
[0160] Based on the above-mentioned method for predicting carpal tunnel syndrome based on B-type ultrasound video, this embodiment provides a device for predicting carpal tunnel syndrome based on B-type ultrasound video, such as Figure 4 As shown, the device comprises:
[0161] The video acquisition module 100 is used to acquire the target carpal tunnel B-type ultrasound video;
[0162] A parameter determination module 200 is used to input the target ultrasound video into a trained video segmentation model, determine the median nerve area of the carpal tunnel of each video frame in the target carpal tunnel B-type ultrasound video through the video segmentation model, and determine the target prediction parameter based on the median nerve area of the carpal tunnel of each video frame;
[0163] The prediction module 300 is used to input the target prediction parameters into a trained carpal tunnel syndrome classification model, and determine the prediction result of the target carpal tunnel B-type ultrasound video through the carpal tunnel syndrome classification model.
[0164] Based on the above-mentioned carpal tunnel syndrome prediction method based on B-type ultrasound video, the present application also provides a terminal device, such as Figure 5 As shown, it includes at least one processor 20; a display screen 21; and a memory 22, and may also include a communication interface 23 and a bus 24. The processor 20, the display screen 21, the memory 22 and the communication interface 23 may communicate with each other through the bus 24. The display screen 21 is configured to display a preset user guide interface in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may call the logic instructions in the memory 22 to execute the method in the above embodiment.
[0165] In addition, the logic instructions in the memory 22 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0166] The memory 22 is a computer-readable storage medium that can be configured to store software programs, computer executable programs, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes functional applications and data processing by running the software programs, instructions or modules stored in the memory 22, that is, implementing the methods in the above embodiments.
[0167] The memory 22 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 22 may include a high-speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, may also be a transient storage medium.
[0168] In addition, the specific process of loading and executing the multiple instruction processors in the above-mentioned storage medium and the terminal device has been described in detail in the above-mentioned method, and will not be described one by one here.
[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for predicting carpal tunnel syndrome based on B-type ultrasound video, characterized in that: The method comprises: Acquire B-mode ultrasound video of the target carpal tunnel; Inputting the target carpal tunnel B-type ultrasound video into a trained video segmentation model, determining the carpal tunnel median nerve area of each video frame in the target carpal tunnel B-type ultrasound video through the video segmentation model, and determining a target prediction parameter based on the carpal tunnel median nerve area of each video frame; The target prediction parameters are input into a trained carpal tunnel syndrome classification model, and the prediction result of the target carpal tunnel B-type ultrasound video is determined by the carpal tunnel syndrome classification model.
2. The method for predicting carpal tunnel syndrome based on B-type ultrasound video according to claim 1, characterized in that: The process of obtaining the target carpal tunnel B-type ultrasound video specifically includes: Obtain B-mode ultrasound video of the carpal tunnel; A preprocessing operation is performed on the carpal tunnel B-type ultrasound video to obtain a target carpal tunnel B-type ultrasound video, wherein the preprocessing operation includes a desensitization operation and / or a pre-cropping operation.
3. The method for predicting carpal tunnel syndrome based on B-type ultrasound video according to claim 2, characterized in that: The pre-cutting operation includes: The position range in which the median nerve area appears is determined based on all video frames in the carpal tunnel B-type ultrasound video, and each frame of the carpal tunnel B-type ultrasound video is cropped based on the position range, wherein the position range includes the coordinates of the upper left corner, upper right corner, lower left corner and lower right corner of the video frame.
4. The method for predicting carpal tunnel syndrome based on B-type ultrasound video according to claim 1, characterized in that: The process of determining the target prediction parameter based on the median nerve area of the carpal tunnel of each video frame specifically includes: Determine a first prediction parameter based on the median nerve region of the carpal tunnel of each video frame, wherein the first prediction parameter includes: the circumference, cross-sectional area, anterior-posterior diameter, and flattening rate of the median nerve; Target prediction parameters are determined based on the first prediction parameters, and the target prediction parameters include: maximum-minimum circumference ratio, swelling rate, maximum flattening rate, maximum-minimum anterior-posterior diameter ratio, and maximum cross-sectional area.
5. The method for predicting carpal tunnel syndrome based on B-type ultrasound video according to claim 1, characterized in that: The trained video segmentation model includes an encoder module, a decoder module and a target perceptron module, the encoder module includes several Transformer blocks, the Transformer blocks include several encoding layers and merging layers, the encoding layers include self-attention layers and hybrid feedforward neural network layers, and the decoder module includes an upsampling layer and a multi-layer perceptron layer.
6. The method for predicting carpal tunnel syndrome based on B-type ultrasound video according to claim 5, characterized in that: The process of determining the median nerve area of the carpal tunnel of each video frame in the target carpal tunnel B-type ultrasound video by using the video segmentation model specifically includes: Acquire an initial image of each video frame in the target carpal tunnel B-type ultrasound video, and overlap and crop the initial image to obtain a plurality of image blocks with preset resolutions; Converting the plurality of image blocks of preset resolutions into first feature vectors corresponding to the image blocks through a convolution operation; Inputting the first feature vector into the encoder module for processing to obtain a second feature vector, where the second feature vector is a multi-scale image feature vector; Performing an upsampling operation and a concatenation operation on the second feature vector based on the upsampling layer of the decoder module to obtain a third feature vector; The target sensor module performs fusion processing on the third feature vector to obtain the median nerve area of the carpal tunnel in each video frame in the target carpal tunnel B-type ultrasound video.
7. The method for predicting carpal tunnel syndrome based on B-type ultrasound video according to claim 6, characterized in that: The process of performing upsampling and concatenation operations on the second feature vector based on the upsampling module to obtain the third feature vector specifically includes: The multi-layer perceptron layer of the decoder module performs feature fusion processing on the second feature vector to obtain a low-dimensional feature vector; Performing linear difference processing on the low-dimensional feature vector to obtain a third feature vector.
8. An automatic prediction device for carpal tunnel syndrome based on B-type ultrasound video, characterized in that: The device specifically comprises: A video acquisition module, used to acquire a B-type ultrasound video of a target carpal tunnel; a parameter determination module, configured to input the target carpal tunnel B-type ultrasound video into a trained video segmentation model, determine the carpal tunnel median nerve area of each video frame in the target carpal tunnel B-type ultrasound video through the video segmentation model, and determine the target prediction parameter based on the carpal tunnel median nerve area of each video frame; The prediction module is used to input the target prediction parameters into a trained carpal tunnel syndrome classification model, and determine the prediction result of the target carpal tunnel B-type ultrasound video through the carpal tunnel syndrome classification model.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the carpal tunnel syndrome prediction method based on B-type ultrasound video as described in any one of claims 1-7.
10. A terminal device, characterized in that: include: Processor and memory; The memory stores a computer-readable program executable by the processor; When the processor executes the computer-readable program, the steps in the method for predicting carpal tunnel syndrome based on B-type ultrasound video as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
System and method to process electronic medical images for diagnostic or interventional use
CN117413318A
Target region segmentation method and system of ultrasonic image and electronic equipment
CN117934824A
KR20210150171A
KR20230100584A
Cited By
Quick prediction method for mechanical response of carpal canal structure based on proxy model
CN122287221A
