A method and device for segmenting thoracic and lumbar spine X-ray films

By mixing the attention mechanism and multi-scale feature fusion, we extract the texture features of spine X-ray images and train the data segmentation model, which solves the problem of segmentation errors caused by noise and boundary blur, and improves the accuracy and diagnosis of spine X-ray segmentation. Degree of automation.

CN118297970BActive Publication Date: 2024-09-17AIR FORCE MEDICAL CENT PLA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410416941.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-08
Publication Date
2024-09-17
Estimated Expiration
2044-04-08

AI Technical Summary

Technical Problem

Existing spine X-ray image segmentation methods are prone to errors when sensitive to noise and blurred boundaries, and have a great impact on human factors, resulting in inaccurate and inconsistent segmentation results.

Method used

A hybrid attention mechanism is used to combine the channel information and spatial information of the image, extract image texture features through multi-scale feature fusion, train the thoracolumbar X-ray image data segmentation model, perform denoising, enhancement, feature extraction and segmentation processing to improve segmentation accuracy. .

Benefits of technology

It improves the segmentation accuracy of complex X-ray spine images, improves the accuracy of segmentation of thoracolumbar X-rays, solves the problems of inaccuracy and inconsistency caused by human factors, and enhances the automation and accuracy of auxiliary diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118297970B
    Figure CN118297970B
Patent Text Reader

Abstract

The present invention discloses a thoracolumbar X-ray film segmentation method and device, including: obtaining a thoracolumbar X-ray film image original data set; labeling the thoracolumbar X-ray film image original data set to obtain a thoracolumbar X-ray film image original data label set; using the thoracolumbar X-ray film image original data set and the thoracolumbar X-ray film image original data label set, training and processing a thoracolumbar X-ray film image data segmentation model to obtain a thoracolumbar X-ray film image data segmentation optimization model; obtaining target thoracolumbar X-ray film image data; using the thoracolumbar X-ray film image data segmentation optimization model, processing the acquired target thoracolumbar X-ray film image data to obtain target thoracolumbar image segmentation data. The invention improves the accuracy of X-ray film segmentation, improves the automation and accuracy of auxiliary diagnosis of X-ray films, and solves the problem of inaccuracy and inconsistency of X-ray film segmentation results due to human factors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of medical image segmentation, and in particular relates to a thoracic and lumbar spine X-ray film segmentation method and device. Background Art

[0002] Spinal lesions are common orthopedic diseases that can have a significant impact on the user's quality of life. X-rays are currently the most commonly used auxiliary diagnostic method for spinal lesions in clinical practice. However, the imaging process of X-rays is easily affected by factors such as internal organs of the human body, shooting measurement, and exposure. The captured images have characteristics such as a large amount of overlap between organs, excessive noise, low contrast, and blurred boundaries. Orthopedic surgeons have a limited field of view and sometimes find it difficult to identify anatomical landmarks, making it difficult to locate the location of spinal lesions. In some specific medical applications, such as detecting lumbar spondylosis and scoliosis, it is necessary to obtain spinal images through X-rays, and the automated segmentation of the thoracic and lumbar vertebrae in the images is an important step in analyzing and diagnosing the disease.

[0003] Existing spinal X-ray image segmentation methods mainly include traditional image processing methods and convolutional neural network (CNN)-based segmentation methods. Among them, one traditional image processing method mainly relies on the grayscale value, contrast and local feature information related to the pixel statistical characteristics of the image, and performs local area segmentation through image enhancement, feature extraction, clustering and classification; the other method is a segmentation method based on boundary information, which mainly utilizes the differences between boundary areas. This method is not strongly dependent on the pre-processed pixel values ​​and is more suitable for parallel processing. However, the disadvantage of this type of method is that it is very sensitive to noise, and when the image boundary is blurred or a fault phenomenon occurs, it is easy to produce erroneous boundary information and discontinuous areas. The segmentation method based on convolutional neural network (CNN) cannot utilize the spatial information of the spinal region. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method and device for segmenting thoracic and lumbar X-ray films, which is conducive to improving the accuracy of X-ray film segmentation, thereby enhancing the degree of automation and accuracy of auxiliary diagnosis of X-ray films, and solving the problem of inaccurate and inconsistent X-ray film segmentation results caused by human factors.

[0005] In order to solve the above technical problems, the first aspect of the embodiments of the present invention discloses a thoracic and lumbar spine X-ray film segmentation method, the method comprising:

[0006] S1, obtain the original dataset of thoracic and lumbar spine X-ray images;

[0007] S2, labeling the original data set of thoracic and lumbar spine X-ray images to obtain a label set of the original data of thoracic and lumbar spine X-ray images;

[0008] S3, using the original data set of thoracolumbar X-ray images and the original data label set of thoracolumbar X-ray images, training a thoracolumbar X-ray image data segmentation model to obtain an optimized thoracolumbar X-ray image data segmentation model;

[0009] S4, acquiring target thoracic and lumbar spine X-ray image data;

[0010] S5, using the thoracolumbar spine X-ray image data segmentation optimization model to process the target thoracolumbar spine X-ray image data to obtain target thoracolumbar spine image segmentation data.

[0011] As an optional implementation, in the first aspect of the embodiment of the present invention, the thoracic and lumbar spine X-ray image data segmentation model includes: a data acquisition module, a data preprocessing module, a data processing module and a segmentation data output module;

[0012] The output end of the data acquisition module is data-connected to the input end of the data pre-processing module; the output end of the data pre-processing module is data-connected to the input end of the data processing module; the output end of the data processing module is data-connected to the input end of the segmented data output module;

[0013] The data acquisition module is used to acquire thoracic and lumbar spine X-ray image data;

[0014] The data preprocessing module is used to perform denoising and enhancement preprocessing on the thoracic and lumbar spine X-ray image data to obtain preprocessed thoracic and lumbar spine X-ray image data;

[0015] The data processing module is used to perform feature extraction, encoding, decoding and feature recognition processing on the pre-processed thoracic and lumbar spine X-ray film image data to obtain thoracic and lumbar spine X-ray film image segmentation data;

[0016] The segmentation data output module is used to output the segmentation data of the thoracic and lumbar spine X-ray film image.

[0017] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the data preprocessing module includes: a data input layer, a data filtering layer, a data transformation layer, an image enhancement layer, a data reconstruction layer and a data output layer;

[0018] The output end of the data input layer is data-connected to the input end of the data filtering layer; the output end of the data filtering layer is data-connected to the input end of the data transformation layer; the output end of the data transformation layer is data-connected to the input end of the image enhancement layer; the output end of the image enhancement layer is data-connected to the input end of the data reconstruction layer; the output end of the data reconstruction layer is data-connected to the input end of the data output layer.

