An image processing method, apparatus, electronic device, and storage medium
By using conditional generative adversarial networks to denoise images from neutron imaging systems, the problem of low image resolution in neutron imaging systems is solved, and the effect of improving image contrast and spatial resolution is achieved without increasing cost and time.
Patent Information
- Application Number
- CN202210949231.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2042-08-09
AI Technical Summary
In neutron imaging systems, the image resolution is low when using a thinner scintillator screen, and existing technologies struggle to improve image contrast and spatial resolution without increasing cost and time.
A conditional generative adversarial network is used for image denoising. High-resolution images are generated from standard and noisy sample images in the training set, and deep learning methods are used to improve the spatial resolution of the images.
Under the condition of using a thinner scintillating screen, the spatial resolution of the image is improved by using a deep learning noise reduction method. The process of generating high-resolution images is short and low-cost, and has high practicality.
Smart Images

Figure CN115272273B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of neutron imaging, and more particularly to an image processing method, apparatus, electronic device and storage medium. Background Technology
[0002] Neutrons possess strong penetrating power, offering advantages in imaging studies of samples such as metallic materials. Utilizing neutrons to penetrate samples enables non-destructive testing imaging studies. However, compared to X-ray transmission imaging systems, neutron imaging systems have lower spatial resolution. Currently, image resolution is primarily improved through lens magnification.
[0003] In actual system development, the main factor limiting the resolution of the imaging system is the thickness of the scintillator screen. The thinner the scintillator screen, the smaller the secondary light source generated when neutrons are converted into visible light. Although this is beneficial to improving the spatial resolution of the system, the efficiency of neutron conversion into visible light is reduced, and the image contrast is reduced, which in turn reduces the spatial resolution, making it impossible for the actual resolution of the system to reach the ideal level.
[0004] Improving resolution solely through hardware is not only time-consuming but also costly. A pressing issue is how to enhance image contrast and thus improve the actual resolution of a neutron detection system using a relatively thin scintillator screen. Summary of the Invention
[0005] This invention provides an image processing method, apparatus, electronic device, and storage medium that can perform noise reduction processing on images, thereby improving image resolution.
[0006] In a first aspect, embodiments of the present invention provide an image processing method, comprising:
[0007] Acquire the original image, wherein the original image is a sample image acquired based on neutron imaging;
[0008] The original image is input into the image processing model to obtain the noisy image output by the image processing model, wherein the image processing model is a conditional generative adversarial network trained with sample images of standard samples with prior information and noisy sample images.
[0009] A target image is generated based on the original image and the noisy image, wherein the resolution of the target image is higher than that of the original image.
[0010] Secondly, embodiments of the present invention also provide an image processing apparatus, the apparatus comprising:
[0011] The original image acquisition module is used to acquire the original image, wherein the original image is a sample image acquired based on neutron imaging.
[0012] The noisy image acquisition module is used to input the original image into the image processing model and acquire the noisy image output by the image processing model, wherein the image processing model is a conditional generative adversarial network trained with sample images of standard samples with prior information and noisy sample images.
[0013] A target image generation module is used to generate a target image based on the original image and the noisy image, wherein the resolution of the target image is higher than that of the original image.
[0014] Thirdly, embodiments of the present invention also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the image processing method as described in any of the embodiments of the present invention.
[0015] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the image processing method as described in any of the embodiments of the present invention.
[0016] In this embodiment of the invention, an original image is acquired, wherein the original image is a sample image acquired based on neutron imaging; the original image is input into an image processing model to obtain a noisy image output by the image processing model, wherein the image processing model is a conditional generative adversarial network trained using a sample image of a standard sample with prior information and a noisy sample image; a target image is generated based on the original image and the noisy image, wherein the resolution of the target image is higher than that of the original image. The technical solution of this embodiment of the invention, by combining deep learning denoising methods, performs denoising processing on the image, improving image contrast, achieving improved spatial resolution of the image while using a thin scintillating screen, and the process of generating a high-resolution image is time-efficient, low-cost, and highly practical. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart of an image processing method provided in an embodiment of the present invention;
[0019] Figure 2 This is a schematic diagram of a neutron imaging amplification and detection system provided in an embodiment of the present invention;
[0020] Figure 3 A flowchart for obtaining a training set consisting of sample images of standard samples with prior information and noise images, provided for an embodiment of the present invention;
[0021] Figure 4 A flowchart of a conditional generative adversarial network trained using sample images of standard samples with prior information and noise sample images is provided for an embodiment of the present invention.
[0022] Figure 5 This is a structural block diagram of an image processing device provided in an embodiment of the present invention;
[0023] Figure 6 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0024] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0025] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "target" and "original" are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with the relevant provisions of national laws and regulations.
[0026] Figure 1 This is a flowchart illustrating an image processing method provided by an embodiment of the present invention. This embodiment is applicable to scenarios involving denoising of images acquired through a neutron imaging amplification and detection system. The method can be executed by an image processing device, which can be implemented in hardware and / or software and can be configured within an electronic device. For example, the electronic device can be a server or a server cluster. Figure 1 As shown, the method includes:
[0027] Step 101: Obtain the original image, wherein the original image is a sample image acquired based on neutron imaging.
[0028] In some embodiments, acquiring the original image includes: acquiring an original image sent by an image acquisition device, wherein the original image is a sample image generated by visible light acquired by the image acquisition device at a set lens position. The set lens position is determined based on the sum of the squares of the brightness differences between adjacent pixels in candidate sample images acquired at different positions.
[0029] The image acquisition device is used to acquire images of the sample generated by the neutron beam penetrating the sample. For example, the image acquisition device can be used to set up a neutron imaging magnification detection system. Figure 2 This is a schematic diagram of a neutron imaging amplification and detection system provided in an embodiment of the present invention, as shown below. Figure 2 As shown, the neutron imaging amplification and detection system includes: a neutron beam 1, a scintillator 2, a reflector 3, a switchable optical magnifying lens 4, a linear motorized stage 5, a CCD or CMOS visible light detector 6, and an image acquisition server 7. Furthermore, the neutron beam 1 is perpendicular to the scintillator 2, which is embedded below the side wall of the dark chamber. The reflector 3 is positioned at a certain angle inside the dark chamber, directly below the switchable optical magnifying lens 4. The switchable optical magnifying lens 4 is connected to the CCD or CMOS visible light detector 6 and fixed on the linear motorized stage 5. The image acquisition server 7 is located outside the dark chamber and is communicatively connected to the CCD or CMOS visible light detector 6.
[0030] Neutron beam 1 penetrates the sample and reaches scintillator 2. When neutron beam 1 penetrates scintillator 2 perpendicularly, it is converted into visible light. The visible light continues to propagate forward and reaches mirror 3. Mirror 3 changes the direction of visible light propagation to reflect the visible light into switchable optical magnifying lens 4. The switchable optical magnifying lens 4 magnifies the image. Then, the visible light carrying the magnified image information reaches CCD or CMOS visible light detector 5, and the image information corresponding to the visible light is transmitted to image acquisition server 7 through CCD or CMOS visible light detector 5.
[0031] Specifically, a neutron beam can be used to irradiate the sample to be imaged. A scintillator converts the neutron beam that penetrates the sample into visible light. When the visible light reaches the position of the reflector, it is reflected to the optical magnifying lens. Subsequently, a CCD or CMOS visible light detector is used to acquire the sample image.
[0032] In practice, different magnifications may be required depending on the specific situation. In this case, the magnification can be changed by switching the magnifying lens, and the position can be adjusted by moving the linear electric displacement stage up and down, thereby adjusting the focal length.
[0033] In some embodiments, the set lens position is determined by fitting the square of the brightness difference between candidate sample images acquired by the image acquisition device at different positions.
[0034] Specifically, the position of the switchable optical magnifying lens is adjusted using a linear motorized stage. At each position, the magnifying lens receives and amplifies the visible light reflected by the mirror. The amplified visible light then reaches a CCD or CMOS visible light detector, acquiring a reference sample image corresponding to the current position. Using the same method, the number of pixels in the vertical and horizontal directions of the complete area of the reference sample image at each position can be acquired. For each reference sample image, the square of the brightness difference between candidate sample images is determined based on the image pixel position and the number of pixels in the vertical and horizontal directions. Specifically, the square of the brightness difference F between the candidate sample images acquired at different positions can be calculated using the following formula:
[0035]
[0036] Where H represents the number of pixels in the complete image region of the candidate sample image along the vertical direction; W represents the number of pixels in the complete image region of the candidate sample image along the horizontal direction; and x and y represent the image pixel coordinates.
[0037] Image detection is performed at multiple locations, and the square of the brightness difference between any two adjacent pixels in the image corresponding to each location is calculated. The square of the brightness difference of the image is determined based on the square of the brightness difference between all adjacent pixels in each image. Gaussian fitting is performed on the obtained square of the brightness difference of the images at multiple locations, and the location point corresponding to the image with the largest square value is determined as the set lens position.
[0038] Step 102: Input the original image into the image processing model to obtain the noisy image output by the image processing model. The image processing model is a conditional generative adversarial network trained using sample images of standard samples with prior information and noisy sample images. Generally, the signal-to-noise ratio (SNR) directly affects the spatial resolution of an image. Typically, thinner scintillators result in lower neutron conversion efficiency, further leading to a lower SNR in the acquired image. This invention achieves noise reduction by experimentally applying a deep learning-based denoising scheme to obtain a network model.
[0039] Conditional Generative Adversarial Networks (CGANs) are an extension of Generative Adversarial Networks (GANs) that can generate images of different types based on different input conditions. A CGAN consists of a generator and a discriminator. The generator is based on the U-Net architecture, which is symmetrical and named U-shaped. U-Net is an Encoder-Decoder architecture.
[0040] There are many ways to create the training set needed for training conditional generative adversarial networks (GANs). One approach is to add white noise or Gaussian noise to noise-free images to generate noisy images, and then use these noisy images as the training set. However, this method of adding noise to noise-free images does not accurately reflect real-world noise conditions. Another approach is to create training sets by altering exposure times to collect high signal-to-noise ratio (SNR) and low SNR images separately. However, this method increases the model training time, as well as labor and financial costs.
[0041] In this embodiment of the invention, neutron data is collected from a series of standard samples with prior information, a noise-free image is generated from the sample images with noise, and a noise sample image is obtained based on the collected sample images with noise and the generated noise-free image.
[0042] Prior information refers to known structural information about the sample, such as which regions are steel and which are plastic, etc. Materials of the same type have the same spatial refractive index, and the standard sample has a homogeneous structure and composition. The sample image is an image of the standard sample obtained through neutron data acquisition. The noise image is an image generated based on the sample image.
[0043] The conditional generative adversarial network (GAN) is trained using sample images and noisy sample images as paired training sets. Through repeated iterations, an image processing model is obtained when the noise prediction image output by the generator perfectly fits the noise sample image, resulting in a true discrimination result from the discriminator. This image processing model is then embedded in a server to generate noisy images from the original images captured by the image acquisition device.
[0044] Step 103: Generate a target image based on the original image and the noisy image, wherein the resolution of the target image is higher than that of the original image.
[0045] In some embodiments, generating a target image based on the original image and the noise image includes: performing a subtraction operation between the image matrix corresponding to the original image and the image matrix corresponding to the noise image to obtain a difference matrix; and determining the target image based on the difference matrix.
[0046] It should be noted that the image matrix mentioned in this invention refers to a matrix composed of pixels at various locations in an image as its elements, and image subtraction refers to matrix subtraction. An image matrix can be generated from an image, and an image can also be transformed based on the obtained image matrix.
[0047] In this embodiment, an original image is acquired, wherein the original image is a sample image acquired based on neutron imaging; the original image is input into an image processing model to obtain a noisy image output by the image processing model; image noise compression is performed based on the original image and the noisy image to generate a target image. The technical solution of this embodiment combines deep learning denoising methods to perform denoising processing on the image, improving image contrast, achieving improved spatial resolution of the image while using a thin scintillator screen, and the process of generating a high-resolution image is time-efficient, low-cost, and highly practical.
[0048] In one specific embodiment, a process is provided for obtaining a training set consisting of sample images of standard samples with prior information and noisy images. Figure 3 This embodiment of the invention provides a flowchart for acquiring a training set consisting of sample images of standard samples with prior information and noise images. This embodiment further defines the training set creation process based on the above embodiments. Figure 3 As shown, acquiring a training set consisting of sample images of standard samples with prior information and noise images may include:
[0049] Step 301: Obtain the sample image of the standard sample with prior information acquired based on neutron imaging.
[0050] The method for obtaining the sample image can refer to the method for obtaining the original image, and will not be repeated here.
[0051] Step 302: Determine a noise-free sample structure image based on the average pixel value of the target region in the sample image, and generate a noisy sample image based on the sample image and the sample structure image.
[0052] Specifically, the noisy sample image is obtained by subtracting the sample image from the noise-free sample structure image. Furthermore, subtracting the sample image from the noise-free sample structure image refers to subtracting the image matrices corresponding to the two images.
[0053] In some embodiments, determining a noise-free sample structure image based on the average pixel value of the target region in the sample image may include:
[0054] The target region is used to traverse the sample image to obtain multiple image sub-regions.
[0055] The target area can be a sliding window of a set size, such as an 8×8 sliding window or a 9×9 sliding window. This embodiment does not limit the specific size of the sliding window.
[0056] Specifically, starting from the origin of the sample image, the sample image is traversed sequentially according to the target region, dividing the sample image into multiple sub-regions of the same size as the target region. The order of traversing the sample image using the target region can be from the top left corner of the image, traversing the image matrix from left to right and from top to bottom. Alternatively, the order can be from the top left corner of the image, traversing the image matrix from top to bottom and from left to right. It should be noted that this embodiment of the invention does not specifically limit the order in which the sample image is traversed.
[0057] For example, assuming the resolution of the sample image is 256×256, that is, the sample image has 256 pixels in both the horizontal and vertical directions, and the target area is an 8×8 small area, which means a small area with 8 pixels in both the horizontal and vertical directions, the image matrix of the sample image is traversed sequentially from the image origin of the target area, and the pixels in the 8×8 small area are obtained each time as an image sub-region.
[0058] After traversing the sample image using the target region to obtain multiple image sub-regions, a noise-free sample structure image can be generated based on the average pixel value of each image sub-region.
[0059] Specifically, for each small region, the average value of the pixels within that region can be calculated, and the pixel values of each pixel within the corresponding image sub-region can be updated based on this average value. The updated image sub-regions are then fused to obtain a noise-free sample structure image.
[0060] Step 303: Determine the training set based on the sample image and the noise image.
[0061] Specifically, for multiple standard samples, the above steps can be used to obtain multiple sample images and their corresponding noise sample images, which are then used as paired training sets.
[0062] The technical solution of this embodiment acquires neutron data from a series of standard samples with prior information, generates a noise-free sample structure image from the sample image with noise, and generates a noisy sample image based on the sample structure image and the sample image. This can generate a noisy sample image that matches the actual noise situation without changing the exposure time. This solves the problem that the noise addition method in related technologies cannot match the actual noise situation. It also solves the problem that it is necessary to collect high signal-to-noise ratio and low signal-to-noise ratio images separately by changing the exposure time to create a training set, which increases the training time, manpower cost and economic cost.
[0063] In one specific embodiment, a process is provided for training a conditional generative adversarial network using sample images of standard samples with prior information and noisy sample images. Figure 4 This embodiment of the invention provides a flowchart for training a conditional generative adversarial network using sample images of standard samples with prior information and noise sample images. This embodiment further defines the model training process based on the above embodiments. Figure 4 As shown, training the conditional generative adversarial network using sample images of standard samples with prior information and noisy sample images may include:
[0064] Step 401: Obtain a training set consisting of sample images of standard samples with prior information and noise images.
[0065] The training set is a pairwise training set composed of sample images and noise images. The methods for obtaining sample images and noise images have been described in the above embodiments and will not be repeated here.
[0066] Step 402: Input the sample image into the generator of the conditional generative adversarial network, and generate a noise prediction image corresponding to the sample image through the generator.
[0067] It should be noted that by inputting the sample image into the generator G and processing the sample image through the U-net network, the noise prediction image corresponding to the sample image can be obtained.
[0068] Step 403: The sample image is concatenated with the noise prediction image and the noise sample image respectively, and used as the input image of the discriminator of the conditional generative adversarial network. The discriminator determines the probability that the noise prediction image is the noise sample image.
[0069] It should be noted that the sample image is concatenated with the noise prediction image and the noise sample image respectively, and then input into the discriminator D. The probability that the noise prediction image is the noise sample image can be obtained through the discriminator D.
[0070] Step 404: Determine the loss value based on the probability, update the generator's model parameters based on the loss value, and obtain the image processing model.
[0071] It should be noted that the loss value can be determined based on the probability that the discriminator D determines the predicted noisy image to be a noisy sample image. The formula for determining this value is as follows:
[0072]
[0073] Where L is the loss value, P is the image matrix of the sample image, N is the image matrix of the noise sample image, and G(P) is the image matrix of the noise prediction image.
[0074] The generator G can update the parameters of the U-net network based on the loss value, making the generated noisy prediction image approximate the noisy sample images in the training set. This process continues until, after repeated iterations, a perfectly fitted training image is output, which the discriminator classifies as true.
[0075] The technical solution of this embodiment trains a generative adversarial network using a pairwise training set consisting of sample images and noisy images to obtain an image processing model. This model learns a denoising method suitable for a neutron imaging detection system, thereby applying the image processing model to compress noise in the images acquired by the neutron imaging detection system and improving the spatial resolution of the acquired images.
[0076] Figure 5 This is a structural block diagram of an image processing apparatus provided in an embodiment of the present invention. The image processing apparatus can be implemented in hardware and / or software, and can be configured in an electronic device. Figure 5 As shown, the image processing device specifically includes: a raw image acquisition module 501, a noisy image acquisition module 502, and a target image generation module 503.
[0077] The original image acquisition module 501 is used to acquire an original image, wherein the original image is a sample image acquired based on neutron imaging.
[0078] The noise image acquisition module 502 is used to input the original image into the image processing model and acquire the noise image output by the image processing model, wherein the image processing model is a conditional generative adversarial network trained with sample images of standard samples with prior information and noise sample images.
[0079] The target image generation module 503 is used to generate a target image based on the original image and the noisy image, wherein the resolution of the target image is higher than that of the original image.
[0080] In this embodiment, an original image is acquired, wherein the original image is a sample image acquired based on neutron imaging; the original image is input into an image processing model to obtain a noisy image output by the image processing model, wherein the image processing model is a conditional generative adversarial network trained using a sample image of a standard sample with prior information and a noisy sample image; a target image is generated based on the original image and the noisy image, wherein the resolution of the target image is higher than that of the original image. The technical solution of this embodiment combines deep learning denoising methods to denoise the image, improving image contrast, achieving improved spatial resolution of the image while using a thin scintillator screen, and the process of generating a high-resolution image is time-efficient, low-cost, and highly practical.
[0081] Optionally, the original image acquisition module is specifically used for:
[0082] Acquire the original image sent by the image acquisition device, wherein the original image is a sample image generated by visible light acquired by the image acquisition device at a set focal point; the set focal point is determined by fitting the square value of the brightness difference between candidate sample images acquired by the image acquisition device at different focal points.
[0083] Optionally, it also includes a model training module, which includes;
[0084] The training set building block is used to acquire a training set consisting of sample images of standard samples with prior information and noisy images.
[0085] The generator unit is used to input the sample image into the generator of the conditional generative adversarial network, and generate a noise prediction image corresponding to the sample image through the generator.
[0086] The discriminator unit is used to concatenate the sample image with the noise prediction image and the noise sample image respectively, and use them as the input image of the discriminator of the conditional generative adversarial network. The discriminator determines the probability that the noise prediction image is the noise sample image.
[0087] The model parameter update unit is used to determine the loss value based on the probability, update the model parameters of the generator based on the loss value, and obtain the image processing model.
[0088] Optionally, the training set constituent unit includes:
[0089] The sample image acquisition subunit is used to acquire sample images of standard samples with prior information based on neutron imaging.
[0090] The sample structure image generation subunit is used to determine a noise-free sample structure image based on the average pixel value of the target region in the sample image.
[0091] A noise sample image generation subunit is used to generate a noise sample image based on the sample image and the sample structure image.
[0092] The training set determination subunit is used to determine the training set based on the sample image and the noise sample image.
[0093] Optionally, the sample structure image generation subunit is specifically used for:
[0094] The target region is used to traverse the sample image to obtain multiple image sub-regions;
[0095] A noise-free sample structure image is generated based on the average pixel value of each of the image sub-regions.
[0096] Optionally, the target image generation module is specifically used for:
[0097] The difference matrix is obtained by subtracting the image matrix corresponding to the original image from the image matrix corresponding to the noise image.
[0098] The target image is determined based on the difference matrix.
[0099] Figure 6 This is a structural block diagram of an electronic device provided for an embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0100] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0101] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0102] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as image processing methods.
[0103] In some embodiments, the image processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the image processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the image processing method by any other suitable means (e.g., by means of firmware).
[0104] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0105] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0106] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0107] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0108] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0109] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. An image processing method, characterized by, The method comprises: acquiring an original image, wherein the original image is a sample image collected based on a neutron imaging mode; inputting the original image into an image processing model to acquire a noise image output by the image processing model, wherein the image processing model is a conditional generative adversarial network trained using sample specimen images and noise specimen images of standard samples having prior information; wherein the prior information refers to structural information of known samples; generating a target image according to the original image and the noise image, wherein the target image has a higher resolution than the original image; training a conditional generative adversarial network using sample specimen images and noise specimen images of standard samples having prior information, comprising: acquiring a training set composed of sample specimen images and noise images of standard samples having prior information; inputting the sample specimen images into a generator of the conditional generative adversarial network to generate noise prediction images corresponding to the sample specimen images through the generator; splicing the sample specimen images with the noise prediction images and the noise specimen images respectively as input images of a discriminator of the conditional generative adversarial network to determine a probability that the noise prediction images are the noise specimen images through the discriminator; determining a loss value according to the probability, updating model parameters of the generator according to the loss value to obtain an image processing model; the acquiring of the training set composed of sample specimen images and noise images of standard samples having prior information comprises: acquiring sample specimen images of standard samples having prior information collected based on a neutron imaging mode; determining a sample structure image without noise according to a pixel average value of a target region in the sample specimen image, and generating a noise specimen image according to the sample specimen image and the sample structure image; determining the training set according to the sample specimen image and the noise specimen image.
2. The method of claim 1, wherein, the acquiring of the original image comprises: acquiring an original image sent by an image collection device, wherein the original image is a sample image generated by visible light collected by the image collection device at a set lens position; wherein the visible light is generated by irradiating a to-be-imaged sample with a neutron beam, and the neutron beam penetrating the to-be-imaged sample is converted into the visible light by a scintillator.
3. The method of claim 2, wherein, The set lens position is determined by fitting square values of brightness differences of alternative sample images collected by the image collection device at different lens positions.
4. The method of claim 1, wherein, the generating of the target image according to the original image and the noise image comprises: performing subtraction operation on an image matrix corresponding to the original image and an image matrix corresponding to the noise image to obtain a difference matrix; determining a target image according to the difference matrix.
5. The method of claim 1, wherein, the determining of the sample structure image without noise according to a pixel average value of a target region in the sample specimen image comprises: traversing the sample specimen image using the target region to obtain a plurality of image sub-regions; generating a sample structure image without noise according to pixel average values of the image sub-regions.
6. An image processing apparatus characterized by comprising: The method comprises: an original image acquisition module configured to acquire an original image, wherein the original image is a sample image collected based on a neutron imaging mode; The device further comprises a model training module, and the model training module comprises: a training set forming unit configured to obtain a training set composed of sample images and noise images of standard samples having prior information; a generator unit configured to input the sample images into a generator of a conditional generative adversarial network, and generate noise prediction images corresponding to the sample images through the generator; a discriminator unit configured to splice the sample images respectively with the noise prediction images and noise sample images as input images of a discriminator of the conditional generative adversarial network, and determine a probability that the noise prediction images are the noise sample images through the discriminator; a model parameter updating unit configured to determine a loss value according to the probability, update model parameters of the generator according to the loss value, and obtain an image processing model; the training set forming unit comprises: a sample image acquisition subunit configured to obtain sample images of standard samples having prior information collected based on a neutron imaging method; a sample structure image generation subunit configured to determine a sample structure image without noise according to a pixel average value of a target region in the sample images; a noise sample image generation subunit configured to generate noise sample images according to the sample images and the sample structure images; a training set determination subunit configured to determine the training set according to the sample images and the noise sample images. The computer program is executed by the processor to implement the image processing method in any one of claims 1-5. The program is executed by the processor to implement the image processing method in any one of claims 1-5.
7. An electronic device, comprising: 8. A computer-readable storage medium having stored thereon a computer program, characterized in that,