A method, program, device, and storage medium for enhancing the features of small targets such as germinated rice under visually blurred conditions.
By using the DF-SRGAN model to enhance the features of germinated rice images, the problem of poor image quality was solved, high-quality super-resolution images were generated, and the accuracy and reliability of detection were improved.
Patent Information
- Application Number
- CN202411990947.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-12-31
AI Technical Summary
During the processing of germ-preserved rice, factors such as low light and vibration result in poor image quality, making it difficult to identify small defects or impurities on the rice grains. Traditional visual inspection methods struggle to extract effective features, leading to a decrease in detection accuracy.
Image feature enhancement is performed using a deep learning-based DF-SRGAN model. By combining a discriminator network with parallel residual modules, deconvolution fusion modules, and residual feedback enhancement modules, along with a cross-convolution fusion discriminator network, the loss function is optimized to generate high-quality germline super-resolution images.
It improved the clarity and visualization of germinated rice images, enhanced the detail features of small target images, reduced the false negative and false positive rates, and provided high-quality image data support for subsequent detection.
Smart Images

Figure CN119784594B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of quality inspection technology for processed germ-retained rice, specifically relating to a method, program, device, and storage medium for enhancing the features of small target images of germ-retained rice under visually blurred conditions. Background Technology
[0002] In the processing of germ-retained rice, the actual processing environment is quite complex, and the image information of germ-retained rice is often affected by low lighting conditions or vibration. Furthermore, due to their small size, a single grain of germ-retained rice occupies less than 0.12% of the area in the entire image, with the germ accounting for only 3% to 5% of the rice's volume. Especially under low-resolution conditions, the image quality and visualization of germ-retained rice are poor, making it difficult to accurately identify small defects or impurities on the rice grains, easily leading to decreased detection accuracy and increasing the incidence of missed and false detections. These factors make it difficult for traditional visual inspection methods to extract effective discriminative features, resulting in information loss during the inspection process, which in turn affects subsequent image processing and quality assessment.
[0003] With the continuous development of computer vision technology, super-resolution based techniques have been widely applied in various industries, including film and television production, security monitoring, and medical image analysis, providing effective solutions to problems such as image blurring and difficulty in identifying small targets at low resolution. Using a super-resolution-based method to enhance the image features of germ-retained rice can effectively identify the processing quality of rice grains. Compared with traditional image enhancement methods, it has advantages such as high image quality, high reliability, and wide applicability, fully overcoming the difficulties of traditional detection techniques and providing high-quality images for subsequent germ-retained rice detection. Summary of the Invention
[0004] The purpose of this invention is to provide a method, program, device, and storage medium for feature enhancement of small target images of preserved rice under visually blurred conditions. It utilizes a deep learning-based method to enhance the features of small target images of preserved rice, providing high-quality image data support for subsequent research.
[0005] A method for feature enhancement of small target images of rice germ under visually blurred conditions includes the following steps:
[0006] Step 1: Obtain image data of germinated rice and construct a training set;
[0007] Step 2: Construct the DF-SRGAN model and train it using the training set;
[0008] The DF-SRGAN model includes a parallel residual module, a deconvolution fusion module, and a residual feedback enhancement module.
[0009] The parallel residual fusion module is used to extract features from the input image and reconstruct the complex details of the small target image of the germinated rice; the deconvolution fusion module is used to make the reconstructed small target image of the germinated rice visually closer to the real scene; the residual feedback enhancement module is used to enhance the local details of the image, suppress noise and artifacts, and the image output by the residual feedback enhancement module is upsampled and convolutionally processed to obtain a super-resolution image.
[0010] Step 3: Input the original germinated rice image into the trained DF-SRGAN model to obtain the germinated rice super-resolution image after image feature enhancement.
[0011] Furthermore, when constructing the training set of germ-preserved rice images, geometric transformations were used to expand the germ-preserved rice image data, increasing the diversity of the images and presenting the rice grains in different positions, thereby reducing the model's dependence on positional information.
[0012] Furthermore, the parallel residual fusion module extracts features of different dimensions and levels through parallel residual paths and multi-level feature fusion, thereby enhancing the ability to express complex structures in small target images of germinated rice.
[0013] Furthermore, during the image magnification process, the deconvolution fusion module enhances important semantic information in the small target image of the germinated rice. Through deep feature fusion, it reduces artifacts and avoids the loss of detailed features in the small target image of the germinated rice, making the details of the generated small target image of the germinated rice more realistic and natural, and ensuring visual realism.
[0014] Furthermore, the residual feedback enhancement module fuses information from different receptive fields and fully learns feature information from different levels to alleviate the gradient vanishing problem, ensure that input features are not lost, and at the same time enhance the network's learning of high-level features, improve the clarity of small target images, and suppress background noise interference.
[0015] Furthermore, during the training of the DF-SRGAN model, high-resolution images of germinated rice and the super-resolution images of germinated rice output by the DF-SRGAN model are input together into the discriminator for target discrimination, and the similarity between the output of the DF-SRGAN model and the real images is evaluated; the loss function is:
[0016]
[0017] Among them, α and β are balance factors; Represents the adversarial loss function. Represents the content loss function;
[0018]
[0019] Among them, I HRThis refers to a reference image, i.e., a real high-resolution image of germinated rice; I LR This represents a low-resolution image of germinated rice as input to the DF-SRGAN model; The function representation of the generator is the input low-resolution image I. LR Convert to high-quality super-resolution images And as closely as possible to reference image I HR Similarity; θ G This represents the set of trainable parameters for the generator; θ is a functional representation of the discriminator used to evaluate the images generated by the generator. D This represents the set of trainable parameters for the discriminator; W and H represent the width and height of the image, respectively, with the reference image and the super-resolution image being the same size. This represents the deep feature map output by convolution in the VGG feature extraction network; the loss of the image is the target reconstructed image G. θG (I LR ) and target reference image I HR The Euclidean distance between them.
[0020] Furthermore, the discriminator adopts a discriminator network structure based on cross-convolutional fusion, introducing skip connections between multiple convolutional layers to weightedly fuse features from different layers, effectively integrating the detailed feature information of shallow and deep layers, realizing cross-layer feature fusion, and using a fully connected layer at its final stage to output the discriminability of the entire image, providing more accurate feedback for the optimization of the generator, thereby improving the quality of the super-resolution reconstructed image.
[0021] The loss function of the discriminator is:
[0022] l D =-log(D(I) HR )-range(-0.05,0.05))-log(range(0.95,1.05)-D(I LR ))
[0023] Where D(·) represents the output probability function of the discriminator, which is used to determine whether the input image is a real image or a generated image. By introducing perturbations range(-0.05,0.05) and range(0.95,1.05), the robustness and generalization ability of the discriminator are enhanced.
[0024] A computer device / apparatus / system includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described method for enhancing the features of small targets in a visually blurred state.
[0025] A computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of the above-described method for enhancing the features of small targets in a visually blurred state.
[0026] A computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the above-described method for enhancing the features of small targets in a visually blurred state.
[0027] The beneficial effects of this invention are as follows:
[0028] This invention designs a super-resolution reconstruction algorithm for small target images of preserved rice germ, and improves the loss functions of the generative network and adversarial network. The trained DF-SRGAN network can generate high-quality preserved rice germ images, providing high-quality image data support for subsequent research on the segmentation of preserved rice germ in densely clustered and superimposed cases. This invention can simultaneously generate a large amount of high-quality preserved rice germ image data, avoiding the problem of unusable images due to poor image quality of small targets. Furthermore, this invention is also applicable to the enhancement of other small target images, with a wide range of applications and strong usability. Attached Figure Description
[0029] Figure 1 This is a diagram of the overall architecture of the present invention.
[0030] Figure 2 This is a network structure diagram of the super-resolution reconstruction algorithm DF-SRGAN.
[0031] Figure 3 This is a structural diagram of a parallel residual fusion block.
[0032] Figure 4 This is a diagram of the residual feedback enhancement block network structure.
[0033] Figure 5 This is a diagram of the discriminator structure of a convolutional neural network.
[0034] Figure 6 The images show a comparison between the original image and the image after feature enhancement, where (a) is the low-resolution image; (b) is the high-resolution image; and (c) is the super-resolution image. Detailed Implementation
[0035] The present invention will now be further described with reference to the accompanying drawings.
[0036] This invention utilizes a deep learning-based method to enhance the features of small target images of preserved rice, providing high-quality image data support for subsequent research. First, images of preserved rice from real-world processing scenarios are collected to create a training dataset. Second, a super-resolution reconstruction algorithm for small target images of preserved rice is designed, and the loss function is optimized. The DF-SRGAN super-resolution reconstruction algorithm is then trained. Finally, the trained network model is used to reconstruct the small target images of preserved rice and perform quality evaluation.
[0037] Combination Figure 1 First, industrial cameras are used to collect image data of rice germ in real processing scenarios, and the data is augmented through geometric transformation. Second, a super-resolution reconstruction algorithm, DF-SRGAN, is built according to requirements. Parallel residual fusion modules, deconvolutional fusion modules, residual feedback enhancement modules, and a discriminator based on cross-convolutional fusion are designed. The loss functions of the generator and loss networks are optimized, and the built network model is trained. Finally, the trained network model is used to reconstruct small target images of rice germ and perform quality evaluation. Specifically, the following steps are included:
[0038] Step 1: Create a training dataset for germ-retained rice. Collect image data of germ-retained rice from actual processing scenarios and expand the data sample.
[0039] Step 2: Design a parallel residual fusion module in the network generator to extract image features and reconstruct complex details of a high-resolution image of a small target.
[0040] Step 3: Build a deconvolution fusion module to make the reconstructed image of the small target (e.g., rice grain) visually closer to the real scene.
[0041] Step 4: Since noise and artifacts are generated when reconstructing the small target image of the embryo rice, the local details of the image are enhanced by the residual feedback enhancement module to further improve the image quality.
[0042] Step 5: After upsampling and convolution operations, a super-resolution image is obtained and input together with the high-resolution image into the discriminator for target discrimination, and the similarity between the generated image and the real image is evaluated.
[0043] Step 6: Apply different loss functions to the generative network and the adversarial network, and train the built network model on a self-made dataset of 8,000 germinated rice images.
[0044] Step 7: After the network training is completed, the network is used to evaluate the quality of the preserved rice images. The perceptual quality index LPIPS can reach 0.362, which shows that the algorithm has a significant advantage in processing small target details of preserved rice.
[0045] 1. The following methods were used to augment the image of germinated rice:
[0046] Expanding the rice image data by using geometric transformations such as flipping, cropping, and rotating increases the diversity of the images, allowing the rice grains to be presented in different positions. This reduces the model's dependence on positional information, improves the model's generalization ability and robustness, and thus reduces overfitting.
[0047] 2. The following methods can be used to extract features from images:
[0048] like Figure 3 As shown, a parallel residual fusion module is designed to extract image features. The main branch of each parallel block consists of three 3×3 convolutional layers and two ReLU functions, while the secondary branch consists of a 3×3 convolutional layer. Residual connections and pixel fusion are performed, and two 1×1 convolutional layers are used to increase the nonlinearity of the network. Finally, the network is output to the next residual block after passing through the ReLU function.
[0049] 3. Enhance image detail using the following methods:
[0050] The deconvolution fusion module is designed to improve the resolution of small target images, enhancing image realism and detail. For example... Figure 4 As shown, a residual feedback enhancement module is designed to enhance local details of the image. The output features in the residual module are optimized by two 3×3 and two 1×1 convolutional layers with a total of 64 channels and a ReLU function. Furthermore, a 1×1 convolutional layer halves the number of channels of the features to achieve deconvolutional concatenation, thereby improving the network's expressive power. Finally, by combining the preceding and following convolutional layers, the contextual semantic information is enhanced, making the reconstructed small target image realistic in both overall and local details.
[0051] 4. The following network was used to reconstruct the image of the germinated rice:
[0052] The network used is a generative adversarial network based on DF-SRGAN. The low-resolution image is pre-extracted for features through one convolutional layer, then passed through a parallel residual fusion module consisting of eight parallel feature blocks, and then the receptive field of the feature map is expanded by dilated convolution. A deconvolution fusion module is used to enhance local feature details, and finally two sub-pixel convolutions are used to achieve a 4x upsampling. The reconstructed image of the small target is output through multiple convolution operations.
[0053] 5. The loss function for network training is calculated using the following method:
[0054] The complete weighted sensing loss formula for generative networks is:
[0055]
[0056] Where α and β are balance factors, which are 1.0 and 10e-3, respectively; Represents the adversarial loss function. This represents the content loss function. The specific formula for calculating this function is:
[0057]
[0058] Among them, I HR This refers to a reference image, i.e., a real high-resolution image of germinated rice; I LR This represents a low-resolution image of germinated rice as input to the DF-SRGAN model; The function representation of the generator is the input low-resolution image I. LR Convert to high-quality super-resolution images And as closely as possible to reference image I HR Similarly, θ G This represents the set of trainable parameters for the generator; θ is a functional representation of the discriminator used to evaluate the images generated by the generator. D This represents the set of trainable parameters for the discriminator; W and H represent the width and height of the image, respectively, with the reference image and the super-resolution image being the same size. This represents the deep feature map output by the 5th convolution after the 4th pooling layer in the VGG feature extraction network; the loss of the image is the target reconstructed image G. θG (I LR ) and target reference image I HR The Euclidean distance between them.
[0059] The formula for the loss function of adversarial networks is:
[0060] l D =-log(D(I) HR )-range(-0.05,0.05))-log(range(0.95,1.05)-D(I LR ))
[0061] Here, D(·) represents the output probability function of the discriminator, used to determine whether the input image is a real image or a generated image. By introducing perturbations (range(-0.05,0.05) and range(0.95,1.05)), the robustness and generalization ability of the discriminator are enhanced.
[0062] 6. Image quality assessment uses the following methods:
[0063] The primary approach employs objective evaluation methods in image quality assessment. Among these, LPIPS uses a perceptual model as its evaluation criterion, which helps people determine the image type. The principle involves extracting information from both the original and reconstructed image, activating patches using BaseNet according to a trained model, scaling the weight values, and calculating the distance sum. A lower sum indicates better enhancement. The calculation formula is as follows:
[0064]
[0065] Where x is the reference image, x0 is the noisy and distorted image, dis(x,x0) is the distance between x0 and x, l is the feature extraction layer, and w l This is the scaling activation function.
[0066] The main principle of this invention is to train a super-resolution reconstruction network using a large amount of actually processed germinated rice image data, and then use the trained network model to reconstruct germinated rice images. First, a germinated rice training dataset is collected and created, and the data is augmented through geometric transformations. Second, a generative adversarial network (GAN) structure based on DF-SRGAN is proposed. A parallel residual fusion module is introduced in the network's generator to extract image features, followed by a deconvolution fusion module to learn contextual information. A residual feedback enhancement module is proposed to enhance local image details. After upsampling and convolution operations, a super-resolution image is obtained. Then, the high-resolution and super-resolution target images are input into a discriminator based on a cross-connected convolutional neural network for target discrimination, and the similarity between the generated image and the real image is evaluated. Finally, the loss functions in the generative and adversarial networks are optimized, and the DF-SRGAN network is trained using self-made germinated rice image data. After training, the network can be used to reconstruct germinated rice images, resulting in high-quality images.
[0067] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for enhancing the features of small target images of rice germ under visually blurred conditions, characterized in that, Includes the following steps: Step 1: Obtain image data of germinated rice and construct a training set; Step 2: Construct the DF-SRGAN model and train it using the training set; The DF-SRGAN model includes a parallel residual fusion module, a deconvolution fusion module, and a residual feedback enhancement module; The parallel residual fusion module is used to extract features from the input image and reconstruct the complex details of the small target image of the germinated rice; the deconvolution fusion module is used to make the reconstructed small target image of the germinated rice visually closer to the real scene. The residual feedback enhancement module is used to enhance local details of the image and suppress noise and artifacts. The image output by the residual feedback enhancement module is upsampled and convolutionally processed to obtain a super-resolution image. The residual feedback enhancement module fuses information from different receptive fields and fully learns feature information from different levels, alleviating the gradient vanishing problem, ensuring that input features are not lost, while enhancing the network's learning of high-level features, improving the clarity of small target images, and suppressing background noise interference. When training the DF-SRGAN model, high-resolution images of germinated rice and the super-resolution images of germinated rice output by the DF-SRGAN model are input together into the discriminator for target discrimination, and the similarity between the output of the DF-SRGAN model and the real images is evaluated; the loss function is: Among them, α and β are balance factors; Represents the adversarial loss function. Represents the content loss function; Among them, I HR This refers to a reference image, i.e., a real high-resolution image of germinated rice; I LR This represents a low-resolution image of germinated rice as input to the DF-SRGAN model; The function representation of the generator is the input low-resolution image I. LR Convert to high-quality super-resolution images And as closely as possible to reference image I HR Similarity; θ G This represents the set of trainable parameters for the generator; θ is a functional representation of the discriminator used to evaluate the images generated by the generator. D This represents the set of trainable parameters for the discriminator; W and H represent the width and height of the image, respectively, with the reference image and the super-resolution image being the same size. This represents the deep feature map output by convolution in the VGG feature extraction network; the image loss is the target reconstructed image. and target reference image I HR The Euclidean distance between them; The discriminator adopts a discriminator network structure based on cross-convolutional fusion. Skip connections are introduced between multiple convolutional layers to weight and fuse features from different layers, effectively integrating the detailed feature information of shallow and deep layers, realizing cross-layer feature fusion, and using a fully connected layer at its final stage to output the discriminability of the entire image, providing more accurate feedback for the optimization of the generator, thereby improving the quality of the super-resolution reconstructed image. The loss function of the discriminator is: l D =-log(D(I HR )-range(-0.05,0.05))-log(range(0.95,1.05)-D(I LR )) Where D(·) represents the output probability function of the discriminator, which is used to determine whether the input image is a real image or a generated image. By introducing perturbations range(-0.05,0.05) and range(0.95,1.05), the robustness and generalization ability of the discriminator are enhanced. Step 3: Input the original germinated rice image into the trained DF-SRGAN model to obtain the germinated rice super-resolution image after image feature enhancement.
2. The method for enhancing the features of small target images of rice grains under visually blurred conditions according to claim 1, characterized in that: When constructing the training set of germ-preserved rice images, geometric transformations are used to expand the image data, increase the diversity of the images, and present the rice grains in different positions, thereby reducing the model's dependence on positional information.
3. The method for enhancing the features of small target images of rice grains under visually blurred conditions according to claim 1, characterized in that: The parallel residual fusion module extracts features of different dimensions and levels through parallel residual paths and multi-level feature fusion, thereby enhancing the ability to express complex structures in small target images of germinated rice.
4. The method for enhancing the features of small target images of rice grains under visually blurred conditions according to claim 1, characterized in that: During the image magnification process, the deconvolution fusion module enhances important semantic information in the small target image of the germinated rice. Through deep feature fusion, it reduces artifacts and avoids the loss of detailed features in the small target image of the germinated rice, making the details of the generated small target image of the germinated rice more realistic and natural, and ensuring visual realism.
5. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 4.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 4.
7. A computer program product comprising computer instructions, characterized in that: When executed by a processor, the computer instructions implement the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Image super-resolution method based on dense connection network
CN106991646A
Multi-task deep neural network-based satellite image simultaneous super-resolution and coloring method
CN107833183A