[0019] As an optional implementation, in the first aspect of the embodiment of the present invention, the data processing module includes: an input layer, an image compression layer, an image segmentation layer, an image flattening processing layer, an image position encoding layer, an image attention fusion layer, and an image restoration layer;

[0020] The output end of the input layer is data-connected to the input end of the image compression layer; the output end of the image compression layer is data-connected to the input end of the image segmentation layer; the output end of the image segmentation layer is data-connected to the input end of the image flattening processing layer; the output end of the image flattening processing layer is data-connected to the input end of the image position encoding layer; the output end of the image position encoding layer is data-connected to the input end of the image attention fusion layer; the output end of the image attention fusion layer is data-connected to the input end of the image restoration layer.

[0021] As an optional implementation, in the first aspect of the embodiment of the present invention, the training process of the thoracolumbar vertebrae X-ray film image data segmentation model using the thoracolumbar vertebrae X-ray film image original data set and the thoracolumbar vertebrae X-ray film image original data label set to obtain the thoracolumbar vertebrae X-ray film image data segmentation optimization model includes:

[0022] S31, dividing the original data set of thoracic and lumbar vertebrae X-ray film images and the original data label set of thoracic and lumbar vertebrae X-ray film images according to a preset ratio to obtain a training set and a test set;

[0023] Set the number of training times to 1;

[0024] S32, using the training set, training a thoracolumbar spine X-ray image data segmentation model to obtain first thoracolumbar spine X-ray image data detection information;

[0025] S33, updating parameters of the thoracic and lumbar vertebrae X-ray film image data segmentation model based on the first thoracic and lumbar vertebrae X-ray film image data detection information and the image data label information of the training set;

[0026] S34, determining whether the training times value is greater than a preset training times threshold, and obtaining a training times determination result;

[0027] Increase the training times by 1;

[0028] When the result of the training number judgment is yes, executing S35;

[0029] When the result of the training number judgment is no, executing S32;

[0030] S35, using the test set, testing and processing the thoracolumbar vertebra X-ray film image data segmentation model to obtain second thoracolumbar vertebra X-ray film image data detection information;

[0031] S36, comparing the detection information of the second thoracic and lumbar vertebrae X-ray image data with the image data label information of the test set to obtain prediction accuracy information;

[0032] S37, determining whether the prediction accuracy information is greater than a preset accuracy threshold, and obtaining an accuracy determination result;

[0033] When the accuracy determination result is no, executing S31;

[0034] If the accuracy judgment result is yes, the training process of the thoracolumbar spine X-ray image data segmentation model is completed to obtain the thoracolumbar spine X-ray image data segmentation optimization model. As an optional embodiment, in the first aspect of the embodiment of the present invention, the use of the thoracolumbar spine X-ray image data segmentation optimization model to process the target thoracolumbar spine X-ray image data to obtain the target thoracolumbar spine image segmentation data includes:

[0035] S51, preprocessing the target thoracic and lumbar spine X-ray image data to obtain target preprocessed X-ray image data;

[0036] S52, performing feature extraction, encoding, decoding, feature recognition and fusion processing on the target pre-processed X-ray film image data to obtain target thoracic and lumbar spine X-ray film image segmentation data.

[0037] As an optional implementation, in the first aspect of the embodiment of the present invention, preprocessing the target thoracic and lumbar spine X-ray image data to obtain target preprocessed X-ray image data includes:

[0038] S511, based on the data input layer, obtaining the target thoracic and lumbar spine X-ray image data;

[0039] S512, performing filtering processing on the target thoracic and lumbar spine X-ray image data based on the data filtering layer to obtain first target pre-processed X-ray image data;

[0040] S513, based on the data transformation layer, segmenting the first target preprocessed X-ray film image data to obtain a second target preprocessed X-ray film image dataset; the second target preprocessed X-ray film image dataset includes a plurality of second target preprocessed X-ray film image data;

[0041] S514, performing data enhancement on the second target preprocessed X-ray film image dataset using an image data enhancement algorithm model based on the image enhancement layer to obtain a third target preprocessed X-ray film image dataset; the third target preprocessed X-ray film image dataset includes a plurality of third target preprocessed X-ray film image data;

[0042] The image data enhancement algorithm model expression is:

[0043] C i,j (k) = α·(l-1)·N i,j (k), k=0,1,…,l-1;

[0044]

[0045] Wherein, α is the adjustment coefficient; k represents the gray level; l represents the number of gray levels of the image; AB represents the total number of pixels in the second target pre-processed X-ray film image data; C i,j (k) represents the third target pre-processed X-ray film image data; M i,j (l) represents the number of times a pixel with gray level k appears in the second target pre-processed X-ray film image data; N i,j (k) represents the probability that a pixel with a gray level less than or equal to k appears in the second target pre-processed X-ray film image data;

[0046] S515, performing image stitching and reconstruction on the third target preprocessed X-ray film image data set based on the data reconstruction layer to obtain target preprocessed X-ray film image data;

[0047] S516: Based on the data output layer, output the target pre-processed X-ray film image data to the data processing module.

[0048] As an optional implementation manner, in the first aspect of the embodiment of the present invention,

[0049] The step of performing feature extraction, encoding, decoding, feature recognition, and fusion processing on the target pre-processed X-ray film image data to obtain target thoracic and lumbar spine X-ray film image segmentation data includes:

[0050] S521, based on the input layer, obtaining the target pre-processed X-ray film image data;

[0051] S522, performing feature image extraction on the target preprocessed X-ray film image data based on the image compression layer to obtain target first feature image data, target second feature image data, target third feature image data, and target feature image data;

[0052] S523, performing feature image segmentation processing on the target feature image data based on the image segmentation layer to obtain target feature image patch data;

[0053] S524, performing flattening processing on the target feature image patch data based on the image flattening processing layer to obtain a one-dimensional sequence of target feature images;

[0054] S525, based on the image position coding layer, using the image position feature model, iteratively processing the one-dimensional sequence of the target feature image to obtain target feature image coding data;

[0055] The image position feature model expression is:

[0056]

[0057] Among them, Z0 is the image position feature vector; X p represents the feature image patch at position p; E is the embedded projection of the feature image patch; N is the number of feature image patches; E pos Encode the location of the feature image patch;

[0058] S526, based on the image attention fusion layer, using the channel attention processing mechanism, decoding the target feature image encoding data to obtain target channel attention feature data;

[0059] S527, based on the image attention fusion layer, using a spatial attention processing mechanism, processing the target channel attention feature data to obtain target comprehensive feature image data;

[0060] S528, based on the image attention fusion layer, interpolate and merge the target first feature image data, the target second feature image data, the target third feature image data, and the target comprehensive feature image data to obtain target multi-dimensional feature image data;

