Method and device for removing metal artifacts of image, storage medium and electronic equipment

By identifying the metal type and interference time length, simulating the spontaneous movement of metal artifacts, generating virtual images for explicit learning of image images, solving the problem of poor metal artifact removal in computed tomography images, and achieving more accurate and efficient artifact removal.

CN120355800APending Publication Date: 2025-07-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410084419.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-19
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

In the prior art, when computed tomography images carry metal implants in patients' bodies, there is obvious metal artifacts, which affects the clinical diagnostic accuracy and the formulation of treatment plans. The existing methods assume that the data distribution is Gaussian, resulting in poor artifact removal effect.

Method used

By acquiring the metal type and interference time of the image image, the spontaneous movement or propagation of metal objects during the imaging process is simulated, simulated virtual images are generated for artifact removal, explicit learning is used to establish the relationship between image images, and multiple cycle iterations are used to reconstruct the sampling.

Benefits of technology

Improve the accuracy and efficiency of metal artifact removal of image images, ensure the authenticity and accuracy of data acquisition and analysis, and improve the accuracy of clinical diagnosis and treatment planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120355800A_ABST
    Figure CN120355800A_ABST
Patent Text Reader

Abstract

The invention discloses an image metal artifact removal method and device, a storage medium and electronic equipment. The method comprises the following steps: acquiring a first image containing a metal artifact; performing image recognition on the first image to obtain an estimated metal type to which the metal object belongs and an estimated time length; and performing simulation by using the estimated metal type and the estimated time duration to obtain the interference of an object of the estimated metal type in the estimated time duration in the imaging process of the first image, and performing spontaneous movement or propagation from a high-concentration area to a low-concentration area. A simulation virtual image generated by polluting the first video image; and performing artifact removal processing on the first image by using the simulation virtual image to obtain a second image. The method can be applied to the field of image processing. The technical problem that the metal artifact removing effect of the image is poor is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular, to a method, apparatus, storage medium, and electronic device for removing metal artifacts from image images. Background Art

[0002] As an imaging method, computed tomography images are often used for disease diagnosis. However, when a patient has a metal implant in the body, due to reasons such as the absorption of X-rays by the metal, the reconstructed image usually contains obvious metal artifact phenomena such as strip structures and shadows, which will inevitably affect the accuracy of subsequent clinical diagnosis and the formulation of treatment plans.

[0003] In order to remove the above metal artifacts, the prior art often models through Gaussian noise. However, this method assumes that the data distribution is a Gaussian distribution, but the actual data has more complex distribution characteristics, which leads to insufficient authenticity and accuracy in capturing and analyzing the data, resulting in poor effects in removing metal artifacts from image images.

[0004] Therefore, there is a technical problem of poor effects in removing metal artifacts from image images in the related art. Summary of the Invention

[0005] Embodiments of the present application provide a method, apparatus, storage medium, and electronic device for removing metal artifacts from image images, so as to at least solve the technical problem of poor effects in removing metal artifacts from image images in the related art.

[0006] According to an aspect of an embodiment of the present application, a method for removing metal artifacts from an image image is provided, including: obtaining a first image image containing metal artifacts, where the metal artifacts are noises generated by the interference of a metal object during the imaging process of the first image image; performing image recognition on the first image image to obtain an estimated metal type to which the metal object belongs, and an estimated time length of the interference of the metal object during the imaging process of the first image image; using the estimated metal type and the estimated time length for simulation to obtain a simulated virtual image generated by the contamination of the first image image when an object of the estimated metal type moves or propagates spontaneously from a high-concentration area to a low-concentration area during the estimated time length of interference during the imaging process of the first image image; using the simulated virtual image to perform artifact removal processing on the first image image to obtain a second image image, where the data volume of the metal artifacts contained in the second image image is less than the data volume of the metal artifacts contained in the first image image.

[0007] According to another aspect of the embodiments of the present application, a method for removing metal artifacts from an image is provided, including: obtaining an image processing model to be tested, where the image processing model is a network model obtained by performing simulation training using positive samples and negative samples, the positive samples are clean image samples, and the negative samples are contaminated image samples obtained by subjecting the positive samples to metal simulation contamination using metal implants; determining a starting sampling point of the degraded chord diagram based on the first position information of the metal implant corresponding to the degraded chord diagram to be reconstructed and the second position information of the metal implant used in the metal simulation contamination process; at the starting sampling point, using the image processing model to sample and reconstruct the degraded chord diagram to obtain a first reconstructed chord diagram corresponding to the starting sampling point; determining the starting sampling point as the current sampling point and the first reconstructed chord diagram as the current reconstructed chord diagram; repeating the following steps until a second reconstructed chord diagram corresponding to the termination sampling point is obtained: determining a previous reconstructed chord diagram corresponding to the previous sampling point of the current sampling point based on the current sampling point and the current reconstructed chord diagram; determining the previous sampling point as the current sampling point and the previous reconstructed chord diagram as the current reconstructed chord diagram; determining the second reconstructed chord diagram as the clean image obtained after removing the metal artifacts corresponding to the degraded chord diagram output by the image processing model.

[0008] According to one aspect of the embodiments of the present application, an apparatus for removing metal artifacts from an image is further provided, including: an acquisition unit configured to acquire a first image containing metal artifacts, where the metal artifacts are noises generated by interference of a metal object during the imaging process of the first image; an identification unit configured to perform image recognition on the first image to obtain an estimated metal type to which the metal object belongs and an estimated time length of interference of the first image by the metal object during the imaging process; a simulation unit configured to perform simulation using the estimated metal type and the estimated time length to obtain a simulated virtual image generated by contaminating the first image during the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area after the first image is interfered by an object of the estimated metal type for the estimated time length; a duplicate removal unit configured to perform artifact removal processing on the first image using the simulated virtual image to obtain a second image, where the data amount of the metal artifacts contained in the second image is less than the data amount of the metal artifacts contained in the first image.

[0009] According to another aspect of the embodiments of the present application, there is also provided a device for removing metal artifacts from an image, including: a model acquisition unit, configured to acquire an image processing model to be tested, where the image processing model is a network model obtained by performing simulation training using positive samples and negative samples, the positive samples are clean image samples, and the negative samples are contaminated image samples obtained by performing metal simulation contamination on the positive samples using metal implants; a first determination unit, configured to determine a starting sampling point of the degraded chord diagram based on first position information of the metal implant corresponding to the degraded chord diagram to be reconstructed and second position information of the metal implant used in the metal simulation contamination process; a sampling and reconstruction unit, configured to perform sampling and reconstruction on the degraded chord diagram using the image processing model at the starting sampling point to obtain a first reconstructed chord diagram corresponding to the starting sampling point; a second determination unit, configured to determine the starting sampling point as the current sampling point and the first reconstructed chord diagram as the current reconstructed chord diagram; an execution unit, configured to repeatedly execute the following steps until a second reconstructed chord diagram corresponding to an end sampling point is obtained: determining a previous reconstructed chord diagram corresponding to a previous sampling point of the current sampling point based on the current sampling point and the current reconstructed chord diagram; determining the previous sampling point as the current sampling point and the previous reconstructed chord diagram as the current reconstructed chord diagram; a third determination unit, configured to determine the second reconstructed chord diagram as the clean image obtained after removing the metal artifact corresponding to the degraded chord diagram output by the image processing model.

[0010] According to yet another aspect of the embodiments of the present application, there is provided a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for removing metal artifacts from an image as described above.

[0011] According to yet another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the method for removing metal artifacts from an image as described above through the computer program.

[0012] In an embodiment of the present application, in the case of obtaining an image processing model after the model training is completed, the image processing model is further sampled and reconstructed by using the degraded chord diagram to be reconstructed and the position information of the corresponding metal implant, so as to test the image processing model. Among them, for the reconstruction adopted in the above test process, in the case of determining the starting sampling point with matching position information, the reconstructed chord diagram of the previous sampling point of the starting sampling point is determined based on the first reconstructed chord diagram corresponding to the starting sampling point, and so on, until the second reconstructed chord diagram corresponding to the termination sampling point is obtained, and the second reconstructed chord diagram is determined as the final output reconstructed chord diagram corresponding to the degraded chord diagram. Furthermore, in the process of testing the image processing model, by using the reconstruction sampling method of multiple loop iterations, the data acquisition and analysis of the reconstructed chord diagram of the degraded chord diagram are more real and accurate, achieving the purpose of improving the accuracy of determining the reconstructed chord diagram corresponding to the degraded chord diagram, thereby realizing the technical effect of improving the accuracy of metal artifact removal applied by the image processing model, and solving the problem of poor effect of metal artifact removal in the above-mentioned image. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments and descriptions thereof of the present application are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:

[0014] Figure 1 is a schematic diagram of an application environment of an optional method for removing metal artifacts from an image according to an embodiment of the present application;

[0015] Figure 2 is a schematic diagram of a process of an optional method for removing metal artifacts from an image according to an embodiment of the present application;

[0016] Figure 3 is a schematic diagram of an optional method for removing metal artifacts from an image according to an embodiment of the present application;

[0017] Figure 4 is a schematic diagram of an optional method for removing metal artifacts from an image according to an embodiment of the present application;

[0018] Figure 5 is a schematic diagram of an optional method for removing metal artifacts from an image according to an embodiment of the present application;

[0019] Figure 6 is a schematic diagram of a process of an optional method for removing metal artifacts from an image according to an embodiment of the present application;

[0020] Figure 7 is a schematic diagram of an optional device for removing metal artifacts from an image according to an embodiment of the present application;

[0021] Figure 8 It is a schematic diagram of an optional metal artifact removal device for image and image according to an embodiment of the present application;

[0022] Figure 9 Schematic structural diagram of an optional electronic device according to an embodiment of the present application.

[0023] Figure 10 Schematic structural diagram of an optional electronic device according to an embodiment of the present application. Detailed implementation manners

[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0026] According to one aspect of the embodiments of the present application, a method for removing metal artifacts from an image and image is provided. Optionally, as an optional implementation manner, the above method for removing metal artifacts from an image and image can be but is not limited to being applied to an environment such as Figure 1 shown. Among them, it can but is not limited to include the client 102 and the server 112. The client 102 can but is not limited to include the display 104, the processor 106 and the memory 108. The server 112 includes the database 114 and the processing engine 116.

[0027] The specific process can be as follows:

[0028] Step S102, the client 102 obtains a first image 1001 containing a metal artifact, wherein the metal artifact is noise generated by interference of a metal object during the imaging process of the first image 1001;

[0029] Steps S104-S106, the client 102 initiates a metal artifact removal request to the server 112, wherein the metal artifact removal request is used to request removal of metal artifacts contained in the first image 1001;

