Automatic bed board removing method and system based on CT image
By preprocessing and building physical models of CT images, combining deep learning and traditional algorithms, the bed boards in CT images are automatically removed, solving the time-consuming and error problems of manual removal, and achieving efficient and accurate bed board removal effect.
Patent Information
- Application Number
- CN202510093528.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-16
Smart Images

Figure CN120013784A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image segmentation, and in particular to a method and system for automatically removing a bed board based on a CT image. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] In CT images, the presence of the bed board often interferes with the doctor's diagnosis, especially when diagnosing diseases in the lungs, abdomen and other parts of the body.
[0004] Traditionally, in order to reduce or eliminate the impact of the bed board, radiologists or technicians need to manually edit CT images and remove the bed board image through image processing software. This manual operation is not only time-consuming and labor-intensive, but also prone to errors, resulting in reduced image quality and affecting the final diagnosis results. In addition, the CT equipment models and setting parameters used in different hospitals may vary, which further increases the difficulty of manually removing the bed board image.
[0005] In recent years, with the successful application of deep learning algorithms in the field of image recognition, new solutions have been provided for the automatic detection and removal of non-biological tissues in CT images. These methods often require a large amount of labeled data as a training basis, and still face problems such as low accuracy and poor generalization ability in practical applications. Summary of the invention
[0006] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a method and system for automatically removing bed boards based on CT images. The present invention can efficiently and accurately remove bed boards in CT images, improve the quality of medical images, reduce the workload of medical staff, and improve the level of medical services.
[0007] In order to achieve the above object, the present invention adopts the following technical solution:
[0008] A first aspect of the present invention provides a method for automatically removing a bed board based on a CT image.
[0009] A method for automatically removing bed boards based on CT images, comprising:
[0010] Preprocess the acquired CT image to obtain a CT fusion image; obtain the grayscale distribution of the bed board in the CT image according to the density and thickness of the bed board material, and generate a grayscale distribution map;
[0011] Based on the CT fusion image and grayscale distribution map, the bed board mask is obtained using the trained segmentation model;
[0012] The segmentation model includes: an encoder module, a decoder module and a prediction module. The encoder is used to extract the features of the CT fusion image and the grayscale distribution map respectively, and the decoder is used to fuse the features of the CT fusion image and the grayscale distribution map, and the prediction probability map is output through the classification layer; an adaptive threshold is introduced in the prediction module to determine the category of each voxel in the prediction probability map, and the bed board mask is output.
[0013] Furthermore, the adaptive threshold is described by the following formula:
[0014]
[0015] Among them, T i represents the adaptive threshold; μ i represents the probability mean in the local neighborhood of the i-th voxel; α represents the coefficient, which is used to control the strictness of the threshold; represents the probability variance within the local neighborhood of the i-th voxel.
[0016] Furthermore, during the training process of the segmentation model, a comprehensive loss function is used to optimize the hyperparameters of the segmentation model; the loss function is expressed by the following formula:
[0017] CL=λ1·AWPFL+λ2·RGBWL+λ3HUWL
[0018] Among them, AWPFL represents adaptive weighted penalty loss, RGBWL represents rotation gradient boundary weighted loss, HUWL represents weighted loss based on HU value, and λ1, λ2, and λ3 represent hyperparameters.
[0019] Furthermore, the acquired CT images are preprocessed to obtain a CT fused image; the method includes: performing window processing on the acquired CT images to normalize the image grayscale; fusing the CT images processed with different window values to obtain a CT fused image; and adjusting all CT fused images to a uniform size.
[0020] Furthermore, after obtaining the bed plate mask, the bed plate mask is processed by filling holes, removing small connected domains, and performing edge smoothing.
[0021] Furthermore, the encoder module includes multiple downsampling layers, each downsampling layer includes: a convolution layer, a ReLU activation function, a BN batch normalization layer and a maximum pooling layer; the decoder module includes multiple upsampling layers and an output layer, each upsampling layer includes: an upsampling layer, a convolution layer, a ReLU activation function and a BN batch normalization layer.
[0022] A second aspect of the present invention provides an automatic bed board removal system based on CT images.
[0023] A bed board automatic removal system based on CT images, comprising:
[0024] A preprocessing unit is used to preprocess the acquired CT image to obtain a CT fusion image; obtain the grayscale distribution of the bed board in the CT image according to the density and thickness of the bed board material, and generate a grayscale distribution map;
[0025] A segmentation unit, used for obtaining a bed plate mask based on the CT fusion image and the grayscale distribution map by using a trained segmentation model;
[0026] The segmentation model includes: an encoder module, a decoder module and a prediction module. The encoder is used to extract the features of the CT fusion image and the grayscale distribution map respectively, and the decoder is used to fuse the features of the CT fusion image and the grayscale distribution map, and the prediction probability map is output through the classification layer; an adaptive threshold is introduced in the prediction module to determine the category of each voxel in the prediction probability map, and the bed board mask is output.
[0027] A third aspect of the present invention provides a computer-readable storage medium.
[0028] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for automatically removing a bed board based on a CT image as described in the first aspect above.
[0029] A fourth aspect of the present invention provides a computer device.
[0030] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for automatically removing a bed board based on a CT image as described in the first aspect above are implemented.
[0031] A fifth aspect of the present invention provides a computer program product or a computer program.
[0032] The present invention provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in the method for automatically removing a bed board based on a CT image as described in the first aspect above.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] The present invention provides a method and system for automatically removing bed boards based on CT images. Firstly, data preprocessing is performed on an input electronic computer tomography CT image, including CT image window processing, image size adjustment and image fusion, so as to obtain richer image information. Then, a bed board physical model is constructed to simulate the performance of the bed board in the CT image. According to factors such as density, thickness and material properties of the bed board material, the grayscale distribution of the bed board under different scanning parameters is predicted by bionic calculation. The grayscale distribution map of the bed board in the CT image is generated by using the physical model as the auxiliary input of a deep learning model. Secondly, a model combining deep learning with traditional algorithms is constructed, a segmentation network and an adaptive loss function are designed, and the inputs are the preprocessed CT image and the grayscale distribution map generated by the physical model. The predicted probability map is output, and the probability map is input into a traditional prediction module to output the category of each voxel according to the bed board image, and a binary mask is output. Finally, the body area mask output by the model is post-processed, such as filling holes, removing small connected domains and the like, so as to ensure the clarity and accuracy of the final output, improve the accuracy and efficiency of removing the bed board, and reduce the dependence on a large amount of labeled data. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0036] Figure 1 is a flow chart of a method for automatically removing bed boards based on CT images shown in the present invention;
[0037] Figure 2 It is a structural diagram of the automatic bed board removal system based on CT images shown in the present invention. DETAILED DESCRIPTION
[0038] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0039] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0040] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0041] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the methods and systems according to various embodiments of the present disclosure. It should be noted that each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of a code may include one or more executable instructions for implementing the logical functions specified in each embodiment. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the flowchart and / or block diagram, and the combination of boxes in the flowchart and / or block diagram can be implemented using a dedicated hardware-based system that performs a specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0042] Embodiment 1
[0043] like Figure 1 As shown, this embodiment provides a method for automatic bed board removal based on CT images. This embodiment uses the method applied to a server as an example for illustration. It is understandable that the method can also be applied to a terminal, and can also be applied to a terminal, a server, and a system, and is implemented through the interaction between the terminal and the server. The server can be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network servers, cloud communications, middleware services, domain name services, security services CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application. In this embodiment, the method includes the following steps:
[0044] Step S1: The preprocessing stage mainly includes CT image window processing, image fusion and image size adjustment. In the window processing image, it is necessary to manually adjust the window information of the image using tools such as 3DSlicer, select the appropriate window value to clearly identify the bed board information, select different window values to obtain different grayscale images, and use the window processing formula to normalize the image grayscale level to eliminate the differences caused by different devices and scanning parameters. In image fusion, the images processed with different window values are fused and input into the deep learning model to obtain richer image information. In image size adjustment, all fused CT images are adjusted to a uniform size to facilitate subsequent input model training.
[0045] In image fusion, images processed with different window values are fused, and the fused images are used as the input of the model to obtain richer image information. Taking the window width ww set to 400 and the window level wl set to 40 as an example, the lower limit of the window width is 380, and the upper limit of the window width is 420. The body tissue area and bed area in the CT image are displayed with high contrast, and the image grayscale level is normalized using the window processing formula to eliminate the differences caused by different equipment and scanning parameters. The bed window processing formula is:
[0046]
[0047] Among them, img_min is the lower limit of the width of the bed window that can be clearly viewed; img_max is the upper limit of the width of the bed window that can be clearly viewed, I(z,y,x) is the corresponding CT image, I window (z, y, x) is the image after window processing; To take no more than The maximum integer.
[0048] The acquired images with different window widths and window positions I window1 (z,y,x),I window2 (z,y,x),I window3 (z,y,x) fusion, the fused image is I(z,y,x) as the input of the model. The specific number of images with different window widths and window positions can be determined according to the CT image, in order to obtain complete bed board information.
[0049] I window (z,y,x)=[i window1 (z,y,x),I window2 (z,y,x),I window3 (z,y,x)]
[0050] Step S2: The bed board physical model construction phase mainly includes two steps: bed board density thickness modeling and grayscale distribution prediction. In bed board density and thickness modeling, in order to build a physical model to simulate the performance of the bed board in CT images, the grayscale distribution of the bed board in CT images is obtained in advance according to the material density and thickness attribute information of the bed board, and a grayscale distribution map is generated. The grayscale distribution map is used as an auxiliary input of the deep learning segmentation model to extract more bed board characteristics.
[0051] Step S3: First, a network structure and an adaptive loss function that combine a deep learning algorithm with a traditional algorithm are designed according to the bed board data features and the segmentation task. Then, a CT image with the bed board area manually annotated is obtained. The CT image, grayscale distribution map and annotated mask obtained in steps S1 and S2 are input into the current segmentation model to adjust parameter training. Then, based on the pre-trained segmentation model, the image and grayscale distribution map obtained in steps S1 and S2 are input into the current segmentation model to output the bed board mask.
[0052] Among them, the pre-trained bed board segmentation model is trained using the following steps:
[0053] Step S31: Design a segmentation network that combines a deep learning algorithm with a traditional algorithm, which mainly includes an input layer, an encoder module, a decoder module, and a prediction module.
[0054] The input layer takes the CT image, the annotated mask and the bed board grayscale distribution map as the input of three channels. The encoder module includes a downsampling layer, each of which includes: a convolution layer, a ReLU activation function, a BN batch normalization layer and a maximum pooling layer; the decoder module includes an upsampling layer and an output layer, each of which includes: an upsampling layer, a convolution layer, a ReLU activation function and a BN batch normalization layer, and finally outputs the predicted probability map through Softmax. Based on the prediction module, according to the HU value distribution characteristics of the bed board area, the threshold is adaptively adjusted using local statistical information to output the category of each voxel.
[0055] Step S32: Further, for the predicted probability map P, where p i,1 (i,1) represents the probability that the i-th voxel belongs to the bed board, p i,0 (i,0) represents the probability of belonging to other regions. Then the probability mean μ and variance in the local neighborhood (such as 3×3×3) of each voxel are calculated.
[0056] The local mean is:
[0057]
[0058] The local variance is:
[0059]
[0060] Finally, an adaptive threshold T is defined i Used to determine the category of the voxel, where α is a hyperparameter that controls the strictness of the threshold. i,1 >T i , then y i =1 means that the i-th voxel belongs to the bed board category; otherwise y i =0 means that the oth voxel belongs to the category of other regions.
[0061] Step S33: Design a loss function suitable for bed board segmentation, considering that the bed board area may occupy a small part of the image, and the edges and details of the bed board may be very small, and the HU values of different tissues or materials vary greatly. The loss function needs to be able to adapt to the situation of category imbalance and a large range of HU values, and be able to capture the edges and details of the bed board, so as to better distinguish the area adjacent to the bed board and the skin.
[0062] The specific loss function is as follows:
[0063] Step S331: In order to deal with the problem of imbalanced categories of bed boards and other regions, an improved FocalLoss is used, combined with adaptive weights and penalty hyperparameters for further optimization. Adaptive Weighted Penalized Focal Loss (AWPFL) dynamically adjusts weights according to the category distribution of each voxel. It solves the category imbalance problem by adjusting the weights of difficult and easy samples. For false positives and false negatives, it introduces an additional penalty factor β to enhance the focus on bed boards and increase its influence when the prediction is wrong.
[0064] AWPFL(p t )=-α t (1-p t ) γ (β·I(p t ≠y t ))log(p t )
[0065] Where: p t is the predicted probability, α t is an adaptive weight that can be dynamically adjusted according to the distribution of categories (bed boards and other areas), γ is a focusing parameter that is used to adjust the weights of the voxel categories of bed boards and other areas. I(·) is an indicator function that takes a value of 1 only when the category is a bed board, otherwise it is 0; β is a penalty hyperparameter that controls the additional penalty intensity for misclassified samples.
[0066] The adaptive weight is:
[0067]
[0068] Where: N is the total number of voxels, p i is the predicted probability of the ith voxel, y i is the true label of the ith voxel, and σ is a parameter that controls the smoothness of the weight.
[0069] Step S332: In order to better capture small structures and handle this special case, a rotated gradient boundary weighted loss (RGBWL) is designed. First, the contrast in the local area is used to enhance the boundary. Second, the gradient information of the image is used to emphasize the importance of the boundary. The weight is dynamically adjusted according to the HU value distribution of the local area.
[0070] First, local contrast can be used to measure the difference between a voxel and its neighbors. For each pixel i, its local contrast C i It can be defined as:
[0071]
[0072] Among them, I i is the HU value of the i-th voxel, N(i) is the neighborhood set of the i-th voxel, and |N(i)| is the size of the neighborhood set.
[0073] Then, the gradient of the image can be used to detect edges, using the gradient operator to calculate the gradient magnitude G of each voxel i :
[0074]
[0075] Where: G θ1 , G θ2 and G θ3 They are the gradients of the image rotation angle θ1, the rotation angle θ2, and the rotation angle θ3, and they are combined into a comprehensive gradient G i ,Compared to the traditional single gradient in the x and y directions, gradients in different directions can provide more ,directional features.
[0076] According to the local contrast and the integrated gradient field, an adaptive weight ω is defined i To emphasize the border area:
[0077]
[0078] Among them, μC and σC are the mean and standard deviation of local contrast; μG and σG are the mean and standard deviation of local gradient amplitude.
[0079] Combining the above local contrast, comprehensive gradient information and adaptive weights, the Rotated Gradient Boundary Weighted Loss (RGBWL) is defined:
[0080]
[0081] Where N is the total number of voxels, ω i is the adaptive weight of the ith voxel, L i is the basic loss of the ith voxel.
[0082] Step S333: In order to handle a wide range of HU values, a weighted loss based on HU values (HU-Weighted Loss, HUWL) is introduced and combined with adaptive weights. According to the distribution of different HU values in the image, different weights are assigned to voxels in different HU value ranges, and the weights are dynamically adjusted according to the image content.
[0083]
[0084] Where N is the total number of voxels, β i is the weight of the ith voxel, L i is the cross entropy loss of the i-th voxel.
[0085]
[0086] Among them, HU i is the HU value of the i-th voxel, μ is the mean of the current HU values, and σ is the control weight smoothness parameter.
[0087] L i =-y i log(p i )-(1-y i )log(1-p i )
[0088] Among them, y i is the true label of the ith voxel (0 or 1), p i is the predicted probability of the ith voxel (the bed board probability output by the model)
[0089] The comprehensive loss function is:
[0090] CL=λ1·AWPFL+λ2·RGBWL+λ3HUWL
[0091] This comprehensive loss function combines adaptive weighted penalty Focal Loss, rotation boundary weighted loss and HU-Weighted Loss, which can effectively handle category imbalance, capture fine structures, and adapt to large-span HU values, improving segmentation accuracy and connectivity. By adjusting the hyperparameters λ1, λ2, and λ3, the best balance can be found in different tasks.
[0092] Step S4: Based on the bed board mask output by the pre-trained segmentation model, fill holes, remove small connected domains, smooth edges, and perform other processing.
[0093] The bed area output by the model is processed by filling holes, removing small connected domains, and smoothing edges. The following steps are further used to obtain:
[0094] Step S41: Post-processing of hole filling is performed to reduce the bed area missed by the mask. Hole filling can be achieved by morphological closing operation or by using sitk.BinaryFillhole in the SimpleITK library.
[0095] Step S42: Removing small connected domains can be achieved by marking connected components and filtering out those connected domains whose areas are smaller than a certain threshold. Specifically, for example, sitk.ConnectedComponentImageFilter is used to mark connected components; sitk.RelabelComponentImageFilter is used to relabel connected components and a minimum size threshold can be set to remove small connected domains.
[0096] Step S43: Finally, the mask edge smoothing operation is implemented by median filtering. The quality of the segmentation result can be significantly improved by performing post-processing operations such as filling holes, removing small connected domains, and edge smoothing on the bed area output by the model.
[0097] The present invention firstly performs data preprocessing on the input electronic computer tomography (CT) image, including CT image window processing, image size adjustment and image fusion, so as to obtain richer image information; then constructs a bed board physical model, constructs a physical model to simulate the performance of the bed board in the CT image, and predicts the grayscale distribution of the bed board under different scanning parameters according to factors such as the density, thickness and material properties of the bed board material by bionic calculation, and uses the physical model to generate a grayscale distribution map of the bed board in the CT image as an auxiliary input of the deep learning model; secondly, constructs a model combining deep learning with traditional algorithms, designs a segmentation network and an adaptive loss function, and inputs the preprocessed CT image and the grayscale distribution map generated by the physical model, outputs a predicted probability map, and inputs the probability map into the traditional prediction module to output the category of each voxel according to the bed board image, and outputs a binary mask; finally, the body area mask output by the model is post-processed, such as filling holes, removing small connected domains, etc., to ensure the clarity and accuracy of the final output.
[0098] Embodiment 2
[0099] like Figure 2 As shown, this embodiment provides an automatic bed board removal system based on CT images, including:
[0100] The preprocessing unit is used for window processing of CT images and image adjustment to a uniform size. Different window values are selected to obtain different grayscale images. The images with different window widths and window positions are fused. The fused image is I (z, y, x) as the input of the model. The specific number of images with different window widths and window positions can be determined according to the CT image, in order to obtain complete bed board information.
[0101] The physical model building unit is used to obtain the grayscale value distribution at each position according to the properties such as the thickness of the bed board, and then determine the approximate grayscale range of the bed board based on prior knowledge. By setting an area to distinguish the bed board area from other areas, the grayscale distribution map G(x,y) is obtained as the auxiliary input of the deep learning model.
[0102] The segmentation unit is used to design a network structure and a comprehensive loss function that combines the deep learning algorithm with the traditional algorithm according to the bed board data characteristics and segmentation tasks, and to adjust the parameter training to obtain the bed board segmentation model. In the inference prediction stage, the fused image and the bed board grayscale distribution map are input into the segmentation model, and the bed board mask is output.
[0103] Among them, the segmentation model training stage uses the fused image, the annotated mask and the bed board grayscale distribution map as the input of three channels; the output layer is the prediction layer, which abandons the usual use of np.argmax() to select the maximum probability as the final prediction result. Instead, it considers the HU value distribution characteristics of the bed board area, uses local statistical information to adaptively adjust the threshold, and outputs the category of each voxel.
[0104] Among them, the comprehensive loss function (CL) combines the adaptive weighted penalty Focal Loss, the rotation boundary weighted loss and the HU-Weighted Loss. By adjusting the hyperparameters λ1, λ2, and λ3, it can effectively handle category imbalance, capture small structures, and adapt to large-span HU values, thereby improving the accuracy and connectivity of segmentation.
[0105] CL=λ1·AWPFL+λ2·RGBWL+λ3HUWL
[0106] Among them, Adaptive Weighted Penalized Focal Loss (AWPFL) introduces an additional penalty factor β to enhance the focus on the bed board, and increases its impact on false positives and false negatives when the prediction is wrong. Rotated Gradient Boundary Weighted Loss (RGBWL) uses the contrast in the local area to enhance the boundary, uses the comprehensive gradient information of the image to emphasize the importance of the boundary, and dynamically adjusts the weight according to the HU value distribution of the local area. HU-Weighted Loss (HUWL) based on HU value is combined with adaptive weights. According to the distribution of different HU values in the image, different weights are assigned to voxels in different HU value ranges, and the weights are dynamically adjusted according to the image content.
[0107] The post-processing optimization unit is used to fill holes, remove small connected domains, and smooth edges of the bed area output by the model. The following steps are used to obtain it:
[0108] (1) Filling holes through morphological closing operations;
[0109] (2) This is achieved by marking connected components and filtering out those connected domains whose area is smaller than a certain threshold;
[0110] (3) Mask edge smoothing is achieved through median filtering.
[0111] The present invention uses automated processing to greatly reduce the time and cost of manual intervention. The combination of physical models and deep learning improves the accuracy of bed board identification and removal. It can adapt to changes in different equipment and scanning parameters, has wide applicability, and has positive significance for promoting the development of medical imaging technology.
[0112] Embodiment 3
[0113] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method for automatically removing a bed board based on a CT image as described in the first embodiment above are implemented.
[0114] Embodiment 4
[0115] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the method for automatically removing a bed board based on a CT image as described in the first embodiment are implemented.
[0116] Embodiment 5
[0117] This embodiment provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of the automatic bed board removal method based on CT images described in the first embodiment.
[0118] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0119] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0120] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0121] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0122] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0123] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for automatically removing bed boards based on CT images, characterized in that: include: Preprocessing the acquired CT image to obtain a CT fusion image; According to the density and thickness of the bed board material, the grayscale distribution of the bed board in the CT image is obtained to generate a grayscale distribution map; Based on the CT fusion image and grayscale distribution map, the bed board mask is obtained using the trained segmentation model; The segmentation model includes: an encoder module, a decoder module and a prediction module. The encoder is used to extract the features of the CT fusion image and the grayscale distribution map respectively, and the decoder is used to fuse the features of the CT fusion image and the grayscale distribution map, and the prediction probability map is output through the classification layer; an adaptive threshold is introduced in the prediction module to determine the category of each voxel in the prediction probability map, and the bed board mask is output.
2. The method for automatically removing bed boards based on CT images according to claim 1, characterized in that: The adaptive threshold is described by the following formula: Among them, T i represents the adaptive threshold; μ i represents the probability mean in the local neighborhood of the i-th voxel; α represents the coefficient, which is used to control the strictness of the threshold; represents the probability variance within the local neighborhood of the i-th voxel.
3. The method for automatically removing bed boards based on CT images according to claim 1, characterized in that: During the training process of the segmentation model, a comprehensive loss function is used to optimize the hyperparameters of the segmentation model; the loss function is expressed by the following formula: CL=λ1·AWPFL+λ2·RGBWL+λ3HUWL Among them, AWPFL represents adaptive weighted penalty loss, RGBWL represents rotation gradient boundary weighted loss, HUWL represents weighted loss based on HU value, and λ1, λ2, and λ3 represent hyperparameters.
4. The method for automatically removing bed boards based on CT images according to claim 1, characterized in that: The obtained CT images are preprocessed to obtain a CT fusion image; the method includes: performing window processing on the obtained CT images to normalize the image grayscale; fusing the CT images processed with different window values to obtain a CT fusion image; and adjusting all CT fusion images to a uniform size.
5. The method for automatically removing bed boards based on CT images according to claim 1, characterized in that: After obtaining the bed plate mask, the bed plate mask is processed by filling holes, removing small connected domains and smoothing edges.
6. The method for automatically removing bed boards based on CT images according to claim 1, characterized in that: The encoder module includes multiple downsampling layers, each of which includes: a convolution layer, a ReLU activation function, a BN batch normalization layer and a maximum pooling layer; the decoder module includes multiple upsampling layers and an output layer, each of which includes: an upsampling layer, a convolution layer, a ReLU activation function and a BN batch normalization layer.
7. A bed board automatic removal system based on CT images, characterized in that: include: A preprocessing unit, used for preprocessing the acquired CT image to obtain a CT fusion image; According to the density and thickness of the bed board material, the grayscale distribution of the bed board in the CT image is obtained to generate a grayscale distribution map; A segmentation unit, used for obtaining a bed plate mask based on the CT fusion image and the grayscale distribution map by using a trained segmentation model; The segmentation model includes: an encoder module, a decoder module and a prediction module. The encoder is used to extract the features of the CT fusion image and the grayscale distribution map respectively, and the decoder is used to fuse the features of the CT fusion image and the grayscale distribution map, and the prediction probability map is output through the classification layer; an adaptive threshold is introduced in the prediction module to determine the category of each voxel in the prediction probability map, and the bed board mask is output.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the method for automatic bed board removal based on CT images as described in any one of claims 1 to 6 are implemented.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the method for automatic bed board removal based on CT images according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps in the method for automatic bed board removal based on CT images as claimed in any one of claims 1 to 6 are implemented.