[0061] S529: Based on the image restoration layer, perform feature image restoration processing on the target multi-dimensional feature image data to obtain target thoracic and lumbar spine X-ray image segmentation data.

[0062] A second aspect of the present invention discloses a thoracic and lumbar spine X-ray film segmentation device, the device comprising:

[0063] a memory storing executable program code;

[0064] a processor coupled to the memory;

[0065] The processor calls the executable program code stored in the memory to execute part or all of the steps in the thoracic and lumbar spine X-ray film segmentation method disclosed in the first aspect of the embodiment of the present invention.

[0066] The third aspect of the present invention discloses a computer-readable storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute some or all of the steps in the thoracic and lumbar X-ray film segmentation method disclosed in the first aspect of an embodiment of the present invention.

[0067] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0068] In an embodiment of the present invention, a hybrid attention mechanism is adopted, which combines the attention mechanisms of the channel information and spatial information of the image, and a multi-scale feature fusion method is used to extract the texture features of the image, thereby improving the segmentation accuracy of complex X-ray spinal images and improving the accuracy of thoracic and lumbar spine X-ray segmentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0070] Figure 1 This is a flow chart of a thoracic and lumbar spine X-ray film segmentation method disclosed in an embodiment of the present invention;

[0071] Figure 2 This is a structural flow chart of a ResNet50 convolutional neural network used in feature extraction and data compression processing in a thoracic and lumbar spine X-ray film segmentation method disclosed in an embodiment of the present invention;

[0072] Figure 3 This is a schematic structural diagram of a thoracic and lumbar spine X-ray film segmentation device disclosed in an embodiment of the present invention;

[0073] Figure 4 This is a comparison chart of the segmentation effects of a thoracic and lumbar spine X-ray film segmentation device disclosed in an embodiment of the present invention and other neural networks. DETAILED DESCRIPTION

[0074] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0075] The terms "first," "second," and so on, in the description and claims of the present invention and the accompanying drawings are used to distinguish between different objects, not to describe a specific order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or device.

[0076] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0077] The present invention discloses a thoracic and lumbar spine X-ray film segmentation method and device, which helps improve the accuracy of X-ray film segmentation, thereby enhancing the automation and accuracy of auxiliary diagnosis of X-ray films, and solves the problem of inaccurate and inconsistent X-ray film segmentation results caused by human factors. Detailed descriptions are given below.

[0078] Example 1

[0079] See also Figure 1 , Figure 1 This is a flow chart of a thoracic and lumbar spine X-ray segmentation method disclosed in an embodiment of the present invention. Figure 1 The thoracic and lumbar spine X-ray segmentation described is applied to a medical image segmentation system, such as a local server or cloud server for medical image segmentation management, and the present invention does not limit this. Figure 1 As shown, the thoracic and lumbar spine X-ray film segmentation method may include the following operations:

[0080] S1, obtain the original dataset of thoracic and lumbar spine X-ray images;

[0081] S2, labeling the original data set of thoracic and lumbar spine X-ray images to obtain a label set of the original data of thoracic and lumbar spine X-ray images;

[0082] S3, using the original data set of thoracolumbar X-ray images and the original data label set of thoracolumbar X-ray images, training a thoracolumbar X-ray image data segmentation model to obtain an optimized thoracolumbar X-ray image data segmentation model;

[0083] S4, acquiring target thoracic and lumbar spine X-ray image data;

[0084] S5, using the thoracolumbar spine X-ray image data segmentation optimization model to process the target thoracolumbar spine X-ray image data to obtain target thoracolumbar spine image segmentation data.

[0085] It can be seen that the implementation of the thoracic and lumbar spine X-ray film segmentation method described in the embodiment of the present invention is conducive to improving the accuracy of X-ray film segmentation, thereby improving the degree of automation and accuracy of auxiliary diagnosis of X-ray films, and solving the problem of inaccurate and inconsistent X-ray film segmentation results caused by human factors.

[0086] In an optional embodiment, in the above step S3, the thoracic and lumbar spine X-ray image data segmentation model includes: a data acquisition module, a data preprocessing module, a data processing module and a segmentation data output module;

[0087] The output end of the data acquisition module is data-connected to the input end of the data pre-processing module; the output end of the data pre-processing module is data-connected to the input end of the data processing module; the output end of the data processing module is data-connected to the input end of the segmented data output module;

[0088] The data acquisition module is used to acquire thoracic and lumbar spine X-ray image data;

[0089] The data preprocessing module is used to perform denoising and enhancement preprocessing on the thoracic and lumbar spine X-ray image data to obtain preprocessed thoracic and lumbar spine X-ray image data;

[0090] The data processing module is used to perform feature extraction, encoding, decoding and feature recognition processing on the pre-processed thoracic and lumbar spine X-ray film image data to obtain thoracic and lumbar spine X-ray film image segmentation data;

[0091] The segmentation data output module is used to output the segmentation data of the thoracic and lumbar spine X-ray film image.

[0092] It can be seen that the implementation of the thoracic and lumbar spine X-ray film segmentation method described in the embodiment of the present invention is conducive to improving the accuracy of X-ray film segmentation, thereby improving the degree of automation and accuracy of auxiliary diagnosis of X-ray films, and solving the problem of inaccurate and inconsistent X-ray film segmentation results caused by human factors.

[0093] In another optional embodiment, the data preprocessing module includes: a data input layer, a data filtering layer, a data transformation layer, an image enhancement layer, a data reconstruction layer and a data output layer;

[0094] The output end of the data input layer is data-connected to the input end of the data filtering layer; the output end of the data filtering layer is data-connected to the input end of the data transformation layer; the output end of the data transformation layer is data-connected to the input end of the image enhancement layer; the output end of the image enhancement layer is data-connected to the input end of the data reconstruction layer; the output end of the data reconstruction layer is data-connected to the input end of the data output layer.

[0095] It can be seen that the implementation of the thoracic and lumbar spine X-ray film segmentation method described in the embodiment of the present invention is conducive to improving the accuracy of X-ray film segmentation, thereby improving the degree of automation and accuracy of auxiliary diagnosis of X-ray films, and solving the problem of inaccurate and inconsistent X-ray film segmentation results caused by human factors.

[0096] In yet another optional embodiment, the data processing module includes: an input layer, an image compression layer, an image flattening processing layer, an image position encoding layer, an image attention fusion layer, and an image restoration layer;

[0097] The output end of the input layer is data-connected to the input end of the image compression layer; the output end of the image compression layer is data-connected to the input end of the image flattening processing layer; the output end of the image flattening processing layer is data-connected to the input end of the image position encoding layer; the input end of the image position encoding layer is data-connected to the input end of the image attention fusion layer; the output end of the image attention fusion layer is data-connected to the input end of the image restoration layer.

