An image data processing method based on multi-scale feature reconstruction
By using the multi-scale adaptive residual module and focused dynamic pyramid network of the DR-D-FINE model, the problems of nonlinear distortion in information transmission and roughness in cross-scale feature fusion in multi-scale feature reconstruction are solved, achieving high-fidelity edge structure and clear texture hierarchy in image reconstruction and improving feature representation capability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-14
- Publication Date
- 2026-05-29
AI Technical Summary
Existing deep learning feature processing architectures struggle to effectively capture long-distance spatial dependencies when processing crop phenotypic image data with multi-scale coupling and low signal-to-noise ratio. This results in feature maps lacking decoupling of low-frequency structural information from high-frequency texture details, and the lack of adaptive alignment mechanisms during cross-scale feature fusion leads to a decline in the image feature representation capability after reconstruction.
A DR-D-FINE model is constructed, which achieves accurate reconstruction of multi-scale features through a multi-scale adaptive residual module, a focused dynamic pyramid network, and a hierarchical feature reconstruction module. Adaptive feature aggregation and dynamic reparameterization techniques are used to enhance the spatial consistency and semantic expression of feature maps.
It significantly improves the spatial consistency and semantic representation robustness of multi-scale feature maps, generates reconstructed feature tensors with high-fidelity edge structures and clear texture levels, and provides a high-quality feature data foundation for subsequent high-precision phenotypic parameter calculation.
Smart Images