[0030] Step S108, the server 112 responds to the metal artifact removal request and performs image recognition on the first image 1001 through the processing engine 116 to obtain the estimated metal type of the metal object and the estimated length of time during which the first image 1001 is disturbed by the metal object during imaging;

[0031] Step S110, using the estimated metal type and the estimated time length to obtain a simulated virtual image, wherein the simulated virtual image is generated by using the estimated metal type and the estimated time length to simulate, and obtaining the first image image 1001, in the process of being disturbed by an object of the estimated metal type for the estimated time length, and then spontaneously moving or propagating from a high-concentration area to a low-concentration area, causing contamination to the first image image 1001;

[0032] Step S112, performing artifact removal processing on the first image 1001 using a simulated virtual image to obtain a second image 1001, wherein the amount of data containing metal artifacts in the second image 1001 is less than the amount of data containing metal artifacts in the first image 1001;

[0033] Steps S114-S116, sending the second image 1001 to the client 102 via the network 110, wherein the processor 106 in the client 102 is used to receive the second image 1001, process the related image data, display the deduplicated second image 1001 on the display 104, and store the related image data in the memory 108;

[0034] In step S118 , the client 102 displays the second image after deduplication.

[0035] remove Figure 1In addition to the examples shown above, the above steps can be completed independently by the client or the server, or jointly by the client and the server. For example, the above steps such as S108 to S112 are executed by the client 102, thereby reducing the processing pressure on the server 112. The client 102 includes but is not limited to laptops, tablets, desktop computers, smart TVs, etc. The present application does not limit the specific implementation manner of the client 102. The server 112 can be a single server or a server cluster composed of multiple servers, or a cloud server.

[0036] Optionally, as an alternative implementation, as Figure 2 shown, the method for removing metal artifacts from an image can be executed by an electronic device, such as Figure 1 the client or server shown, and the specific steps include:

[0037] S202, obtain a first image containing metal artifacts, where the metal artifacts are noises generated by the interference of metal objects during the imaging process of the first image;

[0038] S204, perform image recognition on the first image to obtain the estimated metal type to which the metal object belongs, and the estimated time length of the interference of the first image by the metal object during the imaging process;

[0039] S206, use the estimated metal type and the estimated time length for simulation to obtain a simulated virtual image generated by the contamination of the first image when an object of the estimated metal type interferes with the first image during the estimated time length and moves or propagates spontaneously from a high-concentration area to a low-concentration area;

[0040] S208, use the simulated virtual image to perform artifact removal processing on the first image to obtain a second image, where the data volume of the metal artifacts included in the second image is less than the data volume of the metal artifacts included in the first image.

[0041] Optionally, in this embodiment, the method for removing metal artifacts from the image can be but is not limited to being applied to a medical imaging scenario based on computed tomography (CT) technology. In this scenario, CT imaging means are often used for disease diagnosis. However, when a patient has metal implants in the body, such as false teeth, hip prostheses, etc., due to reasons such as the absorption of X-rays by metals, the reconstructed CT images usually contain obvious artifacts such as strip structures and shadows, which will inevitably affect the accuracy of subsequent clinical diagnosis and the formulation of treatment plans.

[0042] To remove the above-mentioned metal artifacts, the prior art often models through Gaussian noise. However, this method assumes that the data distribution is Gaussian, but the actual data has more complex distribution characteristics, resulting in insufficient authenticity and accuracy in data capture and analysis, and thus poor effects in removing metal artifacts from image images.

[0043] Regarding the problem of poor effects in removing metal artifacts from the above-mentioned image images, using the method for removing metal artifacts from image images according to this embodiment, after obtaining the first image image containing metal artifacts, image recognition is performed on the first image image to obtain the estimated metal type and estimated time length of the metal object that is interfered during the imaging process of the first image image, and simulation is performed using the estimated metal type and estimated time length to obtain, during the imaging process of the first image image, the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area after being interfered by an object of the estimated metal type for the estimated time length, the simulated virtual image generated by contaminating the first image image, thereby achieving the purpose of obtaining the simulated virtual image by explicitly learning the relationship between the contaminated image image and the clean image image, and using the above-mentioned simulated virtual image to perform artifact removal processing on the contaminated first image image to obtain a second image image with reduced interference from metal objects and tending to be a clean image image, thus realizing the purpose of performing artifact removal processing on image images using the simulated virtual image obtained by explicitly learning the relationship between the contaminated image image and the clean image image, and the data acquisition and analysis during the processing process are more real and accurate, thereby achieving the technical effect of improving the accuracy of removing metal artifacts from image images and solving the problem of poor effects in removing metal artifacts from the above-mentioned image images.

[0044] Optionally, in this embodiment, the first image image may but is not limited to be a fringe pattern containing metal artifacts, such as Figure 1 the first image image 1001 shown in Figure 1 ; the second image image may but is not limited to be an enhanced image with a data volume (contamination degree) containing metal artifacts less than that of the second image image, such as

[0045] It can be understood that, in this embodiment, the first image image contaminated by metal is used as the input image for artifact removal processing, and the second image image after weakening or removing metal artifacts is used as the output image after artifact removal processing.

[0046] Optionally, in this embodiment, during the imaging process of the first image image, different metal artifacts are generated when being interfered by metal objects of different metal types, where the metal type may but is not limited to include iron-based metal types, copper-based metal types, titanium-based metal types, etc.

[0047] Optionally, in this embodiment, during the imaging process of the first image, the interference time by metal objects is different, and the resulting metal artifacts are different. Among them, the longer the interference time, the larger the data volume of the resulting metal artifacts, and the higher the degree of contamination by metal objects.

[0048] Optionally, in this embodiment, simulation is performed using the estimated metal type and the estimated time length to obtain a simulated virtual image generated by the contamination of the first image during the imaging process of the first image when the object of the estimated metal type is interfered for the estimated time length and spontaneously moves or propagates from the high-concentration area to the low-concentration area; the simulated virtual image is used to perform artifact removal processing on the first image to obtain a second image.

[0049] For example, assume that at the current time t1, the first image containing metal artifacts is y1, and the metal artifacts are false images generated by the interference of metal M on the original clean image y0 of the first image from time t0 to the current time t1.

[0050] From this, it can be determined that the estimated metal type is M, and the estimated time length is Δt = t1 - t0. Further obtain the simulated virtual image Δy generated by the contamination during the imaging process of the first image when metal M is interfered for the estimated time length Δt and spontaneously moves or propagates from the high-concentration area to the low-concentration area.

[0051] It can be understood that the simulated virtual image Δy is a simulated virtual image generated by the interference of metal M on the original clean image y0 from time t0 to the current time t1.

[0052] Using the simulated virtual image Δy to perform artifact removal processing on the first image y1 can be understood, but not limited to, removing the simulated virtual image Δy on the basis of the first image y1 to obtain a second image y2, so that the second image y2 approaches the original clean image y0.

[0053] Further, for example, as Figure 4 shown, an optional method for removing metal artifacts from an image includes:

[0054] Step S302, recognition processing: Perform image recognition on the obtained first image to obtain the estimated metal type to which the metal-free image belongs and the estimated time length of the interference of the first image by metal objects during the imaging process, where the first image contains metal artifacts generated by the interference of metal objects during the imaging process;

[0055] Step S304, simulation processing: Perform simulation using the estimated metal type and the estimated time length to obtain a simulated virtual image generated by the contamination of the first image during the imaging process of the first image when an object of the estimated metal type moves or propagates spontaneously from a high-concentration area to a low-concentration area under the interference of the estimated time length.

[0056] Step S306, artifact removal processing: Use the simulated virtual image to remove duplicates from the first image to obtain a second image that does not include the simulated virtual image based on the first image.

[0057] Through the embodiments provided in the present application, after obtaining the first image containing metal artifacts, perform image recognition on the first image to obtain the estimated metal type and the estimated time length of the metal object that interfered during the imaging process of the first image, and use the estimated metal type and the estimated time length for simulation to obtain a simulated virtual image generated by the contamination of the first image during the imaging process of the first image when an object of the estimated metal type moves or propagates spontaneously from a high-concentration area to a low-concentration area under the interference of the estimated time length. Thus, the purpose of obtaining the simulated virtual image by explicitly learning the relationship between the contaminated image and the clean image is achieved, and the above simulated virtual image is used to perform artifact removal processing on the contaminated first image to obtain a second image with reduced interference from the metal object and tending towards a clean image, thereby realizing the purpose of performing artifact removal processing on the image using the simulated virtual image obtained by explicitly learning the relationship between the contaminated image and the clean image. Moreover, during the processing, the acquisition and analysis of data are more real and accurate, thereby achieving the technical effect of improving the accuracy of metal artifact removal from the image and solving the problem of poor effect of metal artifact removal from the above image.

[0058] As an optional solution, after performing image recognition on the first image to obtain the estimated metal type to which the metal object belongs and the estimated time length of the interference of the first image by the metal object during the imaging process, the method further includes:

[0059] S1, divide the estimated time length into multiple time intervals that are ordered and have the same interval size, where the multiple time intervals include a first time interval and a second time interval, and the second time interval is the subsequent time interval of the first time interval;

[0060] S2. Obtain a first simulated virtual image generated by contamination of the first image during the process of spontaneous movement or propagation from a high-concentration region to a low-concentration region after being interfered by an object of a predicted metal type in the first time interval during the imaging process of the first image, and a second simulated virtual image generated by contamination of the first image during the process of spontaneous movement or propagation from a high-concentration region to a low-concentration region after being interfered by an object of a predicted metal type in the second time interval during the imaging process of the first image.

[0061] S3. Use the first simulated virtual image and the second simulated virtual image to perform artifact removal processing on the first image to obtain a second image.

[0062] For example, assume that at the current time t1, the first image containing metal artifacts is y1, and the metal artifacts are false images generated by the interference of metal M on the original clean image y0 of the first image from time t0 to the current time t1.

[0063] It can be determined therefrom that the predicted metal type is M, and the predicted time length is Δt = t1 - t0. Divide the predicted time length Δt into multiple time intervals. Taking the first time interval Δt1 and the second time interval Δt2 as an example, the first time interval Δt1 is used to indicate the time interval between time t1 and time t2, and the second time interval Δt2 is used to indicate the time interval between time t2 and time t0, where t2 is the mid-time point between t1 and t0.