[0098] It can be seen that the implementation of the thoracic and lumbar spine X-ray film segmentation method described in the embodiment of the present invention is conducive to improving the accuracy of X-ray film segmentation, thereby improving the degree of automation and accuracy of auxiliary diagnosis of X-ray films, and solving the problem of inaccurate and inconsistent X-ray film segmentation results caused by human factors.

[0099] In another optional embodiment, in the above step S3, the training process of the thoracic and lumbar vertebrae X-ray film image data segmentation model using the thoracic and lumbar vertebrae X-ray film image original data set and the thoracic and lumbar vertebrae X-ray film image original data label set to obtain the thoracic and lumbar vertebrae X-ray film image data segmentation optimization model includes:

[0100] S31, dividing the original data set of thoracic and lumbar vertebrae X-ray film images and the original data label set of thoracic and lumbar vertebrae X-ray film images according to a preset ratio to obtain a training set and a test set;

[0101] Set the number of training times to 1;

[0102] S32, using the training set, training a thoracolumbar spine X-ray image data segmentation model to obtain first thoracolumbar spine X-ray image data detection information;

[0103] S33, updating parameters of the thoracic and lumbar vertebrae X-ray film image data segmentation model based on the first thoracic and lumbar vertebrae X-ray film image data detection information and the image data label information of the training set;

[0104] S34, determining whether the training times value is greater than a preset training times threshold, and obtaining a training times determination result;

[0105] Increase the training times by 1;

[0106] When the result of the training number judgment is yes, executing S35;

[0107] When the result of the training number judgment is no, executing S32;

[0108] S35, using the test set, testing and processing the thoracolumbar vertebra X-ray film image data segmentation model to obtain second thoracolumbar vertebra X-ray film image data detection information;

[0109] S36, comparing the detection information of the second thoracic and lumbar vertebrae X-ray image data with the image data label information of the test set to obtain prediction accuracy information;

[0110] S37, determining whether the prediction accuracy information is greater than a preset accuracy threshold, and obtaining an accuracy determination result;

[0111] When the accuracy determination result is no, executing S31;

[0112] If the accuracy judgment result is yes, the training process of the thoracic and lumbar spine X-ray film image data segmentation model is completed to obtain the thoracic and lumbar spine X-ray film image data segmentation optimization model.

[0113] It can be seen that the implementation of the thoracic and lumbar spine X-ray film segmentation method described in the embodiment of the present invention is conducive to improving the accuracy of X-ray film segmentation, thereby improving the degree of automation and accuracy of auxiliary diagnosis of X-ray films, and solving the problem of inaccurate and inconsistent X-ray film segmentation results caused by human factors.

[0114] In an optional embodiment, in the above step S5, the use of the thoracolumbar spine X-ray image data segmentation optimization model to process the target thoracolumbar spine X-ray image data to obtain target thoracolumbar spine image segmentation data includes:

[0115] S51, preprocessing the target thoracic and lumbar spine X-ray image data to obtain target preprocessed X-ray image data;

[0116] S52, performing feature extraction, encoding, decoding, feature recognition and fusion processing on the target pre-processed X-ray film image data to obtain target thoracic and lumbar spine X-ray film image segmentation data.

[0117] It can be seen that the implementation of the thoracic and lumbar spine X-ray film segmentation method described in the embodiment of the present invention is conducive to improving the accuracy of X-ray film segmentation, thereby improving the degree of automation and accuracy of auxiliary diagnosis of X-ray films, and solving the problem of inaccurate and inconsistent X-ray film segmentation results caused by human factors.

[0118] In another optional embodiment, in the above step S51, preprocessing the target thoracic and lumbar spine X-ray image data to obtain target preprocessed X-ray image data includes:

[0119] S511, based on the data input layer, obtaining the target thoracic and lumbar spine X-ray image data;

[0120] It should be noted that the data input layer is used to receive the target thoracic and lumbar spine X-ray image data acquired by the data acquisition module;

[0121] It should be noted that the enhancement process uses an adaptive histogram equalization method to enhance image features;

[0122] S512, performing filtering processing on the target thoracic and lumbar spine X-ray image data based on the data filtering layer to obtain first target pre-processed X-ray image data;

[0123] It should be noted that the data filtering layer is used to receive the target thoracic and lumbar spine X-ray film image data sent by the data input layer, and perform filtering processing on the target thoracic and lumbar spine X-ray film image data to obtain the first target pre-processed X-ray film image data;

[0124] The filtering process of the target thoracic and lumbar spine X-ray film image data to obtain first target pre-processed X-ray film image data includes:

[0125] Binarizing the target thoracic and lumbar spine X-ray image data to obtain target thoracic and lumbar spine X-ray grayscale image data;

[0126] Optionally, using an improved Gaussian filter algorithm model, denoising is performed on the target thoracic and lumbar spine X-ray film grayscale image data to obtain first target preprocessed X-ray film image data;

[0127] The improved Gaussian filtering algorithm model expression is:

[0128]

[0129] Wherein, G(x,y) represents the image pixel value after Gaussian filtering, (x,y) represents the grayscale image data of the target thoracic and lumbar spine X-ray film; σ is the standard deviation of the Gaussian filter, which is used to control the smoothness of the Gaussian filter;

[0130] Optionally, using an adaptive median filter model to perform denoising on the target thoracic and lumbar spine X-ray film grayscale image data to obtain first target preprocessed X-ray film image data, including:

[0131] Step 1: Based on the gradient acquisition model, the gradient value of the target thoracic and lumbar spine X-ray image is calculated and acquired;

[0132] The gradient acquisition model expression is:

[0133]

[0134] Wherein, G(x,y) represents the gradient of the grayscale image of the target thoracic and lumbar spine X-ray film; F(x,y) represents the forward gradient of the grayscale image of the target thoracic and lumbar spine X-ray film; D(x,y) represents the backward gradient of the grayscale image of the target thoracic and lumbar spine X-ray film; (x,y) represents the pixel data of the target thoracic and lumbar spine X-ray film;

[0135] Step 2: preset the filter window parameter value to obtain the initial filter half-length;

[0136] It should be noted that the half-length of the filter is r, and the length of the filter window is 2×r+1;

[0137] Step 3, determining the direction of the filtering window;

[0138] Step 4, obtaining the grayscale median, maximum grayscale value and minimum grayscale value of the filter window;

[0139] Step 5, obtaining a difference between the grayscale median value and the minimum grayscale value to obtain a first grayscale difference;

[0140] Obtaining a difference between the grayscale median value and the maximum grayscale value to obtain a second grayscale difference;

[0141] Step 6: When the first grayscale difference is greater than a judgment threshold and the second grayscale difference is less than the judgment threshold, the target thoracic and lumbar spine X-ray film grayscale image data is processed using an image data grayscale calculation model to obtain a first target preprocessed X-ray film image grayscale value, and then steps 7 to 9 are executed;