Figure CN122115895A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image feature reconstruction technology, and more specifically to an image data processing method based on multi-scale feature reconstruction. Background Technology
[0002] Machine vision-based crop phenotypic reconstruction has become a core component of automated operations. In greenhouse cultivation environments, high-precision visual feature reconstruction of edible and medicinal fungi fruiting bodies is a crucial prerequisite for achieving growth status assessment and automated harvesting. However, image data in such scenarios exhibits significant multi-scale coupling and low signal-to-noise ratio characteristics: within the same field of view, there are often primordia with extremely small pixel proportions, medium-sized vegetative bodies, and large-sized mature bodies simultaneously, resulting in a vast scale span; at the same time, the surface texture of the fruiting body and the background matrix highly overlap in color spectrum, leading to blurred gradient boundaries between the foreground target and the background, which easily triggers the assimilation effect of visual features. These complex imaging conditions pose a severe challenge to existing deep learning feature processing architectures.
[0003] Existing deep learning feature processing architectures are mainly divided into local feature extraction paradigms based on convolutional neural networks (CNNs) and global context modeling paradigms based on Transformers.
[0004] CNN architectures, represented by the YOLO series and ResNet, rely on fixed-size convolutional kernels for local sliding window computation in their core operators. These architectures, through hierarchical feature downsampling, progressively construct multi-level feature representations from low-level texture to high-level semantics, offering significant advantages in computational efficiency and local pattern recognition. However, when processing low-contrast, weak-edge image data, the limited receptive field of the convolutional kernels makes it difficult to effectively capture long-distance spatial dependencies. This results in reconstructed feature maps lacking effective decoupling of low-frequency structural information from high-frequency texture details in the frequency domain, making them highly susceptible to background noise and causing feature response diffusion.
[0005] The Transformer architecture, exemplified by RT-DETR, introduces a self-attention mechanism to achieve global interaction between pixels at any location in the feature map, effectively compensating for the inherent shortcomings of CNNs in long-range dependency modeling. However, when applied to the feature reconstruction task of the aforementioned multi-scale dense targets, significant technical bottlenecks still exist, specifically in the following two aspects: On the one hand, there is nonlinear distortion in multi-scale information transmission. Existing architectures rely excessively on the aggregation of deep semantic features. During network downsampling, there is a lack of mechanisms to protect the spatial geometric information of small-scale targets, resulting in irreversible attenuation and loss of shallow high-frequency localization information during layer-by-layer transmission. For primordial stage targets with a very small pixel proportion, their spatial response in deep feature maps is easily submerged by background noise.
[0006] On the other hand, there is the topological coarsness of cross-scale feature fusion. General Feature Pyramid Networks (FPNs) often employ simple bilinear interpolation upsampling or element-wise addition when fusing features at different resolutions. This fusion method, lacking an adaptive alignment mechanism, ignores the non-uniformity of spatial distribution of feature maps at different scales, resulting in a lack of precise matching between deep semantic information and shallow localization information at the pixel level. Especially when processing low-contrast targets with blurred edges, this misalignment of spatial-semantic mapping directly leads to a decrease in the feature representation capability of the reconstructed image. Summary of the Invention
[0007] To address the limitations of existing technologies in achieving multi-scale feature extraction and accurate cross-scale reconstruction, this invention proposes an image data processing method based on multi-scale feature reconstruction. By constructing a DR-D-FINE model, multi-scale feature reconstruction is performed on crop phenotypic image data, generating reconstructed feature tensors with high-fidelity edge structures and clear texture levels, significantly improving the spatial consistency and semantic robustness of the multi-scale feature maps.
[0008] The method includes the following steps: S1. Obtain the crop phenotypic image dataset and preprocess it to obtain the training sample set; S2. Construct and improve the D-FINE model to obtain the DR-D-FINE model: S21. In the backbone of the D-FINE model, replace the HG-Block modules in the first HG-Stage module and the second HG-Stage module with the first multi-scale adaptive residual module and the second multi-scale adaptive residual module, respectively. S22. Replace the neck portion of the D-FINE model with a focused dynamic pyramid network; S23. Delete the detector head of the D-FINE model; S3. Train the DR-D-FINE model using the training sample set; S4. Input the crop phenotypic image to be processed into the trained DR-D-FINE model to reconstruct the image features.
[0009] Furthermore, the preprocessing process consists of the following steps: data cleaning, data labeling, data augmentation, and resolution unification.
[0010] Furthermore, the first and second multi-scale adaptive residual modules have the same structure. The input of each multi-scale adaptive residual module is sequentially processed through N serial... After convolution, the concatenation is concatenated with the input of the corresponding multi-scale adaptive residual module to obtain a concatenated feature map. The concatenated feature map is then processed by the adaptive feature aggregation module to obtain an aggregated feature map. The N serial In convolution, each After convolution, batch normalization and ReLU nonlinear activation function processing are performed sequentially.
[0011] Furthermore, the input to the adaptive feature aggregation module is processed by the first... Convolution processing yields the projected feature map. The projected feature maps are respectively processed by Depth convolution and After parallel processing of depthwise convolutions, the data then passes through the second module of element-wise addition and adaptive feature aggregation. Convolution and grouped convolution processes are used to obtain refined feature maps. ; The refined feature map and the projected feature map are fused using an adaptive residual gating method to obtain an aggregated feature map. , ,in, These are globally learnable scalar parameters. The SiLU activation function is used. For batch normalization; The first adaptive feature aggregation module After convolution, batch normalization and ReLU nonlinear activation function processing are performed sequentially.
[0012] Furthermore, focusing on the P3, P4, and P5 feature maps output from the backbone of the dynamic pyramid network, the P3 and P4 feature maps are processed by the first and second convolutions, respectively, to obtain... Feature maps and Feature map; the P5 feature map is processed sequentially through a third convolution and a Transformer module to obtain... Feature map; Feature map Feature maps and feature Figure 1 The same input to the first feature focusing module yields... Feature map; The feature map input is processed by three parallel feature reconstruction branches. The first feature reconstruction branch will... Feature map upsampling to The scale of the feature map is obtained. Feature map Feature maps and After the feature maps are concatenated, they are input into the first-level feature reconstruction module to obtain... Feature map; The second feature reconstruction branch will Feature map downsampling to The scale of the feature map is obtained. Feature map Feature maps and After the feature maps are concatenated, they are input into the second-level feature reconstruction module to obtain... Feature map; The third feature reconstruction branch will Feature map Feature maps and The feature map is input into the second feature focusing module to obtain... Feature map; Feature map downsampling to Feature map scale, and with Feature maps are stitched together Feature map; After the feature map is processed by the third-level feature reconstruction module, it is combined with... Feature maps and feature Figure 1 Both serve as outputs of a focused dynamic pyramid network.
[0013] Furthermore, the first and second feature focusing modules have the same structure. The input of each feature focusing module is processed through the P3, P4, and P5 feature channels, respectively, and then the channels are stitched together to obtain a stitched feature map. , Input parallel Depth convolution, Depth convolution, Depth convolution and Depthwise convolution, respectively, yields convolution kernels of size... Depth convolutional feature map , ; and After performing element-wise summation, the third feature focusing module is then used. Convolutional fusion of cross-channel information yields an output feature map enhanced by pointwise convolution. The output feature map enhanced by pointwise convolution and After performing element-wise summation, input the fourth value into the feature focusing module. Convolution is performed to obtain the output of each feature focusing module.
[0014] Furthermore, the P3 layer feature channel includes an ADown downsampling module, and the input to the P3 layer feature channel includes: Feature maps and Feature map; The P4 layer feature channels include: the first feature focusing module. The input to the feature channels of the convolutional P4 layer includes: Feature maps and Feature map; The P5 layer feature channels include: upsampling processing and the second feature focusing module. The input to the feature channels of the P5 layer of the convolution includes: Feature maps and Feature map.
[0015] Furthermore, the first, second, and third hierarchical feature reconstruction modules have the same structure. The input of each hierarchical feature reconstruction module is processed by the first hierarchical feature reconstruction module. After convolution processing, the main path feature map is divided along the channel dimension. and bypass feature map ; The data passes through the first processing unit and the second processing unit in sequence. The outputs of the first processing unit and the second processing unit are then processed. After concatenation, input the second feature reconstruction module of the hierarchical level. Convolution is performed to obtain the output of each level of feature reconstruction module.
[0016] Furthermore, the first and second processing units have the same structure. The input of each processing unit is processed sequentially through M cascaded dynamic reparameter modules, and then added to the input of each processing unit via residuals to obtain a summed feature map. The summed feature map is then input into the first processing unit. Convolution is used to obtain the output of each processing unit.
[0017] Furthermore, the M cascaded dynamic reparameter re-parameter modules all have identical structures. The input of each dynamic reparameter re-parameter module is processed through morphological branch, projection branch, and high-frequency branch, respectively, and then adaptively weighted and fused to obtain the fused feature map. ; After being processed by the ECA module, the output of each dynamic reparameter module is obtained by multiplying it element by element with the input of each dynamic reparameter module. The morphological branches include: the first one in the dynamic reparameter module. convolution; The projection branch includes: the first dynamic reparameter module. convolution; High-frequency branches include: the first one in the dynamic reparameter module. The second module of depthwise convolution and dynamic reparameterization convolution; The formula for calculation is:
[0018] in, , and These represent the outputs of the morphological branch, projection branch, and high-frequency branch, respectively. , and These represent the weights of the morphological branch, the projection branch, and the high-frequency branch, respectively. This represents the input to each dynamic reparameter module. express The number of channels, This indicates the preset number of output channels for each dynamic reparameter module; The ECA module includes: global average pooling and 3×3 one-dimensional convolution.
[0019] The beneficial effects of the method described in this invention are as follows: (1) The method described in this invention constructs a multi-scale adaptive residual module, which serves as the core feature processing unit in the early stage of the backbone network and as a key processing node for high-fidelity image data transformation. This unit abandons the traditional single attention aggregation paradigm and instead adopts a full-granularity information preservation mechanism: First, the input image tensor is refined layer by layer in the frequency domain through multi-level serial convolution, and the original input signal is concatenated with the output of each intermediate transformation layer in a dense channel. This process constructs a complete information transmission path from shallow high-frequency texture details to deep low-frequency semantic structures, effectively suppressing spatial information aliasing and high-frequency detail loss caused by traditional downsampling operations. Second, the concatenated feature tensor enters the adaptive feature aggregation module. This module employs a dual-branch parallel deep convolution operator to achieve refined decoupling and reconstructing of information within the feature map: A high-frequency detail enhancement branch uses a 3×3 deep convolution, leveraging its fine local receptive field to perform high-pass filtering extraction specifically for subtle edge gradients and local spatial variations in the feature map, significantly enhancing the intensity of subtle texture responses and resolving the issue of feature blurring for small targets in deep networks. A low-frequency structure modeling branch uses a 5×5 deep convolution kernel, expanding the receptive field to strengthen the long-range dependency modeling of the overall contour geometry and low-frequency background structure in the feature tensor, achieving robust capture of large-scale morphological information. Finally, an adaptive residual gating mechanism is introduced. This mechanism dynamically calculates the feature enhancement gain coefficient based on the local statistical characteristics of the input feature map, intelligently adjusting the fusion ratio of the original and reconstructed signals during training and inference. This not only solves the gradient vanishing problem in deep networks but, more importantly, achieves adaptive optimization of the signal-to-noise ratio in complex scenes: suppressing noise amplification in flat background regions and enhancing the response value of the feature map in target edge regions. Through the above mechanism, this invention realizes the joint reconstruction of image data in the spatial and frequency domains, significantly improving the spatial consistency and semantic richness of the output feature map, and generating a reconstructed feature tensor with high-fidelity edge structure and clear texture hierarchy, providing a high-quality feature data foundation for subsequent high-precision phenotypic parameter calculation.
[0020] (2) The method of the present invention has a novel hierarchical feature reconstruction module designed in the encoder structure. It abandons the traditional single-path feature transmission mode and constructs a macroscopic topology structure of dual-path splitting and multi-path aggregation: a high-frequency information direct bypass is established, which is used for lossless transmission of the original high-frequency components of the input image to prevent edge detail aliasing and loss caused by deep network transformation, and to ensure that the reconstructed feature map has a complete spatial high-frequency response; the main path stacks dynamic reparameterized feature reconstruction units. This unit employs a multi-branch dynamic feature decoupling and fusion architecture. By deploying three convolution operators of different properties in parallel, it achieves multi-dimensional orthogonal extraction of image features: First, the morphological structure modeling branch uses a 3×3 standard convolution operator, leveraging its spatial coupling properties to effectively capture the geometric structure and spatial contextual dependencies of the target; the channel domain mapping branch uses a 1×1 projective convolution operator to perform cross-channel linear transformation and information compression, optimizing the feature distribution density across the channel dimension; the high-frequency texture enhancement branch uses a 3×3 depthwise convolution as a dedicated spatial domain high-pass filter, specifically targeting the independent extraction of subtle edge gradients and high-frequency texture details, significantly enhancing the response intensity of minute phenotypic features. Finally, adaptive dynamic aggregation and filtering are performed, adaptively weighting and fusing the feature tensors output from different branches through a set of globally learnable scalar gain coefficients. This process achieves the dynamic optimal allocation of multi-source heterogeneous features, enabling the network to intelligently adjust the fusion weights of structural and texture information based on the local complexity of the input image. Subsequently, a lightweight and efficient channel attention (ECA) mechanism is embedded to further suppress redundant channel noise and filter and enhance semantic channel features with high discriminative power through local cross-channel interactions. Simultaneously, a structural reparameterization technique is introduced. During the training phase, the rich feature decoupling capability of the multi-branch structure is utilized for high-precision image data learning and parameter optimization. During the inference deployment phase, based on the superposition principle of linear systems, the multi-branch convolution kernel and bias term are mathematically equivalently merged into a single convolution operator. This transformation not only maintains the high-fidelity feature reconstruction capability obtained during training but also achieves extreme simplification of computational operators at the inference end, thereby significantly improving the model's spatial resolution and noise robustness for feature data with extremely low computational overhead.
[0021] (3) The method described in this invention constructs a focused dynamic pyramid feature reconstruction network in the encoder to achieve deep coupling of cross-scale semantics and localization information. By fusing P3 channel information and designing a feature focusing module, multi-scale information interaction is driven. To eliminate spatial aliasing caused by scale differences, pixel-level spatial geometric registration is performed between shallow P3 high-frequency details, deep P5 low-frequency semantics, and mid-layer P4 features. Subsequently, a multi-bandwidth parallel filtering architecture with kernel size {3,5,7,9} is adopted, combined with depthwise separable convolution and pointwise convolution, to simultaneously extract full-band spatial information from fine textures to macroscopic contours under multiple receptive fields, effectively overcoming the limitation of spectrum truncation caused by a single scale and significantly enhancing the feature resolution of small targets. Furthermore, a dual-iteration residual reconstruction mechanism is used to achieve comprehensive diffusion of contextual information and adaptive enhancement of local details through secondary feature focusing and tertiary residual correction. Finally, the P4 and P5 layer feature maps optimized by secondary reconstruction and the P3 layer feature map upsampled by the first focusing are used as output. This design constructs a high-fidelity cross-scale information pathway, ensuring the efficient transmission of context-rich semantic data and significantly improving the spatial consistency and semantic representation robustness of multi-scale feature maps. Attached Figure Description
[0022] Figure 1 This is a flowchart of the method described in Embodiment 1; Figure 2 This is a schematic diagram of the DR-D-FINE model structure described in Embodiment 1. Figure 3 This is a schematic diagram of the multi-scale adaptive residual module structure described in Embodiment 1. Figure 4 This is a schematic diagram of the feature focusing module structure described in Embodiment 1. Figure 5 This is a schematic diagram of the hierarchical feature reconstruction module structure described in Embodiment 1. Figure 6 This is the feature map output after processing the first group of Ganoderma lucidum phenotypic images in this embodiment 1 using the D-FINE model; Figure 7 This is the feature map output after processing the first group of Ganoderma lucidum phenotypic images in this embodiment 1 using the DR-D-FINE model; Figure 8 This is the feature map output after processing the first group of Sanghuang phenotypic images in this embodiment 1 using the D-FINE model; Figure 9 This is the feature map output after processing the first group of Sanghuang phenotypic images in this embodiment 1 using the DR-D-FINE model; Figure 10 This is a heatmap output after processing the second group of Ganoderma lucidum phenotypic images in Example 1 using the D-FINE model; Figure 11This is a heatmap output after processing the second group of Ganoderma lucidum phenotypic images in Example 1 using the DR-D-FINE model; Figure 12 This is a heatmap output after processing the second group of Sanghuang phenotypic images in Example 1 using the D-FINE model; Figure 13 This is a heatmap output after processing the second group of Sanghuang phenotypic images in Example 1 using the DR-D-FINE model; Figure 14 This is a schematic diagram showing the confidence level of the third group of Ganoderma lucidum phenotypic images described in Example 2 after processing by the D-FINE model; Figure 15 This is a schematic diagram showing the confidence level of the third group of Ganoderma lucidum phenotypic images described in Example 2 after processing by the DR-D-FINE model; Figure 16 This is a schematic diagram showing the confidence level of the third group of Sanghuang phenotypic images described in Example 2 after processing by the D-FINE model; Figure 17 This is a schematic diagram showing the confidence level of the third group of Sanghuang phenotypic images described in Example 2 after processing by the DR-D-FINE model. Detailed Implementation
[0023] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] Example 1 This embodiment provides an image data processing method based on multi-scale feature reconstruction, the flowchart of which is as follows: Figure 1 As shown, the method includes the following steps: S1. Obtain the crop phenotypic image dataset and preprocess it to obtain the training sample set; The relevant operations in step S1 will be introduced with specific examples: In this embodiment, raw image data of the fruiting bodies of edible and medicinal fungi are obtained from a cultivation base for edible and medicinal fungi, and used as a crop phenotypic image dataset.
[0025] The preprocessing first involves cleaning the crop phenotypic image dataset and then using Labelme image annotation software to create bounding box annotations of the edible and medicinal fungi fruiting bodies in the images, forming an annotated edible and medicinal fungi fruiting body phenotypic image dataset. Next, the annotated dataset undergoes data augmentation and a unified resolution of 640*640. Those skilled in the art can choose the data cleaning and data augmentation methods according to the requirements of the selected crop type; this embodiment does not impose any limitations.
[0026] S2. Construct and improve the D-FINE model to obtain the DR-D-FINE model: S21. In the backbone of the D-FINE model, replace the HG-Block modules in the first HG-Stage module and the second HG-Stage module with the first multi-scale adaptive residual module and the second multi-scale adaptive residual module, respectively. S22. Replace the neck portion of the D-FINE model with a focused dynamic pyramid network; S23. Delete the detector head of the D-FINE model; The relevant operations in step S2 will be introduced with specific examples: like Figure 2 As shown, the DR-D-FINE model (Dynamic Reconstruction D-FINE) is obtained by improving the D-FINE model (the improved D-FINE model in this embodiment, specifically: D-FINE-N, Fine-grained Distribution Refinement - Nano model). The specific improvement method is as follows: Improvement 1: In the backbone of the D-FINE model, the HG-Block modules in the first and second HG-Stage modules are replaced with the first and second multi-scale adaptive residual modules, respectively. The improved first and second HG-Stage modules are named: First Multi-Scale Adaptive Stage Module and Second Multi-Scale Adaptive Stage Module, respectively. The workflow of the multi-scale adaptive stage module is as follows: Figure 3 As shown, and Indicates the optional downsampling trigger condition. When When the input of the multi-scale adaptive Stage module is received, a ConvBNAct module with a step size of 2 and L serial multi-scale adaptive residual modules (replacing the original HG-Block module) are input in sequence. In this embodiment, the value of L is 1. The ConvBNAct module is used to reduce the width and height of the input feature map.
[0027] when When this happens, the following operation is triggered: the input of the multi-scale adaptive Stage module is directly input to L serial multi-scale adaptive residual modules (replacing the original HG-Block module). Those skilled in the art can pre-set according to the actual situation. In this embodiment, the value of is preset in the first multi-scale adaptive Stage module. In the second multi-scale adaptive Stage module, ; The first and second multi-scale adaptive residual modules have the same structure, such as... Figure 3 As shown, the input of each multi-scale adaptive residual module passes through N serial... After convolution, the concatenation is concatenated with the input of the corresponding multi-scale adaptive residual module to obtain a concatenated feature map. The concatenated feature map is then processed by the adaptive feature aggregation module to obtain an aggregated feature map. In this embodiment, three are used. Serial convolution extracts spatial features while preserving information exchange between channels, and introduces batch normalization and ReLU nonlinear activation functions. Through a dense connection strategy, the original input and the output of each intermediate layer are concatenated to retain full-granularity information from shallow texture to deep semantics, which significantly enhances the reusability of features.
[0028] like Figure 3 As shown, the input of the adaptive feature aggregation module is processed by the first... Convolution processing yields the projected feature map. The projected feature maps are respectively processed by Depth convolution and After parallel processing of depthwise convolutions, the data then passes through the second module of element-wise addition and adaptive feature aggregation. Convolution and grouped convolution processes are used to obtain refined feature maps. ; The refined feature map and the projected feature map are fused using an adaptive residual gating method to obtain an aggregated feature map. , ,in, These are globally learnable scalar parameters, initially set to 0. The optimal value is calculated by the AdamW optimizer during training using the gradient descent algorithm. The SiLU activation function is used. For batch normalization; The first adaptive feature aggregation module After convolution, batch normalization and ReLU nonlinear activation function processing are performed sequentially.
[0029] The adaptive feature aggregation module refines the concatenated high-dimensional features through parallel dual convolutional branches: the first branch focuses on capturing high-frequency details, using 3×3 depthwise convolutions to lock local edges and fine textures; the second branch focuses on low-frequency structure modeling, using 5×5 depthwise convolutions to expand the receptive field to capture overall contours and contextual information. After the two features are fused and reconstructed, a learnable adaptive residual gating mechanism is introduced to dynamically adjust the injection intensity of the enhanced features. Finally, the gated reconstructed features are added to the original projected features to obtain local detail features that fuse multi-dimensional information.
[0030] The specific implementation process of each multi-scale adaptive residual module is as follows: Input feature map Three consecutive 3×3 standard convolution operations are applied to the input feature map to map the number of channels to the intermediate dimension. The module retains the original input feature map and the output feature map of each layer, forming a set of 4 (N+1) feature maps. Then, these feature maps are concatenated along the channel dimension to generate a single feature map. .
[0031] The mathematical expression for this process is:
[0032]
[0033]
[0034] Where N represents N consecutive 3×3 standard convolutions. The feature map is obtained after N convolutions. It is a 3×3 standard convolution. It is the ReLU activation function. For batch normalization; For splicing operations, The feature map is obtained after stitching together multi-scale adaptive residual modules; for The number of channels, For input features ( Number of channels, This represents the number of channels in the intermediate dimension.
[0035] Then, adaptive feature aggregation is performed. First, a linear projection is performed using a 1×1 standard convolution to reduce the number of channels from... Compressed back to the preset target dimension of each multi-scale adaptive residual module (In this embodiment, the first multi-scale adaptive residual module) The value is 64, the second multi-scale adaptive residual module. The value of is 256), which is used to obtain the projected feature map. Using a dual-branch parallel structure with 3×3 and 5×5 depthwise convolutions, the two output feature maps are added element-wise, and then reconstructed using a 1×1 convolution. This is further refined using a group convolution to obtain the refined feature map. Finally, the module introduces a globally learnable scalar parameter, initialized to zero. This parameter is optimized together with other network weights through an end-to-end backpropagation algorithm. Adaptive residual gating is used to fuse the reconstructed feature maps back into the main path feature map, resulting in an aggregated feature map. .
[0036] The calculation formula for this stage is as follows:
[0037]
[0038]
[0039]
[0040]
[0041] in, It is a 1×1 convolution, and BN is batch normalization. This is the feature map obtained from the previous step. For the projected feature map, The kernel size is Depth convolution, , The spatial feature map is extracted by a 3×3 depthwise convolution. This is the frequency feature map extracted by a 5×5 depthwise convolution. It is the sigmoid activation function. For grouped convolution operations, This is the refined feature map after fusion.
[0042] Improvement 2: Replace the neck part of the D-FINE model with a focused dynamic pyramid network; the focused dynamic pyramid network uses the feature maps output by the backbone to perform residual reconstruction, and achieves deep feature fusion and comprehensive diffusion of contextual information through two feature focusing and three residual reconstructions.
[0043] like Figure 2 As shown, the focused dynamic pyramid network receives the P3, P4, and P5 feature maps output from the backbone. The P3 and P4 feature maps are processed by the first and second convolutions, respectively, to obtain... Feature maps and Feature map; the P5 feature map is processed sequentially through a third convolution and a Transformer module to obtain... Feature map; To eliminate scale differences and information loss, Feature map Feature maps and feature Figure 1 The input is the first feature focusing module. Within this module, the three feature maps are first aligned in terms of spatial resolution. Then, features are extracted in parallel using depthwise convolutions with kernel sizes of 3, 5, 7, and 9. This extracts cross-scale spatial information across multiple receptive fields, generating a preliminary deep-fused feature map. Feature map. At this time, Feature maps preserve The feature map localization details are also incorporated The global semantics of the feature maps form a preliminary multi-scale feature representation.
[0044] The feature map input is processed by three parallel feature reconstruction branches. The first feature reconstruction branch will... Feature map upsampling to The scale of the feature map is adjusted to obtain a result that incorporates deep information. Feature map Feature maps and Feature map concatenation ensures training stability while further fusing shallow features. The concatenated features are then input into the first-level feature reconstruction module for further feature fusion and reconstruction, resulting in... Feature map; The second feature reconstruction branch will Feature map downsampling to The scale of the feature map yields a result that incorporates shallow features. Feature map Feature maps and Feature map concatenation ensures training stability while further fusing deep semantic information. The concatenated feature maps are then input into the second-level feature reconstruction module for further feature fusion and reconstruction, resulting in... Feature map; The third feature reconstruction branch will Feature map Feature maps and The feature map is input into the second feature focusing module, where multi-scale information is fused again to obtain... Feature map; Feature map downsampling to Feature map scale, and with Feature map concatenation yields a result that incorporates multi-scale information. Feature map; After the feature map undergoes further fusion and reconstruction processing by the third-level feature reconstruction module, it is combined with... Feature maps and feature Figure 1 Both serve as outputs of a focused dynamic pyramid network.
[0045] The first and second feature focusing modules have the same structure, such as... Figure 4 As shown, in order to uniformly adjust the three input feature maps to the same spatial size, the input of each feature focusing module is processed through the P3, P4, and P5 feature channels respectively, and then the channels are concatenated to obtain a feature map concatenated by the feature focusing module that contains multi-scale information. , Input parallel Depth convolution, Depth convolution, Depth convolution and Depthwise convolution, resulting in kernel sizes of... Depth convolutional feature map , , The kernel size is Depth convolution;
[0046] and After performing element-wise summation, the fused feature map is obtained. , , Then through the third feature focusing module convolution( Pointwise convolution (PCL) fuses cross-channel information to obtain the enhanced output feature map. , The output feature map enhanced by pointwise convolution and After performing element-wise summation, input the fourth value into the feature focusing module. Convolution maps the number of channels back to the target output channel number of each feature focusing module (in this embodiment, the target output channel number of each feature focusing module is preset to 128), resulting in the output feature map of each feature focusing module. .
[0047] The P3 layer feature channels, through the ADown downsampling module, reduce the size of the input feature map to the scale of the p4 feature map, while adjusting the number of channels. In this embodiment The value is 128, and the input to the feature channels of layer P3 includes: Feature maps and Feature map; The P4 layer feature channel passes through the first feature focusing module. Convolution processing adjusts the number of channels in the input feature map to [a certain value]. The input to the feature channels of layer P4 includes: Feature maps and Feature map; The P5 layer feature channel, through the second upsampling and feature focusing module Convolution processing compresses the number of channels in the input feature map to... The inputs to the feature channels of layer P5 include: Feature maps and Feature map.
[0048] The first, second, and third hierarchical feature reconstruction modules have the same structure, such as... Figure 5 As shown, the input of each hierarchical feature reconstruction module is processed by the first hierarchical feature reconstruction module. After convolution processing, the main path feature map is divided along the channel dimension. and bypass feature map ; , The input feature map for each level of feature reconstruction module, For channel splitting operation, The data passes through the first and second cascaded processing units sequentially. The outputs of the first and second processing units are then processed, and the original high-frequency information is retained. After concatenation, input the second feature reconstruction module of the hierarchical level. Convolution is used to obtain the output of each level of feature reconstruction module. ,
[0049] in, and These represent the first processing unit and the second processing unit, respectively.
[0050] The first and second processing units have the same structure. The input of each processing unit is processed sequentially through M cascaded dynamic reparameter modules (in this embodiment, M is 3), and then added to the input of each processing unit via residuals to obtain a summed feature map. The summed feature map is then input to the first processing unit. Convolution is used to obtain the output of each processing unit.
[0051] The M cascaded dynamic reparameter re-parameter modules all have identical structures. The input of each dynamic reparameter re-parameter module is processed through morphological branch, projection branch, and high-frequency branch, respectively, and then adaptively weighted and fused to obtain a fused feature map. ; The morphological branches include: the first one in the dynamic reparameter module. The first batch of normalization is performed on the convolution and dynamic reparameter reparameter modules. The projection branch includes: the first dynamic reparameter module. Second batch normalization of the convolution and dynamic reparameter re-parameter modules; High-frequency branches include: the first one in the dynamic reparameter module. Depthwise convolution, third batch normalization of the dynamic reparameter module, second batch normalization of the dynamic reparameter module Fourth batch normalization in the convolution and dynamic reparameter re-parameter module; The formula for calculation is:
[0052] in, , and These represent the outputs of the morphological branch, projection branch, and high-frequency branch, respectively. , , , , and These represent the weights of the morphological branch, the projection branch, and the high-frequency branch, respectively. , and Generate using learnable parameters θ. ,in, This represents the normalized exponential function. The learnable parameter θ has an initial value of [1.0, 1.0, 1.0], and its optimal value is calculated by the AdamW optimizer during training using the gradient descent algorithm. , and The sum of their values equals 1. This represents the input to each dynamic reparameter module. express The number of channels, This indicates the preset number of output channels for each dynamic reparameter module. In this embodiment... The value is 256; After being processed by the ECA module, the output of each dynamic reparameter module is obtained by multiplying it element by element with the input of each dynamic reparameter module. The ECA module includes: global average pooling and 3×3 one-dimensional convolution.
[0053] Fusion Feature Map Entering the ECA module, global average pooling is performed to compress the spatial dimension while preserving channel information. Then, a 3×3 one-dimensional convolution is used to capture the dependencies between adjacent channels. The output of the one-dimensional convolution is then mapped to the [0,1] interval through the Sigmoid activation function to obtain the final channel attention weight vector A. This vector is then broadcast back to the original spatial dimension and multiplied element-wise with the original features.
[0054]
[0055] in, For global average pooling, This is the output of the dynamic reparameter module. For input to the dynamic reparameter module, For one-dimensional convolution, For the values of the kernel in a one-dimensional convolution, The value of the number of padding elements for a one-dimensional convolution is given. It is the sigmoid activation function.
[0056] During inference, the entire dynamic reparameter module is transformed into a serial structure of a single-path 3×3 convolution + ECA + activation function. All convolutional branches are mathematically equivalently merged into a single 3×3 convolution kernel. and bias The ECA module does not participate in the reparameterized fusion of spatial convolutions; instead, it remains as an independent layer in the inference graph, continuing to perform channel-weighted operations. The inference phase calculations are as follows:
[0057]
[0058]
[0059] in, For branch equivalent kernel, For learnable scalars, For identity mapping kernel, For edge fill operation, For the equivalent kernel of all branches, This is the equivalent bias for the corresponding branch. For identity mapping bias. For the equivalent bias of all branches, The convolution is reparameterized, and GAP is the global average pooling operation. For one-dimensional convolution, The SiLU activation function is used. This is the final module output of the dynamic reparameter module during inference.
[0060] Improvement 3: Remove the detector head from the D-FINE model. S3. Train the DR-D-FINE model using the training sample set; The relevant operations in step S3 will be introduced with specific examples: During training, the DR-D-FINE model is connected to any suitable task head or a loss function is introduced to complete the backpropagation of the DR-D-FINE model. In this embodiment, the detection head of the D-FINE model is selected and connected to the DR-D-FINE model to form a model for training. In the model for training, the detection head of the D-FINE model is only used to realize the backpropagation of the DR-D-FINE model.
[0061] The training sample set is input into the model for iterative training. The AdamW optimizer is used to dynamically adjust the learning rate, aiming to minimize the weighted sum of feature reconstruction loss and spatial localization loss, thereby driving network weight updates. During the validation phase, in addition to the usual calculations of AP (AP50-95) and small / medium / large target detection accuracy (AP... S / AP M / AP L In addition to reducing computational complexity (GFLOPs / Params), a feature visualization mechanism is introduced: real-time extraction of feature response maps and attention weight distribution heatmaps to monitor whether the model effectively focuses on the key phenotypic regions of sub-entities, ensuring that the model simultaneously establishes a robust representation capability for high-frequency details and semantic context during the convergence process, laying the parameter foundation for subsequent visualization analysis.
[0062] S4. Input the crop phenotypic image to be processed into the trained DR-D-FINE model to reconstruct the image features.
[0063] The relevant operations in step S4 will be introduced with specific examples: This embodiment selects two sets of Ganoderma lucidum and two sets of Phellinus linteus datasets to be processed, and conducts comparative experiments using the D-FINE model and the RD-D-FINE model described in this embodiment (in the comparative experiment described in this embodiment, the D-FINE model did not use the detection head). The results of the comparative experiments are as follows: Figures 6 to 13 As shown.
[0064] according to Figure 6 , 7 From points 8 and 9, we can see that in the feature maps, the target contours in the images output by the D-FINE model generally appear blurred and diffused, with gentle edge gradients and unclear boundaries with the background. Especially in densely packed scenes, the response regions of adjacent targets show obvious fusion and adhesion, leading to distortion of individual topological structures. At the same time, the background of the D-FINE model contains a large number of irregular low-frequency texture noise and stray responses, significantly reducing the signal-to-noise ratio of the feature maps. In contrast, the feature maps generated by the RD-D-FINE model exhibit higher structural fidelity in all samples: the target edges are sharp and clear, forming high-contrast closed curves, and the internal responses are uniform, continuous, and unbroken. In densely distributed scenes, the RD-D-FINE model successfully decouples adjacent targets into independent, isolated high-response connected regions, eliminating feature aliasing. In addition, its background region is effectively suppressed to a uniform low-response state, almost filtering out environmental interference textures, resulting in a significant improvement in the data purity and spatial resolution of the feature maps.
[0065] Based on points 10, 11, 12, and 13, it can be seen that in the heatmap, the high-confidence response region of the D-FINE model exhibits a broad-spectrum diffusion pattern, often covering an area beyond the actual physical boundary of the target, extending into background wrinkles, reflective areas, and even blank spaces without objects. Furthermore, it is prone to generating false activation peaks under complex lighting and other conditions, resulting in dispersed energy distribution and significant positioning deviations. In contrast, the RD-D-FINE model demonstrates better targeting and focusing capabilities and environmental robustness: high-temperature areas strictly converge to the core of the target entity, the color gradient transition is steep, and energy is highly concentrated without any out-of-bounds diffusion. Even when faced with strong interference factors such as date watermarks, ground shadows, and material reflections, the RD-D-FINE model's heatmap does not show abnormal activation, and the background consistently maintains a low-response, cool-toned state. Especially in dense arrays of multiple targets, the thermal centers of each independent target do not overlap and have clear boundaries, accurately restoring the spatial distribution relationship of objects in the original image. This demonstrates the significant advantages of the RD-D-FINE model in improving image data positioning accuracy, suppressing environmental noise interference, and maintaining spatial topological consistency.
[0066] Example 2 This embodiment is a further limitation of embodiment 1. In this embodiment, the RD-D-FINE model retains the detection head of the D-FINE model, and other improvements are consistent with embodiment 1.
[0067] The RD-D-FINE model in this embodiment can not only generate reconstructed feature tensors with high-fidelity edge structures and clear texture levels, but also output the confidence scores of each crop phenotypic image data on the reconstructed feature map. In this embodiment, a set of Ganoderma lucidum phenotypic data images and a set of Ganoderma lucidum phenotypic data images were selected, and comparative experiments were conducted using the D-FINE model and the RD-D-FINE model described in this embodiment, respectively. The results of the comparative experiments are as follows: Figures 14 to 17 As shown.
[0068] according to Figure 14 , 15 As can be seen from 16 and 17, the confidence level of the crop phenotypic image data output by the RD-D-FINE model in this embodiment is significantly higher than that of the D-FINE model. In the Ganoderma lucidum sample, although the D-FINE model can locate the Ganoderma lucidum fruiting body, its output recognition confidence level is relatively low. This indicates that the model hesitates when extracting the key texture and morphological features of Ganoderma lucidum, the feature expression is insufficient, and the judgment of the target is in a state of "fuzzy certainty", which is easily interfered with by background noise; while the RD-D-FINE model shows a very high judgment confidence on the same sample. The significant increase in confidence is not just a change in numerical value, but also means that the model has successfully captured the deeper semantic features of Ganoderma lucidum. In the Sanghuang sample, the D-FINE model has omissions, indicating that the model lacks sufficient sensitivity to some Sanghuang individuals with indistinct features; on the other hand, background misjudgment occurred, and non-target objects were incorrectly locked. This reflects the shortcomings of the D-FINE model in feature decoupling, making it difficult to clearly define the boundary between the target and the background in complex growth environments. In contrast, the RD-D-FINE model enhances the fusion of multi-scale features and contextual information, making it highly sensitive to targets with subtle features. The features of *Sanghuang* are clearly separated from those of the background and other interfering objects. It no longer relies solely on surface similarity but can identify the unique, deeper combined features of *Sanghuang*, effectively filtering out other artifacts. In summary, the RD-D-FINE model has significant advantages in improving image data localization accuracy, suppressing environmental noise interference, and maintaining spatial topological consistency.
Claims
1. An image data processing method based on multi-scale feature reconstruction, characterized in that, The method includes the following steps: S1. Obtain the crop phenotypic image dataset and preprocess it to obtain the training sample set; S2. Construct and improve the D-FINE model to obtain the DR-D-FINE model: S21. In the backbone of the D-FINE model, replace the HG-Block modules in the first HG-Stage module and the second HG-Stage module with the first multi-scale adaptive residual module and the second multi-scale adaptive residual module, respectively. S22. Replace the neck portion of the D-FINE model with a focused dynamic pyramid network; S23. Delete the detector head of the D-FINE model; S3. Train the DR-D-FINE model using the training sample set; S4. Input the crop phenotypic image to be processed into the trained DR-D-FINE model to reconstruct the image features.
2. The image data processing method based on multi-scale feature reconstruction according to claim 1, characterized in that, The preprocessing steps are as follows: data cleaning, data labeling, data augmentation, and resolution unification.
3. The image data processing method based on multi-scale feature reconstruction according to claim 2, characterized in that, The first and second multi-scale adaptive residual modules have the same structure. The input of each multi-scale adaptive residual module is sequentially processed through N serial... After convolution, the concatenation is concatenated with the input of the corresponding multi-scale adaptive residual module to obtain a concatenated feature map. The concatenated feature map is then processed by the adaptive feature aggregation module to obtain an aggregated feature map. The N serial In convolution, each After convolution, batch normalization and ReLU nonlinear activation function processing are performed sequentially.
4. The image data processing method based on multi-scale feature reconstruction according to claim 3, characterized in that, The input of the adaptive feature aggregation module is processed by the first... Convolution processing yields the projected feature map. The projected feature maps are respectively processed by Depth convolution and After parallel processing of depthwise convolutions, the data then passes through the second module of element-wise addition and adaptive feature aggregation. Convolution and grouped convolution processes are used to obtain refined feature maps. ; The refined feature map and the projected feature map are fused using an adaptive residual gating method to obtain an aggregated feature map. , ,in, These are globally learnable scalar parameters. The SiLU activation function is used. For batch normalization; The first adaptive feature aggregation module After convolution, batch normalization and ReLU nonlinear activation function processing are performed sequentially.
5. The image data processing method based on multi-scale feature reconstruction according to claim 4, characterized in that, The dynamic pyramid network focuses on receiving the P3, P4, and P5 feature maps output from the backbone. The P3 and P4 feature maps are processed by the first and second convolutions, respectively, to obtain... Feature maps and Feature map; the P5 feature map is processed sequentially through a third convolution and a Transformer module to obtain... Feature map; Feature map Feature maps and The feature maps are input together into the first feature focusing module to obtain... Feature map; The feature map input is processed by three parallel feature reconstruction branches. The first feature reconstruction branch will... Feature map upsampling to The scale of the feature map is obtained. Feature map Feature maps and After the feature maps are concatenated, they are input into the first-level feature reconstruction module to obtain... Feature map; The second feature reconstruction branch will Feature map downsampling to The scale of the feature map is obtained. Feature map Feature maps and After the feature maps are concatenated, they are input into the second-level feature reconstruction module to obtain... Feature map; The third feature reconstruction branch will Feature map Feature maps and The feature map is input into the second feature focusing module to obtain... Feature map; Feature map downsampling to Feature map scale, and with Feature maps are stitched together Feature map; After the feature map is processed by the third-level feature reconstruction module, it is combined with... Feature maps and The feature maps are used together as the output of the focused dynamic pyramid network.
6. The image data processing method based on multi-scale feature reconstruction according to claim 5, characterized in that, The first and second feature focusing modules have the same structure. The input of each feature focusing module is processed through the P3, P4, and P5 feature channels, respectively, and then the channels are stitched together to obtain the stitched feature map. , Input parallel Depth convolution, Depth convolution, Depth convolution and Depthwise convolution, respectively, yields convolution kernels of size... Depth convolutional feature maps , ; and After performing element-wise summation, the third feature focusing module is then used. Convolutional fusion of cross-channel information yields an output feature map enhanced by pointwise convolution. The output feature map enhanced by pointwise convolution and After performing element-wise summation, input the fourth value into the feature focusing module. Convolution is performed to obtain the output of each feature focusing module.
7. The image data processing method based on multi-scale feature reconstruction according to claim 6, characterized in that, The P3 layer feature channel includes the ADown downsampling module. The input to the P3 layer feature channel includes: Feature maps and Feature map; The P4 layer feature channels include: the first feature focusing module. The input to the feature channels of the convolutional P4 layer includes: Feature maps and Feature map; The P5 layer feature channels include: upsampling processing and the second feature focusing module. The input to the feature channels of the P5 layer of the convolution includes: Feature maps and Feature map.
8. The image data processing method based on multi-scale feature reconstruction according to claim 7, characterized in that, The first, second, and third hierarchical feature reconstruction modules have the same structure. The input of each hierarchical feature reconstruction module is processed by the first hierarchical feature reconstruction module. After convolution processing, the main path feature map is divided along the channel dimension. and bypass feature map ; The data passes through the first processing unit and the second processing unit in sequence. The outputs of the first processing unit and the second processing unit are then processed. After concatenation, input the second feature reconstruction module of the hierarchical level. Convolution is performed to obtain the output of each level of feature reconstruction module.
9. The image data processing method based on multi-scale feature reconstruction according to claim 8, characterized in that, The first and second processing units have the same structure. The input of each processing unit is processed sequentially through M cascaded dynamic reparameter modules, and then added to the input of each processing unit via residuals to obtain a summed feature map. The summed feature map is then input to the first processing unit. Convolution is used to obtain the output of each processing unit.
10. The image data processing method based on multi-scale feature reconstruction according to claim 9, characterized in that, The M cascaded dynamic reparameter re-parameter modules all have identical structures. The input of each dynamic reparameter re-parameter module is processed through morphological branch, projection branch, and high-frequency branch, respectively, and then adaptively weighted and fused to obtain a fused feature map. ; After being processed by the ECA module, the output of each dynamic reparameter module is obtained by multiplying it element by element with the input of each dynamic reparameter module. The morphological branches include: the first one in the dynamic reparameter module. convolution; The projection branch includes: the first dynamic reparameter module. convolution; High-frequency branches include: the first one in the dynamic reparameter module. The second module of depthwise convolution and dynamic reparameterization convolution; The formula for calculation is: in, , and These represent the outputs of the morphological branch, projection branch, and high-frequency branch, respectively. , and These represent the weights of the morphological branch, the projection branch, and the high-frequency branch, respectively. This represents the input to each dynamic reparameterization module. express The number of channels, This indicates the preset number of output channels for each dynamic reparameter module; The ECA module includes: global average pooling and 3×3 one-dimensional convolution.