[0064] Further obtain a first simulated virtual image Δy1 generated by contamination of the first image during the process of spontaneous movement or propagation from a high-concentration region to a low-concentration region after being interfered by metal M in the first time interval Δt1 during the imaging process of the first image, and a second simulated virtual image Δy2 generated by contamination of the first image during the process of spontaneous movement or propagation from a high-concentration region to a low-concentration region after being interfered by metal M in the second time interval Δt2 during the imaging process of the first image.

[0065] Use the first simulated virtual image Δy1 and the second simulated virtual image Δy2 in parallel to perform artifact removal processing on the first image y1. It can be understood, but not limited to, that on the basis of the first image y1, the first simulated virtual image Δy1 and the second simulated virtual image Δy2 are removed to obtain a second image y2, so that the second image y2 approaches the original clean image y0.

[0066] It should be noted that the above example is only an optional instance. In this embodiment, the number of time intervals included in multiple time intervals is not limited, and it can also be 3, 4 or other numbers. The corresponding processing logic is the same as the processing logic of the above first time interval and second time interval, and will not be elaborated here.

[0067] Through the embodiments provided by this application, the estimated time length is divided into multiple ordered time intervals with the same interval size, and for each time interval, the corresponding simulated virtual image generated by metal simulation pollution of the first image is obtained, and the artifact removal processing of the first image is performed in parallel for multiple time intervals, thereby achieving the purpose of improving the duplicate removal efficiency of the first image, and thus realizing the technical effect of improving the metal artifact removal efficiency of the image.

[0068] As an optional solution, after the first simulated virtual image is generated by contaminating the first image during the process of spontaneous movement or propagation from the high-concentration area to the low-concentration area after being interfered by an object of the estimated metal type during the imaging process of the first image, the method further includes:

[0069] S1. Use the first simulated virtual image to perform artifact removal processing on the first image to obtain a first sub-image of the image;

[0070] S2. Obtain a third simulated virtual image generated by contaminating the first sub-image during the process of spontaneous movement or propagation from the high-concentration area to the low-concentration area after being interfered by an object of the estimated metal type during the imaging process of the first sub-image of the image in the second time interval;

[0071] S3. Use the second simulated virtual image to perform artifact removal processing on the first sub-image of the image to obtain a second image.

[0072] For example, assume that at the current time t1, the first image containing metal artifacts is y1, and the metal artifacts are false images generated by the interference of metal M on the original clean image y0 of the first image between time t0 and the current time t1.

[0073] It can be determined therefrom that the estimated metal type is M, and the estimated time length is △t = t1 - t0. The estimated time length △t is divided into multiple time intervals. Taking the first time interval △t1 and the second time interval △t2 as an example, the first time interval △t1 is used to indicate the time interval between time t1 and time t2, and the second time interval △t2 is used to indicate the time interval between time t2 and time t0, where t2 is the mid-time point between t1 and t0.

[0074] Further obtain a first simulated virtual image Δy1 generated by contamination during the spontaneous movement or propagation of metal M from a high-concentration region to a low-concentration region during the imaging process of the first image, and use the first simulated virtual image Δy1 to perform artifact removal processing on the first image. Remove the first simulated virtual image Δy1 based on the first image y1 to obtain a first sub-image y3.

[0075] Obtain a third simulated virtual image Δy3 generated by contamination during the spontaneous movement or propagation of metal M from a high-concentration region to a low-concentration region during the imaging process of the first sub-image y3 of the first image.

[0076] Use the third simulated virtual image Δy3 to perform artifact removal processing on the first sub-image y3 of the first image. Remove the third simulated virtual image Δy3 based on the first sub-image y3 of the first image to obtain a second image y2, so that the second image y2 approaches the original clean image y0.

[0077] It should be noted that the above example is only an optional instance. In this embodiment, the number of time intervals included in multiple time intervals is not limited, and it can also be 3, 4, or other numbers. The corresponding processing logic is the same as the processing logic of the above first time interval and second time interval, and will not be elaborated here.

[0078] Through the embodiment provided by the present application, the estimated time length is divided into multiple ordered time intervals with the same interval size. When the deduplication result of the previous time interval is obtained, the deduplication result of the previous time interval is used as the input of the metal simulation interference of the next time interval to determine the corresponding simulated virtual image, perform deduplication on the next time interval, and obtain the deduplication result of the next time interval, and so on, paying more attention to the data correlation between different times of the image data. Among them, the more the number of time interval divisions, the better the manifestation of the above data correlation, and the better the deduplication accuracy of the first image, thereby achieving the technical effect of improving the metal artifact removal accuracy of the image.

[0079] As an optional solution, after obtaining the first image containing metal artifacts, the method further includes:

[0080] S1. Input the first image into the image processing model, and use the image processing model to perform artifact removal processing on the first image to obtain the second image output by the image processing model. Here, the image processing model is trained using multiple image samples and is used to identify and remove metal artifacts contained in the input image. The image samples include positive samples and negative samples. The positive samples are clean image samples, and the amount of data containing metal artifacts in the clean image samples is less than or equal to the first preset threshold. The negative samples are contaminated image samples, which are samples obtained by subjecting the clean image samples to metal simulation contamination and containing an amount of data with metal artifacts greater than the second preset threshold. The second preset threshold is greater than or equal to the first preset threshold. The metal simulation contamination is used to simulate the contamination of the clean image samples caused by the spontaneous movement or spread of metal objects from high-concentration areas to low-concentration areas over time.

[0081] Optionally, in this embodiment, after obtaining the first image containing metal artifacts, the first image is input into the image processing model. Here, the image processing model can, but is not limited to, be used to perform image recognition on the first image to obtain the estimated metal type and the estimated time length, can also, but is not limited to, be used to simulate a virtual image using the estimated metal type and the estimated time length, and can also, but is not limited to, be used to perform artifact removal processing on the first image using the virtual image to obtain the second image.

[0082] Optionally, in this embodiment, the image processing model is trained using multiple image samples and is used to identify and remove metal artifacts contained in the input image. The image samples include positive samples and negative samples. The positive samples are clean image samples, and the amount of data containing metal artifacts in the clean image samples is less than or equal to the first preset threshold. The negative samples are contaminated image samples, which are samples obtained by subjecting the clean image samples to metal simulation contamination and containing an amount of data with metal artifacts greater than the second preset threshold. The second preset threshold is greater than or equal to the first preset threshold. The metal simulation contamination is used to simulate the contamination of the clean image samples caused by the spontaneous movement or spread of metal objects from high-concentration areas to low-concentration areas over time.

[0083] Optionally, in this embodiment, the negative samples can, but are not limited to, be obtained by subjecting the positive samples to metal simulation contamination, and can, but are not limited to, be obtained by using a preset metal to perform image degradation processing on the clean image samples for different diffusion times to obtain contaminated image samples with different degrees of degradation and contaminated by the preset metal simulation.

[0084] Through the embodiments provided in this application, by using the trained image processing model, image recognition processing, simulation processing, and artifact removal processing are performed on the input first image, thereby achieving the purpose of improving the speed of the overall artifact removal processing of the first image, and thus realizing the technical effect of improving the efficiency of metal artifact removal of the image.

[0085] As an optional solution, image recognition is performed on the first image to obtain the estimated metal type to which the metal object belongs, including:

[0086] S1, perform image recognition on the first image to obtain the first metal type to which the metal object belongs;

[0087] Inputting the first image into the image processing model includes:

[0088] S2, input the first image into the first processing model, where the image processing model includes the first processing model, and the first processing model is trained using multiple first image samples and is used to identify and remove the metal artifacts generated by the interference of the object of the first metal type included in the input image. The first image samples include first positive samples and first negative samples. The first positive samples are first clean samples, and the data volume of the first metal artifacts included in the first clean samples is less than or equal to the first preset threshold. The first negative samples are first contaminated samples, and the first contaminated samples are samples obtained by performing metal simulation contamination corresponding to the object of the first metal type on the first clean samples and having a data volume of the first metal artifacts greater than the second preset threshold;

[0089] S3, perform artifact removal processing on the first image using the image processing model to obtain the second image output by the image processing model, including: performing artifact removal processing on the first image using the first processing model to obtain the second image output by the first processing model.

[0090] Optionally, in this embodiment, the image processing model may but is not limited to including the first processing model, where the first processing model may but is not limited to be trained using multiple first image samples and is used to identify and remove the metal artifacts generated by the interference of the object of the first metal type included in the input image. The first image samples include first positive samples and first negative samples. The first positive samples are first clean samples, and the data volume of the first metal artifacts included in the first clean samples is less than or equal to the first preset threshold. The first negative samples are first contaminated samples, and the first contaminated samples are samples obtained by performing metal simulation contamination corresponding to the object of the first metal type on the first clean samples and having a data volume of the first metal artifacts greater than the second preset threshold.

[0091] It can be understood that the image processing model may also include, but is not limited to, multiple processing models, where each processing model corresponds to a type of estimated metal type. In the case of obtaining an image of the determined estimated metal type, the image sample is input into the processing model matching the above-determined estimated metal type for image recognition processing, simulation processing, and artifact removal processing to obtain the de-duplicated image.

[0092] Through the embodiments provided in the present application, by adopting mutually matching / corresponding processing models to process images of different metal types, the purpose of removing metal artifacts from the images can be more accurately achieved, thereby improving the effect of removing metal artifacts from the images.

[0093] As an alternative solution, image recognition is performed on the first image to obtain the estimated metal type to which the metal object belongs, including:

[0094] S1. Perform image recognition on the first image to obtain the first metal type and the second metal type to which the metal object belongs;

[0095] Inputting the first image into the image processing model includes:

[0096] S2. Input the first image into the second processing model and the first processing model respectively, where the image processing model includes the second processing model, and the second processing model is trained using multiple second image samples and is used to identify and remove metal artifacts generated by the interference of objects of the second metal type included in the input image. The second image samples include second positive samples and second negative samples. The second positive samples are second clean samples, and the data volume of the second clean samples containing second metal artifacts is less than or equal to the first preset threshold. The second negative samples are second contaminated samples, and the second contaminated samples are samples obtained by performing metal simulation contamination corresponding to objects of the second metal type on the second clean samples and containing a data volume of second metal artifacts greater than the second preset threshold;

[0097] Using the image processing model to perform artifact removal processing on the first image to obtain the second image output by the image processing model includes:

[0098] S3. Use the first processing model to perform artifact removal processing on the first image to obtain the first output image output by the first processing model, and use the second processing model to perform artifact removal processing on the first image to obtain the second output image output by the second processing model;

[0099] S4. Perform fusion processing on the first output image and the second output image to obtain the second image.

[0100] Optionally, in this embodiment, the metal artifacts included in the first image may, but are not limited to, include noise generated by the combined interference of metal objects of different metal types, where the different metal types may, but are not limited to, include a first metal type and a second metal type.