[0142] It should be noted that the judgment threshold is 0;

[0143] The grayscale calculation model expression of the image data is:

[0144] f(x, y)=Sort{f(x+a, y+b), (a, b)∈r(x, y)},·

[0145] Wherein, f(x, y) represents the image pixel value after median filtering of the grayscale data of the target thoracic and lumbar spine X-ray film, (x, y) represents the grayscale value of each point in the grayscale image of the target thoracic and lumbar spine X-ray film; r is the half-length of the filtering window; Sort represents the sorting operation of the valid areas of a and b;

[0146] When the first grayscale difference is not greater than a judgment threshold or the second grayscale difference is not less than the judgment threshold, adjusting a filter window parameter value, increasing the filter window, and adjusting a filter half-length;

[0147] When the half-length of the adjustment filter is smaller than the half-length of the image size, executing steps 4 to 6;

[0148] When the half-length of the adjustment filter is not less than the half-length of the image size, the target thoracic and lumbar spine X-ray film grayscale image data is processed using an image data grayscale calculation model to obtain first target preprocessed X-ray film image data;

[0149] The grayscale calculation model expression of the image data is:

[0150] f(x, y)=Sort{f(x+a, y+b), (a, b)∈r(x, y)},·

[0151] Wherein, f(x, y) represents the image pixel value after median filtering of the grayscale data of the target thoracic and lumbar spine X-ray film, (x, y) represents the grayscale value of each point in the grayscale image of the target thoracic and lumbar spine X-ray film; r is the half-length of the filtering window; Sort represents the sorting operation of the valid areas of a and b;

[0152] Step 7, obtaining a difference between the grayscale value of the first target preprocessed X-ray film image and the minimum grayscale value to obtain a third grayscale difference;

[0153] Step 8: Obtain a difference between the grayscale value of the first target preprocessed X-ray film image and the maximum grayscale value to obtain a fourth grayscale difference;

[0154] Step 9: when the third grayscale difference is greater than the judgment threshold and the fourth grayscale difference is less than the judgment threshold, obtaining first target pre-processed X-ray film image data;

[0155] When the third grayscale difference is not greater than the judgment threshold and the fourth grayscale difference is not less than the judgment threshold, the grayscale median is updated to the first target pre-processed X-ray film image data.

[0156] S513, based on the data transformation layer, segmenting the first target preprocessed X-ray film image data to obtain a second target preprocessed X-ray film image data set;

[0157] It should be noted that the data conversion layer is used to receive the first target pre-processed X-ray film image data set output by the data filtering layer, and segment the first target pre-processed X-ray film image data set to obtain the second target pre-processed X-ray film image data set;

[0158] The second target pre-processed X-ray film image data set includes a plurality of second target pre-processed X-ray film image data;

[0159] S514, based on the image enhancement layer, using the image data enhancement algorithm model, performing data enhancement on the second target preprocessed X-ray film image dataset to obtain a third target preprocessed X-ray film image dataset;

[0160] It should be noted that the image enhancement layer is used to receive the second target pre-processed X-ray film image dataset output by the data conversion layer, and perform enhancement processing on the second target pre-processed X-ray film image dataset to obtain the third target pre-processed X-ray film image dataset;

[0161] The third target pre-processed X-ray film image data set includes a plurality of third target pre-processed X-ray film image data;

[0162] The image data enhancement algorithm model expression is:

[0163] C i,j (k) = α·(l-1)·N i,j (k),k=0,1,…,l-1;

[0164]

[0165] Wherein, α is the adjustment coefficient; k represents the gray level; l represents the number of gray levels of the image; AB represents the total number of pixels in the second target pre-processed X-ray film image data; C i,j (k) represents the third target pre-processed X-ray film image data; M i,j (l) represents the number of times a pixel with gray level k appears in the second target pre-processed X-ray film image data; N i,j (k) represents the probability that a pixel with a gray level less than or equal to k appears in the second target pre-processed X-ray film image data;

[0166] S515, performing image stitching and reconstruction on the third target preprocessed X-ray film image data set based on the data reconstruction layer to obtain target preprocessed X-ray film image data;

[0167] It should be noted that the data reconstruction layer is used to receive the third target pre-processed X-ray film image data set output by the image enhancement layer, and perform image stitching and reconstruction on the third target pre-processed X-ray film image data set according to the position information to obtain pre-processed thoracic and lumbar spine X-ray film image data;

[0168] S516, outputting the target pre-processed X-ray film image data to the data processing module based on the data output layer;

[0169] It should be noted that the data output layer is used to receive the target pre-processed X-ray film image data output by the data reconstruction layer, and output the target pre-processed X-ray film image data to the data processing module.

[0170] It can be seen that the implementation of the thoracic and lumbar spine X-ray film segmentation method described in the embodiment of the present invention is conducive to improving the accuracy of X-ray film segmentation, thereby improving the degree of automation and accuracy of auxiliary diagnosis of X-ray films, and solving the problem of inaccurate and inconsistent X-ray film segmentation results caused by human factors.

[0171] In another optional embodiment, in the above step S52, the step of performing feature extraction, encoding, decoding, feature recognition, and fusion processing on the target pre-processed X-ray film image data to obtain target thoracic and lumbar spine X-ray film image segmentation data includes:

[0172] S521, based on the input layer, obtaining the target pre-processed X-ray film image data;

[0173] It should be noted that the input layer is used to receive the target pre-processed X-ray film image data output by the data pre-processing module and send the target pre-processed X-ray film image data to the image compression layer;

[0174] S522, performing feature image extraction on the target preprocessed X-ray film image data based on the image compression layer to obtain target first feature image data, target second feature image data, target third feature image data, and target feature image data;

[0175] It should be noted that the image compression layer is used to receive the target preprocessed X-ray film image data output by the input layer, and perform feature image extraction and feature image segmentation processing on the target preprocessed X-ray film image data with a size of 512×512×1 to obtain target first feature image data, target second feature image data, target third feature image data and target feature image data;

[0176] Optionally, the image compression layer adopts Figure 2 The ResNet50 convolutional neural network performs feature extraction and data compression processing, wherein the first convolution block of the ResNet50 outputs the target first feature image data, which is compressed to 1 / 2 of the target pre-processed X-ray film image data; the second convolution block of the ResNet50 outputs the target second feature image data, which is compressed to 1 / 4 of the target pre-processed X-ray film image data; the third convolution block of the ResNet50 outputs the target third feature image data, which is compressed to 1 / 8 of the target pre-processed X-ray film image data;

[0177] The size of the target feature image data is 64×64, which is eight times the down-sampled size of the target pre-processed X-ray film image data;

