Lentinus edodes growth timing image prediction method and system, model construction method and system
By using the improved VMRNN-DMSA model, which employs the U-Net structure, MFM module, SAM module, and AKConv module, combined with a weighted loss function, the problems of insufficient sensitivity to detail features and gradient vanishing in the prediction of shiitake mushroom growth time series images are solved, thereby improving prediction accuracy and image quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JILIN AGRICULTURAL UNIV
- Filing Date
- 2026-02-09
- Publication Date
- 2026-04-24
AI Technical Summary
Existing shiitake mushroom growth time-series image prediction models suffer from insufficient sensitivity to detailed features, severe gradient vanishing problem, and weak long-term reliance on modeling capabilities.
A VMRNN-DMSA model is constructed by introducing a U-Net backbone network, the skip connection mechanism of the MFM module, the SAM module and the AKConv module, and combining the weighted loss functions of MSE, MS-SSIM and Perceptual Loss to optimize feature extraction and prediction accuracy.
It improved the model's prediction accuracy and image quality, alleviated the gradient vanishing problem, enhanced the ability to model long-term dependencies, and achieved higher-quality shiitake mushroom growth time-series image prediction.
Smart Images

Figure CN121685849B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of time-series image prediction technology, specifically to a method and system for predicting time-series images of shiitake mushroom growth, and a method and system for model construction. Background Technology
[0002] mushroom( Lentinula edodes With production increasing year by year, its crucial role is becoming increasingly prominent. By accurately predicting the growth process of shiitake mushrooms and formulating scientific production plans, quality and yield can be effectively improved, product competitiveness enhanced, and the shiitake mushroom industry can be transformed from experience-driven to intelligent decision-making, providing technical support for the digital transformation and efficient production of the edible fungi industry.
[0003] Time series forecasting algorithms are widely used in crop growth and climate change monitoring, remote sensing growth monitoring, and yield prediction, with some research focusing on long-term spatiotemporal modeling. For the task of predicting shiitake mushroom growth, it is necessary to construct image time series based on its video frames and perform long-term spatiotemporal prediction, i.e., inferring future sequences from historical two-dimensional time series. This type of data exhibits complex dynamics such as shape changes and density fluctuations, and its inherent spatiotemporal correlation mechanisms display high complexity and heterogeneity. Currently, Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs) are the most commonly used methods in image representation learning, providing important technical pathways in the spatial dimension. Recurrent Neural Networks (RNNs) methods focus on modeling the temporal dependencies in sequence data, providing an important technical pathway for long-term prediction in the temporal dimension.
[0004] Existing VMRNN The Vision Mamba RNN-Depth (VMRNN-D) model enhances the model's ability to express complex spatiotemporal dynamics by introducing more VMRNN units and combining PatchMerging and PatchExpanding layers, becoming a new visual backbone model. Although the VMRNN-D model performs well in terms of prediction accuracy and lightweighting, it still has problems such as insufficient sensitivity to detailed features, serious gradient vanishing problem, and long-term reliance on weak modeling ability.
[0005] Therefore, developing a method for predicting the growth time series images of shiitake mushrooms that aims to effectively improve prediction accuracy and enhance the performance of models in long-term prediction scenarios is a technical challenge that urgently needs to be addressed in the field of time series image prediction technology. Summary of the Invention
[0006] This invention solves the technical problems of insufficient sensitivity to detailed features, serious gradient vanishing problem, and long-term reliance on weak modeling ability in existing technologies.
[0007] The method for constructing a shiitake mushroom growth time-series image prediction model according to the present invention includes the following steps:
[0008] Step 1: Construct a time-series image dataset of shiitake mushroom fruiting bodies and preprocess it;
[0009] Step 2, construct the VMRNN-DMSA model, which is an improved model based on the VMRNN-D architecture. The improvements include:
[0010] The PatchMerging in the VMRNN-D architecture is replaced with a U-Net backbone network, and a skip connection mechanism integrating an MFM module is introduced into the backbone network.
[0011] Add a SAM module to perform spatial weight calibration on the feature maps output by the backbone network;
[0012] Add the AKConv refining module to refine the features of the output image of the PatchExpanding module in the VMRNN-D architecture;
[0013] Step 3: Based on the preprocessed dataset in Step 1, design a weighted loss function combining MSE, MS-SSIM, and PerceptualLoss to train the VMRNN-DMSA model. After training, the final shiitake mushroom growth time-series image prediction model is obtained.
[0014] Furthermore, in one embodiment of the present invention, the construction of the time-series image dataset of shiitake fruiting bodies in step 1 specifically involves:
[0015] The growth process of shiitake mushroom fruiting bodies was monitored and recorded to obtain continuous growth videos. Image frames were extracted from the continuous growth videos at fixed time intervals and arranged in chronological order of shooting time to form a time series image dataset of shiitake mushroom fruiting body growth.
[0016] Furthermore, in one embodiment of the present invention, the backbone network in step 2 includes a downsampled encoder path and an upsampled decoder path. The shallow features extracted by the downsampled encoder path are connected to the upsampled decoder path in a skip connection. The MFM module is used to deconstruct and reconstruct the shallow features extracted by the downsampled encoder path and the high-level spatiotemporal semantic features generated by the upsampled decoder path.
[0017] Furthermore, in one embodiment of the present invention, the MFM module in step 2 specifically comprises:
[0018] ;
[0019] in, To element-wise in features and At each position, a larger value is selected to generate a feature map. For the spatial detail features of the encoder, For the spatiotemporal semantic features of the decoder, , They are respectively and The learnable weight coefficients.
[0020] Furthermore, in one embodiment of the present invention, step 2 includes adding a SAM module to perform spatial weight calibration on the feature map output by the backbone network, specifically as follows:
[0021] For the input feature map respectively Perform max pooling and average pooling to obtain the corresponding max-pooled feature maps. and the feature map after average pooling ,Will and The spliced feature map is obtained by splicing. ,right Perform convolution operations to generate a spatial attention map. ,by As weights, for the feature map Perform element-wise multiplication to obtain the weighted output feature map. .
[0022] Furthermore, in one embodiment of the present invention, the AKConv refining module in step 2 includes a plurality of AKConv modules, wherein the AKConv module is specifically:
[0023] The input image is processed Extract the global vector of the channel after the operation. Extracted from fully connected layer 1 The nonlinear characteristics are obtained to obtain the hidden vector. Based on the hidden vector, a fully connected layer 2 is used to generate the channel weight vector. The channel weight vector is multiplied element-wise with the input image through a dynamic convolution kernel to obtain the recalibrated feature map. The recalibrated feature map is added element-wise with the input image to obtain the output of the AKConv module.
[0024] Furthermore, in one embodiment of the present invention, the batch size for training the VMRNN-DMSA model in step 3 is 8, the image size is 64×64, and the learning rate is 0.00005.
[0025] The shiitake mushroom growth time-series image prediction method of the present invention is implemented based on any of the above-described model construction methods. The final shiitake mushroom growth time-series image prediction model is used to predict the growth time-series image of shiitake mushroom fruiting bodies to obtain the prediction result.
[0026] The shiitake mushroom growth time-series image prediction model construction system of the present invention is constructed based on the above method and includes the following modules:
[0027] The dataset processing module constructs a time-series image dataset of shiitake mushroom fruiting bodies and preprocesses it.
[0028] The module constructs a VMRNN-DMSA model, which is an improved model based on the VMRNN-D architecture. The improvements include:
[0029] The PatchMerging in the VMRNN-D architecture is replaced with a U-Net backbone network, and a skip connection mechanism integrating an MFM module is introduced into the backbone network.
[0030] Add a SAM module to perform spatial weight calibration on the feature maps output by the backbone network;
[0031] Add the AKConv refining module to refine the features of the output image of the PatchExpanding module in the VMRNN-D architecture;
[0032] The training module, based on the preprocessed dataset in the dataset processing module, designs a weighted loss function combining MSE, MS-SSIM, and Perceptual Loss to train the VMRNN-DMSA model. After training, the final shiitake mushroom growth time-series image prediction model is obtained.
[0033] The shiitake mushroom growth time-series image prediction system of the present invention is constructed based on the above method and includes the following modules:
[0034] The prediction module uses the final shiitake mushroom growth time-series image prediction model to predict the growth time-series images of shiitake mushroom fruiting bodies and obtain the prediction results.
[0035] This invention solves the technical problems of existing technologies, such as insufficient sensitivity to detailed features, severe gradient vanishing problem, and weak long-term reliance on modeling capabilities. Specific beneficial effects include:
[0036] 1. This invention proposes a method for constructing a prediction model for time-series images of shiitake mushroom growth. It employs a skip connection mechanism integrating an MFM (Feature Maximization) module to progressively filter and fuse upsampled and downsampled features, enhancing the model's multi-scale feature representation capability in long-term spatiotemporal video sequences, mitigating the gradient vanishing problem, and improving prediction accuracy. A Spatial Attention Mechanism (SAM) module is introduced to enhance the model's perception of key regions in feature maps, strengthen spatial contextual information modeling, and improve feature extraction capabilities. An Adaptive Kernel Convolution (AKConv) module is introduced to extract fine-grained information features through irregular convolution kernel functions, optimizing the visual perception quality of the generated frames. Finally, a weighted loss function composed of mean squared error (MSE Loss), multi-scale structural similarity (MS-SSIM), and perceptual loss is fused to balance pixel-level accuracy, structural fidelity, and visual perception quality of the predicted image.
[0037] 2. This invention proposes a method for constructing a prediction model for shiitake mushroom growth time-series images. Since the distribution density of SAM restricts features and the target of AKConv relies on dense information to capture irregular deformations, gradient flow conflicts occur when the two are used together. In order to solve the above technical problems, this method designs a weighted loss function that combines MSE, MS-SSIM and Perceptual Loss, which unifies and guides the gradient update direction of SAM and AKConv. This ensures that the attention focus of SAM and the local deformation of AKConv both serve to generate images that are close to the true values in multiple evaluation dimensions, thus avoiding gradient flow conflicts.
[0038] 3. This invention proposes a method for constructing a shiitake mushroom growth time-series image prediction model. When only MFM-Skip and AKConv modules are used, although the prediction accuracy is relatively high, the image quality cannot meet the requirements for shiitake mushroom growth time-series image prediction. To solve the above technical problems, this method adds a SAM module and a weighted loss function. The SAM module guides the model to focus on key growth areas through a spatial attention mechanism, enhancing the clarity of details. The weighted loss function sets global optimization objectives from three levels: pixel, structure, and semantics, unifying and coordinating the update direction of all modules. The two work together to comprehensively improve the optimization focus of the model from a single pixel accuracy to the generation of high-quality images that cover structural fidelity and visual naturalness, thereby meeting the practical requirements of shiitake mushroom growth prediction. Attached Figure Description
[0039] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0040] Figure 1 This is a diagram of the deep model VMRNN-D architecture containing multiple VMRNN units as described in Implementation Method 1.
[0041] Figure 2 This is a schematic diagram of the overall architecture of the VMRNN-DMSA model described in Implementation Method 1;
[0042] Figure 3 This is a schematic diagram of the internal structure of the MFM module described in Embodiment 3;
[0043] Figure 4 This is a schematic diagram of the skip connection structure of the integrated MFM module described in Embodiment 3;
[0044] Figure 5 This is a structural flowchart of the Spatial Attention Module (SAM) described in Implementation Method 3;
[0045] Figure 6 This is a schematic diagram of the AKConv module structure described in Implementation Method 5;
[0046] Figure 7 This refers to the implementation method seven, where each video sequence contains 20 frames of images. The first 10 frames are used as model input to predict the growth process of the next 10 frames. The curves showing the changes in the evaluation metrics of the original model and the improved model over a time step t are shown. The prediction time step is from t to t+9. Figure 7 (a) is the MSE change curve; Figure 7 (b) is the SSIM variation curve; Figure 7 (c) is the PSNR variation curve;
[0047] Figure 8 The visualization results of the predictions from the original model and the improved model described in Implementation Method Seven;
[0048] Figure 9 These are the visualization results of predictions from different spatiotemporal models as described in Implementation Method Seven;
[0049] Figure 10 These are the evaluation index curves of the original model and the improved model described in Implementation Method Seven, which change with time step t. The predicted time step is from t to t+4. Figure 10 (a) is the MSE variation curve; Figure 10 (b) is the SSIM variation curve; Figure 10 (c) is the PSNR variation curve;
[0050] Figure 11This refers to the implementation method seven, where 71 video sequences are randomly selected from a time-series image dataset of shiitake mushroom fruiting body growth. Forty consecutive frames are extracted from each sequence, and the first ten frames are used as model input to predict the growth process of the next ten frames. The curves showing the evaluation metrics of the original and improved models change with time step t, where the predicted time step is from t to t+9. Figure 11 (a) is the MSE variation curve; Figure 11 (b) is the SSIM variation curve; Figure 11 (c) is the PSNR variation curve;
[0051] Figure 12 These are the evaluation index curves of the original model and the improved model described in Implementation Method Seven, which change with time step t. The predicted time step is from t to t+19. Figure 12 (a) is the MSE variation curve; Figure 12 (b) is the SSIM variation curve; Figure 12 (c) is the PSNR variation curve;
[0052] Figure 13 The visualization results of the VMRNN-D and VMRNN-DMSA model predictions over different time spans, as described in Implementation Method 7. Detailed Implementation
[0053] Various embodiments of the present invention will now be clearly and completely described with reference to the accompanying drawings. The embodiments described with reference to the drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0054] Implementation Method 1: The task of predicting the growth of shiitake mushrooms presents challenges to the construction of accurate spatiotemporal prediction models due to the high uncertainty of the growth process and factors such as occlusion and illumination changes commonly found in video data. Long-term spatiotemporal prediction requires models to possess both spatial feature extraction and long-term memory capabilities. The core idea lies in effectively fusing spatial features and long-term temporal information using deep learning models to achieve accurate and efficient prediction of the target's growth state. In traditional time-series image prediction tasks, the model's prediction accuracy and the quality of the generated images decrease with increasing time steps. Currently, CNN+RNN localization operations have achieved certain results in feature extraction, but they limit the ability to capture spatiotemporal dependencies. Furthermore, the Transformer-based architecture significantly increases the overall computational burden due to the secondary computational complexity of the attention mechanism on the image size.
[0055] To address the aforementioned technical problems, this embodiment proposes a method for constructing a shiitake mushroom growth time-series image prediction model, specifically including the following steps:
[0056] Step 1: Construct a time-series image dataset of shiitake mushroom fruiting bodies and preprocess it;
[0057] After constructing the time-series image dataset of shiitake mushroom fruiting body growth, this implementation method performed data augmentation on the training set to reduce the impact of environmental factors such as insufficient lighting on image quality, while improving the generalization ability and robustness of the model. The augmentation methods used included image blurring, brightness and contrast adjustment, color perturbation, and noise injection. The augmented dataset contains 13,400 images, divided into training, validation, and test sets in an 8:1:1 ratio. Before inputting the data into the model, all images underwent pixel normalization, converting pixel values to the [0,1] interval to improve the numerical stability of the training process and accelerate model convergence.
[0058] Step 2: Construct the VMRNN-DMSA model. The model selected is VMRNN-D, which performs well in global feature extraction and lightweight design, as the original model.
[0059] like Figure 1 As shown, the input image is first segmented into a series of non-overlapping image patches and flattened. Then, preliminary feature mapping is performed through a patch embedding layer, followed by downsampling through a PatchMerging layer. This effectively reduces the spatial dimensionality of the data, lowers computational complexity, and captures more abstract global features. Finally, in the reconstruction stage, upsampling is performed through PatchExpanding to increase spatial dimensionality and promote detail recovery. In the reconstruction stage, features are precisely located, and the reconstruction layer restores the hidden states of the VMRNN layers to the input size, generating the prediction frame for the next time step. The VMRNN-D unit inherits the characteristics of recursive methods and leverages Mamba's powerful sequence modeling capabilities to improve the model's performance in spatiotemporal prediction tasks, achieving accurate processing of video frame data at the image level.
[0060] The VMRNN Cell, as the core module of VMRNN-D, generates the spatiotemporal representation of the next time step by fusing flattened image features with the state information of the previous time step. The VSB is the VSS block, which efficiently extracts image features through the State Space Model (SSM). The core of the VSS is the 2D Selective Scan mechanism SS2D (2D Selective Scan), which includes Scan Expand, S6 Block, and Scan Merge. Through a four-directional scanning strategy, it can form a globally effective receptive field during inference while maintaining linear computational complexity, achieving a balance between global context modeling and local detail preservation.
[0061] VMRNN Cell integrates the VSS block from the Vision Mamba module with LSTM. The VSS block focuses on enhancing the modeling of global spatial dependencies in images, while LSTM is responsible for capturing dynamic changes in the temporal dimension. This effectively solves the problem of capturing spatiotemporal dynamics in video-level future frame prediction tasks, achieving accurate spatiotemporal modeling while keeping the number of model parameters small.
[0062] To further improve prediction accuracy and image quality, this implementation improves the baseline network, completing the construction of the VMRNN-DMSA model (VMRNN-Depth MFM SAM AKConv), as follows: Figure 2 As shown, the backbone network adopts the U-Net structure. The encoder is responsible for extracting the spatiotemporal features of the input frame, and the decoder restores the spatial resolution through upsampling. Skip connections fuse the multi-scale feature maps of corresponding layers between the encoder and decoder, thereby achieving the fusion of high-level semantic information while preserving the low-level spatial details.
[0063] This implementation makes the following four key improvements to the base network:
[0064] 1. In the feature fusion stage, a skip connection integrating the MFM module is introduced to extract cross-scale spatiotemporal features and select the feature with the largest response to enhance key information and improve the model prediction accuracy.
[0065] 2. Add the SAM module to assign weights to key spatial locations, further enhance the feature representation of important regions, and improve the model's feature extraction capabilities.
[0066] 3. Added AKConv refinement module to perform feature refinement operation, effectively improving the clarity and contrast of the target area and optimizing the visual perception quality of the model-generated frames.
[0067] 4. Design a weighted loss function that combines MSE, MS-SSIM and Perceptual Loss to balance pixel-level accuracy, structural fidelity and visual perception quality of the predicted image.
[0068] Step 3: Based on the preprocessed dataset in Step 1, design a weighted loss function combining MSE, MS-SSIM, and PerceptualLoss to train the VMRNN-DMSA model. After training, the final shiitake mushroom growth time-series image prediction model is obtained.
[0069] To balance pixel-level accuracy, structural fidelity, and visual perception quality in the predicted image, this implementation proposes a weighted loss function consisting of mean squared error (MSE Loss), multi-scale structural similarity (MS-SSIM), and perceptual loss. The relevant calculations are shown in the following formula:
[0070] ;
[0071] in, This represents the total number of sampling points. For batch size, For sequence length, For the number of channels, Image height, This represents the image width.
[0072] ;
[0073] in, The mean squared error loss function ensures that the output is close to the target at the pixel level, which is used to reduce the overall pixel difference between the predicted frame and the real frame. and The first The sequence of real images and the first The predicted sequences generated by the model.
[0074] ;
[0075] in, This is a multi-scale structural similarity loss function. By constraining the multi-scale structural similarity, it enhances the fidelity of local image structure and reduces block artifacts.
[0076] ;
[0077] in, Using a perceptual loss function, feature space constraints are applied to improve the semantic plausibility and visual naturalness of the generated content, particularly in terms of texture and edge details. For the first in the network Feature maps after activation of each feature extraction layer and The real image and the predicted image are respectively the first two images in the network. Feature maps generated by the layers, The first The number of channels, height, and width of the layer feature map are normalized to account for the feature differences between different layers.
[0078] ;
[0079] in, For weighted loss function, , , Different hyperparameters are used to adjust the contribution of each component, and each loss function optimizes the predicted image quality through different mechanisms.
[0080] Implementation Method Two: This implementation method further defines the method for constructing a time-series image prediction model for shiitake mushroom growth described in Implementation Method One. The difference between this implementation method and Implementation Method One is that, in step 1, the construction of the time-series image dataset for shiitake mushroom fruiting body growth is specifically as follows:
[0081] The growth process of shiitake mushroom fruiting bodies was monitored and recorded to obtain continuous growth videos. Image frames were extracted from the continuous growth videos at fixed time intervals and arranged in chronological order of shooting time to form a time series image dataset of shiitake mushroom fruiting body growth.
[0082] This implementation method establishes an intelligent control platform for shiitake mushroom growth. A 12-megapixel ultra-high-definition camera is installed 70cm above the mushroom logs to continuously monitor and record the growth process of shiitake mushroom fruiting bodies, obtaining continuous growth videos. Each video records the complete growth cycle of the shiitake mushroom fruiting body. To reduce the interference of water mist in the shiitake mushroom growth environment on image quality, one clear frame is extracted from the video every hour, arranged in chronological order to construct a time-series image dataset of shiitake mushroom fruiting body growth. The dataset records a total of 420 video sequences, from which 20 consecutive images are extracted, forming a dataset containing 8,400 original images. LabelMe (an annotation tool) is used to segment and label different shiitake mushroom fruiting bodies, retaining the fruiting body regions and removing irrelevant information such as background.
[0083] Implementation Method 3: This implementation method further defines the method for constructing a shiitake mushroom growth time-series image prediction model as described in Implementation Method 1. The difference between this implementation method and Implementation Method 1 is that the backbone network in step 2 includes a downsampled encoder path and an upsampled decoder path. The shallow features extracted by the downsampled encoder path are connected to the upsampled decoder path in a skip connection. The MFM module is used to deconstruct and reconstruct the shallow features extracted by the downsampled encoder path and the high-level spatiotemporal semantic features generated by the upsampled decoder path.
[0084] To enhance the VMRNN-D model's ability to represent multi-scale features in long-term spatiotemporal video sequences, improve its ability to represent dynamic changes, and enhance its long-term prediction performance, this implementation introduces an MFM module. For example... Figure 3 As shown, the MFM module fuses spatial detail features after skipping along the downsampled encoder path. Spatiotemporal semantic features Feature optimization is performed by setting... and Weights allow the model to adaptively learn which branch contributes more to the current prediction task. > This indicates that the model believes current detailed information reflects the true feature response better than semantic information. At each spatial location, it selects the most significant feature value from the two inputs, extracts complementary signals in the spatiotemporal dimensions, and filters redundant information during the fusion process, ensuring that the output features enhance local details while maintaining consistency with global semantics. By introducing the MFM module, the model enhances its ability to represent multi-scale features in mushroom images, while optimizing detail restoration and structural consistency.
[0085] The calculation process of the MFM module is as follows:
[0086] ;
[0087] in, To element-wise in features and At each position, a larger value is selected to generate a new feature map. For the spatial detail features of the encoder, For the spatiotemporal semantic features of the decoder, , These are the learnable weight coefficients.
[0088] To alleviate the vanishing gradient problem and improve model prediction accuracy, this implementation method employs skip connections. For example... Figure 4 As shown, skip connections are used as the link for transmitting spatiotemporal information, and shallow features (x) containing rich multi-scale spatial details extracted by the encoder during downsampling are used to transmit the information. down The compensation is applied to the downsampling encoder path to solve the problem of high-frequency information loss caused by resolution degradation in deep networks.
[0089] After introducing an MFM module between the encoder and decoder, the model is able to handle the detailed features passed through skip connections and the high-level spatiotemporal semantic features (x) generated by the decoder upsampling. up Effective deconstruction and reconstruction are performed. The "maximum feature response" strategy of MFM is used to perform spatiotemporal consistency constraints and feature calibration on a pixel-by-pixel basis. Through dynamic saliency feature screening, the most discriminative features are forced to be retained at each spatial coordinate, correcting the representation bias caused by skip connections in long-term prediction, and achieving accurate restoration of the fine spatial representation of shiitake mushroom.
[0090] The integrated MFM-Skip Connection in the VMRNN-D model achieves multi-scale feature fusion, efficient information preservation, and improved model robustness, significantly enhancing the model's prediction accuracy and running efficiency.
[0091] Implementation Method Four: This implementation method further defines the method for constructing a shiitake mushroom growth time-series image prediction model described in Implementation Method One. The difference between this implementation method and Implementation Method One is that in step 2, a SAM module is added to perform spatial weight calibration on the feature map output by the backbone network. Specifically:
[0092] For the input feature map respectively Perform max pooling and average pooling to obtain the corresponding max-pooled feature maps. and the feature map after average pooling ,Will and The spliced feature map is obtained by splicing. ,right Perform convolution operations to generate a spatial attention map. ,by As weights, for the feature map Perform element-wise multiplication to obtain the weighted output feature map. .
[0093] To enhance the model's ability to perceive key regions of the feature map, strengthen spatial context information modeling, and improve the model's feature extraction capabilities, this implementation introduces a Spatial Attention Mechanism (SAM) module. This mechanism learns to assign dynamic weights to different spatial locations in the input feature map, guiding the model to focus on regions with high information content and suppressing irrelevant or noisy regions. For example... Figure 5 As shown, the SAM module generates a spatial attention matrix to dynamically modulate feature responses by applying spatial weight calibration to skip connection features. This process not only enhances the semantic representation of key regions but also suppresses noise and redundant responses in low-information regions, establishing an effective spatial guidance mechanism in cross-layer feature fusion to ensure the complete transmission and fusion of image details.
[0094] The SAM module processes the input feature map Perform max pooling and average pooling along the channel dimension to obtain and Then, concatenate the two along the channel dimension to obtain... And through convolution kernel Generate spatial attention map Finally, with As weights, for the input feature map Perform element-wise multiplication to obtain the weighted output feature map. The relevant calculations are as follows:
[0095] ;
[0096] ;
[0097] ;
[0098] ;
[0099] ;
[0100] in, For convolution operations, For splicing operations, It is the product of Hadamard.
[0101] Implementation Method 5: This implementation method further defines the method for constructing a shiitake mushroom growth time-series image prediction model as described in Implementation Method 1. The difference between this implementation method and Implementation Method 1 is that the AKConv refining module in step 2 includes several AKConv modules. Specifically, the AKConv module is as follows:
[0102] The input image is processed Extract the global vector of the channel after the operation. Extracted from fully connected layer 1 The nonlinear characteristics are obtained to obtain the hidden vector. Based on the hidden vector, a fully connected layer 2 is used to generate the channel weight vector. The channel weight vector is multiplied element-wise with the input image through a dynamic convolution kernel to obtain the recalibrated feature map. The recalibrated feature map is added element-wise with the input image to obtain the output of the AKConv module.
[0103] To extract fine-grained features from images more flexibly and efficiently and optimize the visual quality of generated frames, this implementation introduces the Adaptive Kernel Convolution (AKConv) module. The AKConv module can extract features through irregular convolution kernel functions, providing convolution kernels with arbitrary sampling shapes and sizes for various changing targets. With the help of a layer-by-layer residual attention mechanism, it can effectively suppress blur and artifacts generated during upsampling, while improving the clarity and contrast of key regions, thus improving the visual quality of generated frames. This compensates for the shortcomings of conventional convolution and solves the feature degradation problem after upsampling in the original VMRNN-D module, making it suitable for embedded devices or mobile inference. Figure 6As shown, the model introduces the AKConv module, providing dual enhancements from output supervision to feature optimization. The first AKConv module after the backbone network is responsible for consistency calibration, handling the initial noise and alignment errors caused by the fusion of skip connections (shallow features) and upsampling (deep semantics). The other AKConv module is responsible for visual detail reconstruction. After initial alignment, it uses an adaptive kernel to perform secondary enhancement on the edges and textures of objects, ensuring that the signal output to Output(x+1) is depth-optimized.
[0104] The AKConv module processes the input image. Extracting the global vector of channels after convolution operation Then, by fully connected layer 1 extract The nonlinear characteristics of the fully connected layer 2 Generate convolutional kernel weights as output. Then, multiply the input features element-wise using a dynamic kernel. Weights are assigned to modulate the input features or convolutional kernels channel-by-channel. Finally, through... The output is obtained by adding elements one by one; this is the output of the first AKConv module. This serves as the input to the second AKConv module, and the second AKConv module outputs the final result. (Output). The AKConv module calculates as follows:
[0105] ;
[0106] ;
[0107] ;
[0108] ;
[0109] ;
[0110] in, It is the input feature map tensor, and the output of the image patch expansion module. To output the feature map, For global vectors, For the hidden vector, For channel weight vectors, , These are the weights and biases of the first fully connected layer, respectively. , These are the weights and biases of the second fully connected layer, respectively. It is a non-linear activation function. It is global average pooling. For activation function, for Channel-by-channel multiplication This is an element-wise addition.
[0111] The convolution of AKConv is calculated as follows:
[0112] ;
[0113] in, To output the feature map, For the first The input feature map of each convolutional kernel, For the first The weight coefficients of each convolutional kernel, For the first Each convolutional kernel weight, For the first The offset of each convolutional kernel This represents the number of convolution kernels.
[0114] Implementation Method Six: This implementation method further defines the method for constructing a shiitake mushroom growth time-series image prediction model as described in Implementation Method One. The difference between this implementation method and Implementation Method One is that, in step 3, when training the VMRNN-DMSA model, the batch size is 8, the image size is 64×64, the learning rate is 0.00005, the model is trained for 300 rounds, and the Adam optimizer is used. The loss function is a weighted loss function composed of MSE Loss, MS-SSIM, and Perceptual Loss, as shown in Table 1.
[0115] Table 1
[0116]
[0117] Implementation Method Seven: This implementation method is an experiment proposed to verify the effectiveness of the model constructed using the model construction methods described in Implementation Methods One to Six.
[0118] 1. Experimental Environment:
[0119] The specific configuration of the experimental platform is shown in Table 2 below: the operating system is Ubuntu 22.04 LTS, the CPU is Intel i9 14900K, the GPU is NVIDIA RTX A6000, the CUDA version is 11.7, the memory is 128G, the storage is 2TSSD + 16THDD, and the development environment is Python 3.8 and PyTorch 1.13.1 + cu117.
[0120] Table 2 Hardware and Software Configuration
[0121]
[0122] 2. Evaluation indicators:
[0123] To evaluate the performance of the shiitake mushroom growth prediction model, the experiment used three metrics—mean squared error (MSE), structural similarity (SSIM), and peak signal-to-noise ratio (PSNR)—to comprehensively evaluate the generated prediction images.
[0124] (1) Mean Square Error (MSE)
[0125] MSE (Mean Error Separation) is a metric that measures the overall error between the predicted and ground truth images. It represents the average of the squared errors of each pixel. A smaller MSE value indicates a smaller pixel difference between the predicted and ground truth images, resulting in higher prediction accuracy. A larger MSE value indicates a larger pixel error, meaning the predicted image deviates more significantly from the ground truth image in terms of fine structure and brightness information, leading to poorer prediction performance. The MSE is calculated as follows:
[0126] ;
[0127] in, and These are the height and width of the image, respectively. For the original image in Pixel value at; This represents the pixel value at the corresponding position in the processed image.
[0128] (2) Structural similarity (SSIM)
[0129] SSIM is a metric for measuring the structural consistency between a predicted image and the ground truth image. SSIM measures image structure across three dimensions: brightness, contrast, and structure. and The similarity between images is used to examine the degree of image distortion. This index uses the mean to estimate brightness, the standard deviation to estimate contrast, and the covariance to measure structural similarity, objectively reflecting the overall image quality at the perceptual level. The SSIM value ranges from 0 to 1; a higher value indicates less image distortion and higher similarity. The SSIM is calculated as follows:
[0130] ;
[0131] in, Images and The average value, For image and covariance, and Images and variance and It is a constant.
[0132] (3) Peak Signal-to-Noise Ratio (PSNR)
[0133] PSNR assesses image quality by measuring the error between the predicted image and the original image. A higher PSNR value indicates better image quality. A PSNR less than 20dB indicates poor quality and severe distortion; a PSNR between 20dB and 30dB indicates medium quality with similar image characteristics; and a PSNR between 30dB and 40dB indicates good quality, closely resembling the true image. PSNR is calculated using the following formula:
[0134] ;
[0135] in, The maximum pixel value of the image. This represents the mean square error of each pixel value between the original image and the processed image.
[0136] 3. Results:
[0137] 3.1 Comparison of different spatiotemporal prediction models
[0138] This experiment selected several spatiotemporal prediction models, including SimVP (video prediction model), TAU (temporal attention unit), ConvLSTM (convolutional long short-term memory network), E3DLSTM (efficient 3D long short-term memory network), PredRNN (predictive recurrent neural network), MIM (memory-in-memory network), SwinLSTM (Swin-based LSTM), DMVFN (dense motion vector field network), and VMRNN-D, and conducted comparative experiments on a time-series image dataset of shiitake mushroom fruiting body growth. Each video sequence contained 20 frames, with the first 10 frames used as model input to predict the growth process of the next 10 frames. Table 3 shows that VMRNN-D had the lowest MSE value (55.5645), SimVP had the highest SSIM value (0.7267), and DMVFN had the highest PSNR value (20.3756). In nonlinear growth prediction, the VMRNN-D model outperformed DMVFN. DMVFN operates on the principle of pixel displacement based on optical flow, which makes it difficult to simulate the actual growth size of shiitake mushroom fruiting bodies. This results in edge shrinkage in the prediction results, and key metrics such as MSE and SSIM are lower than those of VMRNN-D. Therefore, VMRNN-D was chosen as the baseline model for the shiitake mushroom fruiting body growth prediction task.
[0139] Table 3 Comparison of Results from Different Spatiotemporal Prediction Models
[0140]
[0141] Although the VMRNN-D model performs well in terms of prediction accuracy and lightweight design, it still suffers from problems such as insufficient sensitivity to detailed features, severe gradient vanishing, and weak long-term dependency modeling ability. To improve the prediction performance of shiitake mushroom fruiting body growth, modules integrating MFM (Multi-Functional Mechanism) skip connections, spatial attention mechanism, adaptive kernel convolution, and weighted loss function were introduced into the original model, resulting in the improved model VMRNN-DMSA. Experiments were conducted on the shiitake mushroom fruiting body growth dataset.
[0142] Table 4 shows the test results of the original model VMRNN-D and the improved model VMRNN-DMSA. The improved model's MSE, SSIM, and PSNR on the test set are 39.4255, 0.8579, and 22.0774, respectively. The MSE is reduced by 29.05% compared to the original model, while SSIM and PSNR are increased by 19.34% and 14.52%, respectively, indicating a significant improvement in overall model performance. Regarding model complexity, the improved model has 5.021M parameters and 7.933G of computational resources on the test set. The number of parameters increases by 1.546M, and the computational resources increase by 4.072G compared to the original model. Although the number of parameters and the computational resources have increased, VMRNN-DMSA significantly enhances its ability to capture complex spatiotemporal dynamic features by introducing limited structural redundancy, achieving a favorable balance between performance and efficiency.
[0143] Table 4. Results of the original model and the improved model on the test set.
[0144]
[0145] Figure 7 The figures show the changes in MSE, SSIM, and PSNR as a function of time step t in the prediction task. As the time step increases, all indicators of the original model VMRNN-D exhibit a rapid decay trend (MSE increases significantly, while SSIM and PSNR decrease significantly), indicating that it is difficult to avoid error accumulation in long-term time-series predictions. In contrast, the improved model VMRNN-DMSA shows more gradual changes in all indicators, maintaining a higher level. VMRNN-DMSA not only surpasses the original model in overall performance but also effectively overcomes the problem of accuracy decay over time in long-term time-series predictions, ensuring the robustness and reliability of predictions for the later stages of shiitake mushroom growth.
[0146] Visualization of the model's prediction results on the test set, for example Figure 8 As shown in the figure, the image is divided into four rows from top to bottom: the first row is the sequence of the first 10 frames of images input to the model, the second row is the corresponding sequence of the next 10 frames of images, the third row is the prediction result of the original model VMRNN-D, and the fourth row is the prediction result of the improved model VMRNN-DMSA. As the time step increases, the prediction performance of both the original and improved models decreases, but the prediction results of VMRNN-DMSA are closer to the true values than those of VMRNN-D at each time step. Especially in the predicted 10th frame, VMRNN-DMSA still maintains relatively clear texture details, edge contours, and the size characteristics of the mushroom fruiting bodies, demonstrating stronger temporal stability and prediction accuracy.
[0147] Prediction visualization results of different spatiotemporal models are as follows Figure 9As shown in the figure, E3DLSTM and SwinLSTM exhibit the weakest prediction performance, with their prediction accuracy significantly decreasing and visual perception quality deteriorating markedly as the time step increases. PredRNN and MIM show limited effectiveness in long-term prediction tasks. DMVFN and VMRNN-D have relatively similar prediction performance. In contrast, VMRNN-DMSA demonstrates the most significant prediction advantage among all compared models, especially in maintaining superior temporal stability and accuracy in long-term prediction.
[0148] In the image prediction task of shiitake mushroom fruiting body growth, visualization results show that the VMRNN-DMSA model significantly outperforms models such as SimVP, TAU, E3DLSTM, SwinLSTM, and PredNet in terms of prediction accuracy, image texture clarity, and performance stability over long time step sizes. The VMRNN-DMSA model overcomes the inherent limitation of traditional long-time-series prediction methods in generating high-quality future image sequences by effectively fusing spatiotemporal information and capturing key local features.
[0149] 3.2 Prediction of Shiitake Mushroom Fruiting Body Growth Based on VMRNN-DMSA at Different Time Spans
[0150] To comprehensively evaluate the generalization ability and long-term robustness of VMRNN-DMSA, this experiment randomly selected 71 video sequences from the time-series image dataset of shiitake mushroom fruiting body growth. Forty consecutive frames were extracted from each sequence, forming a long-term dataset containing 2840 images. Experiments on shiitake mushroom fruiting body growth prediction were conducted at different time spans. Table 5 shows the test results of the original model and the improved model at different time spans. Figure 10 , Figure 11 and Figure 12 The evaluation metrics for the original model and the improved model as a function of time step. The curve showing the change.
[0151] Table 5. Model test results at different time spans
[0152]
[0153] In short-time prediction tasks (using the first 15 frames as model input to predict the growth process in the next 5 frames), the two models perform similarly, with the former exhibiting the highest prediction accuracy. For example... Figure 10 As shown, the two curves of VMRNN-DMSA and VMRNN-D are closely intertwined, and their trends are basically the same.
[0154] In the mid-temporal prediction task (using the first 10 frames as model input to predict the growth process of the next 10 frames), the MSE, SSIM, and PSNR of the VMRNN-DMSA model were 32.8736, 0.8290, and 23.1500, respectively. The MSE decreased by 13.33% compared to the original model, the SSIM decreased by 2.41%, and the PSNR increased by 5.89%, indicating that the improved model maintains high visual perception quality while still possessing superior prediction accuracy. Figure 11 As shown, the difference between the index curves of the two models gradually widens, and the change trend of VMRNN-DMSA is relatively more gradual.
[0155] In long-term prediction tasks (using the first 20 frames as model input to predict the growth process of the next 20 frames), the VMRNN-DMSA model achieved MSE, SSIM, and PSNR of 39.0567, 0.7143, and 20.5345, respectively. The MSE was reduced by 16.89% compared to the original model, while SSIM and PSNR improved by 10.35% and 3.59%, respectively, indicating that the improved model maintains higher accuracy and structural similarity in long-term predictions. Figure 12 As shown, the MSE curve of VMRNN-D exhibits a significantly steeper upward trend, while the curve of VMRNN-DMSA maintains a relatively gentle linear change. VMRNN-DMSA effectively suppresses error accumulation in the long-term prediction process, thus ensuring that the model performance does not significantly decrease with the increase of the prediction step size.
[0156] Visualization results of the two models' predictions over different time spans are as follows: Figure 13 As shown, the improved model outperforms the original model in predicting results across three different time spans. While the performance of the VMRNN-DMSA model decreases with increasing time span, it still maintains high prediction accuracy, structural similarity, and visual perception quality, demonstrating its good generalization ability and long-term robustness.
[0157] 3.3 Ablation experiment
[0158] Table 6 shows the ablation experiment results of VMRNN-DMSA. Based on the baseline model VMRNN-D, modules such as skip connections integrating MFM, spatial attention mechanism, adaptive kernel convolution and weighted loss function were gradually introduced, and the changes of three indicators, mean squared error (MSE), structural similarity index (SSIM) and peak signal-to-noise ratio (PSNR), were recorded.
[0159] In the single-module ablation experiment, the model with skip connections integrating the MFM module achieved MSE, SSIM, and PSNR of 47.5624, 0.7459, and 20.9457, respectively. The MSE decreased by 14.40% compared to the original model, indicating a significant reduction in the overall error between the predicted and ground truth images, while the changes in SSIM and PSNR were minimal. Introducing skip connections integrating the MFM module improved the model's prediction accuracy. After introducing the SAM module, the MSE, SSIM, and PSNR were 53.8478, 0.7221, and 20.2512, respectively. The MSE decreased by 3.09% and the PSNR increased by 5.05% compared to the original model, indicating enhanced perception of key regions, while the change in SSIM was minimal. Introducing the SAM module improved the model's feature extraction capability for key regions. After introducing the AKConv module, the MSE, SSIM, and PSNR were 53.8459, 0.7331, and 20.2842, respectively. The MSE decreased by 3.09% and the PSNR increased by 5.22% compared to the original model, indicating that the model's ability to extract fine-grained features such as sharpness, contrast, and edge texture in key regions was enhanced, while the SSIM remained relatively unchanged. The introduction of the AKConv module optimized the visual perception quality of the model-generated frames. After applying a weighted loss function, the MSE, SSIM, and PSNR were 47.4107, 0.7468, and 20.7376, respectively. The MSE decreased by 14.67% compared to the original model, while the SSIM and PSNR increased by 3.88% and 7.57%, respectively, indicating that the model's prediction accuracy, structural fidelity, and visual perception performance were all enhanced to varying degrees.
[0160] In the ablation experiments using both modules, when SAM and AKConv were used, the MSE, SSIM, and PSNR were 56.2686, 0.6986, and 20.1125, respectively, indicating a decrease in model performance. This is because the distribution density of the features restricted by SAM contradicts the goal of AKConv, which relies on dense information to capture irregular deformations, leading to gradient flow conflicts when the two are used together. When the MFM-Skip and AKConv modules were used, the MSE, SSIM, and PSNR were 46.6177, 0.7498, and 21.0125, respectively. The MSE was reduced by 16.10% compared to the original model, while SSIM and PSNR were improved by 4.29% and 8.99%, respectively, indicating that the overall model performance was relatively optimal.
[0161] In the three module ablation experiments, when using MFM-Skip (a skip connection integrating MFM modules), SAM, and AKConv modules, the MSE, SSIM, and PSNR were 45.0162, 0.7379, and 21.1256, respectively. The MSE was reduced by 18.98% compared to the original model, while the SSIM and PSNR were improved by 2.64% and 9.59%, respectively, indicating that the overall model performance was relatively optimal.
[0162] By introducing four modules into VMRNN-D, the improved model VMRNN-DMSA achieved MSE, SSIM, and PSNR of 39.4255, 0.8579, and 22.0774, respectively. The MSE decreased by 29.05% compared to the original model, while SSIM and PSNR increased by 19.34% and 14.52%, respectively, indicating a significant enhancement in the overall model performance and fully validating the effectiveness of the proposed improvements.
[0163] Table 6 Ablation Experiment Results
[0164]
[0165] Ablation experiments show that in the shiitake mushroom fruiting body growth prediction task, the improved modules work synergistically to improve model performance. The skip connections integrating the MFM module optimize global feature fusion, SAM achieves spatially selective focusing, AKConv enhances local feature adaptability, and the weighted loss function provides global optimization guidance. These modules contribute to prediction accuracy, feature extraction, and image visual perception quality, respectively, resulting in the improved model VMRNN-DMSA significantly outperforming the original model VMRNN-D in terms of mean squared error (MSE), structural similarity index (SSIM), and peak signal-to-noise ratio (PSNR).
[0166] In summary, this paper addresses the issue that the prediction accuracy and generated image quality of traditional temporal image prediction tasks decline with increasing time step. This implementation proposes an improved model, VMRNN-DMSA, integrating MFM-Skip, SAM, AKConv modules, and a weighted loss function. Experimental results show that this model significantly improves the performance of long-term temporal image prediction, achieving MSE, SSIM, and PSNR values of 39.4255, 0.8579, and 22.0774, respectively. Compared to the original model, the MSE value is reduced by 29.05%, and the SSIM and PSNR are improved by 19.34% and 14.52%, respectively. In long-term predictions with different time spans, the VMRNN-DMSA model maintains high prediction accuracy, structural similarity, and visual perception quality, demonstrating strong generalization ability and long-term robustness, effectively suppressing the rapid decay of prediction accuracy over time. The results show that the VMRNN-DMSA model is suitable for time-series prediction of shiitake fruiting body growth, providing reliable technical support and theoretical basis for non-destructive monitoring, yield prediction and harvesting decision-making in precision agriculture.
[0167] Implementation Method 8: A method for predicting the growth time sequence image of shiitake mushrooms. The method is implemented based on any of the model construction methods described above. The final shiitake mushroom growth time sequence image prediction model is used to predict the growth time sequence image of shiitake mushroom fruiting bodies to obtain the prediction result.
[0168] Implementation Method Nine: A system for constructing a shiitake mushroom growth time-series image prediction model, the system being constructed based on the method described in Implementation Method One, and comprising the following modules:
[0169] The dataset processing module constructs a time-series image dataset of shiitake mushroom fruiting bodies and preprocesses it.
[0170] The module constructs a VMRNN-DMSA model, which is an improved model based on the VMRNN-D architecture. The improvements include:
[0171] The PatchMerging in the VMRNN-D architecture is replaced with a U-Net backbone network, and a skip connection mechanism integrating an MFM module is introduced into the backbone network.
[0172] Add a SAM module to perform spatial weight calibration on the feature maps output by the backbone network;
[0173] Add the AKConv refining module to refine the features of the output image of the PatchExpanding module in the VMRNN-D architecture;
[0174] The training module, based on the preprocessed dataset in the dataset processing module, designs a weighted loss function combining MSE, MS-SSIM, and Perceptual Loss to train the VMRNN-DMSA model. After training, the final shiitake mushroom growth time-series image prediction model is obtained.
[0175] Implementation Method 10: A Shiitake Mushroom Growth Time-Sequence Image Prediction System, which is constructed based on the method described in Implementation Method 8 and includes the following modules:
[0176] The prediction module uses the final shiitake mushroom growth time-series image prediction model to predict the growth time-series images of shiitake mushroom fruiting bodies and obtain the prediction results.
[0177] The above provides a detailed description of the shiitake mushroom growth time-series image prediction method and system, as well as the model construction method and system proposed in this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A method for constructing a shiitake mushroom growth time-series image prediction model, characterized in that, Includes the following steps: Step 1: Construct a time-series image dataset of shiitake mushroom fruiting bodies and preprocess it; Step 2, construct the VMRNN-DMSA model, which is an improved model based on the VMRNN-D architecture. The improvements include: The PatchMerging in the VMRNN-D architecture is replaced with a U-Net backbone network, and a skip connection mechanism integrating an MFM module is introduced into the backbone network. Add a SAM module to perform spatial weight calibration on the feature maps output by the backbone network; Add the AKConv refining module to refine the features of the output image of the PatchExpanding module in the VMRNN-D architecture; Step 3: Based on the preprocessed dataset in Step 1, design a weighted loss function combining MSE, MS-SSIM and Perceptual Loss to train the VMRNN-DMSA model. After training, the final shiitake mushroom growth time-series image prediction model is obtained.
2. The method for constructing a shiitake mushroom growth time-series image prediction model according to claim 1, characterized in that, The construction of the time-series image dataset of shiitake mushroom fruiting bodies in step 1 is specifically as follows: The growth process of shiitake mushroom fruiting bodies was monitored and recorded to obtain continuous growth videos. Image frames were extracted from the continuous growth videos at fixed time intervals and arranged in chronological order of shooting time to form a time series image dataset of shiitake mushroom fruiting body growth.
3. The method for constructing a shiitake mushroom growth time-series image prediction model according to claim 1, characterized in that, In step 2, the backbone network includes a downsampled encoder path and an upsampled decoder path. The shallow features extracted by the downsampled encoder path are connected to the upsampled decoder path in a skip connection. The MFM module is used to deconstruct and reconstruct the shallow features extracted by the downsampled encoder path and the high-level spatiotemporal semantic features generated by the upsampled decoder path.
4. The method for constructing a shiitake mushroom growth time-series image prediction model according to claim 1, characterized in that, The MFM module in step 2 is specifically as follows: ; in, To element-wise in features and At each position, a larger value is selected to generate a feature map. For the spatial detail features of the encoder, For the spatiotemporal semantic features of the decoder, , They are respectively and The learnable weight coefficients.
5. The method for constructing a shiitake mushroom growth time-series image prediction model according to claim 1, characterized in that, In step 2, the SAM module is added to perform spatial weight calibration on the feature map output by the backbone network. Specifically: For the input feature map respectively Perform max pooling and average pooling to obtain the corresponding max-pooled feature maps. and the feature map after average pooling ,Will and The spliced feature map is obtained by splicing. ,right Perform convolution operations to generate a spatial attention map. ,by As weights, for the feature map Perform element-wise multiplication to obtain the weighted output feature map. .
6. The method for constructing a shiitake mushroom growth time-series image prediction model according to claim 1, characterized in that, The AKConv refining module in step 2 includes several AKConv modules, specifically: The input image is processed Extract the global vector of the channel after the operation. Extracted from fully connected layer 1 The nonlinear characteristics are obtained to obtain the hidden vector. Based on the hidden vector, a fully connected layer 2 is used to generate the channel weight vector. The channel weight vector is multiplied element-wise with the input image through a dynamic convolution kernel to obtain the recalibrated feature map. The recalibrated feature map is added element-wise with the input image to obtain the output of the AKConv module.
7. The method for constructing a shiitake mushroom growth time-series image prediction model according to claim 1, characterized in that, In step 3, the batch size for training the VMRNN-DMSA model is 8, the image size is 64×64, and the learning rate is 0.00005.
8. A method for predicting the growth time series images of shiitake mushrooms, wherein the method is implemented based on the model construction method described in any one of claims 1-7, characterized in that, The final shiitake mushroom growth time-series image prediction model was used to predict the growth time-series images of shiitake mushroom fruiting bodies, and the prediction results were obtained.
9. A system for constructing a shiitake mushroom growth time-series image prediction model, the system being constructed based on the method described in claim 1, characterized in that, Includes the following modules: The dataset processing module constructs a time-series image dataset of shiitake mushroom fruiting bodies and preprocesses it. The module constructs a VMRNN-DMSA model, which is an improved model based on the VMRNN-D architecture. The improvements include: The PatchMerging in the VMRNN-D architecture is replaced with a U-Net backbone network, and a skip connection mechanism integrating an MFM module is introduced into the backbone network. Add a SAM module to perform spatial weight calibration on the feature maps output by the backbone network; Add the AKConv refining module to refine the features of the output image of the PatchExpanding module in the VMRNN-D architecture; The training module, based on the preprocessed dataset in the dataset processing module, designs a weighted loss function combining MSE, MS-SSIM, and Perceptual Loss to train the VMRNN-DMSA model. After training, the final shiitake mushroom growth time-series image prediction model is obtained.
10. A shiitake mushroom growth time-series image prediction system, the system being constructed based on the method described in claim 8, characterized in that, Includes the following modules: The prediction module uses the final shiitake mushroom growth time-series image prediction model to predict the growth time-series images of shiitake mushroom fruiting bodies and obtain the prediction results.
Citation Information
Patent Citations
Residual-based enhancement of medical image super-resolution
CN118429216A
Method for multi-motion flow deep convolutional network model for video prediction
WO2020037965A1