[0101] It should be noted that for the first image containing metal artifacts generated by the combined interference of metal objects of multiple different metal types, multiple different processing models need to be used to separately output output images corresponding to the above different metal types, and image fusion is performed to obtain the second image, where the first processing model corresponds to the first metal type and the second processing model corresponds to the second metal type.

[0102] Optionally, in this embodiment, performing a fusion process on the first output image and the second output image to obtain the second image may, but is not limited to, including: taking the average value of the pixels of the first output image and the second output image pixel by pixel to obtain a second image that can reflect the average features of the first output image and the second output image.

[0103] Optionally, in this embodiment, performing a fusion process on the first output image and the second output image to obtain the second image may also, but is not limited to, include: taking the weighted average of the pixels of the first output image and the second output image pixel by pixel, that is, in the case where the first pixel of the first output image and the corresponding second pixel of the second output image are determined, the third pixel of the corresponding second image is the first weight multiplied by the first pixel plus the second weight multiplied by the second pixel, and then divided by 2. Wherein, the first weight may, but is not limited to, be the proportion of the first duration of interference caused by the metal object of the first metal type in the total duration during the imaging process of the first image, and the second weight may, but is not limited to, be the proportion of the second duration of interference caused by the metal object of the second metal type in the total duration during the imaging process of the first image, and the total duration is the sum of the first duration and the second duration.

[0104] Through the embodiments provided in this application, for an image containing metal artifacts caused by the interference of multiple different metal types, first, separate simulation and artifact removal processing are performed using matching processing models according to different metal types to obtain multiple output image results, and then image fusion is performed, thereby achieving the technical effect of improving the metal artifact removal effect of the image.

[0105] As an optional solution, the above method for removing metal artifacts from radiographic images is applied to a scenario of removing metal artifacts from CT images based on the diffusion of physical imaging mechanisms. In this scenario, in order to avoid artifacts such as obvious strip structures and shadows in the reconstructed CT images due to the absorption of X-rays by metals, etc., in the prior art, a diffusion model based on Gaussian noise is often used. However, this method assumes that the data distribution is Gaussian, but the actual data has more complex distribution characteristics, which leads to insufficient authenticity and accuracy in capturing and analyzing the data, thus resulting in poor effects in removing metal artifacts from radiographic images.

[0106] Regarding the above problems, in this embodiment, instead of establishing an implicit distribution between Gaussian noise and the target data, the relationship between the degraded chord diagram and the target clean chord diagram is explicitly learned by using the physical imaging mechanism. In addition, in the sampling reconstruction stage, a starting point sampling point selection method is proposed and a data consistency constraint is introduced to help better perform the reconstruction.

[0107] Specifically, for the problem of removing metal artifacts from CT images, first define the following forward diffusion process based on the physical imaging mechanism:

[0108] y t = D(y0, Tr t , t) = (1 - Tr t ) ⊙ y0 + Tr t

[0109] where D represents the degradation operator, which corresponds to the CT imaging relationship in the presence of metal implants. y0 = Px is the clean chord diagram, x is the clean CT image, and P is the forward projection operator; Tr t is the metal trajectory adopted at the diffusion time step t, and its elements are {0, 1}, where 1 represents the metal trajectory area, used to simulate the influence of metal implants. Specifically, Tr t = B(PM t ), M t is the simulated metal implant at the diffusion time step t, and B represents the binarization process. In the forward diffusion process, the size of M t gradually increases, and this size is measured by the number of pixels occupied by the metal implant. In particular, for t = 0, Tr0 = 0, D(y0, Tr0, 0) = (1 - Tr0) ⊙ y0 = y0.

[0110] After obtaining the contaminated chord diagram yt corresponding to different diffusion times t based on the clean chord diagram y0 through the above forward process, the clean chord diagram y0 is used as the positive sample and the contaminated chord diagram yt is used as the negative sample to train the restoration network R θ (y t, t), where the objective loss function for indicating whether the training is completed is:

[0111]

[0112] The corresponding training algorithm is summarized as follows:

[0113] Input: Clean CT image x, clean chordogram y_0^ = Px, metal implant M_t, t = 1, 2, … T; where the size of the metal implant M has a positive correlation with time, that is, when the time becomes smaller, the size becomes smaller, and when the time becomes larger, the size becomes larger;

[0114] Output: Network parameters θ;

[0115] During the N-round training process, after each round of training, a current round of training is performed by randomly determining the current round's t and the corresponding sample yt from t = 1, 2, … T in a uniform distribution manner until the number of training rounds is sufficient and the objective loss function meets the convergence condition (less than the preset loss threshold).

[0116] It should be noted that during the above N-round training process, it can be but is not limited to setting: the learning rate is 0.0001, the optimization algorithm is AdamW, the batchsize is 24, the total number of training steps is 50000, and the sampling step T is 1000. The above parameter settings are only optional examples of this embodiment, and this embodiment does not limit the specific parameter settings.

[0117] Furthermore, after the restoration network R θ (y t , t) is trained and completed, the degraded chordogram y to be reconstructed and the corresponding metal implant M are obtained. By comparing the size of this metal implant with the metal implant simulated in the forward process, the starting sampling point T′ can be determined (where Mi is used to represent the size of the metal implant at the i-th moment):

[0118] M0 = 0 < M T′-1 < M < M T′ < M T

[0119] Thus, at the corresponding T′ moment, based on the above restoration network R θ (y t , t) the reconstructed chordogram obtained by sampling and reconstruction is:

[0120] y 0,T′ = R θ (y T′ , T′) = R θ (y, T′)

[0121] Furthermore, by using the data guarantee constraint, the estimated corrected reconstructed chord diagram corresponding to time T′ can be obtained as follows:

[0122]

[0123] Correspondingly, the sampling at time T′ - 1 is:

[0124]

[0125] Through iterative loop, with t = T′, T′ - 1, …, 1, the final reconstruction result y0 can be obtained, and the reconstruction result y0 is determined as the target image after metal artifact removal.

[0126] For example, in this embodiment, a schematic diagram of the actual application processing flow for removing metal artifacts from CT images based on the above physical imaging mechanism diffusion is as Figure 4 shown. Among them, the front end 402 receives the CT image contaminated by metal and the contaminated chord diagram, and then uploads them to the back end 404. The back end 404 uses the method for removing metal artifacts from CT images based on the above physical imaging mechanism diffusion to remove the metal artifacts and reconstruct a clean CT image, and then outputs it to the front end 406 for display.

[0127] For further example, as Figure 5 shown, the contaminated chord diagram 502 is obtained, and the metal artifacts in the chord diagram 502 are automatically extracted by using the method for removing metal artifacts from CT images based on the above physical imaging mechanism diffusion, and then the enhanced CT image 504 is obtained.

[0128] Through the embodiments provided in this application, by using the physical imaging mechanism, the relationship between the degraded chord diagram and the target clean chord diagram is explicitly learned, and more attention is paid to the data correlation between image data at different times. Moreover, in the sampling reconstruction stage, a starting point sampling point selection method is proposed and data consistency constraints are introduced to help better perform the reconstruction, thereby achieving accelerated sampling.

[0129] Optionally, as an alternative implementation, as Figure 1 shown, the method for removing metal artifacts from medical images specifically includes the following steps:

[0130] S602, obtain the image processing model to be tested, where the image processing model is a network model obtained by performing simulation training using positive samples and negative samples. The positive samples are clean medical samples, and the negative samples are contaminated medical samples obtained by performing metal simulation contamination on the positive samples using metal implants;

[0131] S604. Determine the starting sampling point of the degraded chord diagram based on the first position information of the metal implant corresponding to the degraded chord diagram to be reconstructed and the second position information of the metal implant used in the metal simulation contamination process;

[0132] S606. At the starting sampling point, use an image processing model to sample and reconstruct the degraded chord diagram to obtain the first reconstructed chord diagram corresponding to the starting sampling point;

[0133] S608. Determine the starting sampling point as the current sampling point and the first reconstructed chord diagram as the current reconstructed chord diagram;

[0134] S610. Repeat the following steps until the second reconstructed chord diagram corresponding to the termination sampling point is obtained: Determine the previous reconstructed chord diagram corresponding to the previous sampling point of the current sampling point based on the current sampling point and the current reconstructed chord diagram; Determine the previous sampling point as the current sampling point and the previous reconstructed chord diagram as the current reconstructed chord diagram;

[0135] S612. Determine the second reconstructed chord diagram as the clean image after removing the metal artifacts corresponding to the degraded chord diagram output by the image processing model. Optionally, in this embodiment, the above method for removing metal artifacts from the image can be applied but is not limited to medical imaging scenarios based on computed tomography (CT) technology. In this scenario, CT imaging means are often used for disease diagnosis. However, when a patient has metal implants in the body, such as dentures, hip prostheses, etc., due to reasons such as the absorption of X-rays by metals, the usually reconstructed CT images will contain obvious artifacts such as strip structures and shadows, which will inevitably affect the accuracy of subsequent clinical diagnosis and the formulation of treatment plans.

[0136] To remove the above metal artifacts, the prior art often uses Gaussian noise for modeling. However, this method assumes that the data distribution is Gaussian, but the actual data has more complex distribution characteristics, which leads to insufficient authenticity and accuracy in capturing and analyzing the data, thus resulting in poor effects in removing metal artifacts from the image.

[0137] Regarding the problem of poor effect in removing metal artifacts from the above-mentioned video images, by using the method for removing metal artifacts from video images according to this embodiment, after obtaining the image processing model after the model training is completed, the image processing model is further sampled and reconstructed by using the degraded chord diagram to be reconstructed and the position information of the corresponding metal implant, so as to play the role of testing the image processing model. Among them, for the reconstruction adopted in the above test process, when determining the starting sampling point with matching position information, the reconstructed chord diagram of the previous sampling point of the starting sampling point is determined based on the first reconstructed chord diagram corresponding to the starting sampling point, and so on, until the second reconstructed chord diagram corresponding to the termination sampling point is obtained, and the second reconstructed chord diagram is determined as the final output reconstructed chord diagram corresponding to the degraded chord diagram. Furthermore, during the process of testing the image processing model, by using the reconstruction sampling method of multiple cyclic iterations, the data acquisition and analysis of the reconstructed chord diagram of the degraded chord diagram are more real and accurate, achieving the purpose of improving the determination accuracy of the reconstructed chord diagram corresponding to the degraded chord diagram, thereby realizing the technical effect of improving the accuracy of removing metal artifacts applied by the image processing model, and solving the problem of poor effect in removing metal artifacts from the above-mentioned video images.