[0178] S523, performing feature image segmentation processing on the target feature image data based on the image segmentation layer to obtain target feature image patch data;

[0179] It should be noted that the image segmentation layer is used to receive the target feature image data output by the image compression layer and perform segmentation processing on the target feature image data, dividing the target feature image data into N 2D image patches according to a set size of 1×1, where the image patch size is P×P, and the total number is N=(64×64) / P 2 , obtaining the feature image patch data;

[0180] S524, performing flattening processing on the target feature image patch data based on the image flattening processing layer to obtain a one-dimensional sequence of target feature images;

[0181] It should be noted that the image flattening processing layer is used to receive the target feature image patch data output by the image segmentation layer, and perform flattening processing on the target feature image patch data to obtain a one-dimensional sequence of target feature images;

[0182] S525, based on the image position coding layer, using the image position feature model, iteratively processing the one-dimensional sequence of the target feature image to obtain target feature image coding data;

[0183] It should be noted that the image position encoding layer is used to receive the one-dimensional sequence of target feature images output by the image flattening processing layer, and iteratively process the one-dimensional sequence of target feature images to obtain the target feature image encoding data;

[0184] Preferably, the number of iterative processing is 12, and the output is a one-dimensional vector with the same size as the original;

[0185] The image position feature model expression is:

[0186]

[0187] Among them, Z0 is the image position feature vector; X p represents the feature image patch at position p; E is the embedded projection of the feature image patch; N is the number of feature image patches; E pos Encode the location of the feature image patch;

[0188] S526, based on the image attention fusion layer, using the channel attention processing mechanism, decoding the target feature image encoding data to obtain target channel attention feature data;

[0189] It should be noted that the image attention fusion layer performs global maximum pooling and mean pooling on the input target feature image encoding data by channel, sends the two one-dimensional vectors after pooling to the fully connected layer for operation and then adds them to generate a one-dimensional channel attention, and then multiplies the channel attention with the input element to obtain the target channel attention feature data F' after channel attention adjustment;

[0190] The channel attention processing mechanism is expressed as:

[0191]

[0192] Wherein, F is the target feature image encoding data; F' is the target channel attention feature data; Indicates multiplication; M C (F) represents the target feature image encoding data channel attention;

[0193] S527, based on the image attention fusion layer, using a spatial attention processing mechanism, processing the target channel attention feature data to obtain target comprehensive feature image data;

[0194] It should be noted that the image attention fusion layer performs global maximum pooling and mean pooling on the target channel attention feature data F' in space, concatenates the two two-dimensional vectors generated by pooling, and performs a convolution operation to obtain two-dimensional spatial attention feature data. The spatial attention is then element-wise multiplied with the target channel attention feature data F' to obtain a target comprehensive feature image data with the same dimension as the original feature map.

[0195] The spatial attention processing mechanism is expressed as:

[0196]

[0197] Wherein, F is the target feature image encoding data; F' is the target channel attention feature data; Indicates multiplication; M C (F) represents the target feature image encoding data channel attention;

[0198] S528, based on the image attention fusion layer, interpolating and concatenating the target first feature image data, the target second feature image data, the target third feature image data, and the target comprehensive feature image data to obtain target multi-dimensional feature image data, including:

[0199] The image attention fusion layer performs a first bilinear interpolation upsampling and a 1×1 convolution operation on the target comprehensive feature image data to obtain first target comprehensive feature map data that matches the size and number of channels of the target third feature map data, and splices the first target comprehensive feature map data and the target third feature map data along the channel dimension to obtain first spliced ​​comprehensive target feature map data;

[0200] Performing a second bilinear interpolation upsampling and 1×1 convolution operation on the first spliced ​​comprehensive target feature map data to obtain second target comprehensive feature map data that matches the size and number of channels of the target second feature map data, and splicing the second target comprehensive feature map data and the target second feature map data along the channel dimension to obtain second spliced ​​comprehensive target feature map data;

[0201] The second spliced ​​comprehensive target feature map data is subjected to a third bilinear interpolation upsampling and a 1×1 convolution operation to obtain third target comprehensive feature map data that matches the size and number of channels of the target first feature map data. The third target comprehensive feature map data and the target first feature map data are spliced ​​along the channel dimension to obtain target multidimensional feature image data.

[0202] It should be noted that, through the above processing, the low-level spatial detail information and the high-level semantic information are fused together. The low-level feature map contains rich spatial detail information (edges and textures of the image), and the high-level feature map contains rich semantic information such as position information. The two are spliced ​​together to obtain the target multi-dimensional feature image data containing both spatial details and semantic content.

[0203] 529, performing feature image restoration processing on the target multi-dimensional feature image data based on the image restoration layer to obtain target thoracic and lumbar spine X-ray image segmentation data;

[0204] The image restoration layer is used to map each pixel value of the target multidimensional feature image data to a value between 0 and 1, obtain the probability that the pixel belongs to a certain category, and determine the relationship between the probability value and a set threshold value. When the probability value is greater than or equal to the set threshold value, the pixel is marked as a spine region and the grayscale value is set to 255; when the probability value is less than the set threshold value, the pixel is marked as background and the grayscale value is set to 0, thereby obtaining a pair of target thoracic and lumbar spine X-ray image segmentation data with the same size as the original image;

[0205] Preferably, the threshold is set to 0.5.

[0206] Finally, thresholding is performed, and the threshold is set to 0.5. The pixels with a probability greater than 0.5 are marked as the spine area (foreground category), and the grayscale value is set to 255. The pixels with a probability less than 0.5 are marked as the background category, and the grayscale value is set to 0, thereby generating a predicted image with the same size as the original image.

[0207] It can be seen that the implementation of the thoracic and lumbar spine X-ray film segmentation method described in the embodiment of the present invention is conducive to improving the accuracy of X-ray film segmentation, thereby improving the degree of automation and accuracy of auxiliary diagnosis of X-ray films, and solving the problem of inaccurate and inconsistent X-ray film segmentation results caused by human factors.

[0208] The present invention applies the thoracic and lumbar spine X-ray segmentation method described in the first embodiment of the present invention. Compared with the existing neural network models such as U-Net, TransUNet, DeepLabv3, U2Net and FCN, the segmentation effect is shown in the following table. Figure 4As shown in Figure 2, the Dice coefficient increased by 3.7%, 8.1%, 4.6%, 0.22%, and 2.08%, respectively. Experimental results show that the thoracic and lumbar spine X-ray image data segmentation model facilitates doctors to identify each vertebra and determine the location of lesions, improving the image processing segmentation effect and achieving better performance.

[0209]

