Training method and device for strong logic reconstruction model of lumbar CT bony lateral recess area images
Through the joint training of domain adaptation model and automatic rotation correction technology, the problem of vertebral body rotation in CT images is solved, the detection accuracy and diagnostic consistency of the lumbar CT bone window recess image is improved, and the accuracy of medical diagnosis is improved. Patient experience.
Patent Information
- Application Number
- CN202411369885.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-09-29
AI Technical Summary
The problem of vertebral rotation in CT images leads to inaccuracy of lateral crypt detection and inconsistency of diagnostic results, which is difficult to effectively solve in the prior art.
The domain adaptation model is used to train strong logic reconstruction model for lumbar CT bone lateral crypt area images. Through the pre-training stage and the domain adaptive training stage, the source domain and target domain data are used for joint training, and three-dimensional rotation correction is automatically performed to eliminate Problems of vertebral body rotation caused by factors such as the patient's position.
The robustness and generalization of the strong logic image correction equipment of the lumbar CT bone window side recess is improved, ensuring the accuracy and reliability of image correction, improving the accuracy of medical diagnosis, and reducing the work burden of doctors.
Smart Images

Figure CN118864484B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and in particular relates to a method and a device for training a strong logic reconstruction model of a lumbar CT bony lateral recess region image. Background Art
[0002] As we all know, CT is the abbreviation of Computed Tomography. CT uses X-ray beams to scan a certain thickness of a certain part of the human body. The detector receives the X-rays that pass through the layer, converts them into visible light, and then converts them into electrical signals by photoelectric conversion. Then, they are converted into digital signals by analog / digital converters and input into computers for processing. The image formation process is like dividing the selected layer into several rectangular blocks of equal volume, called voxels. The information obtained from the scan is calculated to obtain the X-ray attenuation coefficient or absorption coefficient of each voxel, and then arranged into a matrix, that is, a digital matrix. CT technology plays a vital role in modern medical diagnosis, especially in the process of vertebral detection. It can provide high-definition internal structure images to help doctors accurately judge the condition. However, although CT technology has made significant progress, there are still some problems in practical applications. Due to the uncertainty of shooting angles, patient position and other factors, the vertebrae in CT images often have a certain rotation, which will affect the accuracy of automatic detection of the lateral recess. In addition, the difference in imaging between different CT devices may also lead to inconsistent diagnostic results. Therefore, further research and development are still needed to improve CT technology and enhance its accuracy. Summary of the invention
[0003] The purpose of the present invention is to meet actual needs and provide a method and device for training a strong logic reconstruction model of the bony lateral recess area of lumbar CT. The robustness and generalization of the strong logic image correction equipment of the lumbar CT bone window lateral recess are improved through a domain adaptation model. The high-precision detection capability of the domain adaptation model is used to automatically correct the three-dimensional rotation of the vertebra, eliminating the vertebral rotation problem caused by factors such as the patient's position.
[0004] The first object of the present invention is to provide a method for training a strong logic reconstruction model of a lumbar CT bony lateral recess region image, comprising:
[0005] S1, acquiring lumbar CT plain scan data, wherein the lumbar CT plain scan data includes a bone window;
[0006] S2, extracting the DICOM data of the bone window and converting it into a two-dimensional PNG image, wherein the PNG image is the source domain data and the target domain data;
[0007] S3, annotating the source domain png image to obtain an annotated json file, wherein the json file is a category and a bounding box label of the source domain data;
[0008] S4. Use the domain adaptation model to train the data; specifically:
[0009] The training process is divided into a pre-training stage and a domain adaptive training stage; wherein:
[0010] In the pre-training stage, a model in the source domain is trained using source domain data as a pre-training model;
[0011] In the domain adaptation training stage, the pre-trained model is used to jointly train the source domain data and the target domain data, and the target domain data is used for verification.
[0012] Preferably, the labeling includes: performing target detection and key point detection labeling on sagittal images; performing segmentation, target detection and key point detection labeling on axial images; and the labeled objects are all vertebral images.
[0013] Preferably, the domain adaptation model is used to train the object detection and key point detection annotation on the axial image, the segmentation, object detection and key point detection annotation on the axial image in the json file respectively.
[0014] The second object of the present invention is to provide a lumbar CT bony lateral recess region image strong logic reconstruction model training device, comprising:
[0015] A data acquisition module, which acquires lumbar CT plain scan data, wherein the lumbar CT plain scan data includes a bone window;
[0016] A data preprocessing module extracts the DICOM data of the bone window and converts it into a two-dimensional PNG image, wherein the PNG image is the source domain data and the target domain data;
[0017] A labeling module labels the source domain PNG image to obtain a labeled JSON file, wherein the JSON file contains the category and bounding box label of the source domain data;
[0018] The training module uses the domain adaptation model to train the data; specifically:
[0019] The training process is divided into a pre-training stage and a domain adaptive training stage; wherein:
[0020] In the pre-training stage, a model in the source domain is trained using source domain data as a pre-training model;
[0021] In the domain adaptation training stage, the pre-trained model is used to jointly train the source domain data and the target domain data, and the target domain data is used for verification.
[0022] Preferably, the labeling includes: performing target detection and key point detection labeling on sagittal images; performing segmentation, target detection and key point detection labeling on axial images; and the labeled objects are all vertebral images.
[0023] Preferably, the domain adaptation model is used to train the object detection and key point detection annotation on the axial image, the segmentation, object detection and key point detection annotation on the axial image in the json file respectively.
[0024] The third object of the present invention is to provide a method for correcting a strong logic image of a lumbar CT bony lateral recess region image, based on the above-mentioned lumbar CT bony lateral recess region image strong logic reconstruction model training device, completing the following steps:
[0025] Extract features and center position of axial images;
[0026] The rotation angle at each stage of the sagittal plane was calculated;
[0027] The secondary rotation angle at each stage of the sagittal position was calculated;
[0028] The rotation angle at each stage of the coronal position was calculated;
[0029] The rotation angle at each stage of the axial position was calculated;
[0030] Morphological rotation: The rotation methods for sagittal, coronal, and axial positions are the same;
[0031] Based on the corrected images, measurements of the lateral recess were performed.
[0032] The fourth object of the present invention is to provide a system for correcting strong logic images of lumbar CT bony lateral recess region images, comprising one or more processors; a storage device for storing one or more programs;
[0033] When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned lumbar CT bony lateral recess area image strong logic reconstruction model training method, and train the lumbar CT bony lateral recess area image strong logic reconstruction model training device according to the lumbar CT bony lateral recess area image strong logic reconstruction model training method to perform image correction.
[0034] The fifth object of the present invention is to provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned strong logic reconstruction model training method for lumbar CT bony lateral recess area images.
[0035] The sixth object of the present invention is to provide a computer program product, comprising a computer program, which, when executed by a processor, implements the above-mentioned strong logic reconstruction model training method for lumbar CT bony lateral recess area images.
[0036] The advantages and positive effects of this application are:
[0037] The construction of the domain adaptation model involved in the present invention is obtained by deep learning and training of various types of annotation information contained in the json file (target detection and key point detection annotation on sagittal images; segmentation, target detection, and key point detection annotation on axial images). The training process of this model is subdivided into two important stages: the pre-training stage and the domain adaptation training stage. In the pre-training stage, the present application uses source domain data to train a model that performs best in the source domain as a pre-training model, with the aim of obtaining a pre-training model with excellent performance. This pre-training model is the basis for subsequent domain adaptation training, and it will play a key role in the domain adaptation training stage.
[0038] After entering the domain adaptation training phase, this application uses the model obtained in the previous pre-training phase to co-train the source domain data and the target domain data, and uses the target domain data for verification. This joint training method can not only consolidate and strengthen the model's processing capabilities for source domain data, but also broaden the model's learning horizons through target domain data, enabling it to better understand and adapt to the characteristics and differences of data in different fields. In this process, the target domain data plays a role in eliminating domain gaps and aligning features.
[0039] Through the training method described above, the domain adaptation model obtained by the present invention shows significant improvement in the robustness and generalization of the strong logic image correction device for the lateral recess of the lumbar CT bone window. More importantly, the present invention cleverly utilizes the high-precision detection capability of the domain adaptation model and can automatically correct the three-dimensional rotation of the vertebra. This function effectively solves the problem of vertebral rotation caused by factors such as changes in patient position, thereby ensuring the accuracy and reliability of image correction. This is of great significance for improving the accuracy of medical diagnosis, reducing the workload of doctors, and enhancing the diagnosis and treatment experience of patients. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] 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 paying any creative work.
[0041] Figure 1A flowchart of reconstruction model training provided by a preferred embodiment of the present invention is shown;
[0042] Figure 2 A partial flow chart of model training provided by a preferred embodiment of the present invention is shown;
[0043] Figure 3 A device block diagram provided by a preferred embodiment of the present invention is shown;
[0044] Figure 4 shows an image correction flow chart provided by a preferred embodiment of the present invention;
[0045] Figure 5 A schematic diagram of key points of lumbar CT sagittal position provided by a preferred embodiment of the present invention is shown;
[0046] Figure 6 A schematic diagram showing the positions of the left and right key points of the lateral recess provided by a preferred embodiment of the present invention is shown. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in 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 creative work are within the scope of protection of the present invention.
[0048] See also Figures 1 to 6 ;
[0049] First embodiment
[0050] The present invention provides a method for training a strong logic reconstruction model of lumbar CT bony lateral recess area images, such as Figure 1 As shown, the following steps are included:
[0051] S1. Acquire lumbar CT plain scan data. During conventional plain scan, the lumbar CT plain scan data mainly includes a bone window and may also include a soft tissue window;
[0052] S2, extracting the DICOM data of the bone window and converting it into a two-dimensional PNG image; the PNG image is the source domain data and the target domain data;
[0053] S3. Experienced staff annotates the source domain png image to obtain an annotated json file; the json file contains the category and bounding box labels of the source domain data; wherein:
[0054] Labeling is not limited to object detection, key point detection, segmentation, etc. Specifically: object detection, key point detection and labeling will be performed on sagittal images; segmentation, object detection, key point detection and labeling will be performed on axial images. The labeled objects are all vertebrae;
[0055] S4. Use the domain adaptation model to train the data; specifically:
[0056] The training process is divided into a pre-training stage and a domain adaptive training stage; wherein:
[0057] In the pre-training stage, a model with the best performance in the source domain is trained using the source domain data as a pre-training model;
[0058] In the domain adaptation training stage, the pre-trained model is used to jointly train the source domain data and the target domain data, and the target domain data is used for verification.
[0059] When traditional AI models are used for detection, they will encounter the challenge of "domain gap" caused by differences in data feature distribution. The "domain gap" stems from the differences in data acquisition and processing between different models of CT equipment. This difference is mainly manifested in differences in imaging protocols, reconstruction algorithms, etc., resulting in significant differences in contrast, noise, spatial resolution, etc. in the scanned images of the same patient. Therefore, even if a deep learning model trained by one device performs well on one device, it may experience reduced accuracy or performance collapse on another device. The most direct way to solve this "domain gap" is to collect enough medical data from all other fields and have it annotated by professional doctors. But it is obvious that this direct method is almost impossible to achieve, whether it is the scarcity of data or the expensive expert annotation. Therefore, this application has developed a new model, namely a domain adaptation model to solve these problems in CT.
[0060] This application uses the domain adaptation model to train the above five annotation results (target detection and key point detection annotation on sagittal images; segmentation, target detection, and key point detection annotation on axial images). The following models are specifically axial target detection models, and the data is axial vertebra target detection data. This method is universal for segmentation, target detection, and key point detection. It just needs to be trained separately.
[0061] The training here is to input images and annotations into the initial model. After training, the initial model is trained to obtain a mature model, which can automatically detect and recognize images.
[0062] This invention is based on the existing AI detection model YOLOv8. First, compared with the previous research on unsupervised domain adaptation (UDA), a new training strategy for the domain adaptation model (Pretraining-Joint Training) is proposed:
[0063] This strategy divides the training process into a pre-training phase and a domain adaptive training phase. In the pre-training phase, a model with the best performance in the source domain is trained on the source domain (with labeled data) as a pre-training model. In the domain adaptive training phase, this pre-trained model is used for joint training on the source domain and the target domain (without labeled data), and then verified on the target domain. Making full use of a large amount of labeled data in the source domain for pre-training can build a model with excellent performance in the source domain. This provides a high-quality initial state for subsequent cross-domain migration, which is particularly important for avoiding negative migration. In domain adaptive training, the pre-trained model provides powerful feature extraction capabilities, laying a good foundation for subsequent feature fusion and similarity modeling. At the same time, the pre-trained model has learned general and domain-invariant features, which is conducive to capturing shared features in different domains and enhancing the generalization of the model. In addition, an excellent pre-trained model can also provide a good starting point for subsequent optimization, greatly accelerating the convergence process of feature similarity modeling and improving the overall training efficiency.
[0064] As for the model itself, the pre-training stage is the YOLOV8 model, and the domain adaptation training stage needs to read the data of the target domain and the source domain (axial vertebrae target detection data) at the same time. Figure 2 As shown:
[0065] First, a source domain dataset of lumbar CT sagittal images from the same device is given. ,in, Represents the source domain dataset: Represents lumbar spine CT axial images in the source domain, which have similar imaging parameters and imaging quality. express The category label of express The target domain dataset of lumbar CT sagittal images from different devices but from the same CT device is ; ,in Represents an image used for domain adaptation training.
[0066] The pre-training phase consists of the following components: the initialized backbone network , initialized detection head And the composite loss function Specifically, the initialized backbone network The source domain data Converted to intermediate features of three scales Next, the detection head These intermediate features Further generate the final features of three scales Finally, the composite loss function Used to balance the generalization ability and accuracy of the model.
[0067] The domain adaptation training phase consists of the following components: the backbone network of the pre-trained model trained in the first phase , the detection head of the pre-trained model trained in the first stage , Feature Fusion Network , composite loss function And the cross-domain loss function Among them, the backbone network The source domain data and target domain data Generate intermediate features of three scales and . Detection head These intermediate features will be further transformed into final features and . Still using the composite loss function To process the features of the source domain. Then, the intermediate features and Through feature fusion Get the intermediate features of the source domain after feature fusion The intermediate features of the target domain after feature fusion Finally, these fused features are mapped to the latent distance space using the cross-domain loss function To measure the generalization ability and accuracy of cross-domain models.
[0068] Select the intermediate features between the model's backbone network and the detection head for feature fusion, and then calculate the pairwise distance between them, which is the feature similarity. Then, by minimizing this feature similarity as part of the domain adaptation loss function, it can help the model capture shared features in different domains, maintain the model's detection performance, and improve generalization capabilities. This feature relationship modeling helps the model better understand the connection between features and learn more representative feature representations, thereby improving the adaptability and performance of target detection in different vertebral data.
[0069] First, the intermediate features between the backbone network and the detection head are fused into a one-dimensional vector:
[0070] ;
[0071] ;
[0072] represents the operation of flattening a multidimensional feature map into a one-dimensional array, Indicates a splicing operation along the sample dimension; Represents the source domain features that pass through the backbone; Represents the target domain features passing through the backbone.
[0073] Split the output features of the head into features of only the source domain, and continue to calculate the loss of the source domain:
[0074] ;
[0075] in is the classification loss, yes The weight of . Indicates Complete-IoU Loss; represents Distribution Focal Loss; the position regression loss is given by and constitute, yes The weight of yes The weight of .
[0076] Calculate intermediate features and its nearest feature in the target domain The average of all minimum pairwise distances is used as the domain adaptation loss :
[0077] ;
[0078] in, is the batch size of the source domain, is the batch size of the target domain. Minimizing the pairwise distance can directly optimize the feature alignment of different domains. Using hyperparameters To control the weight of the domain adaptation loss in the total loss, the final loss function is:
[0079] ;
[0080] By minimizing this domain adaptation loss, we hope to narrow the gap between the source domain and the target domain, thereby improving the generalization performance of the model on different data domains. This domain adaptation method based on the distance between samples can effectively capture the differences between the two data domains and minimize these differences during training, thereby improving the generalization ability of the model.
[0081] In the task alignment allocator, Represents the feature map extracted from the Feature Pyramid Network (FPN); It represents Task-aligned Predictors; Class represents supervised classification; Local represents supervised positioning.
[0082] The above is the optimization part of the model, and a very important feature of yolov8 is that the backbone network of all its tasks is the same, only the head is different, which provides a great foundation for the design of a general domain adaptation model in this application. Therefore, the optimization of this application can not only be used in simple tasks such as target detection, but also segmentation and key point detection. More importantly, this application does not change any structure of the model. This application only adds a module to the outside, which is very meaningful. Because a very important feature of UDA is that it is very easy to negatively transfer, and this application can ensure that the basic performance of the model will not change. At the same time, using this strategy proposed in this application, the problem of inefficiency of previous technologies can be perfectly avoided.
[0083] A device for correcting images of the bony lateral recess area of lumbar CT images with strong logic, such as Figure 3 As shown, including:
[0084] A data acquisition module, for acquiring lumbar CT plain scan data. During conventional plain scan, the lumbar CT plain scan data mainly includes a bone window and may also include a soft tissue window;
[0085] A data preprocessing module extracts the DICOM data of the bone window and converts it into a two-dimensional PNG image; the PNG image is the source domain data and the target domain data;
[0086] In the annotation module, experienced staff annotates the source domain png image and obtains the annotated json file; the json file contains the category and bounding box labels of the source domain data; wherein: annotation is not limited to target detection, key point detection, segmentation, etc. Specifically: target detection and key point detection and annotation are performed on sagittal images; segmentation, target detection, key point detection and annotation are performed on axial images. The annotated objects are all vertebrae; e.g. Figure 5As shown: Key point 1 refers to the junction of the lower edge of the upper vertebra and the front edge of the upper vertebra; Key point 2 refers to the most concave part of the upper edge of the vertebra; Key point 3 refers to the junction of the lower edge of the upper vertebra and the posterior edge of the upper vertebra; Key point 4 and key point 5 refer to the shortest distance from the spinous process to the front vertebra; Key point 6 refers to the junction of the upper edge of the lower vertebra and the posterior edge of the lower vertebra; Key point 7 refers to the most concave part of the lower edge of the vertebra; Key point 8 refers to the junction of the upper edge of the lower vertebra and the anterior edge of the lower vertebra;
[0087] The training module uses the domain adaptation model to train the data; specifically:
[0088] The training process is divided into a pre-training stage and a domain adaptive training stage; wherein:
[0089] In the pre-training stage, a model with the best performance in the source domain is trained using the source domain data as a pre-training model;
[0090] In the domain adaptation training stage, the pre-trained model is used to jointly train the source domain data and the target domain data, and the target domain data is used for verification.
[0091] Traditional AI models will encounter differences in data distribution when performing detection, which is the challenge of "domain gap". The "domain gap" stems from the differences in data acquisition and processing between different models of CT equipment. This difference is mainly manifested in differences in imaging protocols, reconstruction algorithms, etc., resulting in significant differences in contrast, noise, spatial resolution, etc. in the scanned images of the same patient. Therefore, even if a deep learning model trained by one device performs well on one device, it may experience reduced accuracy or performance collapse on another device. The most direct way to solve this "domain gap" is to collect enough medical data from all other fields and have it labeled by professional doctors. But it is obvious that this direct method is almost impossible to achieve, whether it is the scarcity of data or the expensive expert labeling. Therefore, this application has developed a new model, namely a domain adaptation model to solve these problems in CT.
[0092] This application uses the domain adaptation model to train the following five annotation results (object detection and key point detection annotation on sagittal images; segmentation, object detection, and key point detection annotation on axial images). The following models are specifically axial object detection models, and the data is axial vertebrae object detection data. This method is universal for segmentation, object detection, and key point detection. It just needs to be trained separately.
[0093] The training here is to input images and annotations into the initial model. After training, the initial model is trained to obtain a mature model, which can automatically detect and recognize images.
[0094] This invention is based on the existing AI detection model YOLOv8. First, compared with the previous UDA research, a new domain adaptation model training strategy (Pretraining-Joint Training) is proposed:
[0095] This strategy divides the training process into a pre-training phase and a domain adaptive training phase. In the pre-training phase, a model with the best performance in the source domain is trained on the source domain (with labeled data) as a pre-training model. In the domain adaptive training phase, this pre-trained model is used for joint training on the source domain and the target domain (without labeled data), and then verified on the target domain. Making full use of a large amount of labeled data in the source domain for pre-training can build a model with excellent performance in the source domain. This provides a high-quality initial state for subsequent cross-domain migration, which is particularly important for avoiding negative migration. In domain adaptive training, the pre-trained model provides powerful feature extraction capabilities, laying a good foundation for subsequent feature fusion and similarity modeling. At the same time, the pre-trained model has learned general and domain-invariant features, which is conducive to capturing shared features in different domains and enhancing the generalization of the model. In addition, an excellent pre-trained model can also provide a good starting point for subsequent optimization, greatly accelerating the convergence process of feature similarity modeling and improving the overall training efficiency.
[0096] As for the model itself, the pre-training stage is the YOLOV8 model, and the domain adaptation training stage needs to read the data of the target domain and the source domain (axial vertebrae target detection data) at the same time. Figure 2 shown.
[0097] A method for correcting a strong logic image of a lumbar CT bony lateral recess region image is provided, based on the above-mentioned strong logic reconstruction model training device of a lumbar CT bony lateral recess region image, to complete the following steps of CT data rotation:
[0098] Step 1: Extract the features and center position of the axial image;
[0099] 1.1. Reconstruct the sagittal PNG image based on the patient's axial DICOM file and PNG image.
[0100] 1.2. Obtain the image spacing values spacing_x (pixel spacing information) and spacing_z (spacing information in the z-axis direction) by reading the patient's DICOM file.
[0101] 1.3. Use the axial segmentation model to segment the axial images in the case one by one, and perform bitwise operations on the generated mask images to obtain sub-masks.
[0102] 1.4. Process the mask data, filter out the labels that meet the conditions, rearrange the labels according to the logic, and finally save the processed mask data as a nii file.
[0103] 1.5. For each ZW image, use the object detection model to find the objects of interest, and then use the key point model to extract the key point coordinates of these objects and save them in the zw_kp_res list.
[0104] 1.6. Find the index of the median of the L3-L4 image row number, and based on this index find the result of the previous key point detection zw_kp_res to obtain the index szw_mid_num of the SZW middle slice.
[0105] Step 2: Calculate the rotation angle at each stage of the sagittal position;
[0106] 2.1. Read the image according to the sagittal szw_mid_num index, and use the sagittal target detection model to perform target detection on the selected image.
[0107] 2.2. Traverse the 6 detected vertebral regions (T12-L1, L1-L2, L2-L3, L3-L4, L4-L5, L5-S1). If only one vertebral region is detected, use it directly; if multiple vertebral regions are detected, select the region with the highest confidence. Based on the detected vertebral region, crop the region and save it as new_img.
[0108] 2.3. Use the sagittal key point detection model for new_img, and convert new_img back to the original image coordinate system, select the 6th and 8th key points, and calculate the angle between the horizontal line of point 6 and point 8 as the rotation angle.
[0109] Step 3: Calculate the secondary rotation angle at each stage of the sagittal position;
[0110] Using the result of the first sagittal rotation as input, find the index of the respective middle slice in each stage, repeat step 2, and obtain the second rotation angle of each sagittal stage;
[0111] Step 4: Calculate the rotation angle at each stage of the coronal position;
[0112] 4.1. Take the result of two sagittal rotations as input, traverse the first dimension (axial position) of the label sequence new_shi_label, obtain which pictures have labels, find the index of the first picture and add 10 pictures to it, and store all the indexes in num_list.
[0113] 4.2. For each axial image whose index appears in num_list, first use the segmentation model to obtain the target detection box, expand and crop the area, and store the expanded detection box and index in the dictionary zw_rect. Then use the lateral recess initial display target detection model to perform target detection in the cropped image and obtain the index of the initial display of the left and right lateral recesses.
[0114] 4.3. According to the initial index of the left and right lateral recesses and the detection frame corresponding to the index, the key point detection model (2 points) is used to obtain the ninth key point 9 and the tenth key point 10 of the right lateral recess, and the two points are mapped to the coronal plane to obtain the rotation angle. Figure 6 As shown, the ninth key point 9 refers to the outermost side of the right recess, and the tenth key point 10 refers to the outermost side of the left recess;
[0115] Step 5: Calculate the rotation angle of each stage of the axis position;
[0116] 5.1. Take the coronal rotation result as input, traverse the first dimension (axis) of the label sequence new_guan_label, and find the first index with a label.
[0117] 5.2. For the first labeled image, first use the segmentation model to get the target detection frame, crop the detection area, and then use the key point detection model to get the two points of the current image.
[0118] 5.3. Calculate the rotation angle of the current vertebra based on the two points.
[0119] Step 6: Morphological rotation; the rotation methods for sagittal, coronal, and axial positions are the same; the following takes the sagittal position as an example:
[0120] 6.1. Read the nii file to read the tag data and spatial coordinates, and calculate the target coordinates based on the spatial coordinates;
[0121] 6.2. Read the original DICOM data, preprocess and resample it to get the desired 3D array shape. Finally, convert it into the target shape;
[0122] a) Traverse the directory where the DICOM files are located and sort all the file paths;
[0123] b) Then, read these DICOM files one by one, extract their 2D slice data, and merge them into a 3D array;
[0124] c) Perform some basic preprocessing on this 3D array, including thresholding and data normalization;
[0125] d) Resample the 3D array to the desired shape using 1D interpolation;
[0126] e) Resize the three dimensions of the data to (depth, height, width), which makes subsequent data processing and visualization easier.
[0127] 6.3. Resample the original label data to the same shape as the target coordinates, mark the non-target category area as 0, and normalize the label data to [0, 1];
[0128] 6.4. Obtain the parameters and range limits on the z-axis by calculating the positions of non-zero elements on the z-axis to ensure that they are within the original shape range;
[0129] 6.5. Crop the image according to the parameters on the z-axis before rotating the data;
[0130] 6.6. Flip the CT data and label data along the X-axis (front and back);
[0131] 6.7. Rotate the CT data according to the angle information of the current category;
[0132] 6.8. Loop through the z-axis of the CT data and label data, rotate each slice, and save the processed CT data and label data to storage;
[0133] 6.9. Calculate the maximum available range and crop the stored processed CT data and label data;
[0134] 6.10. Convert label data into binary labels;
[0135] 6.11. Finally, save the processed CT data and label data as nii format files.
[0136] Step 7: Based on the corrected image, measure the lateral recess.
[0137] A system for correcting images of the bony lateral recess region of lumbar CT with strong logic, comprising one or more processors; a storage device for storing one or more programs;
[0138] When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned lumbar CT bony lateral recess area image strong logic reconstruction model training method, and train the lumbar CT bony lateral recess area image strong logic reconstruction model training device according to the lumbar CT bony lateral recess area image strong logic reconstruction model training method to perform image correction.
[0139] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned strong logic reconstruction model training method for lumbar CT bony lateral recess area images.
[0140] A computer program product includes a computer program, which, when executed by a processor, implements the above-mentioned strong logic reconstruction model training method for lumbar CT bony lateral recess area images.
[0141] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When the use is implemented in whole or in part in the form of a computer program product, the computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL) or wireless (e.g., infrared, wireless, microwave, etc.) mode) to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidState Disk (SSD)), etc.
[0142] The above is only a preferred embodiment of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A training device for a strong logic reconstruction model of lumbar CT bony lateral recess area images, characterized in that: include: A data acquisition module, which acquires lumbar CT plain scan data, wherein the lumbar CT plain scan data includes a bone window; A data preprocessing module extracts the DICOM data of the bone window and converts it into a two-dimensional PNG image, wherein the PNG image is the source domain data and the target domain data; A labeling module labels the source domain PNG image to obtain a labeled JSON file, wherein the JSON file contains the category and bounding box label of the source domain data; The training module uses the domain adaptation model to train the data; specifically: The training process is divided into a pre-training stage and a domain adaptive training stage; wherein: In the pre-training stage, a model in the source domain is trained using source domain data as a pre-training model; In the domain adaptation training stage, the source domain data and the target domain data are jointly trained using the pre-trained model, and the target domain data are used for verification; The method for performing strong logic image correction of lumbar CT bony lateral recess region image using the strong logic reconstruction model training device of lumbar CT bony lateral recess region image comprises: Extract features and center position of axial images; The rotation angle at each stage of the sagittal plane was calculated; The secondary rotation angle at each stage of the sagittal position was calculated; The rotation angle at each stage of the coronal position was calculated; The rotation angle at each stage of the axial position was calculated; Morphological rotation: The rotation methods for sagittal, coronal, and axial positions are the same; Based on the corrected images, measurements of the lateral recess were performed.
2. The device for training the strong logic reconstruction model of the lumbar CT bony lateral recess region image according to claim 1, characterized in that: The labeling includes: performing target detection and key point detection labeling on sagittal images; performing segmentation, target detection and key point detection labeling on axial images; and the labeled objects are all vertebrae images.
3. The device for training the strong logic reconstruction model of the lumbar CT bony lateral recess region image according to claim 2, characterized in that: The domain adaptation model is used to train the object detection and key point detection annotation on the sagittal image, the segmentation, object detection and key point detection annotation on the axial image in the JSON file.
Citation Information
Patent Citations
Lumbar vertebra CT bone window side crypt gap detection method and device
CN116758087A
Model training method, cross-domain target detection method and electronic equipment
CN118038163A