[0138] Optionally, in this embodiment, the image processing model to be tested may but is not limited to a network model obtained by performing simulation training using positive samples and negative samples.

[0139] Optionally, in this embodiment, a given degraded chord diagram y to be reconstructed and the corresponding metal implant M are obtained. By comparing the size of the metal implant with the metal implant simulated in the forward process, the starting sampling point can be determined as T′:

[0140] M0 = 0 < M T′-1 < M < M T′ < M T

[0141] Optionally, in this embodiment, the degraded chord diagram is sampled and reconstructed by using the image processing model to obtain the first reconstructed chord diagram corresponding to the starting sampling point.

[0142] It can be understood that at the corresponding T′ moment, the reconstructed chord diagram obtained by sampling and reconstruction is:

[0143] y 0,T′ = R θ (y T′ , T′) = R θ (y, T′)

[0144] Among them, the image processing model may but is not limited to be obtained by training the model based on the restoration network R θ (y t , t).

[0145] Optionally, in this embodiment, based on the first reconstructed chord diagram corresponding to the starting sampling point, the reconstructed chord diagram of the previous sampling point of the starting sampling point is determined; based on the reconstructed chord diagram of the previous sampling point of the starting sampling point, the reconstructed chord diagram of the second previous sampling point of the starting sampling point (i.e., the previous sampling point of the previous sampling point) is determined, and so on, until the second reconstructed chord diagram corresponding to the termination sampling point (the earliest sampling point of the starting sampling point) is obtained, and the second reconstructed chord diagram is determined as the reconstruction result output by the image processing model for the degraded chord diagram.

[0146] It can be understood that after the reconstructed chord diagram y obtained by sampling and reconstruction 0,T′ the estimated corrected reconstructed chord diagram corresponding to time T′ can be obtained by using data assurance constraints as:

[0147]

[0148] Correspondingly, the sampling at time T′−1 is:

[0149]

[0150] Through cyclic iteration, with t = T′, T′−1, …, 1, the final reconstruction result y0 can be obtained.

[0151] Through the embodiments provided in this application, during the process of testing the image processing model, by using the reconstruction sampling method of multiple cyclic iterations, the data acquisition and analysis of the reconstructed chord diagram of the degraded chord diagram are more real and accurate, achieving the purpose of improving the determination accuracy of the reconstructed chord diagram corresponding to the degraded chord diagram, thereby realizing the technical effect of improving the accuracy of metal artifact removal applied by the image processing model.

[0152] As an alternative solution, before obtaining the image processing model to be tested, the method further includes:

[0153] S1, obtaining an initial image processing model to be trained;

[0154] S2, using positive samples and negative samples to perform simulation training on the initial image processing model. During the simulation training process, the negative samples are used as the input of the initial image processing model, and the initial image processing model is used to perform restoration processing on the input negative samples to obtain output samples;

[0155] S3, using the difference information between the positive samples and the output samples to determine the target loss function after the initial image has undergone simulation training;

[0156] S4, when the target loss function is less than a preset loss threshold, it is determined that the simulation training meets the preset convergence condition, and the initial image processing model after simulation training is determined as the image processing model.

[0157] Optionally, in this embodiment, the initial image processing model can be, but is not limited to, a restoration network for reverse image construction, and the target loss function can be, but is not limited to, an indicator of whether the initial image processing model meets the convergence condition after the above simulation training.

[0158] Optionally, in this embodiment, during the above simulation training process, negative samples are used as the input of the initial image processing model, and the initial image processing model is used to perform restoration processing on the input negative samples to obtain output samples that approach positive samples. Among them, the positive samples are clean image samples, and the negative samples are contaminated image samples obtained by simulating metal contamination based on the clean image samples. During the above simulation training process, the target loss function is determined according to the difference information between the output samples and the positive samples corresponding to the input negative samples.

[0159] Through the embodiments provided in this application, positive samples and negative samples are used as sample data for training the initial image processing model to obtain a trained image processing model. The trained image processing model is used for subsequent model testing and metal artifact removal after model testing. Furthermore, by improving the accuracy of the image processing model obtained through model training, the technical effect of improving the accuracy of subsequent metal artifact removal is achieved.

[0160] As an alternative solution, before using positive samples and negative samples to perform simulation training on the initial image processing model, the method further includes:

[0161] S1. Obtain clean image samples with the amount of data containing metal artifacts less than or equal to a first preset threshold, and determine the clean image samples as positive samples;

[0162] S2. Use a preset metal to perform image degradation processing on the clean image samples for different diffusion times to obtain contaminated image samples with different degradation degrees and contaminated by the preset metal simulation, where the diffusion time and the degradation degree are in a positive correlation, and the diffusion time and the degree of contamination by the preset metal simulation are in a positive correlation;

[0163] S3. Determine the contaminated image samples as negative samples.

[0164] Optionally, in this embodiment, obtain clean image samples with the amount of data containing metal artifacts less than or equal to a first preset threshold, and determine the clean image samples as positive samples.

[0165] Optionally, in this embodiment, a preset metal is used to perform image degradation processing on clean image samples with different diffusion times to obtain contaminated image samples with different degradation degrees and contaminated by the preset metal simulation, where the diffusion time and the degradation degree are in a positive correlation, and the diffusion time and the degree of contamination by the preset metal simulation are in a positive correlation. The contaminated image samples are determined as negative samples.

[0166] It can be understood that the above image degradation processing is implemented based on the forward diffusion process of the physical imaging mechanism. In the forward diffusion process, as the diffusion time increases, the number of pixels occupied by the preset metal in the clean image sample is more, the degradation degree is higher, and the degree of contamination by the preset metal simulation is higher.

[0167] As an alternative solution, using a metal implant to perform image degradation processing on clean image samples with different diffusion times to obtain contaminated image samples with different degradation degrees and contaminated by the preset metal simulation includes:

[0168] S1. Obtain the position information of the simulated metal implant at the current diffusion time;

[0169] S2. Perform forward projection processing and binarization processing on the position information to obtain a metal trajectory, where the metal trajectory is a binary matrix, and each element in the binary matrix is 0 or 1;

[0170] S3. Use the result obtained by subtracting the metal trajectory from 1 to perform dot multiplication processing on the clean image sample to obtain a dot multiplication result, and add the dot multiplication result to the metal trajectory to obtain the contaminated image sample after simulating image degradation of the clean image sample at the current diffusion time.

[0171] For example, assume that the clean image sample is y0, and the corresponding contaminated image sample is yt, where y0 = Px, P is the forward projection operator, x is the clean CT image, the clean image sample y0 is the clean chordogram, and the contaminated image sample yt represents the sample after being contaminated by metal M corresponding to different diffusion times t. Then there is the following forward diffusion process based on the physical imaging mechanism:

[0172] y t = D(y0, Tr t , t) = (1 - Tr t ) ⊙ y0 + Tr t

[0173] where D represents the degradation operator, which corresponds to the CT imaging relationship in the presence of a metal implant; Tr t is the metal trajectory adopted at the diffusion time t, and its elements are {0, 1}, where 1 represents the metal trajectory area, used to simulate the influence of the metal. Specifically, Tr t = B(PMt ), M t is the metal implant simulated at diffusion time t, P represents the forward projection process, and B represents the binarization process. During the forward diffusion process, M t corresponds to a gradually increasing size, which is measured by the number of pixels occupied by the metal. In particular, for t = 0, Tr0 = 0, D(y0, Tr0, 0) = (1 - Tr0) ⊙ y0 = y0.

[0174] Through the embodiments provided in this application, by using the physical imaging mechanism, the relationship between the degraded chord diagram and the target clean chord diagram is explicitly learned, which has good physical meaning.

[0175] After obtaining the contaminated chord diagram yt corresponding to different diffusion times t based on the clean chord diagram y0 through the above forward process, the clean chord diagram y0 is used as the positive sample and the contaminated chord diagram yt is used as the negative sample to train the restoration network R θ (y t , t), where the target loss function for indicating whether the training is completed is:

[0176]

[0177] The corresponding training algorithm is summarized as follows:

[0178] Input: clean CT image x, clean chord diagram y_0^ = Px, metal implant M_t, t = 1, 2, … T; where the size of the metal implant M is positively correlated with time, that is, as time decreases, the size decreases, and as time increases, the size increases;

[0179] Output: network parameters θ;

[0180] During the N-round training process, after each round of training, t for the current round and the corresponding sample yt are determined from t = 1, 2, … T in a uniform distribution manner for the current round of training until the training round is sufficient and the target loss function satisfies the convergence condition (less than the preset loss threshold).

[0181] It should be noted that during the above N-round training process, it can be but is not limited to setting: the learning rate is 0.0001, the optimization algorithm is AdamW, the batchsize is 24, the total number of training steps is 50000, and the sampling step T is 1000. The above parameter settings are only optional examples of this embodiment, and this embodiment does not limit the specific parameter settings.