[0210] It can be seen that the implementation of the thoracic and lumbar spine X-ray film segmentation method described in the embodiment of the present invention is conducive to improving the accuracy of X-ray film segmentation, thereby improving the degree of automation and accuracy of auxiliary diagnosis of X-ray films, and solving the problem of inaccurate and inconsistent X-ray film segmentation results caused by human factors.

[0211] Example 2

[0212] See also Figure 2 , Figure 2 This is a schematic diagram of the structure of another thoracic and lumbar spine X-ray film segmentation device disclosed in an embodiment of the present invention. Figure 2 The described device can be applied to a medical image segmentation system, such as a local server or cloud server for medical image segmentation management, and the embodiment of the present invention does not limit this. Figure 3 As shown, the device may include:

[0213] A memory 301 storing executable program code;

[0214] a processor 302 coupled to the memory 301;

[0215] The processor 302 calls the executable program code stored in the memory 301 to execute the steps of the thoracic and lumbar spine X-ray film segmentation method described in the first embodiment.

[0216] Example 3

[0217] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps of the thoracic and lumbar spine X-ray film segmentation method described in the first embodiment.

[0218] The device embodiments described above are merely illustrative. Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0219] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by means of hardware. Based on this understanding, the above technical solution, in essence, or the portion that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, including a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0220] Finally, it should be noted that the method and device for segmenting thoracic and lumbar X-ray films disclosed in the embodiments of the present invention are only preferred embodiments of the present invention, and are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. 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 various embodiments of the present invention.

Claims

1. A thoracolumbar spine X-ray film segmentation method, characterized in that: The method comprises: S1, obtain the original data set of thoracic and lumbar spine X-ray images; S2, labeling the original data set of thoracolumbar X-ray images to obtain a label set of the original data of thoracolumbar X-ray images; S3, using the original data set of thoracolumbar X-ray images and the original data label set of thoracolumbar X-ray images, training a thoracolumbar X-ray image data segmentation model to obtain a thoracolumbar X-ray image data segmentation optimization model; S4, obtaining target thoracic and lumbar spine X-ray image data; S5, using the thoracolumbar spine X-ray film image data segmentation optimization model, processing the target thoracolumbar spine X-ray film image data to obtain target thoracolumbar spine image segmentation data; The step of using the thoracolumbar spine X-ray film image data segmentation optimization model to process the target thoracolumbar spine X-ray film image data to obtain target thoracolumbar spine image segmentation data includes: S51, preprocessing the target thoracic and lumbar spine X-ray film image data to obtain target preprocessed X-ray film image data; S52, performing feature extraction, encoding, decoding, feature recognition and fusion processing on the target pre-processed X-ray film image data to obtain target thoracic and lumbar spine X-ray film image segmentation data; The step of preprocessing the target thoracic and lumbar spine X-ray film image data to obtain the target preprocessed X-ray film image data includes: S511, based on the data input layer, obtaining the target thoracic and lumbar spine X-ray image data; S512, based on the data filter layer, filtering the target thoracic and lumbar spine X-ray film image data to obtain first target pre-processed X-ray film image data; S513, based on the data transformation layer, segmenting the first target preprocessed X-ray film image data to obtain a second target preprocessed X-ray film image data set; the second target preprocessed X-ray film image data set includes a plurality of second target preprocessed X-ray film image data; S514, based on the image enhancement layer, using the image data enhancement algorithm model, performing data enhancement on the second target preprocessed X-ray film image data set to obtain a third target preprocessed X-ray film image data set; the third target preprocessed X-ray film image data set includes a plurality of third target preprocessed X-ray film image data; The image data enhancement algorithm model expression is: C i,j (k)=α·(l-1)·N i,j (k), k=0,1,…,l-1; Wherein, α is the adjustment coefficient; k represents the gray level; l represents the number of gray levels of the image; AB represents the total number of pixels in the second target preprocessed X-ray film image data; C i,j (k) represents the third target pre-processed X-ray film image data; M i,j (l) represents the number of times a pixel with gray level k appears in the second target pre-processed X-ray film image data; N i,j (k) represents the probability of a pixel with a gray level less than or equal to k appearing in the second target pre-processed X-ray film image data; S515, based on the data reconstruction layer, performing image stitching and reconstruction on the third target preprocessed X-ray film image data set to obtain target preprocessed X-ray film image data; S516, based on the data output layer, outputting the target pre-processed X-ray film image data to the data processing module; The filtering process of the target thoracic and lumbar spine X-ray film image data to obtain first target pre-processed X-ray film image data includes: Binarizing the target thoracic and lumbar spine X-ray film image data to obtain target thoracic and lumbar spine X-ray film grayscale image data; Using an adaptive median filter model, denoising the target thoracic and lumbar spine X-ray film grayscale image data to obtain first target pre-processed X-ray film image data, including: Step 1, based on the gradient acquisition model, calculate and acquire the gradient value of the target thoracic and lumbar spine X-ray image; The gradient acquisition model expression is: Wherein, G(x,y) represents the gradient of the grayscale image of the target thoracolumbar X-ray film; F(x,y) represents the forward gradient of the grayscale image of the target thoracolumbar X-ray film; D(x,y) represents the backward gradient of the grayscale image of the target thoracolumbar X-ray film; (x,y) represents the pixel point data of the target thoracolumbar X-ray film image; Step 2, preset the filter window parameter value to obtain the initial filter half length; The half length of the filter is r, and the length of the filter window is 2×r+1; Step 3, determining the direction of the filtering window; Step 4, obtaining the grayscale median, maximum grayscale value and minimum grayscale value of the filter window; Step 5, obtaining the difference between the grayscale median value and the minimum grayscale value to obtain a first grayscale difference; Obtaining a difference between the grayscale median value and the maximum grayscale value to obtain a second grayscale difference; Step 6, when the first grayscale difference is greater than the judgment threshold and the second grayscale difference is less than the judgment threshold, the target thoracic and lumbar spine X-ray film grayscale image data is processed using the image data grayscale calculation model to obtain the first target preprocessed X-ray film image grayscale value, and execute steps 7 to 9; The grayscale calculation model expression of the image data is: f(x,y)=Sort{f(x+a,y+b),(a,b)∈r(x,y)}; Wherein, f(x,y) represents the image pixel value after median filtering of the grayscale data of the target thoracolumbar spine X-ray film image, (x,y) represents the grayscale value of each point of the grayscale image of the target thoracolumbar spine X-ray film; r is the half length of the filtering window; Sort represents the sorting operation of the effective areas of a and b; When the first grayscale difference is not greater than a judgment threshold or the second grayscale difference is not less than the judgment threshold, adjusting the filter window parameter value, increasing the filter window, and adjusting the filter half length; When the half length of the adjustment filter is smaller than the half length of the image size, executing steps 4 to 6; When the half-length of the adjustment filter is not less than the half-length of the image size, the target thoracic and lumbar spine X-ray film grayscale image data is processed using an image data grayscale calculation model to obtain first target preprocessed X-ray film image data; Step 7, obtaining the difference between the grayscale value of the first target preprocessed X-ray film image and the minimum grayscale value to obtain a third grayscale difference; Step 8, obtaining the difference between the grayscale value of the first target preprocessed X-ray film image and the maximum grayscale value to obtain a fourth grayscale difference; Step 9, when the third grayscale difference is greater than the judgment threshold and the fourth grayscale difference is less than the judgment threshold, obtaining the first target preprocessed X-ray film image data; When the third grayscale difference is not greater than the judgment threshold and the fourth grayscale difference is not less than the judgment threshold, the grayscale median is updated to the first target pre-processed X-ray film image data.

