Artifact removal model training method and device, equipment and storage medium
By combining an adaptive convolutional kernel and a feature extraction network in the artifact removal model with a metal artifact removal network, the problem of poor metal artifact removal in medical images is solved, achieving accurate extraction and differentiation of metal artifacts and improving image processing performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2023-06-01
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, the removal of metal artifacts in medical images is ineffective, and it is impossible to accurately distinguish metal artifacts from tissue structures, resulting in unsatisfactory image processing results.
An adaptive convolutional kernel is determined through an adaptive convolutional kernel network for the artifact removal model. Combined with an artifact location feature extraction network and a metal artifact removal network, metal artifacts are extracted and removed based on the location information of the adaptive convolutional kernel and non-metallic regions. The model is optimized by adjusting the network parameters until an efficient removal effect is achieved.
It enables flexible extraction and accurate removal of metal artifacts in different medical images, improves the generalization and effectiveness of image processing, and can adaptively adjust the convolution kernel to distinguish between metal artifacts and tissue structures.
Smart Images

Figure CN116977460B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a training method, apparatus, computer device, storage medium, and computer program product for an artifact removal model. Background Technology
[0002] With the development of computer technology and artificial intelligence, AI-based image processing technology can be widely applied to various industries. In some application scenarios, in order to ensure that valuable information in the original image is not covered by useless information, it is often necessary to remove useless information from the original image. For example, in the process of acquiring medical images through tomography, if metal is present in the scanned area, metal artifacts will appear in the obtained medical images. In this case, to avoid the metal artifacts from obscuring the original image information, it is necessary to remove the metal artifacts in the medical images.
[0003] In related technologies, medical image data is often used directly to reconstruct medical images without metal artifacts. However, there is a coupling effect between tissue structures and metal artifacts in medical images, and the properties of the metal itself will affect the intensity changes of metal artifacts in medical images. Related technologies do not take into account the differences in the characteristic patterns of metal artifacts in different medical images, which makes it impossible to accurately remove metal artifacts and the image processing effect is poor. Summary of the Invention
[0004] Therefore, it is necessary to provide a training method, apparatus, computer equipment, computer-readable storage medium, and computer program product for an artifact removal model that can improve image processing performance, in order to address the aforementioned technical problems.
[0005] This application provides a method for training an artifact removal model. The method includes:
[0006] Acquire training samples, which include original medical images and images containing artifacts, wherein the images containing artifacts include metal artifacts and include metal regions and non-metal regions;
[0007] An adaptive convolutional kernel corresponding to the image containing artifacts is determined through an adaptive network of convolutional kernels in the artifact removal model. The adaptive convolutional kernel is adapted to the metal artifact pattern in the image containing artifacts.
[0008] The artifact location feature extraction network of the artifact removal model extracts the artifact location features of the metal artifacts in the image containing artifacts based on the adaptive convolution kernel and the location information of the non-metallic region.
[0009] The artifact removal model uses a metal artifact removal network to remove artifacts from the image containing artifacts, based on the adaptive convolution kernel, the location information of the non-metallic region, and the artifact location features, to obtain an artifact-removed image.
[0010] Based on the difference between the artifact-removed image and the original medical image, the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network are adjusted, and then the process returns to the step of obtaining training samples to continue training until a well-trained artifact removal model is obtained.
[0011] This application also provides a training apparatus for an artifact removal model. The apparatus includes:
[0012] The sample acquisition module is used to acquire training samples, which include original medical images and images containing artifacts. The images containing artifacts include metal artifacts and include metal regions and non-metal regions.
[0013] The first convolutional kernel determination module is used to determine an adaptive convolutional kernel corresponding to the image containing artifacts through the convolutional kernel adaptive network of the artifact removal model. The adaptive convolutional kernel is adapted to the metal artifact pattern in the image containing artifacts.
[0014] The first location feature extraction module is used to extract the artifact location features of the metal artifacts in the image containing artifacts by means of the artifact location feature extraction network of the artifact removal model, based on the adaptive convolution kernel and the location information of the non-metallic region.
[0015] The first removal module is used to remove artifacts from the image containing artifacts by using the metal artifact removal network of the artifact removal model, based on the adaptive convolution kernel, the position information of the non-metallic region, and the artifact position features, to obtain an artifact-removed image.
[0016] The adjustment module is used to adjust the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network based on the difference between the artifact removal image and the original medical image, and then return to the step of obtaining training samples to continue training until a trained artifact removal model is obtained.
[0017] In some embodiments, the sample acquisition module is configured to acquire an original medical image, the original medical image being a medical image without metal artifacts; obtain an image containing artifacts corresponding to the original medical image based on at least one metal mask and the original medical image; and determine training samples based on the original medical image and the corresponding image containing artifacts.
[0018] In some embodiments, the artifact removal model includes sub-models in multiple iteration stages, each sub-model in each iteration stage sharing the same convolutional kernel adaptive network; the first convolutional kernel determination module is configured to, in the first iteration stage of the multiple iteration stages, determine an intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the first iteration stage based on the artifact-containing image using the convolutional kernel adaptive network; output an intermediate artifact-removed image of the first iteration stage based on the intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the first iteration stage and the artifact-containing image; in non-first iteration stages of the multiple iteration stages, obtain the intermediate artifact-removed image output from the previous iteration stage of the current iteration stage, determine an intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the current iteration stage based on the artifact-containing image and the intermediate artifact-removed image output from the previous iteration stage using the convolutional kernel adaptive network; and use the intermediate adaptive convolutional kernel obtained in the last iteration stage of the multiple iteration stages as the adaptive convolutional kernel corresponding to the artifact-containing image.
[0019] In some embodiments, the first convolutional kernel determination module is used to stitch together the image containing artifacts and the intermediate artifact-removed image output from the previous iteration stage to obtain the input image of the current iteration stage; and through the convolutional kernel adaptive network, to determine the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration stage based on the input image of the current iteration stage.
[0020] In some embodiments, the artifact location feature extraction network in the sub-model of each iteration stage is updated with the iteration process; the first location feature extraction module is used to determine the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the first iteration stage based on the artifact-containing image in the first iteration stage of the plurality of iteration stages; in the non-first iteration stages of the plurality of iteration stages, the intermediate artifact location features of the metal artifacts in the artifact-containing image are extracted by the artifact location feature extraction network in the sub-model of the current iteration stage based on the location information of the non-metallic region, the intermediate adaptive convolution kernel corresponding to the artifact-containing image in the current iteration stage, and the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage of the current iteration stage; and the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the last iteration stage are used as the artifact location features of the metal artifacts in the artifact-containing image.
[0021] In some embodiments, the first location feature extraction module is configured to: determine the estimated location feature gradient of the previous iteration stage based on the location information of the non-metallic region, the intermediate adaptive convolution kernel corresponding to the artifact-containing image in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage in the current iteration stage, and the intermediate artifact-removed image output by the previous iteration stage in the current iteration stage; determine the difference between the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage in the current iteration stage and the estimated location feature gradient of the previous iteration stage; and extract the intermediate artifact location features of the metallic artifacts in the artifact-containing image based on the difference through the artifact location feature extraction network in the sub-model of the current iteration stage.
[0022] In some embodiments, the metal artifact removal network in the sub-model of each iteration stage is updated with the iteration process; the first removal module is used to remove artifacts from the image containing artifacts by using the metal artifact removal network in the sub-model of the current iteration stage, based on the location information of the non-metallic region, the intermediate adaptive convolution kernel corresponding to the image containing artifacts in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage, and the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the previous iteration stage, to obtain the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the current iteration stage; and the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the last iteration stage is used as the artifact removal image obtained by removing artifacts from the image containing artifacts.
[0023] In some embodiments, the first removal module is configured to: determine the image gradient of the previous iteration stage based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage, and the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the previous iteration stage; determine the difference between the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the previous iteration stage and the image gradient of the previous iteration stage; and, through the metal artifact removal network in the sub-model of the current iteration stage, determine the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the current iteration stage based on the difference.
[0024] In some embodiments, the first removal module is configured to encode the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage using the intermediate adaptive convolution kernel corresponding to the artifact-containing image in the current iteration stage, to obtain the metal artifact image of the current iteration stage; fuse the metal artifact image of the current iteration stage and the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the previous iteration stage to obtain a fused image; and calculate the image gradient of the previous iteration stage based on the location information of the non-metallic region and the difference between the fused image and the artifact-containing image.
[0025] In some embodiments, the adjustment module is configured to: determine a predicted metal artifact based on the adaptive convolutional kernel and the artifact location features; overlay the predicted metal artifact onto the original medical image to obtain a predicted image containing artifacts; construct a target loss based on a first difference between the image containing artifacts and the predicted image containing artifacts and a second difference between the original medical image and the image with artifact removal; and adjust the network parameters of the adaptive convolutional kernel network, the artifact location feature extraction network, and the metal artifact removal network based on the target loss.
[0026] This application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above-described artifact removal model training method.
[0027] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the above-described artifact removal model training method.
[0028] This application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the training method for the aforementioned artifact removal model.
[0029] The training method, apparatus, computer equipment, storage medium, and computer program product of the aforementioned artifact removal model acquire training samples, which include original medical images and images containing artifacts. The images containing artifacts include metallic artifacts and comprise both metallic and non-metallic regions. That is, the original medical image in each training sample can be considered a standard image after completely removing metallic artifacts from the image containing artifacts, thus effectively reflecting the training effect of the artifact removal model. Through the convolutional kernel adaptive network of the artifact removal model, an adaptive convolutional kernel corresponding to the image containing artifacts is determined. This adaptive convolutional kernel adapts to the metallic artifact pattern in the image containing artifacts, promoting the flexible extraction of metallic artifacts by the artifact removal model. Through the artifact location feature extraction network of the artifact removal model, based on the adaptive convolutional kernel and the location information of the non-metallic regions, the artifact location features of metallic artifacts in the image containing artifacts are extracted, i.e., the location information of metallic artifacts in the image containing artifacts is accurately extracted. In this way, the metal artifact removal network of the artifact removal model removes artifacts from images containing artifacts based on adaptive convolutional kernels, the location information of non-metallic regions, and artifact location features. This results in an artifact-removed image; that is, by using convolutional kernels adapted to the metal artifact model and accurate metal artifact location information, metal artifacts in artifact-containing images can be accurately extracted. Based on the differences between the artifact-removed image and the original medical image, the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network are automatically adjusted. Then, the training process returns to the step of obtaining training samples to continue training until a well-trained artifact removal model is obtained. Thus, the trained artifact removal model can adaptively adjust the convolutional kernels used to extract metal artifacts based on the differences in metal artifacts in different artifact-containing images. This allows for accurate differentiation between metal artifacts and tissue structures in different artifact-containing images, improving the generalization ability of the artifact removal model and enabling flexible extraction of metal artifacts from different artifact-containing images, thereby improving image processing performance.
[0030] This application provides an image processing method. The method includes:
[0031] Acquire a medical image to be processed, the medical image containing metal artifacts;
[0032] By using the kernel adaptive network of the trained artifact removal model, a target adaptive convolution kernel corresponding to the medical image to be processed is determined, and the target adaptive convolution kernel is adapted to the metal artifact pattern in the medical image to be processed.
[0033] The artifact location feature extraction network of the trained artifact removal model extracts the target artifact location features of the metal artifacts in the medical image to be processed based on the target adaptive convolution kernel and the location information of the target non-metallic region in the medical image to be processed.
[0034] The trained artifact removal model uses a metal artifact removal network to remove artifacts from the medical image to be processed, based on the target adaptive convolution kernel, the location information of the target non-metallic region, and the location features of the target artifacts, to obtain the artifact-removed image corresponding to the medical image to be processed.
[0035] This application also provides an image processing apparatus. The apparatus includes:
[0036] An image acquisition module is used to acquire a medical image to be processed, wherein the medical image to be processed contains metal artifacts;
[0037] The second convolutional kernel determination module is used to determine the target adaptive convolutional kernel corresponding to the medical image to be processed through the convolutional kernel adaptive network of the trained artifact removal model. The target adaptive convolutional kernel is adapted to the metal artifact pattern in the medical image to be processed.
[0038] The second location feature extraction module is used to extract the target artifact location features of the metal artifacts in the medical image to be processed by the artifact location feature extraction network of the trained artifact removal model, based on the target adaptive convolution kernel and the location information of the target non-metallic region of the medical image to be processed.
[0039] The second removal module is used to remove artifacts from the medical image to be processed by using the metal artifact removal network of the trained artifact removal model, based on the target adaptive convolution kernel, the position information of the target non-metallic region, and the position features of the target artifact, to obtain the artifact-removed image corresponding to the medical image to be processed.
[0040] This application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above-described image processing method.
[0041] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the above-described image processing method.
[0042] This application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the above-described image processing method.
[0043] The aforementioned image processing method, apparatus, computer equipment, storage medium, and computer program product acquire a medical image to be processed, which contains metal artifacts; determine a target adaptive convolutional kernel corresponding to the medical image to be processed using a pre-trained artifact removal model's convolutional kernel adaptive network, the target adaptive convolutional kernel being adapted to the metal artifact pattern in the medical image to be processed; extract the target artifact location features in the medical image to be processed using a pre-trained artifact removal model's artifact location feature extraction network, based on the target adaptive convolutional kernel and the location information of the target non-metallic region in the medical image to be processed; and remove artifacts from the medical image to be processed using a pre-trained artifact removal model's metal artifact removal network, based on the target adaptive convolutional kernel, the location information of the target non-metallic region, and the target artifact location features, to obtain an artifact-removed image corresponding to the medical image to be processed. In this way, the trained artifact removal model adaptively adjusts the convolution kernel used to extract metal artifacts based on the differences in the metal artifacts in the medical images to be processed. As a result, it can accurately distinguish the metal artifacts and tissue structures in different medical images to be processed, flexibly extract metal artifacts in different medical images to be processed, and improve the image processing effect. Attached Figure Description
[0044] Figure 1 This is a diagram illustrating the application environment of the training method for the artifact removal model in one embodiment.
[0045] Figure 2 This is a flowchart illustrating the training method of an artifact removal model in one embodiment;
[0046] Figure 3 This is a schematic diagram of the model structure of an artifact removal model in one embodiment;
[0047] Figure 4 This is a flowchart illustrating the adaptive convolution kernel determination step in one embodiment;
[0048] Figure 5 This is a schematic diagram of the structure of an adaptive convolutional kernel network in one embodiment;
[0049] Figure 6 This is a flowchart illustrating the steps for determining artifact location features in one embodiment;
[0050] Figure 7 This is a flowchart illustrating the steps for determining intermediate artifact location features in one embodiment;
[0051] Figure 8 This is a schematic diagram of the process for determining an image with artifact removal in one embodiment;
[0052] Figure 9 This is a flowchart illustrating the intermediate artifact removal image acquisition step in one embodiment;
[0053] Figure 10 This is a flowchart illustrating an image processing method in one embodiment;
[0054] Figure 11A This is a schematic diagram of artifact removal in one embodiment;
[0055] Figure 11B This is a schematic diagram illustrating the artifact removal effect in one embodiment;
[0056] Figure 11C This is a schematic diagram of artifact removal in another embodiment;
[0057] Figure 11D This is a comparative diagram of different artifact removal processes in a single example.
[0058] Figure 12 This is a schematic diagram of the artifact removal process in one embodiment;
[0059] Figure 13 This is a structural block diagram of a training device for an artifact removal model in one embodiment;
[0060] Figure 14 This is a structural block diagram of an image processing device in one embodiment;
[0061] Figure 15 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0063] The artifact removal model training method provided in this application relates to Artificial Intelligence (AI) technology. AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to obtain optimal results—theories, methods, technologies, and application systems. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce new intelligent machines capable of reacting in a manner similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities.
[0064] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning. The artifact removal model training method provided in this application specifically relates to machine learning techniques in artificial intelligence.
[0065] In related technologies, to remove metal artifacts from medical images, the medical image data is directly used to reconstruct an image free of metal artifacts. However, for different medical images, there is a coupling between the structure of interest and the metal artifacts. Furthermore, the size, quantity, or type of metal in the structure of interest may differ in different medical images. Consequently, the intensity of the metal artifacts will vary across different medical images, exhibiting different intensity variations. Therefore, related technologies cannot flexibly extract metal artifacts from different medical images.
[0066] The training method for the artifact removal model provided in this application obtains training samples, including original medical images and images containing artifacts. The images containing artifacts include metallic artifacts and comprise both metallic and non-metallic regions. That is, the original medical image in each training sample can be considered a standard image after completely removing metallic artifacts from the image containing artifacts, thus effectively reflecting the training effect of the artifact removal model. Through the convolutional kernel adaptive network of the artifact removal model, an adaptive convolutional kernel corresponding to the image containing artifacts is determined. This adaptive convolutional kernel adapts to the metallic artifact pattern in the image containing artifacts, promoting the flexible extraction of metallic artifacts by the artifact removal model. Through the artifact location feature extraction network of the artifact removal model, based on the adaptive convolutional kernel and the location information of the non-metallic regions, the artifact location features of metallic artifacts in the image containing artifacts are extracted, i.e., the location information of metallic artifacts in the image containing artifacts is accurately extracted. In this way, the metal artifact removal network of the artifact removal model removes artifacts from images containing artifacts based on adaptive convolutional kernels, the location information of non-metallic regions, and artifact location features. This results in an artifact-removed image; that is, by using convolutional kernels adapted to the metal artifact model and accurate metal artifact location information, metal artifacts in artifact-containing images can be accurately extracted. Based on the differences between the artifact-removed image and the original medical image, the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network are automatically adjusted. Then, the training process returns to the step of obtaining training samples to continue training until a well-trained artifact removal model is obtained. Thus, the trained artifact removal model can adaptively adjust the convolutional kernels used to extract metal artifacts based on the differences in metal artifacts in different artifact-containing images. This allows for accurate differentiation between metal artifacts and tissue structures in different artifact-containing images, improving the generalization ability of the artifact removal model and enabling flexible extraction of metal artifacts from different artifact-containing images, thereby improving image processing performance.
[0067] The training method for the artifact removal model provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another server. Both terminal 102 and server 104 can independently execute the training method for the artifact removal model, or they can assist in executing the training method for the artifact removal model.
[0068] In some embodiments, the training method of the artifact removal model provided in this application can be executed by server 104. Server 104 obtains training samples, which include original medical images and images containing artifacts. The images containing artifacts include metallic artifacts and include metallic and non-metallic regions. Server 104 determines an adaptive convolutional kernel corresponding to the image containing artifacts using the convolutional kernel adaptive network of the artifact removal model. The adaptive convolutional kernel is adapted to the metallic artifact pattern in the image containing artifacts. Server 104 extracts the artifact-containing artifacts based on the adaptive convolutional kernel and the position information of the non-metallic regions using the artifact location feature extraction network of the artifact removal model. The artifact location features of metal artifacts in the image; through the metal artifact removal network of the artifact removal model, artifact removal is performed on the image containing artifacts based on the adaptive convolutional kernel, the location information of the non-metallic region, and the artifact location features, to obtain an artifact-removed image; based on the difference between the artifact-removed image and the original medical image, the server 104 adjusts the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network, and then returns to the step of obtaining training samples to continue training until a trained artifact removal model is obtained.
[0069] Optionally, the server sends the trained artifact removal model to the terminal 102, the terminal 102 deploys the trained artifact removal model, and the terminal performs artifact removal processing on the medical image to be removed according to the trained artifact removal model to obtain a medical image without metal artifacts.
[0070] The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0071] In one embodiment, such as Figure 2 As shown, a training method for an artifact removal model is provided, which can be applied to a computer device (which may be...). Figure 1 The server 104 in the middle can also be Figure 1 Taking terminal 102 as an example, the following steps are included:
[0072] Step S202: Obtain training samples. The training samples include the original medical image and the image containing artifacts. The image containing artifacts includes metal artifacts and includes metal regions and non-metal regions.
[0073] The original medical image refers to an image obtained through tomographic scanning. Optionally, the original medical image can be an image obtained according to the target scanning method, such as an image obtained through plain scanning, an image obtained through contrast scanning, or an image obtained through contrast-enhanced scanning. This original medical image does not contain any artifacts. Metal artifacts refer to artifacts generated during tomographic scanning of the target area due to the presence of at least one metal in the target area. These metal artifacts have a rotationally symmetric structure, i.e., a radiating stripe structure. It can be understood that a region corresponding to a certain angle is rotated by a preset angle to obtain a region corresponding to another angle, and the angle difference between the two angles is the preset angle. An image containing artifacts is an image that includes metal artifacts, comprising the metal region containing the metal and non-metal regions containing no metal.
[0074] Optionally, the computer device acquires a publicly available dataset containing multiple raw medical images free of metal artifacts. For each raw medical image, the computer device generates a corresponding image containing artifacts based on the raw medical image, and uses the raw medical image and the corresponding image containing artifacts as a training sample.
[0075] For example, after determining the original medical image, the computer device obtains a corresponding preliminary artifact image for each original medical image. The computer device crops the preliminary artifact image into image blocks of a preset size, and randomly mirrors each image block horizontally or vertically to obtain flipped image blocks. These flipped image blocks are then combined to obtain an artifact-containing image corresponding to the original medical image. For example, the original medical image is cropped into 64×64 image blocks, and each image block is randomly mirrored horizontally and vertically with a probability of 0.5 to obtain corresponding flipped image blocks. These flipped image blocks are then assembled according to the stitching order of the image blocks to obtain the artifact-containing image corresponding to the original medical image. In the above example, random flipping further enriches the artifact-containing image and enhances the robustness and generalization of the artifact removal model.
[0076] Step S204: Through the convolution kernel adaptive network of the artifact removal model, an adaptive convolution kernel corresponding to the image containing artifacts is determined. The adaptive convolution kernel is adapted to the metal artifact pattern in the image containing artifacts.
[0077] The artifact removal model is a neural network model used to remove metal artifacts. The convolutional kernel of this model is determined based on the rotational symmetry of the metal artifacts, and the metal artifact pattern reflects the intensity variation of the metal artifacts. As mentioned earlier, for any two images containing metal artifacts (such as the artifact-containing images involved in model training), if the types of metals producing the artifacts are different, or if the coupling effect between the tissue structure and the metal artifacts in the two images is different, then the intensity variation of the metal artifacts in these two images will be different. That is, for any two images containing metal artifacts, their respective metal artifact patterns are different. Therefore, if the same convolutional kernel is used when extracting metal artifacts from different images containing metal artifacts, the extracted images will still contain intensity information, meaning that the extracted images will still contain metal artifacts, resulting in poor metal artifact removal performance. Based on this, the adaptive convolutional kernel network (which takes into account the rotational symmetry of metal artifacts) is used to determine an adaptive convolutional kernel that matches the intensity variation of metal artifacts in an image containing metal artifacts. It can be understood that the adaptive convolutional kernel takes into account the intensity variation of metal artifacts in different images containing metal artifacts. Regardless of the metal artifact pattern of the image containing metal artifacts, it can adaptively adjust the corresponding convolutional kernel to effectively remove metal artifacts in each image containing metal artifacts, resulting in better removal effect.
[0078] Optionally, the computer device acquires an image containing artifacts and inputs the image into an artifact removal model. The adaptive convolutional kernel corresponding to the image containing artifacts is determined through the convolutional kernel adaptive network of the artifact removal model.
[0079] As mentioned earlier, the artifact removal model is designed to remove artifacts from images containing metal artifacts; that is, the goal of this model is to obtain a clean image free of any metal artifacts. However, when processing each image containing metal artifacts, the clean image, the adaptive convolutional kernel, and the artifact location features are unknown. Therefore, to ensure the training effect of the artifact removal model, after inputting the image containing metal artifacts into the artifact removal model, multiple iterative stages are required to determine the adaptive convolutional kernel that best matches the metal artifact pattern of the image containing metal artifacts, and to determine the artifact location features. This results in the model output result corresponding to the image containing metal artifacts, i.e., the clean image. Based on this, the artifact removal model includes sub-models corresponding to multiple iterative stages. Each sub-model includes a convolutional kernel adaptive network. Therefore, after multiple convolutional kernel adaptive processing (i.e., one convolutional kernel adaptive processing per iterative stage), the adaptive convolutional kernel that best fits the input image containing metal artifacts is obtained.
[0080] For example, the computer device uses the kernel adaptive network of the artifact removal model to obtain an adaptive convolutional kernel corresponding to the image containing artifacts through multiple kernel adaptive processing steps. This adaptive convolutional kernel is obtained by performing kernel adaptive processing in the last iteration stage. The kernel adaptive network is the same in the sub-model of each iteration stage.
[0081] Step S206: Using the artifact location feature extraction network of the artifact removal model, the artifact location features of metal artifacts in the image containing artifacts are extracted based on the adaptive convolution kernel and the location information of the non-metallic region.
[0082] The artifact location feature extraction network is used to determine the location information of metal artifacts in the artifact-containing image. The artifact location features reflect the location information of the metal artifacts. It should be noted that since the metal intensity in the metal region of the artifact-containing image cannot be ignored and it has complex internal scattering, it is not necessary to consider the metal region when removing metal artifacts; only the non-metal region needs to be considered.
[0083] Optionally, during the final iteration, the computer device obtains the adaptive convolution kernel corresponding to the final iteration and uses the artifact location feature extraction network of the artifact removal model to obtain the artifact location features of the metal artifacts in the image containing artifacts.
[0084] Furthermore, for each iteration stage, the corresponding sub-model also includes an artifact location feature extraction network.
[0085] For example, during the final iteration, the artifact location feature extraction network in the sub-model corresponding to the final iteration determines the artifact location features of the metallic artifacts in the image based on the location information of the non-metallic region and the adaptive convolutional kernel corresponding to the final iteration. The artifact location feature extraction network in the sub-model of each iteration is different. Here, the artifact location features are obtained by extracting the artifact location features through the artifact location feature extraction network corresponding to the final iteration.
[0086] Step S208: Using the metal artifact removal network of the artifact removal model, artifact removal is performed on the image containing artifacts based on the adaptive convolution kernel, the location information of the non-metallic region, and the artifact location features, to obtain the artifact-removed image.
[0087] Among them, the metal artifact removal network is used to remove metal artifacts from images containing artifacts.
[0088] Optionally, during the final iteration, the computer device acquires the adaptive convolutional kernel and artifact location features corresponding to the final iteration, and removes artifacts from the image containing artifacts using the metal artifact removal network of the artifact removal model, based on the location information of the adaptive convolutional kernel, the non-metallic region, and the artifact location features, to obtain the artifact-removed image.
[0089] Furthermore, for each iteration stage, the corresponding sub-model also includes a metal artifact removal network.
[0090] For example, during the final iteration, the metal artifact removal network in the sub-model corresponding to the final iteration removes artifacts from the image containing artifacts based on the location information of the non-metallic regions, the adaptive convolutional kernel corresponding to the final iteration, and the artifact location features, resulting in an artifact-removed image. The metal artifact removal network in the sub-model differs for each iteration; the artifact-removed image here refers to the image obtained in the final iteration after removing metal artifacts.
[0091] Step S210: Based on the difference between the artifact removal image and the original medical image, adjust the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network, and then return to the step of obtaining training samples to continue training until a trained artifact removal model is obtained.
[0092] The smaller the difference between the artifact-removed image and the original medical image, the more similar the artifact-removed image is to the original medical image, indicating a better effect in removing metal artifacts.
[0093] Optionally, the computer device obtains a target loss based on the difference between the artifact-removed image and the original medical image, wherein the difference between the artifact-removed image and the original medical image is positively correlated with the target loss.
[0094] The computer equipment adjusts the network parameters of the adaptive convolutional kernel network, the artifact location feature extraction network, and the metal artifact removal network at each iteration stage based on the target loss. After adjusting the network parameters of the adaptive convolutional kernel network, the artifact location feature extraction network, and the metal artifact removal network, it returns to the step of obtaining training samples to continue training until a well-trained artifact removal model is obtained.
[0095] The specific training process in steps S202 to S210 above is as follows:
[0096] Having obtained a first preset number of training samples, the artifact removal model needs to be trained multiple times based on these samples. For each training cycle, the computer divides the first preset number of training samples equally, resulting in a preset training batch of training subsets. The number of training samples contained in each training batch of training subsets is the ratio of the first preset number to the preset batch.
[0097] For each training batch in each loop, the computer device acquires the artifact removal model obtained after training the previous training batch, and acquires each training sample of the current training batch. Based on each training sample of the current training batch, the artifact removal model of the current training batch is processed in multiple iterative stages. For example, the first preset number is 200, and the initial learning rate is set to 2 × 10⁻⁶. -4 The learning decay rate is 0.5 for cyclic training.
[0098] Among them, such as Figure 3 The diagram shown illustrates the model structure of an artifact removal model in one embodiment. This iterative artifact removal model includes N iteration stages, each corresponding to N sub-models. Each iteration stage's sub-model includes a convolutional kernel adaptive network, an artifact location feature extraction network corresponding to that iteration stage, and a metal artifact removal network.
[0099] In the final iteration, the computer acquires the intermediate artifact-removed image from the sub-model of the previous iteration. Based on this intermediate artifact-removed image and the image containing artifacts, it performs adaptive convolutional kernel processing using a convolutional kernel adaptive network to obtain an adaptive convolutional kernel corresponding to the image containing artifacts. The computer then uses the artifact location feature extraction network in the sub-model corresponding to the final iteration to determine the artifact location features of the metal artifacts in the image containing artifacts, based on the location information of the non-metallic regions and the adaptive convolutional kernel of the final iteration. Finally, the computer uses the metal artifact removal network of the artifact removal model to remove artifacts from the image containing artifacts, based on the adaptive convolutional kernel, the location information of the non-metallic regions, and the artifact location features, resulting in an artifact-removed image. The computer device calculates the target loss based on the difference between the artifact-removed image and the original medical image. Based on the target loss, it adjusts the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network at each iteration stage, and the metal artifact removal network. Based on the adjusted network parameters, it updates the artifact removal model and uses the updated artifact removal model as the next batch of artifact removal models. It then returns to the step of obtaining training samples for this training batch and continues execution until a preset number of iterations is reached to obtain the trained artifact removal model.
[0100] In the training method of the aforementioned artifact removal model, training samples are obtained. These samples include the original medical image and the image containing artifacts. The image containing artifacts includes metallic artifacts and comprises both metallic and non-metallic regions. That is, the original medical image in each training sample can be considered as a standard image after completely removing the metallic artifacts from the image containing artifacts, thus effectively reflecting the training effect of the artifact removal model. Through the convolutional kernel adaptive network of the artifact removal model, an adaptive convolutional kernel corresponding to the image containing artifacts is determined. This adaptive convolutional kernel adapts to the metallic artifact pattern in the image containing artifacts, promoting the flexible extraction of metallic artifacts by the artifact removal model. Through the artifact location feature extraction network of the artifact removal model, based on the adaptive convolutional kernel and the location information of the non-metallic regions, the artifact location features of the metallic artifacts in the image containing artifacts are extracted, thus accurately extracting the location information of the metallic artifacts in the image containing artifacts. In this way, the metal artifact removal network of the artifact removal model removes artifacts from images containing artifacts based on adaptive convolutional kernels, the location information of non-metallic regions, and artifact location features. This results in an artifact-removed image; that is, by using convolutional kernels adapted to the metal artifact model and accurate metal artifact location information, metal artifacts in artifact-containing images can be accurately extracted. Based on the differences between the artifact-removed image and the original medical image, the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network are automatically adjusted. Then, the training process returns to the step of obtaining training samples to continue training until a well-trained artifact removal model is obtained. Thus, the trained artifact removal model can adaptively adjust the convolutional kernels used to extract metal artifacts based on the differences in metal artifacts in different artifact-containing images. This allows for accurate differentiation between metal artifacts and tissue structures in different artifact-containing images, improving the generalization ability of the artifact removal model and enabling flexible extraction of metal artifacts from different artifact-containing images, thereby improving image processing performance.
[0101] In some embodiments, obtaining training samples includes: obtaining an original medical image, wherein the original medical image is a medical image without metal artifacts; obtaining an image containing artifacts corresponding to the original medical image based on at least one metal mask and the original medical image; and determining training samples based on the original medical image and the corresponding image containing artifacts.
[0102] Optionally, the computer device acquires multiple raw medical images from a publicly available dataset and obtains metal masks for different types of metals. For each raw medical image, the computer device, based on at least one metal mask and the raw medical image, and in conjunction with a publicly available metal artifact simulation protocol, obtains a corresponding image containing artifacts. The computer device then determines a training sample based on the raw medical image and the corresponding image containing artifacts. The metal masks for different types of metals are different. Any two different types of metals refer to two metals that differ in at least one of the following: metal material, metal size, and metal shape.
[0103] For example, a corresponding preliminary artifact image is generated based on at least one metal mask and an original medical image, combined with a publicly available metal artifact simulation protocol. A computer device adjusts the pixel values in this preliminary artifact image to obtain an adjusted preliminary artifact image. The computer device directly determines the preliminary artifact image as the artifact-containing image corresponding to the original medical image. Alternatively, the computer device crops the adjusted preliminary artifact image into image blocks of a preset size, and randomly mirrors each image block horizontally or vertically to obtain flipped image blocks. These flipped image blocks are then combined to obtain the artifact-containing image corresponding to the original medical image.
[0104] The above-described steps for determining the adjusted preliminary artifact image include: adjusting the pixel values of the preliminary artifact image to the range of [0,1], and multiplying each pixel value belonging to the range of [0,1] by a preset value (such as 255) to obtain the adjusted preliminary artifact image. Based on this, it can be ensured that the pixel values of each pixel in the adjusted preliminary artifact image are within the range of [0,255], thus standardizing the pixel values of the image containing artifacts.
[0105] In this embodiment, an original medical image is obtained, which is a medical image without metal artifacts. Based on at least one metal mask and the original medical image, that is, the corresponding image with artifacts and the original medical image can be regarded as a set of control images. In this way, training samples are determined based on the original medical image and the corresponding image with artifacts. That is, the original medical image in each training sample can be regarded as a standard image after the metal artifacts in the image with artifacts have been completely removed. Thus, the training effect of the artifact removal model can be effectively reflected, and the image processing effect can be improved.
[0106] In some embodiments, the artifact removal model includes sub-models in multiple iteration stages, with each iteration stage's sub-model sharing the same convolutional kernel adaptive network; such as Figure 4 The diagram shown illustrates the flowchart of the adaptive convolution kernel determination step in one embodiment. The adaptive convolution kernel corresponding to the image containing artifacts is determined through the convolution kernel adaptive network of the artifact removal model, including:
[0107] Step S402: In the first iteration of multiple iteration stages, the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the first iteration stage is determined by the convolutional kernel adaptive network based on the image containing artifacts; the intermediate artifact removal image of the first iteration stage is output based on the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the first iteration stage and the image containing artifacts.
[0108] Optionally, in the first iteration of multiple iterations, the computer device acquires the image containing artifacts and directly applies Gaussian blur to it to obtain the initial artifact-removed image before the first iteration. The computer device then uses an adaptive convolutional kernel network to determine the intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the first iteration, based on the initial artifact-removed image and the image containing artifacts. Finally, the computer device outputs the intermediate artifact-removed image for the first iteration, based on the intermediate adaptive convolutional kernel and the image containing artifacts.
[0109] It is understandable that if the first iteration is the 1st iteration, then the iteration before the first iteration is the 0th iteration.
[0110] For example, after determining the initial artifact-removed image, the computer device uses a convolutional kernel adaptive network to determine the intermediate adaptive coefficient matrix corresponding to the artifact-containing image in the first iteration stage, based on the initial artifact-removed image and the image containing artifacts. Then, based on the intermediate adaptive coefficient matrix, it determines the intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the first iteration stage. The computer device outputs the intermediate artifact-removed image for the first iteration stage based on the intermediate adaptive convolutional kernel and the artifact-containing image.
[0111] For example, the intermediate adaptive convolution kernel is determined based on the product of the intermediate adaptive coefficient matrix and the constant matrix. The values of each element in the constant matrix are independent of the metal artifact pattern and can be considered constants. The intermediate adaptive coefficient matrix is related to the metal artifact pattern; that is, different images containing artifacts have different metal artifact patterns, which causes changes in the intermediate adaptive coefficient matrix, and thus changes in the intermediate adaptive convolution kernel. Based on this, the convolution kernel adaptive network can also be regarded as an adaptive coefficient network.
[0112] For example, in the first iteration, i.e., the first iteration, the computer device determines the initial artifact-removed image X. 0 According to X 0 The intermediate adaptive coefficient matrix W of the first iteration stage was determined using the image Y containing artifacts. 1 Based on this, the intermediate adaptive convolution kernel C of the output of the first iteration stage was determined. 1 Based on this, computer equipment is based on C. 1Given an image containing artifacts, the sub-model in the first iteration stage outputs the intermediate artifact-removed image X for the first stage. 1 .
[0113] For example, after calculating the product of the intermediate adaptive coefficient matrix and the constant matrix, in order to ensure that the dimensions are consistent in each network, the product can be transformed to obtain the intermediate adaptive convolution kernel.
[0114] Step S404: In a non-first iteration stage of multiple iteration stages, obtain the intermediate artifact removal image output from the previous iteration stage of the current iteration stage, and determine the intermediate adaptive convolution kernel corresponding to the artifact image in the current iteration stage through the convolution kernel adaptive network based on the artifact image and the intermediate artifact removal image output from the previous iteration stage.
[0115] Optionally, in each non-first iteration of multiple iterations, when that non-first iteration is the current iteration, the computer device acquires the intermediate artifact-removed image output from the previous iteration. The computer device inputs both the artifact-containing image and the intermediate artifact-removed image output from the sub-model of the previous iteration into the convolutional kernel adaptive network to obtain the intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the current iteration.
[0116] In some embodiments, the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration stage is determined by using a convolutional kernel adaptive network based on the image containing artifacts and the intermediate artifact-removed image output from the previous iteration stage. This includes: concatenating the image containing artifacts and the intermediate artifact-removed image output from the previous iteration stage to obtain the input image of the current iteration stage; and determining the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration stage based on the input image of the current iteration stage using a convolutional kernel adaptive network.
[0117] Optionally, the computer device concatenates the image containing artifacts and the intermediate artifact-removed image output from the previous iteration to obtain the input image for the current iteration. The computer device then inputs the input image of the current iteration into a convolutional kernel adaptive network to determine the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration.
[0118] For example, after determining the input image for the current iteration, the computer device inputs the input image for the current iteration into the convolution kernel adaptive network, determines the intermediate adaptive coefficient matrix corresponding to the image containing artifacts in the current iteration stage, and determines the intermediate adaptive convolution kernel corresponding to the image containing artifacts in the current iteration stage based on the intermediate adaptive coefficient matrix corresponding to the image containing artifacts in the current iteration stage.
[0119] The aforementioned kernel-adaptive network (which, as mentioned earlier, can also be considered an adaptive coefficient network W-net) includes convolutional layers, global average pooling layers, linear layers, and reshape layers (abbreviated as W-net). Used for dimensional transformation), activation layers, and normalization processing, such as Figure 5 The diagram shown is a schematic representation of a convolutional kernel adaptive network in one embodiment. For example, if the current iteration stage is the nth iteration stage (n equals or greater than 1), Y is an image containing artifacts, X... n-1 The intermediate artifact-removed image output from the previous iteration is used as an example. As mentioned earlier, when n is 1, the previous intermediate artifact-removed image X is used as an example. 0 The image is determined by Gaussian blurring based on the image containing artifacts. When n is greater than 1, the intermediate artifact image output from the previous iteration is based on the image after metal artifact extraction obtained in the (n-1)th iteration. The input image in the current iteration passes sequentially through convolutional layers (2, 6, 3), two convolutional layers (6, 6, 3), a global average pooling layer, and a linear layer (6, 2p). 2 k), Reshaping layer (dimension changed from 2p) 2 k transforms into 2p 2 ×K), normalization layer (will be performed with dimension 2p) 2 (Normalization), based on this, we obtain the adaptive coefficient matrix W for the nth iteration stage. n (dimension is 2p) 2 Based on this, the adaptive coefficient matrix W in the nth iteration stage... n This yields the intermediate adaptive convolution kernel for the nth iteration stage. Where Φ is a constant matrix.
[0120] In this embodiment, the input image for the current iteration is obtained by stitching together the image containing artifacts and the intermediate artifact-removed image output from the previous iteration. Based on this, an adaptive convolutional kernel network is used to determine the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration, according to the input image of the current iteration. Thus, based on the intermediate artifact-removed image output from the previous iteration, the intermediate adaptive convolutional kernel corresponding to the current iteration is adaptively adjusted. After multiple iterations, an adaptive convolutional kernel that accurately matches the metallic artifact pattern of the image containing artifacts can be obtained, ensuring the accuracy of subsequent artifact removal model training and improving image processing performance.
[0121] Step S406: The intermediate adaptive convolution kernel obtained in the last iteration of multiple iteration stages is used as the adaptive convolution kernel corresponding to the image containing artifacts.
[0122] Optionally, when the current iteration stage is the last iteration stage (i.e., the last iteration stage), the intermediate adaptive convolution kernel corresponding to the image containing artifacts in the last iteration stage is used as the adaptive convolution kernel corresponding to the image containing artifacts.
[0123] It is understandable that the sub-models in each iteration stage share the same convolutional kernel adaptive network, meaning that the convolutional kernel adaptive network in the sub-models of each iteration stage is the same.
[0124] Based on the aforementioned steps S402 to S406, it can be known that for the convolutional kernel adaptive network W-net, in the nth iteration stage (n≥1), the intermediate adaptive coefficient matrix W corresponding to the image containing artifacts in the nth iteration stage is... (n) The expression:
[0125]
[0126] In the above expression, θ W Here are the network parameters for the convolutional kernel adaptive network, and concat is the concatenation layer. When n is 1, X... (n-1) =X 0 That is, the initial artifact-removed image X mentioned above. 0 When n is greater than 1, X (n-1) This refers to the image with intermediate artifacts removed from the output of the previous iteration stage, as mentioned above.
[0127] In this embodiment, during the first iteration, the intermediate artifact removal image for the first iteration is determined using the image containing artifacts. Based on this, the intermediate adaptive convolutional kernel for the first iteration can be determined. Then, in subsequent iterations, based on the image containing artifacts and the intermediate artifact removal image output from the previous iteration, the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration is determined using a shared convolutional kernel adaptive network. This process continues until the intermediate adaptive convolutional kernel for the final iteration is obtained. Through multiple iterations, an adaptive convolutional kernel that accurately matches the metallic artifact pattern of the image containing artifacts is obtained, ensuring the accuracy of subsequent artifact removal model training and improving image processing performance.
[0128] In some embodiments, the artifact location feature extraction network in the sub-model of each iteration stage is updated as the iteration process continues; such as Figure 6 The diagram shown illustrates the flowchart for determining artifact location features in one embodiment. Using the artifact location feature extraction network of the artifact removal model, based on the adaptive convolution kernel and the location information of non-metallic regions, the artifact location features of metallic artifacts in the artifact-containing image are extracted, including:
[0129] Step S602: In the first iteration of multiple iteration stages, the artifact location feature extraction network in the sub-model of the first iteration stage is used to determine the intermediate artifact location features extracted by the artifact location feature extraction network in the first iteration stage based on the image containing artifacts.
[0130] Optionally, in the first iteration of the iteration phase, the computer device considers the initial artifact location features prior to the first iteration as preset features. The computer device, through the artifact location feature extraction network in the sub-model of the first iteration phase, determines the intermediate artifact location features extracted by the artifact location feature extraction network in the first iteration phase, based on the image containing artifacts and the initial artifact location features. Here, the preset features can refer to zero, meaning the initial artifact location features are defaulted to zero.
[0131] For example, after determining the initial artifact location features, the computer device uses the artifact location feature extraction network in the sub-model of the first iteration stage to determine the intermediate artifact location features extracted by the artifact location feature extraction network in the first iteration stage, using the location information of the non-metallic region, the intermediate adaptive convolutional kernel output by the first iteration stage, the image containing artifacts, and the initial artifact location features.
[0132] For example, the computer device determines the initial position feature gradient before the first iteration stage based on the position information of the non-metallic region, the intermediate adaptive convolution kernel output in the first iteration stage, the image containing artifacts, and the initial artifact position features. Based on the initial position feature gradient, it determines the intermediate artifact position features extracted by the artifact position feature extraction network in the first iteration stage.
[0133] For example, for the first iteration, i.e., the first iteration stage, before the first iteration stage, the initial artifact position features are: Based on this, the computer device uses the intermediate adaptive convolution kernel C output in the first iteration phase. 1 , The location information I of the artifact image Y and the non-metallic region is used to determine the intermediate artifact location features output in the first iteration stage.
[0134] Step S604: In a non-first iteration stage of multiple iteration stages, the artifact location feature extraction network in the sub-model of the current iteration stage extracts the intermediate artifact location features of the metal artifacts in the image containing artifacts based on the location information of the non-metallic region, the intermediate adaptive convolution kernel corresponding to the image containing artifacts in the current iteration stage, and the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage.
[0135] Optionally, in a non-first iteration of multiple iterations, the computer device uses the artifact location feature extraction network in the sub-model of the current iteration to determine the estimated location feature gradient of the previous iteration of the current iteration based on the location information of the non-metallic region, the intermediate adaptive convolution kernel corresponding to the image containing artifacts in the current iteration, and the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration of the current iteration. Based on the estimated location feature gradient of the previous iteration of the current iteration, the intermediate artifact location features of the metallic artifacts in the image containing artifacts are determined.
[0136] For example, when the current iteration stage is the second iteration stage, the computer device uses the intermediate adaptive convolution kernel C output by the second iteration stage. 2 , Using the artifact image Y and the location information I of the non-metallic region, the predicted location feature gradient for the first iteration stage is determined. Then according to Determine the intermediate artifact location features in the output of the second iteration stage.
[0137] Step S606: The intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the last iteration stage are used as the artifact location features of the metal artifacts in the image containing artifacts.
[0138] Optionally, if the current iteration stage is the last iteration stage (i.e., the final iteration stage), the computer device will use the intermediate artifact location features of the last iteration stage as the artifact location features of the metal artifacts in the image containing artifacts.
[0139] It is understandable that the artifact location feature extraction network in the sub-model of each iteration stage is updated with the iteration process, meaning that the artifact location feature extraction network in the sub-model of each iteration stage is different.
[0140] In this embodiment, in the first iteration stage, the artifact location feature extraction network in the sub-model of the first iteration stage determines the intermediate artifact location features determined in the first iteration stage based on the artifact-containing image. Furthermore, for iterations other than the first iteration stage, the intermediate artifact location features of the previous iteration stage can be accurately determined. Thus, based on the location information of the non-metallic region, the intermediate adaptive convolution kernel corresponding to the artifact-containing image in the current iteration stage, and the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage, the intermediate artifact location features of the metallic artifacts in the artifact-containing image are extracted until the intermediate artifact location features of the final iteration stage are obtained. In this way, through the artifact location feature extraction networks of multiple iteration stages, the artifact location features can be accurately extracted from the artifact-containing image, thereby precisely locating the metallic artifacts, ensuring the accuracy of the trained artifact removal model, and improving the image processing effect.
[0141] In some embodiments, such as Figure 7 The diagram illustrates a flowchart of the steps for determining intermediate artifact location features in one embodiment. Using the artifact location feature extraction network in the sub-model of the current iteration stage, based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the current iteration stage, and the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage, the intermediate artifact location features of the metallic artifacts in the artifact-containing image are extracted, including:
[0142] Step S702: Based on the location information of the non-metallic region, the intermediate adaptive convolution kernel corresponding to the image containing artifacts in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage of the current iteration stage, and the intermediate artifact removal image output by the previous iteration stage of the current iteration stage, determine the predicted location feature gradient of the previous iteration stage.
[0143] For example, when n is greater than 1, for the nth iteration stage, the intermediate adaptive convolution kernel corresponding to the current iteration stage and the image containing artifacts is determined. The artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration in the current iteration phase. And the intermediate artifact-removed image X output from the previous iteration in the current iteration phase. (n-1) After that, computer equipment Dot product Obtain the first dot product result, and then sum the first dot product result to X. (n-1) The first superposition result is obtained, and the second superposition result is obtained by multiplying I by the difference between the first superposition result and Y. The transposed convolution operation is performed on the result of the second dot product to obtain the predicted position feature gradient from the previous iteration. Its expression is as follows:
[0144]
[0145] Of course, the above expression also applies to the first iteration phase. That is, the initial artifact location features mentioned above, X (n-1) =X (0) This refers to the initial artifact-removed image mentioned above. At this point, before the first iteration (the first iteration stage), the initial position feature gradient... Its expression is as follows:
[0146]
[0147] Step S704: Determine the difference between the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage and the predicted location feature gradient of the previous iteration stage.
[0148] Among them, the difference between the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage and the predicted location feature gradient of the previous iteration stage is called the location feature gradient difference.
[0149] Optionally, the computer device directly uses the first difference between the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration in the current iteration stage and the estimated location feature gradient of the previous iteration stage as the location feature gradient difference. Alternatively, after calculating the estimated location feature gradient of the previous iteration stage, the computer device calculates the product of the estimated location feature gradient of the previous iteration stage and the first update step size to obtain the first product, and uses the difference between the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage in the current iteration stage and the first product as the location feature gradient difference corresponding to the current iteration stage.
[0150] Of course, for the first iteration, the computer device can also determine the intermediate artifact location features extracted by the artifact location feature extraction network in the first iteration based on the difference between the initial artifact location features and the initial location feature gradient. For example, the difference between the initial artifact location features and the initial feature gradient is determined, i.e., the initial location feature gradient difference. Alternatively, the computer device can use the product of the initial location feature gradient and the first update step size as the initial location feature product, and use the difference between the initial artifact location features and the initial location feature product as the initial location feature gradient difference.
[0151] Step S706: Using the artifact location feature extraction network in the sub-model of the current iteration stage, extract the intermediate artifact location features of the metal artifacts in the image containing artifacts based on the differences.
[0152] Optionally, for the current iteration stage, the computer device inputs the corresponding position feature gradient difference into the artifact position feature extraction network in the sub-model of the current iteration stage to obtain the intermediate artifact position features of the metal artifacts in the artifact-containing image of the current iteration stage.
[0153] Of course, for the first iteration stage, the computer device can also input the corresponding initial position feature gradient difference into the artifact position feature extraction network in the sub-model of the first iteration stage to obtain the intermediate artifact position features of the metal artifacts in the artifact image of the first iteration stage.
[0154] Based on the aforementioned steps S702 to S706, it can be known that for the nth iteration stage (n≥1), the artifact location feature extraction network of the sub-model in the nth iteration stage... The intermediate artifact location features of metallic artifacts in the artifact-containing image during the nth iteration stage. The expression:
[0155]
[0156] in, The network parameters characterizing the artifact location feature extraction network of the sub-model in the nth iteration stage. It can be a residual network η1 is the first update step size.
[0157] In this embodiment, for iterations other than the first iteration, the predicted position feature gradient of the previous iteration is estimated based on the location information of the non-metallic region, the intermediate adaptive convolution kernel corresponding to the image containing artifacts in the current iteration, the intermediate artifact position features extracted by the artifact position feature extraction network in the sub-model of the previous iteration in the current iteration, and the intermediate artifact-removed image output by the previous iteration in the current iteration. Based on this, the difference between the intermediate artifact position features extracted by the artifact position feature extraction network in the sub-model of the previous iteration in the current iteration and the predicted position feature gradient of the previous iteration can be accurately reflected. Thus, based on the artifact position feature extraction network in the sub-model of the current iteration, the intermediate artifact position features of the metal artifacts in the image containing artifacts are accurately determined according to the difference, until the intermediate artifact position features of the final iteration are obtained. In this way, after multiple iterations of artifact position feature extraction networks, the artifact position features can be accurately extracted from the image containing artifacts, thereby accurately locating the metal artifacts, ensuring the accuracy of the trained artifact removal model, and improving the image processing effect.
[0158] In some embodiments, the metal artifact removal network in the sub-model of each iteration stage is updated with the iteration process; such as Figure 8 The diagram illustrates the process of determining an image with artifact removal in one embodiment. Using a metal artifact removal network within the artifact removal model, artifact removal is performed on the image containing artifacts based on the adaptive convolution kernel, the location information of non-metallic regions, and artifact location features, resulting in an image with artifact removal. This includes:
[0159] Step S802: In a non-first iteration stage of multiple iteration stages, the metal artifact removal network in the sub-model of the current iteration stage removes artifacts from the image containing artifacts based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage, and the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the previous iteration stage.
[0160] Optionally, in a non-first iteration of multiple iterations, the computer device uses the metal artifact removal network in the sub-model of the current iteration to determine the image gradient of the previous iteration based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel corresponding to the artifact in the current iteration, and the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the previous iteration. Based on the image gradient, the computer device performs artifact removal on the image containing artifacts in the current iteration, obtaining the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the current iteration.
[0161] Of course, as mentioned earlier, for the first iteration, the computer device determines the initial artifact-removed image X before proceeding to the first iteration. 0 After the first iteration stage and the intermediate adaptive convolution kernel corresponding to the image containing artifacts, and the image containing artifacts, the computer device uses the initial artifact-removed image X from before the first iteration stage. 0 The first iteration stage uses an intermediate adaptive convolutional kernel and an image containing artifacts to determine the initial image gradient before the first iteration stage. Based on the initial image gradient, the computer device performs artifact removal on the image containing artifacts in the first iteration stage, resulting in the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the first iteration stage.
[0162] For example, for the first iteration, based on the intermediate adaptive convolution kernel C output by the first iteration... 1 and intermediate artifact location features Initial artifact removal image X 0 Given the image Y containing artifacts, determine the initial image gradient before proceeding to the first iteration stage. For example, for the second iteration stage which is not the first iteration stage, the intermediate adaptive convolution kernel C output by the second iteration stage is used. 2 Intermediate artifact location features and artifact removal image X 1 And the image gradient in the first iteration stage is determined by the image Y containing artifacts.
[0163] Step S804: The intermediate artifact removal image output by the metal artifact removal network in the sub-model of the final iteration stage is used as the artifact removal image obtained by removing artifacts from the image containing artifacts.
[0164] Optionally, if the current iteration stage is the final iteration stage (i.e., the last iteration stage), the computer device directly uses the intermediate artifact-removed image of the final iteration stage as the artifact-containing image to obtain the artifact-removed image after multiple iteration stages.
[0165] It is understandable that the metal artifact removal network in the sub-model of each iteration stage is updated with the iteration process, meaning that the metal artifact removal network in the sub-model of each iteration stage is different.
[0166] In this embodiment, for iterations other than the first iteration, based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel output by the convolutional kernel adaptive network in the current iteration, and the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the previous iteration, the metal artifacts of the current iteration are extracted through the metal artifact removal network in the sub-model of the current iteration. This ensures that the metal artifacts are correctly extracted in the current iteration, thereby improving the accuracy of the intermediate artifact removal image output in the current iteration. In this way, the effectiveness of the intermediate artifact removal image output in the next iteration is ensured. That is, while ensuring the accuracy of the intermediate artifact removal images output in each iteration, the accuracy of the artifact removal image obtained in the final iteration is also ensured, thus improving the model training effect.
[0167] In some embodiments, such as Figure 9 The diagram illustrates the process of obtaining the intermediate artifact removal image in one embodiment. Based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the current iteration stage, and the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the previous iteration stage, artifact removal is performed on the artifact-containing image to obtain the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the current iteration stage. This includes:
[0168] Step S902: Determine the image gradient of the previous iteration stage based on the location information of the non-metallic region, the intermediate adaptive convolution kernel corresponding to the image containing artifacts in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage, and the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the previous iteration stage.
[0169] It should be noted that for any image containing metal artifacts, such as the artifact-containing image Y used for training, the target decomposition model of the non-metallic region I is satisfied as follows:
[0170]
[0171] In the above, X represents the image after artifact removal, which can be understood as a clean image. The extracted metal artifact image is represented here, and the expression for the metal artifact is obtained by taking into account the rotational symmetry structure of the metal artifact. It can be regarded as an adaptive convolution kernel C.
[0172] The above target decomposition model reflects the features of the clean image X, the adaptive convolution kernel C, and the artifact location. The correlation between the location information I of the non-metallic region and the image Y containing artifacts.
[0173] Based on this, in some embodiments, step S902 includes: encoding the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage using the intermediate adaptive convolution kernel corresponding to the artifact-containing image in the current iteration stage, to obtain the metal artifact image of the current iteration stage; fusing the metal artifact image of the current iteration stage and the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the previous iteration stage to obtain a fused image; and calculating the image gradient of the previous iteration stage based on the location information of the non-metallic region and the difference between the fused image and the artifact-containing image.
[0174] The adaptive convolutional kernel encodes the artifact location features, which can be understood as a convolution operation. The encoded result represents the metallic artifacts. For example, when n is greater than 1, for the nth iteration stage, the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration stage... The intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage. Based on the clean image X, adaptive convolution kernel C, and artifact location features reflected by the target decomposition model. The correlation between the location information I of the non-metallic region and the artifact-containing image Y is determined. Image A, representing the metal artifacts output in the current iteration phase. (n) At this point, to determine the image gradient, The intermediate artifact-removed image X output by the metal artifact removal network in the sub-model of the previous iteration. (n-1) The images are superimposed to obtain a fused image, and the difference between this fused image and the image Y containing artifacts is taken as the image difference of the previous iteration. Since this is only effective in non-metallic regions, the position information I of the non-metallic regions needs to be multiplied by the image difference of the previous iteration to obtain the image gradient of the previous iteration.
[0175] That is, when n is greater than 1, the image gradient of the previous iteration stage The expression is as follows:
[0176]
[0177] Of course, when n equals 1, the above steps can also be followed to determine the initial image gradient before the first iteration stage. In this case, based on the intermediate adaptive convolution kernel and intermediate artifact position features of the first iteration stage, the metal artifact image of the first iteration stage is determined. The metal artifact image A output from the first iteration stage is then obtained. (1) After that, A (1) Compared with the initial artifact removal image X 0 The images are superimposed to obtain the fused image corresponding to the first iteration stage. The difference between the fused image corresponding to the first iteration stage and the image Y containing artifacts is then used as the initial image difference before the first iteration stage. The positional information I of the non-metallic region is multiplied by the initial image difference to obtain the initial image gradient before the first iteration stage.
[0178] That is, the initial image gradient before the first iteration stage. The expression is as follows:
[0179]
[0180] The above method utilizes intermediate adaptive convolutional kernels corresponding to the artifact-containing image in the current iteration to encode the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration, thus obtaining the metal artifact image extracted in the current iteration. The metal artifact image of the current iteration and the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the previous iteration are fused to obtain a fused image. Based on the location information of the non-metallic regions and the differences between the fused image and the artifact-containing image, the image gradient of the previous iteration is calculated. This gradient reflects the difference between the intermediate artifact-removed image output by the metal artifact removal network in the previous iteration and the image gradient of the previous iteration. Therefore, the intermediate artifact-removed image obtained by the metal artifact removal network in the current iteration can be accurately extracted, ensuring the accuracy of the trained artifact removal model and improving image processing performance.
[0181] Step S904: Determine the difference between the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the previous iteration stage and the image gradient of the previous iteration stage.
[0182] Optionally, the computer device directly uses the second difference between the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the previous iteration and the image gradient of the previous iteration as the image gradient difference corresponding to the current iteration. Alternatively, after calculating the image gradient of the previous iteration, the computer device calculates the product of the image gradient of the previous iteration and the second update step size to obtain the second product, and uses the difference between the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the previous iteration and the second product as the image gradient difference corresponding to the current iteration.
[0183] Of course, for the first iteration, after the computer device determines the initial image gradient, it uses the difference between the initial artifact-removed image and the initial image gradient as the initial image gradient difference. Alternatively, the computer device uses the product of the initial image gradient and the second update step size as the initial image gradient product, and uses the difference between the initial artifact-removed image and the initial image gradient product as the initial image gradient difference.
[0184] Step S906: Using the metal artifact removal network in the sub-model of the current iteration stage, based on the differences, obtain the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the current iteration stage.
[0185] Optionally, for the current iteration stage, the computer device inputs the corresponding image gradient difference into the metal artifact removal network in the sub-model of the current iteration stage to obtain the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the current iteration stage.
[0186] Of course, for the first iteration, the computer device inputs the initial image gradient difference into the metal artifact removal network in the sub-model of the first iteration, and obtains the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the first iteration.
[0187] Based on the aforementioned steps S902 to S906, it can be known that for the nth iteration stage (n≥1), the metal artifact removal network X-net in the sub-model of the nth iteration stage outputs the intermediate artifact removal image X. (n) The expression:
[0188]
[0189] in, The network parameters characterizing the metal artifact removal network of the sub-model in the nth iteration stage. It can be a residual network η2 is the second update step size.
[0190] In this embodiment, after determining the image gradient of the previous iteration based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the current iteration stage, and the intermediate artifact-removed image output by the metal artifact removal network in the previous iteration stage, the difference between the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the previous iteration stage and the image gradient of the previous iteration stage can be reflected. Thus, by using the metal artifact removal network in the sub-model of the current iteration stage, the intermediate artifact-removed image output by the metal artifact removal network in the current iteration stage can be accurately extracted based on the difference, ensuring the accuracy of the trained artifact removal model and improving the image processing effect.
[0191] As mentioned earlier, for each iteration stage's sub-model, there exists a shared convolutional kernel adaptive network, a corresponding artifact location extraction network, and a metal artifact removal network. The sub-model is constructed based on the rotationally symmetric structure of metal artifacts, as explained below:
[0192] For any image containing metal artifacts, such as the artifact-containing image Y used for training, the following formula 1 is satisfied:
[0193] I⊙Y=I⊙X+I⊙A
[0194] Where Y is the image containing artifacts (which can be understood as an image contaminated with metal), Y∈R H×W X represents the original medical image (which can be understood as a clean image), X∈R H×W A represents the metal artifact to be extracted, where A∈R H×W I is a nonmetallic region, I∈R H ×W Its elements are {0, 1}, where 1 represents a non-metallic region and 0 represents a metallic region; H and W represent the height and width of the image, respectively; ⊙ represents element-wise multiplication. Clearly, the above formula is only meaningful within the non-metallic region I (where the elements are 1).
[0195] As mentioned earlier, metal artifacts are rotationally symmetric structures. Therefore, considering this rotational symmetry, sub-metal artifacts corresponding to different rotation angles are superimposed to obtain metal artifact A. To enhance the redundancy in characterizing the metal artifacts, K convolution kernels (which can be understood as convolutional filters) exist at each rotation angle. Based on this, the expression for metal artifact A is shown in Formula 2 below:
[0196]
[0197] Where L is the number of rotation angles, θ l =2π(l-1) / L represents the l-th rotation angle, and K is the number of convolution filters at each angle; C k (θ l )∈R p×p The rotation angle is θ l The k-th parameter filter can be considered as a convolution kernel, such as L = 8 and K = 4. p×p is the size of the convolution kernel, such as p×p being set to 9×9; M lk ∈R H×W It is a feature layer, which includes the artifact location features of each pixel in the image, representing the location information of the metal artifacts (such as the intensity and position of each pixel). This is a two-dimensional planar convolution operation. Where C... k (θ l This can be viewed as a matrix containing multiple elements, each of which is expressed as shown in Formula 3 below:
[0198]
[0199] in, The angle is θ l The rotation matrix, its expression is: It can be considered as a two-dimensional function; x ij It can be considered as the element in the i-th row and j-th column of a matrix, and its expression is: x ij =[x i ,x j ] T =[(i-(p+1) / 2)h,(j-(p+1) / 2)h] T ;i=1,…,p,j=1,…,p,a qtk and b qtk These are the expansion coefficients, which are shared across different rotation directions. It should be noted that different metal artifact modes will have different expansion coefficients. and These are the Fourier basis functions of the rotation, and their respective expressions are as follows:
[0200]
[0201]
[0202] Where Ω(x)≥0 is a radial mask function, when When y ≤ p / 2, Ω(x) = 0, I p (y) = y; otherwise, I p(y) = yp. In the specific embodiment, h = 1 / 4.
[0203] Remember W kd =[a qtk ,b qtk ] T , Combining Formula 3 above, Formula 2 can be rewritten as Formula 4, as follows:
[0204]
[0205] Here, W can be considered as a coefficient matrix, as shown below:
[0206]
[0207] in, By M lk The stacked structure consists of L×K feature layers, which can be understood as each convolutional kernel corresponding to one feature layer.
[0208] Finally, based on Formula 4, Formula 1 is rewritten to obtain Formula 5, which gives the decomposition model of the non-metallic region as follows:
[0209]
[0210] Formula 5 This can be considered as an adaptive convolution kernel C. Therefore, based on Equation 5, the clean image (i.e., the image without artifacts) after extracting metal artifacts from an image containing artifacts can be determined. Similarly, Equation 5 also reflects the clean image X, the adaptive convolution kernel C, and the artifact location features. The correlation between the location information I of the non-metallic region and the image Y containing artifacts.
[0211] Considering that there are three unknowns in Equation 5, namely the clean image X, the adaptive convolution kernel C, and the location information of the metal artifacts. At this point, considering the image coupling between tissue structure and metal artifacts, as well as the different intensity variations of metal artifacts in images of different types of metals—that is, as mentioned earlier, different images containing artifacts have different metal artifact patterns—we estimate the clean image X, the adaptive convolution kernel C, and the location information of the metal artifacts, given an image Y containing artifacts. The objective optimization problem is then defined as shown in Formula 6 below:
[0212]
[0213] Where α, β, and γ are trade-off parameters, and f1(.) and f2(.) are regularization terms, representing the location information of the metal artifacts, respectively. And the prior structure of the clean image X.
[0214] Based on Formula 5, the above unknowns are solved through multiple iterations, as shown in Formula 7 below, which expresses the expressions for the three unknowns in the nth iteration stage (at this time, the nth iteration stage can be the first iteration stage or a non-first iteration stage):
[0215]
[0216]
[0217]
[0218] The meanings of the parts in the expressions for the three unknowns mentioned above have already been discussed earlier and will not be repeated here.
[0219] Based on this, it can be seen that, considering the rotationally symmetric structure, each sub-model can be constructed according to the expressions of the three unknowns mentioned above. It is known that the intermediate artifact-removed image and the image containing artifacts output by the metal artifact removal network of the sub-model in the previous iteration are used as input to the kernel adaptive network in the current iteration to obtain the intermediate adaptive coefficient matrix in the current iteration, thus determining the intermediate adaptive convolutional kernel of the current iteration. Then, based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel of the current iteration, and the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration in the current iteration, the intermediate artifact location features of the current iteration are determined by the artifact location feature extraction network of the current iteration. Finally, based on the location information of the non-metallic region, the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the previous iteration in the current iteration, the intermediate adaptive convolutional kernel of the current iteration, and the intermediate artifact location features of the current iteration, the intermediate artifact-removed image of the current iteration is obtained by the metal artifact removal network in the current iteration. If the current iteration stage is the last iteration stage, then the intermediate artifact-removed image of the last iteration stage is used as the artifact-removed image obtained by removing artifacts from the image containing artifacts.
[0220] In this way, through multiple iterations, the network parameters of the sub-models are gradually adjusted to ensure the performance of the finally trained artifact removal model.
[0221] In some embodiments, adjusting the network parameters of the adaptive convolutional kernel network, the artifact location feature extraction network, and the metal artifact removal network based on the difference between the artifact-removed image and the original medical image includes: determining the estimated metal artifacts based on the adaptive convolutional kernels and the artifact location features; superimposing the estimated metal artifacts onto the original medical image to obtain an estimated artifact-containing image; constructing a target loss based on a first difference between the artifact-containing image and the estimated artifact-containing image and a second difference between the original medical image and the artifact-removed image; and adjusting the network parameters of the adaptive convolutional kernel network, the artifact location feature extraction network, and the metal artifact removal network based on the target loss.
[0222] As mentioned earlier, each iteration stage determines the intermediate adaptive convolutional kernel, intermediate artifact location features, and intermediate artifact-removed image for that stage. The intermediate adaptive convolutional kernel and intermediate artifact location features can accurately predict the intermediate predicted metal artifacts for that iteration stage. Therefore, by overlaying the intermediate predicted metal artifacts onto the original medical image, the intermediate predicted artifact-containing image for that iteration stage can be predicted. Based on this, the network parameters of each sub-model in each iteration stage can be adjusted by considering the first difference between the artifact-containing image and the intermediate predicted artifact-containing image for that iteration stage, and the second difference between the original medical image and the intermediate artifact-removed image. The target loss is positively correlated with the first difference, and the target loss is positively correlated with the second difference.
[0223] Optionally, for each iteration stage, the computer device determines the predicted metal artifact of that iteration stage by the convolution operation result between the intermediate adaptive convolution kernel and the intermediate artifact location features corresponding to that iteration stage, and superimposes the original medical image and the predicted metal artifact of that iteration stage to obtain the intermediate predicted artifact-containing image of that iteration stage. The computer device calculates the first difference between the artifact-containing image and the intermediate predicted artifact-containing image, and determines the first target difference of that iteration stage by multiplying the location information of the non-metallic region with the first difference of that iteration stage. The computer device calculates the second difference between the original medical image and the intermediate artifact-removed image of that iteration stage, and determines the second target difference of that iteration stage by multiplying the location information of the non-metallic region with the second difference of that iteration stage. The computer device superimposes the first target difference and the second target difference of each iteration stage to determine the target loss. Based on the target loss, the network parameters of the convolution kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network of the sub-model of each iteration stage are adjusted respectively.
[0224] For example, for each iteration stage, the computer device performs l1 norm and l2 norm calculations on the first target difference to obtain the first sub-norm and second sub-norm corresponding to that iteration stage; the computer device performs l1 norm calculation on the second target difference to obtain the third sub-norm for that iteration stage. The computer device sums the first sub-norms of each iteration stage to obtain a first sum, sums the second sub-norms of each iteration stage to obtain a second sum, and sums the third sub-norms of each iteration stage to obtain a third sum.
[0225] The computer equipment performs a weighted summation of the first, second, and third sums according to their respective weights to determine the target loss.
[0226] For example, the target loss L is expressed as follows:
[0227]
[0228] There are a total of N iteration stages, μ n λ1 and λ2 are both trade-off parameters used to balance the weights of various losses. μ is the l2 norm, ||.|1 is the l1 norm, and μ n =0.1(n=
[0229] 0,1,…,N-1),μ n =1, λ1=λ2=5×10 -4 N = 10.
[0230] In this embodiment, metal artifacts can be predicted based on adaptive convolutional kernels and artifact location features. By overlaying the predicted metal artifacts onto the original medical image, a predicted image containing artifacts is generated. This allows for the determination of a first difference between the image containing artifacts and the predicted image containing artifacts, using the image containing artifacts as a reference. Simultaneously, a second difference between the original medical image and the image with artifact removal is determined. Based on the first and second differences, a target loss is constructed. Using this target loss, the network parameters of the adaptive convolutional kernel network, the artifact location feature extraction network, and the metal artifact removal network are accurately adjusted until a well-trained artifact removal model is obtained. This trained artifact removal model can accurately distinguish between metal artifacts and tissue structures in different images containing artifacts, flexibly extracting metal artifacts from different images, thus improving image processing performance.
[0231] In some embodiments, such as Figure 10 As shown, an image processing method is provided, and the method is illustrated using an application to a computer device as an example. The method includes the following steps:
[0232] Step S1002: Obtain the medical image to be processed, which contains metal artifacts.
[0233] Step S1004: Through the kernel adaptive network of the trained artifact removal model, a target adaptive convolution kernel corresponding to the medical image to be processed is determined. The target adaptive convolution kernel is adapted to the metal artifact pattern in the medical image to be processed.
[0234] The trained artifact removal model is obtained by training the artifact removal model mentioned earlier. The trained artifact removal model includes target sub-models in multiple iteration stages, and each target sub-model in each iteration stage shares the convolutional kernel adaptive network of the trained artifact removal model.
[0235] Optionally, in the first iteration of multiple iterations, the kernel adaptive convolutional network of the trained artifact removal model is used to determine the target intermediate adaptive convolutional kernel corresponding to the medical image to be processed in the first iteration; the target intermediate artifact removal image of the first iteration is output based on the target intermediate adaptive convolutional kernel corresponding to the medical image to be processed in the first iteration and the medical image to be processed; in non-first iterations of multiple iterations, the target intermediate artifact removal image output from the previous iteration of the current iteration is obtained, and the kernel adaptive convolutional network of the trained artifact removal model is used to determine the target intermediate adaptive convolutional kernel corresponding to the medical image to be processed in the current iteration based on the medical image to be processed and the target intermediate artifact removal image output from the previous iteration; the target intermediate adaptive convolutional kernel obtained in the last iteration of multiple iterations is used as the target adaptive convolutional kernel corresponding to the medical image to be processed.
[0236] In the above process, the kernel adaptive convolutional network of the trained artifact removal model determines the target intermediate adaptive convolutional kernel corresponding to the medical image to be processed in the current iteration stage based on the medical image to be processed and the target intermediate artifact removal image output from the previous iteration stage. This includes: stitching the medical image to be processed and the target intermediate artifact removal image output from the previous iteration stage to obtain the target input image for the current iteration stage; and determining the target intermediate adaptive convolutional kernel corresponding to the medical image to be processed in the current iteration stage based on the target input image for the current iteration stage.
[0237] Step S1006: Using the artifact location feature extraction network of the trained artifact removal model, the target artifact location features of the metal artifacts in the medical image to be processed are extracted based on the target adaptive convolution kernel and the location information of the target non-metallic region in the medical image to be processed.
[0238] In this model, the artifact location feature extraction network in the target sub-model of each iteration stage is updated with the iteration process. That is, each iteration stage corresponds to one target sub-model, and each target sub-model includes the artifact location feature extraction network. In other words, the trained artifact removal model comprises multiple target sub-models. The medical image to be processed includes non-metallic regions where no metal is present and metallic regions where metal is present. After acquiring the medical image, the location information of the non-metallic regions in the image can be determined based on image recognition.
[0239] Optionally, in the first iteration of multiple iterations, the artifact location feature extraction network in the target sub-model of the first iteration determines the target intermediate artifact location features extracted by the artifact location feature extraction network in the target sub-model of the first iteration based on the medical image to be processed. In non-first iterations of multiple iterations, the artifact location feature extraction network in the target sub-model of the current iteration extracts the target intermediate artifact location features of the metal artifacts in the medical image to be processed based on the location information of the target non-metallic region, the target intermediate adaptive convolution kernel corresponding to the medical image to be processed in the current iteration, and the target intermediate artifact location features extracted by the artifact location feature extraction network in the target sub-model of the previous iteration. The target intermediate artifact location features extracted by the artifact location feature extraction network in the target sub-model of the last iteration are used as the target artifact location features of the metal artifacts in the medical image to be processed.
[0240] For example, through the artifact location feature extraction network in the target sub-model of the current iteration stage, based on the location information of the non-metallic region of the target, the target intermediate adaptive convolution kernel corresponding to the medical image to be processed in the current iteration stage, and the target intermediate artifact location features extracted by the artifact location feature extraction network in the target sub-model of the previous iteration stage, the target intermediate artifact location features of the metallic artifacts in the medical image to be processed are extracted, including:
[0241] Based on the location information of the target non-metallic region, the target intermediate adaptive convolution kernel corresponding to the medical image to be processed in the current iteration stage, the target intermediate artifact location features extracted by the artifact location feature extraction network in the target sub-model of the previous iteration stage in the current iteration stage, and the target intermediate artifact removal image output by the previous iteration stage in the current iteration stage, the target predicted location feature gradient of the previous iteration stage is determined; the third difference between the target intermediate artifact location features extracted by the artifact location feature extraction network in the target sub-model of the previous iteration stage in the current iteration stage and the target predicted location feature gradient of the previous iteration stage is determined; and the target intermediate artifact location features of the metallic artifacts in the medical image to be processed are extracted by the artifact location feature extraction network in the target sub-model of the current iteration stage based on the third difference.
[0242] Step S1008: Using the trained artifact removal model's metal artifact removal network, artifact removal is performed on the medical image to be processed based on the target adaptive convolution kernel, the location information of the target non-metallic region, and the location features of the target artifact, resulting in an artifact-removed image corresponding to the medical image to be processed.
[0243] In each iteration stage, the metal artifact removal network in the target sub-model is updated as the iteration process progresses.
[0244] Optionally, in a non-first iteration of multiple iterations, the metal artifact removal network in the target sub-model of the current iteration removes artifacts from the medical image to be processed based on the location information of the non-metallic region of the target, the target intermediate adaptive convolution kernel corresponding to the medical image to be processed in the current iteration, the target intermediate artifact location features extracted by the artifact location feature extraction network in the target sub-model of the current iteration, and the target intermediate artifact removal image output by the metal artifact removal network in the target sub-model of the previous iteration. This results in the target intermediate artifact removal image output by the metal artifact removal network in the target sub-model of the current iteration. The target intermediate artifact removal image output by the metal artifact removal network in the target sub-model of the last iteration is then used as the artifact removal image corresponding to the medical image to be processed.
[0245] For example, the metal artifact removal network in the target sub-model of the current iteration stage removes artifacts from the medical image to be processed based on the location information of the non-metallic region of the target, the target intermediate adaptive convolutional kernel corresponding to the medical image to be processed in the current iteration stage, the target intermediate artifact location features extracted by the artifact location feature extraction network in the target sub-model of the current iteration stage, and the target intermediate artifact removal image output by the metal artifact removal network in the target sub-model of the previous iteration stage. This results in the target intermediate artifact removal image output by the metal artifact removal network in the target sub-model of the current iteration stage, including:
[0246] Based on the location information of the target non-metallic region, the target intermediate adaptive convolution kernel corresponding to the medical image to be processed in the current iteration stage, the target intermediate artifact location features extracted by the artifact location feature extraction network in the target sub-model of the current iteration stage, and the target intermediate artifact removal image output by the metal artifact removal network in the target sub-model of the previous iteration stage, the gradient of the target image in the previous iteration stage is determined; the fourth difference between the target intermediate artifact removal image output by the metal artifact removal network in the target sub-model of the previous iteration stage and the gradient of the target image in the previous iteration stage is determined; and the target intermediate artifact removal image output by the metal artifact removal network in the target sub-model of the current iteration stage is obtained based on the fourth difference.
[0247] For example, based on the location information of the target non-metallic region, the target intermediate adaptive convolutional kernel corresponding to the medical image to be processed in the current iteration stage, the target intermediate artifact location features extracted by the artifact location feature extraction network in the target sub-model of the current iteration stage, and the target intermediate artifact removed image output by the metal artifact removal network in the target sub-model of the previous iteration stage, the target image gradient of the previous iteration stage is determined, including:
[0248] The target intermediate artifact position features extracted by the artifact position feature extraction network in the target sub-model of the current iteration stage are encoded using the target intermediate adaptive convolution kernel corresponding to the medical image to be processed in the current iteration stage to obtain the target metal artifact image of the current iteration stage; the target metal artifact image of the current iteration stage and the target intermediate artifact removal image output by the metal artifact removal network in the target sub-model of the previous iteration stage are fused to obtain the target fused image; the target image gradient of the previous iteration stage is calculated based on the position information of the target non-metallic region and the difference between the target fused image and the medical image to be processed.
[0249] In practical applications, such as steps S1002 to S1008 above, for example... Figure 11A The diagram illustrates artifact removal in one embodiment. Terminal A sends a medical image containing metallic artifacts to a computer device. The computer device uses a pre-trained artifact removal model to perform artifact removal processing on the medical image, obtaining an artifact-removed image, which is then sent to terminal B. Terminals A and B can be the same or different terminals; no specific limitation is imposed. Figure 11B The image shown is a schematic diagram illustrating the artifact removal effect in one embodiment. After inputting the medical image to be processed into the trained artifact removal model, the output image with artifact removal effectively removes metallic artifacts.
[0250] like Figure 11C The diagram shown illustrates artifact removal in another embodiment. There are four medical images to be processed: Y1, Y2, Y3, and Y4. Each image is input into a trained artifact removal model for multiple iterative processing steps. Figure 11C The four images in the second row are the metal artifacts A1 obtained from the 10th iteration of Y1. (10) The metallic artifact A2 obtained from the 10th iteration of Y2 (10) The metallic artifact A3 obtained from the 10th iteration of Y3 (10) The metallic artifact A4 obtained from the 10th iteration of Y4 (10) Finally, after the final iteration, the metal artifacts A1 corresponding to Y1, A2 corresponding to Y2, A3 corresponding to Y3, and A4 corresponding to Y4 are obtained respectively. When processing each medical image, multiple adaptive convolutional kernels are determined based on the specific metal artifact pattern of that image, such as... Figure 11C The fifth line in the diagram shows four adaptive convolutional kernels corresponding to different rotation directions.
[0251] Furthermore, to compare the metal artifact removal performance of the trained artifact removal model obtained in this application, such as... Figure 11DThe diagram illustrates a comparison of different artifact removal processes in a single example. Three control groups were set up, each corresponding to an image without artifacts. Metal artifacts were then superimposed onto each of these artifact-free images to obtain the corresponding input images. The input images contained metal artifacts. Each input image was processed using five artifact removal methods (related techniques 1 to 5, and the pre-trained artifact removal model used in this application), resulting in artifact-removed images. Related technique 1 is a neural network-based artifact removal method (CNNMAR). Related technique 2 is based on a dual-domain network for CT metal artifact reduction (DuDoNET). Related technique 3 is based on encoding mask projection to reduce CT metal artifacts (DuDoNet++). Related technique 4 is based on the DeepInterpretable Convolutional Dictionary Network for Metal Artifact Reduction in CT Images (DICDNet). Related technique 5 is based on Orientation-Shared Convolution Representation for CT Metal Artifact Learning (OSCNet). Each sub-image includes two evaluation metrics: PSNR (Peak Signal-to-Noise Ratio) and SSIM (Structural Similarity), which evaluate the image obtained after applying the corresponding artifact removal processing. Compared to the artifact-removed images obtained by the five related techniques, the artifact removal model used in this application achieves better results.
[0252] In this embodiment, the above image processing method involves acquiring a medical image to be processed, which contains metal artifacts; determining a target adaptive convolutional kernel corresponding to the medical image to be processed using a pre-trained artifact removal model's kernel adaptive network, wherein the target adaptive convolutional kernel is adapted to the metal artifact pattern in the medical image to be processed; extracting target artifact location features of the metal artifacts in the medical image to be processed using a pre-trained artifact removal model's artifact location feature extraction network, based on the target adaptive convolutional kernel and the location information of the target non-metallic region in the medical image to be processed; and removing artifacts from the medical image to be processed using a pre-trained artifact removal model's metal artifact removal network, based on the target adaptive convolutional kernel, the location information of the target non-metallic region, and the target artifact location features, to obtain an artifact-removed image corresponding to the medical image to be processed. In this way, the trained artifact removal model determines the matching adaptive convolution kernel based on the strip-shaped prior result of the rotational symmetry of metal artifacts and the differences presented by metal artifacts in the medical image to be processed. The convolution kernel used to extract metal artifacts is adaptively adjusted, which can dynamically remove metal artifacts in the medical image to be processed. It has good adaptability and better extraction effect, that is, better image processing effect.
[0253] This application also provides an application scenario in which the above-mentioned artifact removal model training method is applied. Specifically, the application of the artifact removal model training method in this scenario is as follows: In anomaly repair scenarios, anomalies exist in the target area of the target object. To perform targeted anomaly repair on the target area, computed tomography (CT) imaging is required. Based on the obtained medical images, the type of anomaly is determined, and anomaly repair corresponding to the type is performed. Therefore, to avoid interference from the determination of the type of anomaly due to metal artifacts, metal artifacts in the scanned images need to be removed to obtain an image without metal artifacts, thus determining the type of anomaly. Based on this, the artifact removal model training method provided in this application embodiment can be used to obtain a trained artifact removal model. Then, the trained artifact removal model is used to remove metal artifacts from the scanned images, resulting in an artifact-removed image without metal artifacts. The training process of the artifact removal model is as follows: Training samples are obtained, including the original medical image and an image containing artifacts. The image containing artifacts includes metallic artifacts and comprises both metallic and non-metallic regions. An adaptive convolutional kernel corresponding to the image containing artifacts is determined using the convolutional kernel adaptive network of the artifact removal model. This adaptive convolutional kernel adapts to the metallic artifact pattern in the image containing artifacts. The artifact location feature extraction network of the artifact removal model extracts the artifact location features of metallic artifacts in the image containing artifacts based on the location information of the adaptive convolutional kernel and the non-metallic regions. The metal artifact removal network of the artifact removal model removes artifacts from the image containing artifacts based on the location information of the adaptive convolutional kernel, the non-metallic regions, and the artifact location features, resulting in an artifact-removed image. Based on the differences between the artifact-removed image and the original medical image, the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network are adjusted. The process then returns to the step of obtaining training samples to continue training until a well-trained artifact removal model is obtained.
[0254] Of course, it is not limited to this. The training of the artifact removal model provided in this application can also be applied to other application scenarios. For example, in the scenario of monitoring the state of a target object, after performing a tomographic scan on the target object to obtain a medical image, in order to avoid the judgment of the monitoring personnel regarding metal artifacts, it is necessary to remove the metal artifacts in the scanned medical image. At this time, the trained artifact removal model obtained by the training method of the artifact removal model provided in the embodiments of this application can be used to remove metal artifacts from all medical images, and the state of the target object can be determined based on the medical image after removal.
[0255] The above application scenarios are merely illustrative. It is understood that the application of the training methods for artifact removal models provided in the embodiments of this application is not limited to the above scenarios.
[0256] In one specific embodiment, a method for training an artifact removal model is provided, which uses a computing device as the implementing entity, such as... Figure 12 The diagram shown illustrates the artifact removal process in one embodiment, with the specific implementation as follows: Figure 12 (1) includes steps S1202 to S1220:
[0257] Step S1202: Determine whether the current processing task is a training task?
[0258] Specifically, if the computer device detects that there is no artifact removal model for removing metal artifacts, it determines that the current processing task is a training task, executes step S1204 to obtain the trained artifact removal model, and then executes step S1214; if it detects that there is an artifact removal model for removing metal artifacts, it determines that the current processing task is not a training task, that is, a testing task, and then directly executes step S1214.
[0259] Step S1204: Obtain training samples.
[0260] Specifically, the computer device acquires a first preset number of training samples. The acquisition steps for each training sample include: acquiring an original medical image, which is a medical image without metal artifacts; acquiring at least one metal mask; and generating a preliminary artifact image corresponding to the original medical image based on the at least one metal mask and the original image, combined with a publicly available metal artifact simulation protocol. The pixel values in the preliminary artifact image are adjusted to obtain an adjusted preliminary artifact image. The preliminary artifact image is directly identified as the artifact-containing image corresponding to the original medical image. Alternatively, the adjusted preliminary artifact image is cropped into image blocks of a preset size, and each image block is randomly horizontally or vertically mirrored to obtain flipped image blocks. These flipped image blocks are then combined to obtain the artifact-containing image corresponding to the original medical image. Based on the original medical image and the corresponding artifact-containing image, training samples are determined. The step of determining the adjusted preliminary artifact image includes: adjusting the pixel values of the preliminary artifact image to the range of [0,1], and multiplying each pixel value belonging to the range of [0,1] by a preset value (such as 255) to obtain the adjusted preliminary artifact image.
[0261] Step S1206: Load training samples and train the artifact removal model.
[0262] Specifically, after the computer device loads the training samples, it performs multiple iterations of training on the artifact removal model based on a first preset number of training samples. For each iteration, the first preset number of training samples is divided equally to obtain a training subset of a preset training batch. The number of training samples in each training subset is the ratio of the first preset number to the preset batch. For each training batch in each iteration, the artifact removal model obtained after training the previous training batch is acquired, and each training sample of that training batch is acquired. Based on each training sample of the training batch, the artifact removal model of that training batch is processed through multiple iteration stages. The artifact removal model includes sub-models in multiple iteration stages. Each sub-model in each iteration stage includes a shared convolutional kernel adaptive network, an artifact location feature extraction network corresponding to that iteration stage, and a metal artifact removal network.
[0263] For each training sample in the current training batch, multiple iterations are performed. The training steps for each iteration are as follows: Figure 12 (2) includes steps S1206a to S1206b:
[0264] Step S1206a: In the first iteration stage of model processing, the intermediate artifact removal image of the sub-model output of the first iteration stage is obtained.
[0265] Specifically, in the first iteration of multiple iterations, the image containing artifacts of the training sample is acquired, and Gaussian blur is directly applied to this image to obtain the initial artifact-removed image before the first iteration. Using a convolutional kernel adaptive network, based on the initial artifact-removed image and the image containing artifacts, an intermediate adaptive coefficient matrix corresponding to the image containing artifacts in the first iteration is determined, and an intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the first iteration is determined based on the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the first iteration. Based on the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the first iteration and the image containing artifacts, the intermediate artifact-removed image of the first iteration is output.
[0266] The initial artifact location features before the first iteration are considered as preset features. For example, the preset features can be zero, meaning the default initial artifact location features are zero. The artifact location feature extraction network in the sub-model of the first iteration determines the initial location feature gradient before the first iteration based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel output from the first iteration, the image containing artifacts, and the initial artifact location features. The difference between the initial artifact location features and the initial feature gradient is determined, i.e., the initial location feature gradient difference. Alternatively, the computer device uses the product of the initial location feature gradient and the first update step size as the initial location feature product, and the difference between the initial artifact location features and the initial location feature product as the initial location feature gradient difference. Based on the initial location feature gradient difference, the intermediate artifact location features extracted by the artifact location feature extraction network in the first iteration are determined.
[0267] Based on the intermediate adaptive convolutional kernels and intermediate artifact location features of the first iteration stage, the metal artifact image of the first iteration stage is determined. Based on the metal artifact image of the first iteration stage, the metal artifact image of the first iteration stage is fused with the initial artifact removal image before the first iteration stage to obtain the fused image of the first iteration stage. Based on the location information of the non-metallic regions and the difference between the fused image of the first iteration stage and the image containing artifacts, the gradient of the initial image before the first iteration stage is determined. Based on the difference between the initial artifact removal image and the initial image gradient, the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the first iteration stage is determined through the metal artifact removal network of the first iteration stage.
[0268] Step S1206b: Perform model processing for non-first iteration stages to obtain intermediate artifact removal images output by the sub-model of the corresponding iteration stage, and use the intermediate artifact removal image output by the sub-model of the last iteration stage as the artifact removal image obtained by removing artifacts from the image containing artifacts.
[0269] Specifically, in non-first iterations across multiple iteration stages, the computer device stitches together the artifact-containing image of the training sample and the intermediate artifact-removed image output from the previous iteration stage to obtain the input image for the current iteration stage. Using a convolutional kernel adaptive network, based on the input image of the current iteration stage, the intermediate adaptive coefficient matrix corresponding to the artifact-containing image in the current iteration stage is determined, and based on the intermediate adaptive coefficient matrix corresponding to the artifact-containing image in the current iteration stage, the intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the current iteration stage is determined. If the current iteration stage is the last iteration stage, then the intermediate adaptive convolutional kernel obtained from the last iteration stage across multiple iteration stages is used as the adaptive convolutional kernel corresponding to the artifact-containing image.
[0270] Based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage, and the intermediate artifact-removed image output from the previous iteration stage, the estimated location feature gradient of the previous iteration stage is determined. The first difference between the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage and the estimated location feature gradient of the previous iteration stage is directly used as the location feature gradient difference. Alternatively, after calculating the estimated location feature gradient of the previous iteration stage, the product of the estimated location feature gradient of the previous iteration stage and the first update step size is calculated to obtain the first product. The difference between the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage and this first product is used as the location feature gradient difference corresponding to the current iteration stage. Through the artifact location feature extraction network in the sub-model of the current iteration stage, the intermediate artifact location features of the metallic artifacts in the image containing artifacts are extracted based on the location feature gradient difference corresponding to the current iteration stage. If the current iteration stage is the last iteration stage, then the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the last iteration stage will be used as the artifact location features of the metal artifacts in the image containing artifacts.
[0271] The intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage are encoded using the intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the current iteration stage, resulting in the metal artifact image of the current iteration stage. The metal artifact image of the current iteration stage is then fused with the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the previous iteration stage to obtain a fused image. Based on the location information of the non-metallic regions and the difference between the fused image and the artifact-containing image, the image gradient of the previous iteration stage is calculated. The intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the current iteration stage is obtained by using the metal artifact removal network in the sub-model of the current iteration stage, based on the difference between the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the previous iteration stage and the image gradient of the previous iteration stage. If the current iteration stage is the last iteration stage, the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the last iteration stage is used as the artifact-removed image obtained by removing artifacts from the artifact-containing image.
[0272] Step S1208: Based on the artifact-removed image and the predicted artifact-containing image of the training sample, construct the target loss, and update the network parameters of the artifact removal model according to the target loss to obtain the updated artifact removal model.
[0273] Specifically, based on the adaptive convolutional kernel and artifact location features, the predicted metal artifacts are determined, and the predicted metal artifacts are superimposed on the original medical image to obtain the predicted image containing artifacts. Based on the first difference between the image containing artifacts and the predicted image containing artifacts and the second difference between the original medical image and the image with artifact removal, a target loss is constructed. Based on the target loss, the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network are adjusted. Based on the adjusted network parameters, the artifact removal model is updated to obtain the updated artifact removal model, which is then used as the artifact removal model for the next batch.
[0274] Step S1210: Determine whether the training stop condition has been met.
[0275] Specifically, determine whether the training stop condition has been met. For example, the training stop condition is reaching a predetermined number of cycles. If not, return to step S1206 to continue execution.
[0276] In step S1212, if the training stopping condition is met, the updated artifact removal model corresponding to the training stopping condition is taken as the trained artifact removal model and the trained artifact removal model is saved.
[0277] Step S1214: Obtain the medical image to be processed.
[0278] The medical images to be processed contain metal artifacts;
[0279] Step S1216: Load the trained artifact removal model.
[0280] Step S1218: Using the trained artifact removal model, artifact removal is performed on the medical image to be processed to obtain an artifact-removed image.
[0281] Specifically, the computer equipment performs forward computation to remove artifacts from the medical image to be processed using a trained artifact removal model, thereby obtaining the artifact-removed image corresponding to the medical image to be processed.
[0282] For example, the kernel adaptive network of the trained artifact removal model determines the target adaptive convolutional kernel corresponding to the medical image to be processed, and the target adaptive convolutional kernel is adapted to the metal artifact pattern in the medical image to be processed; the artifact location feature extraction network of the trained artifact removal model extracts the target artifact location features of the metal artifacts in the medical image to be processed based on the location information of the target non-metallic region in the target adaptive convolutional kernel and the target artifact location features; the metal artifact removal network of the trained artifact removal model removes artifacts from the medical image to be processed based on the location information of the target non-metallic region and the target artifact location features, thereby obtaining the artifact-removed image corresponding to the medical image to be processed.
[0283] For example, in the first iteration of multiple iterations, the kernel adaptive convolutional network of the trained artifact removal model determines the target intermediate adaptive convolutional kernel corresponding to the medical image to be processed in the first iteration, based on the medical image to be processed. The target intermediate artifact-removed image for the first iteration is output based on the target intermediate adaptive convolutional kernel and the medical image to be processed. In iterations other than the first iteration, the target intermediate artifact-removed image output from the previous iteration is obtained, and the medical image to be processed and the target intermediate artifact-removed image output from the previous iteration are combined to obtain the target input image for the current iteration. The kernel adaptive convolutional network of the trained artifact removal model determines the target intermediate adaptive convolutional kernel corresponding to the medical image to be processed in the current iteration based on the target input image for the current iteration. The target intermediate adaptive convolutional kernel obtained in the last iteration of multiple iterations is used as the target adaptive convolutional kernel corresponding to the medical image to be processed.
[0284] In the first iteration of multiple iterations, the artifact location feature extraction network in the target sub-model of the first iteration is used to determine the intermediate artifact location features extracted by the network based on the medical image to be processed. In subsequent iterations, the target prediction location feature gradient of the previous iteration is determined based on the location information of the non-metallic region, the target intermediate adaptive convolution kernel corresponding to the medical image to be processed in the current iteration, the target intermediate artifact location features extracted by the artifact location feature extraction network in the target sub-model of the previous iteration in the current iteration, and the target intermediate artifact removal image output by the previous iteration in the current iteration. The third difference between the target intermediate artifact location features extracted by the artifact location feature extraction network in the target sub-model of the previous iteration in the current iteration and the target prediction location feature gradient of the previous iteration is determined. The target intermediate artifact location features of the metallic artifacts in the medical image to be processed are extracted based on the third difference using the artifact location feature extraction network in the target sub-model of the current iteration. The target intermediate artifact location features extracted by the artifact location feature extraction network in the target sub-model of the final iteration stage are used as the target artifact location features of the metal artifacts in the medical image to be processed.
[0285] In non-first iterations across multiple iterations, the target image gradient of the previous iteration is determined based on the location information of the target non-metallic region, the target intermediate adaptive convolution kernel corresponding to the medical image to be processed in the current iteration, the target intermediate artifact location features extracted by the artifact location feature extraction network in the target sub-model of the current iteration, and the target intermediate artifact removal image output by the metal artifact removal network in the target sub-model of the previous iteration in the current iteration. A fourth difference is determined between the target intermediate artifact removal image output by the metal artifact removal network in the target sub-model of the previous iteration in the current iteration and the target image gradient of the previous iteration. Based on this fourth difference, the target intermediate artifact removal image output by the metal artifact removal network in the target sub-model of the current iteration is obtained. The target intermediate artifact removal image output by the metal artifact removal network in the target sub-model of the final iteration is used as the artifact removal image corresponding to the medical image to be processed, obtained by artifact removal of the medical image to be processed.
[0286] Step S1220: Output the image with artifacts removed.
[0287] In this embodiment, training samples are acquired, including original medical images and images containing artifacts. The images containing artifacts include metallic artifacts and comprise both metallic and non-metallic regions. That is, the original medical image in each training sample can be considered a standard image after completely removing metallic artifacts from the image containing artifacts, thus effectively reflecting the training effect of the artifact removal model. An adaptive convolutional kernel network of the artifact removal model is used to determine an adaptive convolutional kernel corresponding to the image containing artifacts. This adaptive convolutional kernel adapts to the metallic artifact pattern in the image containing artifacts, promoting the flexible extraction of metallic artifacts by the artifact removal model. An artifact location feature extraction network of the artifact removal model extracts the artifact location features of metallic artifacts in the image containing artifacts based on the adaptive convolutional kernel and the location information of the non-metallic regions, thus accurately extracting the location information of metallic artifacts in the image containing artifacts. In this way, the metal artifact removal network of the artifact removal model removes artifacts from images containing artifacts based on adaptive convolutional kernels, the location information of non-metallic regions, and artifact location features. This results in an artifact-removed image; that is, by using convolutional kernels adapted to the metal artifact model and accurate metal artifact location information, metal artifacts in artifact-containing images can be accurately extracted. Based on the differences between the artifact-removed image and the original medical image, the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network are automatically adjusted. Then, the training process returns to the step of obtaining training samples to continue training until a well-trained artifact removal model is obtained. Thus, the trained artifact removal model can adaptively adjust the convolutional kernels used to extract metal artifacts based on the differences in metal artifacts in different artifact-containing images. This allows for accurate differentiation between metal artifacts and tissue structures in different artifact-containing images, improving the generalization ability of the artifact removal model and enabling flexible extraction of metal artifacts from different artifact-containing images, thereby improving image processing performance.
[0288] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0289] Based on the same inventive concept, this application also provides a training apparatus for an artifact removal model to implement the training method for the artifact removal model described above. The solution provided by this apparatus is similar to the implementation described in the above method. Therefore, the specific limitations of the one or more artifact removal model training apparatus embodiments provided below can be found in the limitations of the artifact removal model training method described above, and will not be repeated here.
[0290] In one embodiment, such as Figure 13 As shown, a training device 1300 for an artifact removal model is provided, comprising: a sample acquisition module 1302, a first convolutional kernel determination module 1304, a first positional feature extraction module 1306, a first removal module 1308, and an adjustment module 1310, wherein:
[0291] The sample acquisition module 1302 is used to acquire training samples, which include original medical images and images containing artifacts. The images containing artifacts include metal artifacts and include metal regions and non-metal regions.
[0292] The first convolutional kernel determination module 1304 is used to determine the adaptive convolutional kernel corresponding to the image containing artifacts through the convolutional kernel adaptive network of the artifact removal model. The adaptive convolutional kernel is adapted to the metal artifact pattern in the image containing artifacts.
[0293] The first position feature extraction module 1306 is used to extract the artifact position feature of metal artifacts in an image containing artifacts by means of the artifact position feature extraction network of the artifact removal model, based on the adaptive convolution kernel and the position information of the non-metallic region.
[0294] The first removal module 1308 is used to remove artifacts from the image containing artifacts by using the metal artifact removal network of the artifact removal model, based on the adaptive convolution kernel, the position information of the non-metallic region and the artifact position features, to obtain the artifact-removed image.
[0295] The adjustment module 1310 is used to adjust the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network based on the difference between the artifact removal image and the original medical image. Then, it returns to the step of obtaining training samples to continue training until a well-trained artifact removal model is obtained.
[0296] In some embodiments, the sample acquisition module 1302 is used to acquire an original medical image, which is a medical image without metal artifacts; obtain an image with artifacts corresponding to the original medical image based on at least one metal mask and the original medical image; and determine training samples based on the original medical image and the corresponding image with artifacts.
[0297] In some embodiments, the artifact removal model includes sub-models in multiple iteration stages, each sub-model in each iteration stage sharing the same convolutional kernel adaptive network; the first convolutional kernel determination module 1304 is used to determine, in the first iteration stage of the multiple iteration stages, an intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the first iteration stage based on the artifact-containing image using the convolutional kernel adaptive network; output an intermediate artifact-removed image of the first iteration stage based on the intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the first iteration stage and the artifact-containing image; in non-first iteration stages of the multiple iteration stages, obtain the intermediate artifact-removed image output from the previous iteration stage of the current iteration stage, and determine the intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the current iteration stage based on the artifact-containing image and the intermediate artifact-removed image output from the previous iteration stage using the convolutional kernel adaptive network; and use the intermediate adaptive convolutional kernel obtained in the last iteration stage of the multiple iteration stages as the adaptive convolutional kernel corresponding to the artifact-containing image.
[0298] In some embodiments, the first convolutional kernel determination module 1304 is used to stitch together the image containing artifacts and the intermediate artifact-removed image output from the previous iteration stage to obtain the input image of the current iteration stage; and through the convolutional kernel adaptive network, to determine the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration stage based on the input image of the current iteration stage.
[0299] In some embodiments, the artifact location feature extraction network in the sub-model of each iteration stage is updated with the iteration process; the first location feature extraction module 1306 is used to determine the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the first iteration stage based on the artifact-containing image in the first iteration stage of multiple iteration stages; in non-first iteration stages of multiple iteration stages, the intermediate artifact location features of the metal artifacts in the artifact-containing image are extracted by the artifact location feature extraction network in the sub-model of the current iteration stage based on the location information of the non-metallic region, the intermediate adaptive convolution kernel corresponding to the artifact-containing image in the current iteration stage, and the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage of the current iteration stage; and the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the last iteration stage are used as the artifact location features of the metal artifacts in the artifact-containing image.
[0300] In some embodiments, the first location feature extraction module 1306 is configured to: determine the estimated location feature gradient of the previous iteration stage based on the location information of the non-metallic region, the intermediate adaptive convolution kernel corresponding to the image containing artifacts in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage in the current iteration stage, and the intermediate artifact-removed image output by the previous iteration stage in the current iteration stage; determine the difference between the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage in the current iteration stage and the estimated location feature gradient of the previous iteration stage; and extract the intermediate artifact location features of the metal artifacts in the image containing artifacts based on the difference through the artifact location feature extraction network in the sub-model of the current iteration stage.
[0301] In some embodiments, the metal artifact removal network in the sub-model of each iteration stage is updated with the iteration process; the first removal module 1308 is used to remove artifacts from the image containing artifacts in a non-first iteration stage of multiple iteration stages by using the metal artifact removal network in the sub-model of the current iteration stage, based on the location information of the non-metallic region, the intermediate adaptive convolution kernel corresponding to the image containing artifacts in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage, and the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the previous iteration stage, to obtain the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the current iteration stage; and the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the last iteration stage is used as the artifact removal image obtained by removing artifacts from the image containing artifacts.
[0302] In some embodiments, the first removal module 1308 is configured to: determine the image gradient of the previous iteration stage based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage, and the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the previous iteration stage; determine the difference between the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the previous iteration stage and the image gradient of the previous iteration stage; and, through the metal artifact removal network in the sub-model of the current iteration stage, determine the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the current iteration stage based on the difference.
[0303] In some embodiments, the first removal module 1308 is used to encode the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage using the intermediate adaptive convolution kernel corresponding to the artifact-containing image in the current iteration stage, to obtain the metal artifact image of the current iteration stage; to fuse the metal artifact image of the current iteration stage and the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the previous iteration stage, to obtain a fused image; and to calculate the image gradient of the previous iteration stage based on the location information of the non-metallic region and the difference between the fused image and the artifact-containing image.
[0304] In some embodiments, the adjustment module 1310 is configured to determine a predicted metal artifact based on the adaptive convolutional kernel and the artifact location features; superimpose the predicted metal artifact onto the original medical image to obtain a predicted image containing artifacts; construct a target loss based on a first difference between the image containing artifacts and the predicted image containing artifacts and a second difference between the original medical image and the image with artifact removal; and adjust the network parameters of the adaptive convolutional kernel network, the artifact location feature extraction network, and the metal artifact removal network based on the target loss.
[0305] Based on the same inventive concept, this application also provides an image processing apparatus for implementing the image processing method described above. The solution provided by this apparatus is similar to the solution described in the above method. Therefore, the specific limitations in one or more image processing apparatus embodiments provided below can be found in the limitations of the image processing method above, and will not be repeated here.
[0306] In one embodiment, such as Figure 14 As shown, an image processing apparatus 1400 is provided, comprising:
[0307] Image acquisition module 1402 is used to acquire a medical image to be processed, which contains metal artifacts;
[0308] The second convolutional kernel determination module 1404 is used to determine the target adaptive convolutional kernel corresponding to the medical image to be processed through the convolutional kernel adaptive network of the trained artifact removal model. The target adaptive convolutional kernel is adapted to the metal artifact pattern in the medical image to be processed.
[0309] The second location feature extraction module 1406 is used to extract the target artifact location features of the metal artifacts in the medical image to be processed by the artifact location feature extraction network of the trained artifact removal model, based on the target adaptive convolution kernel and the location information of the target non-metallic region of the medical image to be processed.
[0310] The second removal module 1408 is used to remove artifacts from the medical image to be processed by using the metal artifact removal network of the trained artifact removal model, based on the target adaptive convolution kernel, the position information of the target non-metallic region and the position features of the target artifact, to obtain the artifact-removed image corresponding to the medical image to be processed.
[0311] The various modules in the training device and image processing device of the aforementioned artifact removal model can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0312] In one embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 15 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a training method for an artifact removal model and an image processing method.
[0313] Those skilled in the art will understand that Figure 15 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0314] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0315] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0316] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0317] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0318] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0319] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0320] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method of training an artifact removal model, the method comprising: The method includes: Acquire training samples, which include original medical images and images containing artifacts, wherein the images containing artifacts include metal artifacts and include metal regions and non-metal regions; An adaptive convolutional kernel corresponding to the image containing artifacts is determined through an adaptive network of convolutional kernels in the artifact removal model. The adaptive convolutional kernel is adapted to the metal artifact pattern in the image containing artifacts. The artifact location feature extraction network of the artifact removal model extracts the artifact location features of the metal artifacts in the image containing artifacts based on the adaptive convolution kernel and the location information of the non-metallic region. The artifact removal model uses a metal artifact removal network to remove artifacts from the image containing artifacts, based on the adaptive convolution kernel, the location information of the non-metallic region, and the artifact location features, to obtain an artifact-removed image. Based on the difference between the artifact-removed image and the original medical image, the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network are adjusted, and then the process returns to the step of obtaining training samples to continue training until a well-trained artifact removal model is obtained.
2. The method of claim 1, wherein, The acquisition of training samples includes: Acquire raw medical images, wherein the raw medical images are medical images that do not contain metal artifacts; Based on at least one metal mask and the original medical image, an image containing artifacts corresponding to the original medical image is obtained; Training samples are determined based on the original medical images and the corresponding images containing artifacts.
3. The method of claim 1, wherein, The artifact removal model includes multiple iteration stages of sub-models, and each iteration stage of sub-models shares the same convolutional kernel adaptive network; The step of determining the adaptive convolutional kernel corresponding to the image containing artifacts through the convolutional kernel adaptive network of the artifact removal model includes: In the first iteration of the plurality of iteration stages, the convolution kernel adaptive network determines the intermediate adaptive convolution kernel corresponding to the artifact-containing image in the first iteration stage based on the artifact-containing image; and outputs the intermediate artifact-removed image of the first iteration stage based on the intermediate adaptive convolution kernel corresponding to the artifact-containing image in the first iteration stage and the artifact-containing image. In a non-first iteration of the multiple iteration stages, the intermediate artifact removal image output from the previous iteration stage is obtained. Through the convolution kernel adaptive network, the intermediate adaptive convolution kernel corresponding to the artifact image in the current iteration stage is determined based on the artifact-containing image and the intermediate artifact removal image output from the previous iteration stage. The intermediate adaptive convolution kernel obtained in the last iteration of the multiple iteration stages is used as the adaptive convolution kernel corresponding to the image containing artifacts.
4. The method of claim 3, wherein, The step of determining the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration stage through the convolutional kernel adaptive network, based on the image containing artifacts and the intermediate artifact-removed image output from the previous iteration stage, includes: The image containing artifacts and the intermediate artifact-removed image output from the previous iteration stage are stitched together to obtain the input image for the current iteration stage. The adaptive convolutional kernel network determines the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration stage based on the input image in the current iteration stage.
5. The method of claim 3, wherein, The artifact location feature extraction network in the sub-model of each iteration stage is updated as the iteration process progresses; The artifact location feature extraction network of the artifact removal model extracts the artifact location features of metallic artifacts in the artifact-containing image based on the adaptive convolutional kernel and the location information of the non-metallic region, including: In the first iteration of the multiple iteration stages, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the first iteration stage are determined based on the artifact-containing image. In the non-first iteration stage of the multiple iteration stages, the artifact location feature extraction network in the sub-model of the current iteration stage extracts the intermediate artifact location features of the metal artifacts in the image containing artifacts based on the location information of the non-metallic region, the intermediate adaptive convolution kernel corresponding to the current iteration stage and the artifact location feature extraction network in the sub-model of the previous iteration stage. The intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the final iteration stage are used as the artifact location features of the metal artifacts in the artifact-containing image.
6. The method according to claim 5, characterized in that, The artifact location feature extraction network in the sub-model of the current iteration stage extracts the intermediate artifact location features of the metal artifacts in the image containing artifacts based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration stage, and the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage. This includes: Based on the location information of the non-metallic region, the intermediate adaptive convolution kernel corresponding to the image containing artifacts in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage of the current iteration stage, and the intermediate artifact removal image output by the previous iteration stage of the current iteration stage, the estimated location feature gradient of the previous iteration stage is determined. Determine the difference between the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the previous iteration stage and the gradient of the predicted location features in the previous iteration stage. The artifact location feature extraction network in the sub-model of the current iteration stage is used to extract the intermediate artifact location features of the metal artifacts in the artifact-containing image based on the differences.
7. The method according to claim 5, characterized in that, The metal artifact removal network in the sub-model of each iteration stage is updated with the iteration process; the metal artifact removal network of the artifact removal model removes artifacts from the image containing artifacts based on the adaptive convolution kernel, the location information of the non-metallic region, and the artifact location features, to obtain an artifact-removed image, including: In a non-first iteration of the multiple iteration stages, the metal artifact removal network in the sub-model of the current iteration stage removes artifacts from the image containing artifacts based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage, and the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the previous iteration stage. This process yields the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the current iteration stage. The intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the final iteration stage is used as the artifact-removed image obtained by removing artifacts from the image containing artifacts.
8. The method according to claim 7, characterized in that, The step of removing artifacts from the image containing artifacts, based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage, and the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the previous iteration stage, to obtain the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the current iteration stage, includes: Based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel corresponding to the image containing artifacts in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage, and the intermediate artifact removed image output by the metal artifact removal network in the sub-model of the previous iteration stage, the image gradient of the previous iteration stage is determined. Determine the difference between the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the previous iteration stage and the image gradient of the previous iteration stage; Based on the differences, the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the current iteration stage is obtained.
9. The method according to claim 8, characterized in that, The step of determining the image gradient of the previous iteration stage based on the location information of the non-metallic region, the intermediate adaptive convolutional kernel corresponding to the artifact-containing image in the current iteration stage, the intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage, and the intermediate artifact-removed image output by the metal artifact removal network in the sub-model of the previous iteration stage, includes: The intermediate artifact location features extracted by the artifact location feature extraction network in the sub-model of the current iteration stage are encoded using the intermediate adaptive convolution kernel corresponding to the artifact-containing image in the current iteration stage to obtain the metal artifact image of the current iteration stage. The fused image is obtained by fusing the metal artifact image of the current iteration stage with the intermediate artifact removal image output by the metal artifact removal network in the sub-model of the previous iteration stage. The image gradient of the previous iteration is calculated based on the location information of the non-metallic region and the difference between the fused image and the image containing artifacts.
10. The method according to claim 1, characterized in that, The step of adjusting the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network based on the difference between the artifact-removed image and the original medical image includes: Based on the adaptive convolution kernel and the artifact location features, the predicted metal artifacts are determined; The estimated metal artifacts are superimposed on the original medical image to obtain the estimated image containing artifacts; Based on the first difference between the image containing artifacts and the estimated image containing artifacts, and the second difference between the original medical image and the image with artifacts removed, a target loss is constructed. Based on the target loss, the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network are adjusted.
11. An image processing method, characterized in that, The method includes: Acquire a medical image to be processed, the medical image containing metal artifacts; By using the kernel adaptive network of the trained artifact removal model, a target adaptive convolution kernel corresponding to the medical image to be processed is determined, and the target adaptive convolution kernel is adapted to the metal artifact pattern in the medical image to be processed. The artifact location feature extraction network of the trained artifact removal model extracts the target artifact location features of the metal artifacts in the medical image to be processed based on the target adaptive convolution kernel and the location information of the target non-metallic region in the medical image to be processed. The trained artifact removal model uses a metal artifact removal network to remove artifacts from the medical image to be processed, based on the target adaptive convolution kernel, the location information of the target non-metallic region, and the location features of the target artifacts, to obtain the artifact-removed image corresponding to the medical image to be processed.
12. A training device for an artifact removal model, characterized in that, The device includes: The sample acquisition module is used to acquire training samples, which include original medical images and images containing artifacts. The images containing artifacts include metal artifacts and include metal regions and non-metal regions. The first convolutional kernel determination module is used to determine an adaptive convolutional kernel corresponding to the image containing artifacts through the convolutional kernel adaptive network of the artifact removal model. The adaptive convolutional kernel is adapted to the metal artifact pattern in the image containing artifacts. The first location feature extraction module is used to extract the artifact location features of the metal artifacts in the image containing artifacts by means of the artifact location feature extraction network of the artifact removal model, based on the adaptive convolution kernel and the location information of the non-metallic region. The first removal module is used to remove artifacts from the image containing artifacts by using the metal artifact removal network of the artifact removal model, based on the adaptive convolution kernel, the position information of the non-metallic region, and the artifact position features, to obtain an artifact-removed image. The adjustment module is used to adjust the network parameters of the convolutional kernel adaptive network, the artifact location feature extraction network, and the metal artifact removal network based on the difference between the artifact removal image and the original medical image, and then return to the step of obtaining training samples to continue training until a trained artifact removal model is obtained.
13. An image processing apparatus, characterized in that, The device includes: An image acquisition module is used to acquire a medical image to be processed, wherein the medical image to be processed contains metal artifacts; The second convolutional kernel determination module is used to determine the target adaptive convolutional kernel corresponding to the medical image to be processed through the convolutional kernel adaptive network of the trained artifact removal model. The target adaptive convolutional kernel is adapted to the metal artifact pattern in the medical image to be processed. The second location feature extraction module is used to extract the target artifact location features of the metal artifacts in the medical image to be processed by the artifact location feature extraction network of the trained artifact removal model, based on the target adaptive convolution kernel and the location information of the target non-metallic region of the medical image to be processed. The second removal module is used to remove artifacts from the medical image to be processed by using the metal artifact removal network of the trained artifact removal model, based on the target adaptive convolution kernel, the position information of the target non-metallic region, and the position features of the target artifact, to obtain the artifact-removed image corresponding to the medical image to be processed.
14. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.
16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.