[0182] Furthermore, in the restoration network R θ (y t, after the training is completed, obtain the degraded chord diagram y to be reconstructed and the corresponding metal implant M. By comparing the size of the metal implant with the metal implant simulated for use in the forward process, the starting sampling point T′ can be determined (where Mi is used to represent the size of the metal implant at the i-th moment):

[0183] M0 = 0 < M T′-1 < M < M T′ < M T

[0184] Thus, at the corresponding moment T′, based on the above restoration network R θ (y t , t) The reconstructed chord diagram obtained by sampling and reconstruction is:

[0185] y 0,T′ = R θ (y T′ , T′) = R θ (y, T′)

[0186] Furthermore, by using the data guarantee constraint, the estimated corrected reconstructed chord diagram corresponding to the moment T′ can be obtained as:

[0187]

[0188] Correspondingly, the sampling at the moment T′ - 1 is:

[0189]

[0190] Through iterative loop, t = T′, T′ - 1, …, 1, the final reconstruction result y0 can be obtained, and the reconstruction result y0 is determined as the target image after metal artifact removal.

[0191] It can be understood that in the specific implementation manner of the present application, it involves data such as user information. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards of relevant countries and regions.

[0192] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present application.

[0193] According to another aspect of the embodiments of the present application, there is also provided an apparatus for removing metal artifacts from an image for implementing the above-mentioned method for removing metal artifacts from an image. As Figure 7 shown, the apparatus includes:

[0194] An acquisition unit 702, configured to acquire a first image containing metal artifacts, where the metal artifacts are noises generated by the interference of a metal object during the imaging process of the first image;

[0195] An identification unit 704, configured to perform image recognition on the first image to obtain an estimated metal type to which the metal object belongs, and an estimated time length during which the first image is interfered by the metal object during the imaging process;

[0196] A simulation unit 706, configured to perform simulation using the estimated metal type and the estimated time length to obtain a simulated virtual image generated by the contamination of the first image during the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area after the object of the estimated metal type interferes with the first image during the estimated time length during the imaging process of the first image;

[0197] An artifact removal unit 708, configured to perform artifact removal processing on the first image using the simulated virtual image to obtain a second image, where the data amount of the metal artifacts included in the second image is less than the data amount of the metal artifacts included in the first image.

[0198] As an optional solution, the apparatus further includes:

[0199] A division module, configured to divide the estimated time length into a plurality of time intervals that are ordered and have the same interval size after performing image recognition on the first image to obtain the estimated metal type to which the metal object belongs and the estimated time length during which the first image is interfered by the metal object during the imaging process, where the plurality of time intervals include a first time interval and a second time interval, and the second time interval is the subsequent time interval of the first time interval;

[0200] A first acquisition module, configured to acquire a first simulated virtual image generated by the contamination of the first image during the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area after the object of the estimated metal type interferes with the first image during the first time interval, and acquire a second simulated virtual image generated by the contamination of the first image during the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area after the object of the estimated metal type interferes with the first image during the second time interval after performing image recognition on the first image to obtain the estimated metal type to which the metal object belongs and the estimated time length during which the first image is interfered by the metal object during the imaging process;

[0201] The first duplicate removal module is configured to perform artifact removal processing on the first image by using the first simulated virtual image and the second simulated virtual image after performing image recognition on the first image to obtain the estimated metal type to which the metal object belongs and the estimated time length of interference caused by the metal object during the imaging process of the first image, so as to obtain the second image.

[0202] As an alternative solution, the apparatus further includes:

[0203] The second duplicate removal module is configured to perform artifact removal processing on the first image by using the first simulated virtual image after obtaining the first simulated virtual image generated by contaminating the first image during the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area after the first image is interfered by an object of the estimated metal type during the imaging process of the first image, so as to obtain the first sub-image.

[0204] The second acquisition module is configured to obtain the third simulated virtual image generated by contaminating the first sub-image during the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area after the first sub-image is interfered by an object of the estimated metal type during the imaging process of the first sub-image after obtaining the first simulated virtual image generated by contaminating the first image during the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area after the first image is interfered by an object of the estimated metal type during the imaging process of the first image.

[0205] The third duplicate removal module is configured to perform artifact removal processing on the first sub-image by using the second simulated virtual image after obtaining the first simulated virtual image generated by contaminating the first image during the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area after the first image is interfered by an object of the estimated metal type during the imaging process of the first image, so as to obtain the second image.

[0206] As an alternative solution, the apparatus further includes:

[0207] An input module, configured to input a first image containing metal artifacts into an image processing model after obtaining the first image. The image processing model is trained using multiple image samples for identifying and removing metal artifacts included in the input image. The image samples include positive samples and negative samples. The positive samples are clean image samples, and the data volume of metal artifacts included in the clean image samples is less than or equal to a first preset threshold. The negative samples are contaminated image samples, which are obtained by performing metal simulation contamination on the clean image samples and have a data volume of metal artifacts greater than a second preset threshold. The second preset threshold is greater than or equal to the first preset threshold. The metal simulation contamination is used to simulate the contamination caused to the clean image samples during the process of the metal object spontaneously moving or spreading from a high-concentration area to a low-concentration area over time.

[0208] A third acquisition module, configured to acquire a second image output by the image processing model after obtaining the first image containing metal artifacts.

[0209] As an optional solution, the recognition unit 704 includes:

[0210] A first recognition module, configured to perform image recognition on the first image to obtain the first metal type to which the metal object belongs.

[0211] The input module includes: a first input sub-module, configured to input the first image into a first processing model. The image processing model includes the first processing model, which is trained using multiple first image samples for identifying and removing metal artifacts generated by the interference of objects of the first metal type included in the input image. The first image samples include first positive samples and first negative samples. The first positive samples are first clean samples, and the data volume of metal artifacts included in the first clean samples is less than or equal to the first preset threshold. The first negative samples are first contaminated samples, which are obtained by performing metal simulation contamination corresponding to the objects of the first metal type on the first clean samples and have a data volume of metal artifacts greater than the second preset threshold.

[0212] As an optional solution, the recognition unit 804 includes:

[0213] A second recognition module, configured to perform image recognition on the first image to obtain the first metal type and the second metal type to which the metal object belongs.

[0214] An input module, comprising: a second input sub-module for inputting a first image into a second processing model and a first processing model respectively, wherein the image processing model includes the second processing model, and the second processing model is trained using a plurality of second image samples for identifying and removing metal artifacts generated by interference of objects of a second metal type included in the input image. The second image samples include second positive samples and second negative samples. The second positive samples are second clean samples, and the data volume of the second clean samples containing second metal artifacts is less than or equal to a first preset threshold. The second negative samples are second contaminated samples, and the second contaminated samples are samples obtained by subjecting the second clean samples to metal simulation contamination corresponding to objects of the second metal type and having a data volume of second metal artifacts greater than a second preset threshold.

[0215] A third acquisition module, comprising:

[0216] A fusion sub-module for, when the first output image output by the first processing model and the second output image output by the second processing model are acquired, performing a fusion process on the first output image and the second output image to obtain a second image.

[0217] As an optional solution, the apparatus further includes:

[0218] A fourth acquisition module for acquiring an initial image processing model before inputting the first image into the image processing model;

[0219] A training module for, before inputting the first image into the image processing model, performing simulated training on the initial image processing model using positive samples and negative samples. During the simulated training process, the negative samples are used as inputs to the initial image processing model, and the initial image processing model is used to perform a restoration process on the input negative samples to obtain output samples;

[0220] A first determination module for, before inputting the first image into the image processing model, determining a target loss function of the initial image after the simulated training using the difference information between the positive samples and the output samples;

[0221] A second determination module for, before inputting the first image into the image processing model, determining that the simulated training meets a preset convergence condition and determining the initial image processing model after the simulated training as the image processing model when the target loss function is less than a preset loss threshold.

[0222] As an optional solution, the apparatus further includes:

[0223] A fifth acquisition module, configured to obtain clean image samples with the amount of data containing metal artifacts less than or equal to a first preset threshold before simulating and training an initial image processing model using positive samples and negative samples, and determine the clean image samples as positive samples;

[0224] A degradation module, configured to, before simulating and training an initial image processing model using positive samples and negative samples, perform image degradation processing on the clean image samples with different diffusion times using a preset metal to obtain contaminated image samples with different degradation degrees and contaminated by the preset metal simulation, where the diffusion time and the degradation degree are in a positive correlation, and the diffusion time and the degree of contamination by the preset metal simulation are in a positive correlation;

[0225] A third determination module, configured to, before simulating and training an initial image processing model using positive samples and negative samples, determine the contaminated image samples as negative samples.

[0226] As an optional solution, the degradation module includes:

[0227] An acquisition sub-module, configured to acquire the position information of the preset metal simulated at the current diffusion time; a first degradation sub-module, configured to perform forward projection processing and binarization processing on the position information to obtain a metal trajectory, where the metal trajectory includes a plurality of elements, and each element is 0 or 1;

[0228] A second degradation sub-module, configured to use the plurality of elements to perform dot multiplication processing on the clean image samples to obtain a dot multiplication result, and add the dot multiplication result to the metal trajectory to obtain a contaminated image sample after simulating image degradation of the clean image sample at the current diffusion time.

[0229] According to another aspect of the embodiments of the present application, there is also provided an apparatus for removing metal artifacts from an image of an image for implementing the method for removing metal artifacts from an image of an image as described above. As Figure 8 shown, the apparatus includes:

[0230] A model acquisition unit 802, configured to acquire an image processing model to be tested, where the image processing model is a network model obtained after simulating and training using positive samples and negative samples, the positive samples are clean image samples, and the negative samples are contaminated image samples obtained by performing metal simulation contamination on the positive samples using a metal implant;

[0231] A first determination unit 804, configured to determine a starting sampling point of the degraded chord diagram based on the first position information of the metal implant corresponding to the degraded chord diagram to be reconstructed and the second position information of the metal implant used in the metal simulation contamination process;

[0232] The sampling and reconstruction unit 806 is configured to sample and reconstruct the degraded chord diagram using the image processing model at the starting sampling point to obtain the first reconstructed chord diagram corresponding to the starting sampling point;

[0233] The second determination unit 808 is configured to determine the starting sampling point as the current sampling point and the first reconstructed chord diagram as the current reconstructed chord diagram;

[0234] The execution unit 810 is configured to repeatedly execute the following steps until the second reconstructed chord diagram corresponding to the termination sampling point is obtained: determining the previous reconstructed chord diagram corresponding to the previous sampling point of the current sampling point according to the current sampling point and the current reconstructed chord diagram; determining the previous sampling point as the current sampling point and the previous reconstructed chord diagram as the current reconstructed chord diagram;

[0235] The third determination unit 812 is configured to determine the second reconstructed chord diagram as the clean image obtained by removing the metal artifact corresponding to the degraded chord diagram output by the image processing model.

[0236] As an alternative solution, the apparatus further includes:

[0237] The model acquisition module is configured to acquire the initial image processing model to be trained before acquiring the image processing model to be tested;

[0238] The model training module is configured to perform simulation training on the initial image processing model using positive samples and negative samples before acquiring the image processing model to be tested. During the simulation training process, the negative samples are used as the input of the initial image processing model, and the initial image processing model is configured to perform restoration processing on the input negative samples to obtain output samples;

[0239] The loss determination module is configured to determine the target loss function of the initial image after the simulation training by using the difference information between the positive samples and the output samples before acquiring the image processing model to be tested;

[0240] The training determination module is configured to determine that the simulation training meets the preset convergence condition and determine the initial image processing model after the simulation training as the image processing model when the target loss function is less than the preset loss threshold before acquiring the image processing model to be tested.

[0241] As an alternative solution, the apparatus further includes:

[0242] The sample acquisition module is configured to acquire clean image samples with the data amount containing metal artifacts less than or equal to the first preset threshold and determine the clean image samples as positive samples before performing simulation training on the initial image processing model using positive samples and negative samples;

[0243] A degradation processing module, configured to, before simulating the training of the initial image processing model using positive samples and negative samples, use a metal implant to perform image degradation processing on clean image samples with different diffusion times, so as to obtain contaminated image samples with different degradation degrees and contaminated by metal implant simulation, wherein there is a positive correlation between the diffusion time and the degradation degree, and there is a positive correlation between the diffusion time and the degree of contamination by metal implant simulation;

[0244] A sample determination module, configured to, before simulating the training of the initial image processing model using positive samples and negative samples, determine the contaminated image samples as negative samples.

[0245] As an optional solution, the degradation processing module includes:

[0246] An acquisition sub-module, configured to acquire the position information of the metal implant simulated at the current diffusion time;

[0247] A degradation sub-module, configured to perform forward projection processing and binarization processing on the position information to obtain a metal trajectory, wherein the metal trajectory is a binary matrix, and each element in the binary matrix is 0 or 1;

[0248] A dot multiplication sub-module, configured to perform dot multiplication processing on the clean image samples using the result obtained by subtracting the metal trajectory from 1 to obtain a dot multiplication result, and add the dot multiplication result to the metal trajectory to obtain a contaminated image sample after simulating the image degradation of the clean image sample at the current diffusion time.

[0249] According to another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the above metal artifact removal method for video images, further as Figure 9 shown, the electronic device includes a memory 902 and a processor 904. A computer program is stored in the memory 902, and the processor 904 is configured to execute the steps in any one of the above method embodiments through the computer program.

[0250] Optionally, in this embodiment, the above electronic device may be at least one network device among multiple network devices of a computer network.

[0251] Optionally, in this embodiment, the above processor may be configured to execute the following steps through the computer program:

[0252] S1, acquire a first video image containing metal artifacts, wherein the metal artifacts are noises generated by the interference of metal objects during the imaging process of the first video image;

[0253] S2, perform image recognition on the first video image to obtain an estimated metal type to which the metal object belongs and an estimated time length of the interference of the metal object during the imaging process of the first video image;

[0254] S3. Use the estimated metal type and the estimated time length to perform a simulation to obtain a simulated virtual image generated by contamination of the first image during the imaging process of the first image due to the interference of an object of the estimated metal type during the estimated time length and the spontaneous movement or propagation from a high-concentration area to a low-concentration area;

[0255] S4. Use the simulated virtual image to perform artifact removal processing on the first image to obtain a second image, where the amount of data containing metal artifacts in the second image is less than the amount of data containing metal artifacts in the first image.

[0256] Optionally, those of ordinary skill in the art can understand that Figure 9 the structure shown is only schematic Figure 9 and does not limit the structure of the above electronic device. For example, the electronic device may further include more or fewer components (such as a network interface, etc.) than those shown Figure 9 or have a different configuration from that shown Figure 9 .

[0257] Among them, the memory 902 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for removing metal artifacts from an image in an embodiment of the present application. The processor 904 executes various functional applications and data processing by running the software programs and modules stored in the memory 902, that is, implements the above method for removing metal artifacts from an image. The memory 902 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 902 may further include a memory remotely disposed relative to the processor 904, and these remote memories may be connected to the electronic device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof. Specifically, the memory 902 may be used to store information such as the estimated metal type and the estimated time length. As an example, as Figure 9 shown, the above memory 902 may include, but is not limited to, the acquisition unit 702, the identification unit 704, the simulation unit 706, and the de-duplication unit 708 in the device for removing metal artifacts from an image. In addition, it may further include, but is not limited to, other module units in the device for removing metal artifacts from an image, which will not be elaborated in this example.

[0258] Optionally, the above-mentioned transmission device 906 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 906 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable, so as to communicate with the Internet or a local area network. In one example, the transmission device 906 is a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0259] In addition, the above-mentioned electronic device further includes: a display 908, which is used to display information such as the estimated metal type and the estimated time length; and a connection bus 910, which is used to connect each module component in the above-mentioned electronic device.