2. The thoracolumbar spine X-ray film segmentation method according to claim 1, characterized in that: The thoracolumbar spine X-ray film image data segmentation model includes: a data acquisition module, a data preprocessing module, a data processing module and a segmentation data output module; The output end of the data acquisition module is data-connected to the input end of the data preprocessing module; the output end of the data preprocessing module is data-connected to the input end of the data processing module; the output end of the data processing module is data-connected to the input end of the segmented data output module; The data acquisition module is used to acquire thoracic and lumbar spine X-ray image data; The data preprocessing module is used to perform denoising and enhancement preprocessing on the thoracolumbar spine X-ray film image data to obtain preprocessed thoracolumbar spine X-ray film image data; The data processing module is used to perform feature extraction, encoding, decoding and feature recognition processing on the pre-processed thoracolumbar X-ray film image data to obtain thoracolumbar X-ray film image segmentation data; The segmentation data output module is used to output the segmentation data of the thoracic and lumbar spine X-ray film image.

3. The thoracolumbar spine X-ray film segmentation method according to claim 2, characterized in that: The data preprocessing module includes: a data input layer, a data filtering layer, a data transformation layer, an image enhancement layer, a data reconstruction layer and a data output layer; The output end of the data input layer is data-connected to the input end of the data filtering layer; the output end of the data filtering layer is data-connected to the input end of the data transformation layer; the output end of the data transformation layer is data-connected to the input end of the image enhancement layer; the output end of the image enhancement layer is data-connected to the input end of the data reconstruction layer; the output end of the data reconstruction layer is data-connected to the input end of the data output layer.

4. The thoracolumbar spine X-ray film segmentation method according to claim 2, characterized in that: The data processing module includes: an input layer, an image compression layer, an image segmentation layer, an image flattening layer, an image position encoding layer, an image attention fusion layer, and an image restoration layer; The output end of the input layer is data-connected to the input end of the image compression layer; the output end of the image compression layer is data-connected to the input end of the image segmentation layer; the output end of the image segmentation layer is data-connected to the input end of the image flattening layer; the output end of the image flattening layer is data-connected to the input end of the image position encoding layer; the output end of the image position encoding layer is data-connected to the input end of the image attention fusion layer; the output end of the image attention fusion layer is data-connected to the input end of the image restoration layer.

5. The thoracolumbar spine X-ray film segmentation method according to claim 1, characterized in that: The method uses the original data set of thoracolumbar X-ray images and the original data label set of thoracolumbar X-ray images to train the thoracolumbar X-ray image data segmentation model to obtain the thoracolumbar X-ray image data segmentation optimization model, including: S31, dividing the original data set of thoracolumbar X-ray images and the original data label set of thoracolumbar X-ray images according to a preset ratio to obtain a training set and a test set; Set the number of training times to 1; S32, using the training set, training a thoracolumbar spine X-ray image data segmentation model to obtain first thoracolumbar spine X-ray image data detection information; S33, based on the first thoracolumbar spine X-ray film image data detection information and the image data label information of the training set, updating the parameters of the thoracolumbar spine X-ray film image data segmentation model; S34, determining whether the training times value is greater than a preset training times threshold, and obtaining a training times determination result; Increase the training times by 1; When the result of the training times is yes, executing S35; When the result of the training number determination is no, executing S32; S35, using the test set, testing and processing the thoracolumbar vertebra X-ray film image data segmentation model to obtain second thoracolumbar vertebra X-ray film image data detection information; S36, comparing the second thoracic and lumbar spine X-ray film image data detection information with the image data label information of the test set to obtain prediction accuracy information; S37, determining whether the prediction accuracy information is greater than a preset accuracy threshold, and obtaining an accuracy determination result; When the accuracy determination result is no, executing S31; If the accuracy judgment result is yes, the training process of the thoracolumbar spine X-ray film image data segmentation model is completed to obtain the thoracolumbar spine X-ray film image data segmentation optimization model.

6. The thoracolumbar spine X-ray film segmentation method according to claim 1, characterized in that: The step of performing feature extraction, encoding, decoding, feature recognition and fusion processing on the target pre-processed X-ray film image data to obtain target thoracic and lumbar spine X-ray film image segmentation data includes: S521, based on the input layer, obtaining the target pre-processed X-ray film image data; S522, based on the image compression layer, extracting characteristic images from the target preprocessed X-ray film image data to obtain target first characteristic image data, target second characteristic image data, target third characteristic image data and target characteristic image data; S523, performing feature image segmentation processing on the target feature image data based on the image segmentation layer to obtain target feature image patch data; S524, based on the image flattening processing layer, flattening the target feature image patch data to obtain a one-dimensional sequence of target feature images; S525, based on the image position coding layer, using the image position feature model, iteratively processing the one-dimensional sequence of the target feature image to obtain target feature image coding data; The image position feature model expression is: Among them, Z0 is the image position feature vector; X p represents the feature image patch at position p; E is the embedded projection of the feature image patch; N is the number of feature image patches; E pos Encode the location of feature image patches; S526, based on the image attention fusion layer, using the channel attention processing mechanism, decoding the target feature image encoding data to obtain target channel attention feature data; S527, based on the image attention fusion layer, using the spatial attention processing mechanism, processing the target channel attention feature data to obtain target comprehensive feature image data; S528, based on the image attention fusion layer, interpolate and concatenate the target first feature image data, the target second feature image data, the target third feature image data and the target comprehensive feature image data to obtain target multi-dimensional feature image data; S529, based on the image restoration layer, perform feature image restoration processing on the target multi-dimensional feature image data to obtain target thoracic and lumbar spine X-ray film image segmentation data.

7. A thoracolumbar spine X-ray film segmentation device, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the thoracic and lumbar spine X-ray film segmentation method according to any one of claims 1-6.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores the thoracolumbar X-ray image data segmentation model, and when the thoracolumbar X-ray image data segmentation model is called, it is used to execute the thoracolumbar X-ray segmentation method according to any one of claims 1-6.