[0260] In other embodiments, the above-mentioned client or server can be a node in a distributed system. Among them, the distributed system can be a blockchain system, and the blockchain system can be a distributed system formed by connecting the multiple nodes through network communication. Among them, the nodes can form a peer-to-peer network, and any form of computing device, such as electronic devices such as servers and clients, can become a node in the blockchain system by joining the peer-to-peer network.

[0261] According to one aspect of the present application, a computer program product is provided. The computer program product includes computer programs / instructions, and the computer programs / instructions include program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part, and / or installed from a removable medium. When the computer program is executed by the central processing unit, various functions provided by the embodiments of the present application are executed.

[0262] The serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0263] It should be noted that the computer system of the electronic device is only an example and should not bring any restrictions to the functions and usage scopes of the embodiments of the present application.

[0264] The computer system includes a Central Processing Unit (CPU), which can perform various appropriate actions and processes according to the program stored in the Read-Only Memory (ROM) or the program loaded from the storage section into the Random Access Memory (RAM). In the random access memory, various programs and data required for system operation are also stored. The central processing unit, the read-only memory, and the random access memory are connected to each other via a bus. An Input / Output interface (I / O interface) is also connected to the bus.

[0265] The following components are connected to the input / output interface: an input section including a keyboard, a mouse, etc.; an output section including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc. and a speaker, etc.; a storage section including a hard disk, etc.; and a communication section including a network interface card such as a local area network card, a modem, etc. The communication section performs communication processing via a network such as the Internet. A drive is also connected to the input / output interface as needed. Removable media, such as magnetic disks, optical discs, magneto-optical discs, semiconductor memories, etc., are installed on the drive as needed so that the computer program read from them can be installed into the storage section as needed.

[0266] According to another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the above metal artifact removal method for images, further as Figure 10 shown, the electronic device includes a memory 1002 and a processor 1004. A computer program is stored in the memory 1002, and the processor 1004 is configured to execute the steps in any one of the above method embodiments through the computer program.

[0267] Optionally, in this embodiment, the above electronic device may be at least one network device among multiple network devices in a computer network.

[0268] Optionally, in this embodiment, the above processor may be configured to execute the following steps through a computer program:

[0269] S1, obtain an image processing model to be tested, where the image processing model is a network model obtained by simulation training using positive samples and negative samples. The positive samples are clean image samples, and the negative samples are contaminated image samples obtained by subjecting the positive samples to metal simulation contamination using metal implants;

[0270] S2. Determine the starting sampling point of the degraded chord diagram based on the first position information of the metal implant corresponding to the degraded chord diagram to be reconstructed and the second position information of the metal implant used in the metal simulation pollution process;

[0271] S3. At the starting sampling point, use the image processing model to sample and reconstruct the degraded chord diagram to obtain the first reconstructed chord diagram corresponding to the starting sampling point;

[0272] S4. Determine the starting sampling point as the current sampling point and the first reconstructed chord diagram as the current reconstructed chord diagram;

[0273] S5. Repeat the following steps until the second reconstructed chord diagram corresponding to the termination sampling point is obtained: Determine the previous reconstructed chord diagram corresponding to the previous sampling point of the current sampling point according to the current sampling point and the current reconstructed chord diagram; Determine the previous sampling point as the current sampling point and the previous reconstructed chord diagram as the current reconstructed chord diagram;

[0274] S6. Determine the second reconstructed chord diagram as the clean image of the degraded chord diagram corresponding to the output of the image processing model after removing the metal artifacts.

[0275] Optionally, those of ordinary skill in the art can understand that Figure 10 The structure shown is only schematic Figure 10 and does not limit the structure of the above-mentioned electronic device. For example, the electronic device may further include more or fewer components (such as a network interface, etc.) than those shown Figure 10 or have a different configuration from that shown Figure 10 .

[0276] Among them, the memory 1002 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for removing metal artifacts from the image in the embodiment of the present application. The processor 1004 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002, that is, implements the above-mentioned method for removing metal artifacts from the image. The memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 1002 may further include a memory remotely disposed relative to the processor 1004, and these remote memories may be connected to the electronic device through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and their combinations. Among them, the memory 1002 may specifically but not limitedly be used to store information such as the first position information and the second position information. As an example, such as Figure 10As shown, the memory 1002 may but is not limited to include the model acquisition unit 802, the first determination unit 804, the sampling and reconstruction unit 806, the second determination unit 808, the execution unit 810, and the third determination unit 812 in the metal artifact removal device for the above-mentioned video images. In addition, it may also include but is not limited to other module units in the metal artifact removal device for the above-mentioned video images, which will not be elaborated in this example.

[0277] Optionally, the above-mentioned transmission device 1006 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 1006 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers through a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1006 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0278] In addition, the above-mentioned electronic device further includes: a display 1008, which is used to display information such as the first position information and the second position information; and a connection bus 1010, which is used to connect each module component in the above-mentioned electronic device.

[0279] In other embodiments, the above-mentioned client or server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes in a form of network communication. Among them, the nodes can form a peer-to-peer network, and any form of computing device, such as an electronic device like a server or a client, can become a node in the blockchain system by joining the peer-to-peer network.

[0280] According to one aspect of the present application, a computer program product is provided. The computer program product includes computer programs / instructions, and the computer programs / instructions contain program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it executes various functions provided by the embodiments of the present application.

[0281] The serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the superiority or inferiority of the embodiments.

[0282] It should be noted that the computer system of the electronic device is only an example and should not bring any restrictions to the functions and usage scopes of the embodiments of the present application.

[0283] The computer system includes a Central Processing Unit (CPU), which can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) or a program loaded from a storage section into a Random Access Memory (RAM). In the random access memory, various programs and data required for system operations are also stored. The central processing unit, the read-only memory, and the random access memory are connected to each other via a bus. An Input / Output interface (I / O interface) is also connected to the bus.

[0284] The following components are connected to the input / output interface: an input section including a keyboard, a mouse, etc.; an output section including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc. and a speaker, etc.; a storage section including a hard disk, etc.; and a communication section including a network interface card such as a local area network card, a modem, etc. The communication section performs communication processing via a network such as the Internet. A drive is also connected to the input / output interface as needed. A removable medium, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive as needed so that a computer program read from it can be installed into the storage section as needed.

[0285] In particular, according to an embodiment of the present application, the processes described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section and / or installed from a removable medium. When the computer program is executed by the central processing unit, various functions defined in the system of the present application are executed.

[0286] According to one aspect of the present application, a computer-readable storage medium is provided. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above various optional implementation manners.

[0287] Optionally, in this embodiment, the above computer-readable storage medium may be set to store instructions for executing the above method for removing metal artifacts from an image.

[0288] Optionally, in this embodiment, those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by a program instructing the relevant hardware of the electronic device. The program can be stored in a computer-readable storage medium, and the storage medium can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, etc.

[0289] The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.

[0290] If the integrated unit in the above embodiments is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in the storage medium and includes several instructions for causing one or more computer devices (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.

[0291] In the above embodiments of the present application, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0292] In the several embodiments provided by the present application, it should be understood that the recorded client can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the units or modules can be in an electrical or other form.

[0293] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0294] In addition, in each embodiment of the present application, each functional unit may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0295] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A method for removing metal artifacts from an image, characterized in that Including: Obtain a first image containing metal artifacts, where the metal artifacts are noises generated by the interference of metal objects during the imaging process of the first image; Perform image recognition on the first image to obtain the estimated metal type to which the metal object belongs, and the estimated time length during which the first image is interfered by the metal object during the imaging process; Use the estimated metal type and the estimated time length for simulation to obtain a simulated virtual image generated by the contamination of the first image during the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area by an object of the estimated metal type during the estimated time length during the imaging process of the first image; Use the simulated virtual image to perform artifact removal processing on the first image to obtain a second image, where the data volume of the metal artifacts contained in the second image is less than the data volume of the metal artifacts contained in the first image.

2. The method according to claim 1, wherein After performing image recognition on the first image to obtain the estimated metal type to which the metal object belongs, and the estimated time length during which the first image is interfered by the metal object during the imaging process, the method further includes: Divide the estimated time length into a plurality of ordered time intervals with the same interval size, where the plurality of time intervals include a first time interval and a second time interval, and the second time interval is the subsequent time interval of the first time interval; Obtain a first simulated virtual image generated by the contamination of the first image during the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area by an object of the estimated metal type during the first time interval during the imaging process of the first image, and obtain a second simulated virtual image generated by the contamination of the first image during the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area by an object of the estimated metal type during the second time interval during the imaging process of the first image; Use the first simulated virtual image and the second simulated virtual image to perform artifact removal processing on the first image to obtain the second image.

3. The method according to claim 2, wherein After obtaining the first simulated virtual image generated by the contamination of the first image during the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area by an object of the estimated metal type during the first time interval during the imaging process of the first image, the method further includes: Use the first simulated virtual image to perform artifact removal processing on the first image to obtain a first sub-image of the image; Obtain a third simulated virtual image generated by the contamination of the first sub-image of the image during the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area by an object of the estimated metal type during the second time interval during the imaging process of the first sub-image of the image; Performing artifact removal processing on the first image sub-image using the second simulated virtual image to obtain the second image.

4. The method according to claim 1, characterized in that, After obtaining the first image containing metal artifacts, the method further includes: Inputting the first image into an image processing model, and using the image processing model to perform artifact removal processing on the first image to obtain the second image output by the image processing model. The image processing model is trained using multiple image samples for identifying and removing metal artifacts contained in the input image. The image samples include positive samples and negative samples. The positive samples are clean image samples, and the data volume of the metal artifacts contained in the clean image samples is less than or equal to a first preset threshold. The negative samples are contaminated image samples, which are samples obtained by performing metal simulation contamination on the clean image samples and containing a data volume of the metal artifacts greater than a second preset threshold. The second preset threshold is greater than or equal to the first preset threshold. The metal simulation contamination is used to simulate the contamination caused to the clean image samples during the process of the metal object spontaneously moving or spreading from a high-concentration area to a low-concentration area over time.

5. The method according to claim 4, wherein: Performing image recognition on the first image to obtain the estimated metal type to which the metal object belongs includes: performing image recognition on the first image to obtain the first metal type to which the metal object belongs; Inputting the first image into the image processing model includes: inputting the first image into a first processing model. The image processing model includes the first processing model. The first processing model is trained using multiple first image samples for identifying and removing metal artifacts contained in the input image that are interfered by objects of the first metal type. The first image samples include first positive samples and first negative samples. The first positive samples are first clean samples, and the data volume of the first metal artifacts contained in the first clean samples is less than or equal to the first preset threshold. The first negative samples are first contaminated samples, which are samples obtained by performing metal simulation contamination corresponding to the objects of the first metal type on the first clean samples and containing a data volume of the first metal artifacts greater than the second preset threshold; Using the image processing model to perform artifact removal processing on the first image to obtain the second image output by the image processing model includes: using the first processing model to perform artifact removal processing on the first image to obtain the second image output by the first processing model.

6. The method according to claim 5, wherein: Performing image recognition on the first image to obtain the estimated metal type to which the metal object belongs includes: performing image recognition on the first image to obtain the first metal type and the second metal type to which the metal object belongs; Said inputting the first image into the image processing model includes: inputting the first image into the second processing model and the first processing model respectively, wherein the image processing model includes the second processing model, and the second processing model is obtained by training with a plurality of second image samples and is used to identify and remove metal artifacts generated by the interference of objects of the second metal type included in the input image. The second image samples include second positive samples and second negative samples. The second positive samples are second clean samples, and the data volume of the second clean samples containing the second metal artifacts is less than or equal to the first preset threshold. The second negative samples are second contaminated samples, and the second contaminated samples are samples obtained by performing metal simulation contamination corresponding to the objects of the second metal type on the second clean samples and having a data volume of the second metal artifacts greater than the second preset threshold. Said removing artifacts from the first image by using the image processing model to obtain the second image output by the image processing model includes: removing artifacts from the first image by using the first processing model to obtain a first output image output by the first processing model, and removing artifacts from the first image by using the second processing model to obtain a second output image output by the second processing model; performing fusion processing on the first output image and the second output image to obtain the second image.

7. A method for removing metal artifacts from an image, characterized in that, including: obtaining an image processing model to be tested, wherein the image processing model is a network model obtained by performing simulation training with positive samples and negative samples. The positive samples are clean image samples, and the negative samples are contaminated image samples obtained by performing metal simulation contamination on the positive samples with metal implants; determining a starting sampling point of the degraded chord diagram based on the first position information of the metal implant corresponding to the degraded chord diagram to be reconstructed and the second position information of the metal implant used in the metal simulation contamination process; at the starting sampling point, using the image processing model to sample and reconstruct the degraded chord diagram to obtain a first reconstructed chord diagram corresponding to the starting sampling point; determining the starting sampling point as the current sampling point and the first reconstructed chord diagram as the current reconstructed chord diagram; repeating the following steps until a second reconstructed chord diagram corresponding to the termination sampling point is obtained: determining a previous reconstructed chord diagram corresponding to the previous sampling point of the current sampling point according to the current sampling point and the current reconstructed chord diagram; determining the previous sampling point as the current sampling point and the previous reconstructed chord diagram as the current reconstructed chord diagram; determining the second reconstructed chord diagram as the clean image obtained after removing the metal artifacts corresponding to the degraded chord diagram output by the image processing model.

8. The method according to claim 7, characterized in that Before said obtaining the image processing model to be tested, the method further includes: obtaining an initial image processing model to be trained; The initial image processing model is simulated and trained using the positive samples and the negative samples. During the simulation training process, the negative samples are used as the input of the initial image processing model, and the initial image processing model is used to perform restoration processing on the input negative samples to obtain output samples; Using the difference information between the positive samples and the output samples, determine the target loss function of the initial image after the simulation training; When the target loss function is less than a preset loss threshold, it is determined that the simulation training meets the preset convergence condition, and the initial image processing model after the simulation training is determined as the image processing model.

9. The method according to claim 8, wherein Before using the positive samples and the negative samples to simulate and train the initial image processing model, the method further includes: Obtain a clean image sample whose data volume containing the metal artifact is less than or equal to the first preset threshold, and determine the clean image sample as the positive sample; Use the metal implant to perform image degradation processing on the clean image sample with different diffusion times to obtain contaminated image samples with different degradation degrees and simulated contamination by the metal implant, where the diffusion time and the degradation degree are in a positive correlation, and the diffusion time and the degree of simulated contamination by the metal implant are in a positive correlation; Determine the contaminated image samples as the negative samples.

10. The method according to claim 9, wherein The step of using the metal implant to perform image degradation processing on the clean image sample with different diffusion times to obtain contaminated image samples with different degradation degrees and simulated contamination by the metal implant includes: Obtain the position information of the simulated metal implant at the current diffusion time; Perform forward projection processing and binarization processing on the second position information to obtain a metal trajectory, where the metal trajectory is a binary matrix, and each element in the binary matrix is 0 or 1; Use the result obtained by subtracting the metal trajectory from 1 to perform dot multiplication processing on the clean image sample to obtain a dot multiplication result, and add the dot multiplication result to the metal trajectory to obtain the contaminated image sample after the simulated image degradation of the clean image sample at the current diffusion time.

11. An apparatus for removing metal artifacts from an image, characterized in that, Includes: An acquisition unit for acquiring a first image with a metal artifact, where the metal artifact is noise generated by interference from a metal object during the imaging process of the first image; An identification unit for performing image identification on the first image to obtain the estimated metal type to which the metal object belongs and the estimated time length of the interference of the first image by the metal object during the imaging process; A simulation unit for performing simulation using the estimated metal type and the estimated time length to obtain a simulated virtual image generated by contaminating the first image during the process of spontaneous movement or propagation from a high-concentration area to a low-concentration area after the interference of the first image by an object of the estimated metal type for the estimated time length; A duplicate removal unit for removing artifacts from the first image using the simulated virtual image to obtain a second image, wherein the amount of data containing the metal artifacts in the second image is less than that in the first image.

12. An apparatus for removing metal artifacts from an image, characterized in that, Comprising: A model acquisition unit for acquiring an image processing model to be tested, wherein the image processing model is a network model obtained by simulated training using positive samples and negative samples, the positive samples are clean image samples, and the negative samples are contaminated image samples obtained by subjecting the positive samples to metal simulation contamination using metal implants; A first determination unit for determining a starting sampling point of the degraded chord diagram based on the first position information of the metal implant corresponding to the degraded chord diagram to be reconstructed and the second position information of the metal implant used in the metal simulation contamination process; A sampling and reconstruction unit for sampling and reconstructing the degraded chord diagram using the image processing model at the starting sampling point to obtain a first reconstructed chord diagram corresponding to the starting sampling point; A second determination unit for determining the starting sampling point as the current sampling point and the first reconstructed chord diagram as the current reconstructed chord diagram; An execution unit for repeatedly executing the following steps until a second reconstructed chord diagram corresponding to the termination sampling point is obtained: determining a previous reconstructed chord diagram corresponding to the previous sampling point of the current sampling point according to the current sampling point and the current reconstructed chord diagram; determining the previous sampling point as the current sampling point and the previous reconstructed chord diagram as the current reconstructed chord diagram; A third determination unit for determining the second reconstructed chord diagram as the clean image after removing the metal artifacts corresponding to the degraded chord diagram output by the image processing model.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when run by an electronic device, executes the method described in any one of claims 1 to 6 or 7 to 10.

14. An electronic device, comprising a memory and a processor, characterized in that, A computer program is stored in the memory, and the processor is configured to execute the method described in any one of claims 1 to 6 or 7 to 10 through the computer program.