Wheat seedling identification method and system

By using the lightweight deep learning model WheatNeXt-Mini, combined with multiple attention modules and confidence management, the requirements for cross-scenario generalization and high accuracy in wheat seedling identification are solved. This enables efficient and reliable wheat seedling identification on mobile devices, making it suitable for high-frequency monitoring and precise management by small farmers.

CN122200322APending Publication Date: 2026-06-12NANJING AGRICULTURAL UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING AGRICULTURAL UNIVERSITY
Filing Date
2026-02-02
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing technologies for wheat seedling identification suffer from low efficiency, high subjectivity, limited coverage, and poor repeatability, making it difficult to achieve high-frequency monitoring and rapid response. Furthermore, recognition algorithms based on mobile phone images lack cross-scenario generalization ability, and high-precision deep learning networks have a large number of parameters, high computing power requirements, and lack reliability management and probability calibration mechanisms, making them difficult to implement and promote.

Method used

We employ a lightweight deep learning model, WheatNeXt-Mini, combined with the MobileViT-XS backbone, SE channel attention, CBAM spatial channel attention, and Token self-attention modules for wheat seedling identification. High-precision identification is achieved through preprocessing and lightweight model inference, and a confidence threshold and reliability management mechanism are introduced.

Benefits of technology

It achieves high-precision and robust identification of wheat seedling conditions in complex field environments, is suitable for on-the-fly data collection and analysis on mobile or edge devices, is suitable for high-frequency monitoring and precision management at the small farmer scale, and features lightweight and high precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122200322A_ABST
    Figure CN122200322A_ABST
Patent Text Reader

Abstract

The application discloses a wheat seedling condition recognition method and system, and the method comprises the steps of: acquiring an original image of wheat; pre-processing the original image to obtain a target image; inputting the target image into a light-depth learning model WheatNeXt-Mini for recognition to obtain a wheat seedling condition recognition result; wherein the WheatNeXt-Mini model comprises a backbone feature extraction module, an SE channel attention module, a CBAM spatial channel attention module, a Token self-attention module, a feature fusion module and a classification head module. The application adopts the light-depth learning model WheatNeXt-Mini, takes MobileViT-XS as the backbone, fuses the SE channel attention, the CBAM spatial channel attention and the Token self-attention module, and outputs a seedling condition classification result, and is suitable for high-frequency monitoring and production decision of farmers on wheat.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of agricultural intelligent recognition and image processing technology. For example, it relates to a method for identifying wheat seedling conditions and a system for identifying wheat seedling conditions. Background Technology

[0002] Wheat is widely planted in my country, and farmers' management models vary significantly, resulting in strong spatial and temporal heterogeneity in seedling conditions. Traditional seedling condition surveys mainly rely on experienced personnel conducting field inspections, visually assessing indicators such as leaf color, tillering, plant height, and uniformity of growth for grading. This method suffers from low efficiency, high subjectivity, limited coverage, and poor repeatability, making it difficult to support high-frequency monitoring and rapid response.

[0003] While regional monitoring based on drones or satellite imagery offers certain coverage advantages, it is often limited at the small-scale farmer level by spatiotemporal resolution, weather conditions, and data processing hurdles, making it difficult to establish an agile "on-demand" workflow. In recent years, using smartphones for field photography has become a low-barrier, high-resolution data source, offering advantages such as simple deployment, high timeliness, and connectivity to mobile applications. However, existing crop condition identification based on smartphone images still has the following shortcomings: (1) Traditional algorithms based on manual features and fixed thresholds are highly sensitive to lighting, shadows, shooting angles and differences in camera models, and lack cross-scene generalization ability; (2) High-precision deep learning networks have a large number of parameters and high computing power requirements, which is not conducive to low-latency inference on terminal devices; (3) The lack of a complete reliability management and probability calibration mechanism may lead to "overconfidence" on abnormal samples, reducing production availability, even if the overall accuracy is high. (4) The lack of an integrated engineering closed loop from data collection, preprocessing, model inference, result calibration to application output makes it difficult to implement and promote.

[0004] Therefore, there is a need for a solution that can accurately identify crop growth based on mobile phone images, enabling production-level applications of "snap and shoot and judge stability".

[0005] This section provides background information related to this application, which is not necessarily prior art. Summary of the Invention

[0006] One objective of this application is to solve or at least alleviate some or all of the aforementioned problems. Therefore, one objective of this application is to provide a method for identifying wheat seedling conditions, employing a lightweight deep learning model, WheatNeXt-Mini, which can quickly and accurately identify wheat seedling conditions.

[0007] To achieve the above objectives, this application adopts the following technical solution: Firstly, this application provides a method for identifying wheat seedling conditions, the method comprising: Obtain the raw image of the wheat; The target image is obtained by preprocessing the original image; The target image is input into the lightweight deep learning model WheatNeXt-Mini for recognition, and the wheat seedling condition recognition result is obtained. The WheatNeXt-Mini model includes a backbone feature extraction module, an SE channel attention module, a CBAM spatial channel attention module, a Token self-attention module, a feature fusion module, and a classification head module. The backbone feature extraction module uses the MobileViT-XS model to perform multi-scale feature extraction on the input target image to obtain a multi-level feature map sequence; The SE channel attention module is in series and embedded into the shallow feature extraction stage of the MobileViT-XS model to generate channel weights for channel-by-channel recalibration of shallow features. The CBAM spatial channel attention module is cascaded and embedded into the high-level feature extraction stage of the MobileViT-XS model to perform joint attention processing on high-level features in both channel and spatial dimensions, resulting in enhanced high-level features. The Token self-attention module is used to perform multi-scale convergence on the enhanced high-level features to obtain multi-scale vectors, and then use them to form a Token sequence to perform multi-head self-attention calculation to output a global semantic vector. The feature fusion module is used to concatenate multi-scale vectors and global semantic vectors to obtain fused features; The classification head module is used to map the fused features and output the identification results corresponding to different seedling condition categories.

[0008] In some embodiments, the feature fusion module is also used to concatenate multi-scale vectors to obtain fused features when the Token self-attention module is turned off.

[0009] In some embodiments, preprocessing the original image to obtain the target image includes: Select a standard template; The original image is processed according to a standard template to unify its size, resolution, and color space. The image after unified processing is normalized to obtain the target image.

[0010] In some embodiments, the original image was captured by a mobile terminal.

[0011] In some embodiments, mapping the fused features to output identification results corresponding to different crop condition categories includes: The fusion features are mapped to output a four-dimensional probability vector and confidence level corresponding to the vigorous growth seedlings, Class I seedlings, Class II seedlings, and Class III seedlings; The seedling condition category corresponding to the target image is determined based on the probability vector and confidence level.

[0012] In some embodiments, the method further includes: generating a result table according to the original image file name, crop condition category and confidence level, and storing or visualizing the recognition results in association with the original image.

[0013] In some embodiments, the method further includes: the confidence level being the maximum value conf in the four-dimensional probability vector. When conf is greater than or equal to the first preset threshold, output the seedling condition category with the highest probability. When the conf value is between the first preset threshold and the second preset threshold, the original image sample is marked as pending review and a prompt is given to retake the image or vote with multiple images. When conf is lower than the second preset threshold, the original image sample is directly marked as pending review.

[0014] In some embodiments, the method further includes: The sample proportions of vigorous seedlings, Class I seedlings, Class II seedlings, and Class III seedlings within a preset statistical area or time window; Based on the proportion, provide at least one management recommendation from among controlling the growth, maintaining, strengthening, and key intervention.

[0015] Secondly, this application also provides a wheat seedling condition identification system, including: The image acquisition module is used to acquire raw images of wheat. The image processing module is used to preprocess the original image to obtain the target image; The image recognition module is used to input the target image into the lightweight deep learning model WheatNeXt-Mini for recognition and obtain the wheat seedling condition recognition result. The WheatNeXt-Mini model includes a backbone feature extraction module, an SE channel attention module, a CBAM spatial channel attention module, a Token self-attention module, a feature fusion module, and a classification head module. The backbone feature extraction module uses the MobileViT-XS model to perform multi-scale feature extraction on the input target image to obtain a multi-level feature map sequence; The SE channel attention module is in series and embedded into the shallow feature extraction stage of the MobileViT-XS model to generate channel weights for channel-by-channel recalibration of shallow features. The CBAM spatial channel attention module is cascaded and embedded into the high-level feature extraction stage of the MobileViT-XS model to perform joint attention processing on high-level features in both channel and spatial dimensions, resulting in enhanced high-level features. The Token self-attention module is used to perform multi-scale convergence on the enhanced high-level features to obtain multi-scale vectors, and then use them to form a Token sequence to perform multi-head self-attention calculation to output a global semantic vector. The feature fusion module is used to concatenate multi-scale vectors and global semantic vectors to obtain fused features; The classification head module is used to map the fused features and output the identification results corresponding to different seedling condition categories.

[0016] Thirdly, this application also provides an electronic device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The processor loads and executes the at least one instruction, at least one program, code set, or instruction set to implement the wheat seedling condition identification method described above.

[0017] Fourthly, this application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the wheat seedling condition identification method described above.

[0018] The advantages of this application are as follows: By constructing a lightweight WheatNeXt-Mini model and integrating SE, CBAM, and a lightweight Token Self-Attention (TokenSA) module, this application achieves high-precision and robust identification of four types of seedling conditions under complex field environments (light variations, angle differences, weed / soil background interference). This invention can achieve high-precision identification of wheat seedling conditions in specific areas at different stages, balancing lightweight design and high precision. It can be used on mobile or edge devices for on-the-fly data collection and analysis, making it suitable for high-frequency monitoring and precision management at the smallholder scale. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating a wheat seedling condition identification method provided in an embodiment of this application; Figure 2 This is a schematic diagram illustrating the principle of preprocessing the original image provided in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the WheatNeXt-Mini model provided in the embodiments of this application; Figure 4 This is a software package structure diagram provided in the embodiments of this application; Figure 5This is a schematic diagram of PowerShell operation provided in the embodiments of this application. Detailed Implementation

[0020] Before explaining any implementation of this application in detail, it should be understood that this application is not limited to its application to the structural details and component arrangements set forth in the following description or shown in the above drawings.

[0021] In this application, the terms "comprising," "including," "having," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0022] In this application, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this application generally indicates that the preceding and following related objects have an "and / or" relationship.

[0023] In this application, the terms "connection," "combination," "coupling," and "installation" can refer to direct connection, combination, coupling, or installation, or indirect connection, combination, coupling, or installation. For example, a direct connection refers to two parts or components being connected together without the need for an intermediary, while an indirect connection refers to two parts or components each being connected to at least one intermediary, with the connection achieved through the intermediary. Furthermore, "connection" and "coupling" are not limited to physical or mechanical connections or couplings, but can also include electrical connections or couplings.

[0024] In this application, those skilled in the art will understand that relative terms (e.g., “about,” “approximately,” “basically,” etc.) used in conjunction with quantities or conditions are to include the values ​​and have the meaning indicated by the context. For example, such relative terms include at least the degree of error associated with the measurement of a particular value, tolerances associated with the particular value due to manufacturing, assembly, use, etc. Such terms should also be considered as disclosing a range defined by the absolute values ​​of the two endpoints. Relative terms may refer to a certain percentage (e.g., 1%, 5%, 10% or more) of the indicated value. Numerical values ​​that do not use relative terms should also be disclosed as specific values ​​with tolerances. Furthermore, “basically” when expressing relative angular relationships (e.g., substantially parallel, substantially perpendicular) may refer to a certain degree (e.g., 1 degree, 5 degrees, 10 degrees or more) added to or subtracted from the indicated angle.

[0025] In this application, those skilled in the art will understand that the function performed by a component can be performed by one component, multiple components, one part, or multiple parts. Similarly, the function performed by a part can also be performed by one part, one component, or a combination of multiple parts.

[0026] In this application, the directional terms "upper," "lower," "left," "right," "front," and "rear" are used to describe the orientation and positional relationships shown in the accompanying drawings and should not be construed as limiting the embodiments of this application. Furthermore, in the context, it should be understood that when an element is mentioned as being connected "upper" or "lower" to another element, it can be directly connected to the other element "upper" or "lower," or indirectly connected through an intermediate element. It should also be understood that directional terms such as upper side, lower side, left side, right side, front side, and rear side not only represent positive orientation but can also be understood as lateral orientation. For example, "below" can include directly below, lower left, lower right, lower front, and lower rear.

[0027] In this application, the terms "controller," "processor," "central processing unit," "CPU," and "MCU" are used interchangeably. When using the unit "controller," "processor," "central processing unit," "CPU," or "MCU" to perform a specific function, unless otherwise stated, these functions may be performed by a single or multiple of the aforementioned units.

[0028] In this application, the terms "device," "module," or "unit" are used to describe devices that can be implemented in hardware or software to perform a specific function.

[0029] In this application, the terms “calculation,” “judgment,” “control,” “determine,” “identify,” etc., refer to the operation and process of a computer system or similar electronic computing device (e.g., controller, processor, etc.).

[0030] The benefits, other advantages, and solutions to problems will be described below with reference to specific embodiments. However, these benefits, advantages, solutions to problems, and any features that may lead to or make any benefit, advantage, or solution appear or become more significant should not be construed as key, necessary, or essential features of any or all claims.

[0031] This application discloses a wheat seedling condition identification method that uses wheat field images collected by a smartphone as the sole input. It employs a lightweight deep learning model, WheatNeXt-Mini, with MobileViT-XS as the backbone, and integrates SE channel attention, CBAM spatial-channel attention, and Token Self-Attention modules to output four levels of results: vigorous seedlings, Class I seedlings, Class II seedlings, and Class III seedlings. This method is suitable for high-frequency monitoring and production decision-making at the smallholder scale.

[0032] Figure 1 The diagram shown is a flowchart illustrating a wheat seedling condition identification method provided in an embodiment of this application. The following is a summary of the process. Figure 1 The technical solution of this application is described in detail. It should be noted that this specification provides the operational steps of the method as shown in the embodiments or flowcharts, but based on conventional or non-inventive labor, more or fewer operational steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many steps and does not represent the only execution order. This method is adapted for deployment on mobile terminals / edge devices and specifically includes the following steps: S10, acquire the raw image of the wheat.

[0033] Specifically, images of wheat in the field are captured using a mobile device, such as a smartphone, tablet, or smartwatch, to serve as the raw images for identifying wheat seedling conditions. The raw images captured by the mobile device can be color images. In some embodiments, the raw images can also be grayscale images.

[0034] Specifically, it also records metadata such as the shooting time, shooting angle, and shooting equipment information when the original image was captured.

[0035] To ensure sample quality, images that are obviously blurry, severely overexposed or underexposed, or severely obscured are first removed through manual quality inspection, and only samples that meet the basic requirements for clarity and integrity are retained for subsequent processes.

[0036] S20, preprocess the original image to obtain the target image.

[0037] Specifically, the standardization process for the image includes at least the following: scaling the image to a preset size and resampling it using bilinear interpolation to unify it to the same color space, normalizing the brightness and contrast, and removing unqualified samples based on the sharpness index and the ratio of overexposed / underexposed pixels, thereby obtaining a standardized image with uniform size, brightness, and color characteristics.

[0038] In some embodiments, the process of standardizing images from a dataset composed of mobile phone image samples from multiple locations and time periods includes: S201, Count the size frequency of images in different batches, and select the size with the highest frequency as the standard template; S202. Calculate the scaling ratio of the non-standard image according to the standard template and scale it, and resample it using bilinear interpolation. S203. When the number of channels in the input image is inconsistent with the preset number of channels, the standardized image is made to have the same channel configuration by copying or filtering the channels. S204. Normalize the pixel values ​​of the standardized image to a fixed range and unify them as floating-point types.

[0039] In some embodiments, see Figure 2 As shown, a unified, standardized process is performed on the original image: (a) Size and resolution uniformity: The image is scaled to a standard input size of 224×224 pixels and bilinear interpolation is used for resampling to balance structural continuity and computational efficiency; (b) Color and brightness specifications: Unified to sRGB color space; (c) Consistent Values ​​and Types: Pixel values ​​from 0 to 255 are linearly normalized to the [0,1] interval, and mean-variance standardization is performed on a channel-by-channel basis. Let I be the pixel at position (x,y) in the c-th channel. c (x,y), then the normalized pixel is:

[0040] Where, μ c and σ c These are the mean and standard deviation of the channel, obtained statistically from the training set. This step statistically unifies the brightness and contrast of each channel, which can be regarded as an approximate white balance. This ensures that images from different models and under different lighting conditions have a similar intensity distribution when input into the model, thereby compressing model differences and environmental disturbances within a controllable range and significantly improving the consistency of model input.

[0041] S30: Input the target image into the lightweight deep learning model WheatNeXt-Mini for recognition to obtain the wheat seedling condition recognition result.

[0042] The WheatNeXt-Mini model includes a backbone feature extraction module, an SE channel attention module, a CBAM spatial channel attention module, a token self-attention module, a feature fusion module, and a classification head module; for details, please refer to [link to specific structure]. Figure 3 As shown.

[0043] The backbone feature extraction module adopts the MobileViT-XS model to perform multi-scale feature extraction on the input target image to obtain a multi-level feature map sequence. For example, the MobileViT-XS model includes n convolutional layers and a transform encoder. The n convolutional layers perform multi-scale feature extraction on the target image to obtain n-level feature maps.

[0044] The SE channel attention module is in series and embedded into the shallow feature extraction stage of the MobileViT-XS model to generate channel weights for channel-by-channel recalibration of shallow features; where shallow refers to the front layer of n convolutional layers, such as the first layer, the second layer, and up to the N-3th layer.

[0045] The CBAM spatial channel attention module is cascaded and embedded into the high-level feature extraction stage of the MobileViT-XS model. It is used to perform joint attention processing on the high-level features in terms of channel and spatial dimensions to obtain enhanced high-level features. Here, high level refers to the end layer of the n-layer convolutional layer, such as the N-2, N-1 and Nth layers.

[0046] The Token self-attention module is used to perform multi-scale aggregation on the enhanced high-level features to obtain multi-scale vectors, and then use these vectors to form a Token sequence for multi-head self-attention calculation to output a global semantic vector.

[0047] The feature fusion module is used to concatenate multi-scale vectors and global semantic vectors to obtain fused features.

[0048] The classification head module is used to map the fused features and output the identification results corresponding to different seedling condition categories.

[0049] Understandably, in the WheatNeXt-Mini model: 1) The backbone network is MobileViT-XS, which combines the local representation capabilities of convolution with the global relation modeling capabilities of a lightweight Transformer; 2) The SE channel attention module adaptively recalibrates the channel dimension to improve the channel response related to seedling condition discrimination; 3) The CBAM spatial channel attention module jointly models spatial and channel saliency, highlighting the differences in regions with vigorous growth, sparseness, and unevenness; 4) The TokenSA token self-attention module constructs a compact token set at the bottleneck feature layer using a learnable token compression / projection mechanism, and then enhances the discrimination robustness in complex scenarios by modeling long-range dependencies and group structure features through self-attention.

[0050] The model classification head outputs a four-dimensional probability vector p = [p(vigorous seedlings), p(class I seedlings), p(class II seedlings), p(class III seedlings)], and calculates the confidence level conf = max(p). This invention does not introduce manually constructed feature indicators such as color indices on the inference side; the classification conclusion is mainly based on the probability distribution output by the model and a uniformly set confidence threshold.

[0051] In some embodiments, the Token self-attention module can be enabled or disabled. When the Token self-attention module is enabled, the feature fusion module concatenates multi-scale vectors and global semantic vectors to obtain fused features. When the Token self-attention module is disabled, the feature fusion module concatenates multi-scale vectors to obtain fused features. Wheat seedling condition classification and recognition can still be achieved even when the Token self-attention module is disabled.

[0052] In some embodiments, mapping the fused features to output identification results corresponding to different crop condition categories includes: The fusion features are mapped to output a four-dimensional probability vector and confidence level corresponding to the vigorous growth seedlings, Class I seedlings, Class II seedlings, and Class III seedlings; The seedling condition category corresponding to the target image is determined based on the probability vector and confidence level.

[0053] In some embodiments, a result table is generated according to the original image file name, crop condition category, and confidence level, and the recognition results are associated with the original image for storage or visualization. It is understood that a result table containing image file names, predicted categories, and confidence levels is generated based on the crop condition recognition results, and optionally, category labels are overlaid on the original image to form a visualized diagnostic image. This supports batch processing and historical queries, providing farmers or researchers with an intuitive basis for wheat crop condition diagnosis.

[0054] In some embodiments, the confidence level is the maximum value conf in the four-dimensional probability vector: When conf is greater than or equal to the first preset threshold, output the seedling condition category with the highest probability. When the conf value is between the first preset threshold and the second preset threshold, the original image sample is marked as pending review and a prompt is given to retake the image or vote with multiple images. When the conf value is lower than the second preset threshold, the original image sample is directly marked as pending review.

[0055] Forward inference is performed on a single standardized image to obtain a probability vector and confidence score. A confidence threshold is set based on the principle of engineering controllability: when conf ≥ 0.80, the category corresponding to the highest probability is directly output; when 0.60 ≤ conf < 0.80, it is marked as "pending verification," prompting for reshoots or a majority voting strategy for multiple images of the same scene; when conf < 0.60, it is directly marked as "pending verification," avoiding outputting strong conclusions under low confidence conditions. These thresholds can be fine-tuned during the deployment phase based on operational risk preferences to maintain production availability.

[0056] In some embodiments, the sample proportions of excessively growing seedlings, Class I seedlings, Class II seedlings, and Class III seedlings are determined within a preset statistical region or time window; and based on these proportions, at least one management recommendation is output from among controlling excessive growth, maintaining growth, strengthening growth, and key intervention.

[0057] The final output includes image-level classification results, confidence scores, and timestamps, and generates an evaluation report, including overall accuracy, macro-average / weighted F1, Kappa coefficient, confusion matrix, reliability curve, and "proportion to be reviewed". It supports CSV and image export, facilitating the integration of scientific research archiving and production management.

[0058] To improve the consistency between the output probability and the true accuracy, temperature scaling calibration is performed on the validation set. Let logits be z, and single-parameter temperature scaling is performed using z′=z / T to obtain the calibrated probability. The calibration effect is evaluated using metrics such as reliability curves and expected calibration error (ECE), thereby improving the interpretability and usability of the confidence level.

[0059] The following is combined with Figure 3 A detailed description of the relationships between the modules is provided: Input Construction Module → Backbone Feature Extraction Module (MobileViT-XS) The input construction module receives and normalizes the field color image I, then feeds it into the backbone feature extraction module. The backbone feature extraction module performs progressive convolution / Transformer hybrid encoding on the input image, outputting a multi-level feature map sequence {F1,…,FN}, where the last three levels of features {FN-2,FN-1,FN} serve as the main information source for subsequent fusion.

[0060] SE Channel Attention Module Shallow features of the main trunk (embedded serial relationships) The SE channel attention module takes the shallow layer output Fstem (or shallow convolutional block output) of the backbone as input, generates channel weights, and performs channel-by-channel recalibration on the shallow features, outputting the enhanced shallow features F~stem. Therefore, the SE and the backbone network have a serial embedding relationship: the SE does not change the topological orientation of the backbone network, but only performs adaptive calibration on the channel dimension in the shallow layer, thus affecting the feature extraction quality of subsequent stages.

[0061] Stage output → CBAM spatial channel attention module (end-level high-level enhancement relationship) The CBAM spatial channel attention module only operates on the high semantic features FN at the end of the backbone. That is, after the backbone completes Stage N, it feeds FN into CBAM to obtain high-level features F^N = CBAM(FN) that emphasize the salient regions of the canopy. Therefore, the relationship between CBAM and the backbone Stage N is a terminal concatenation enhancement relationship: the CBAM output directly replaces the original high-level output for subsequent multi-scale convergence and classification.

[0062] Multi-scale convergence module (GAP) Three-scale features (parallel mapping relationships) The multi-scale aggregation module performs global average pooling on {FN-2, FN-1, F^N} to obtain three scale vectors {t4, t5, t6}. This process represents a parallel mapping relationship between the scale branches: each scale is independently pooled into a unified vector representation, providing input for subsequent token modeling and fusion.

[0063] Token Self-Attention Module Multi-scale tokens (cross-scale interaction relationships) The Token Self-Attention module takes {t4, t5, t6} as input, assembles them into a token sequence, performs multi-head self-attention computation, and outputs a global semantic vector z. Therefore, the relationship between Token-SA and the multi-scale convergence module is one of serialization and cross-scale interaction: Token-SA does not directly process two-dimensional feature maps, but instead performs global dependency modeling on the "Tokens obtained from the convergence of multi-scale features".

[0064] Fusion Module (Main multi-scale vector + global semantic vector) (Concatenation and fusion relationship) The fusion module concatenates the three-scale vector {t4,t5,t6} with the global semantic vector z output by Token-SA to form a fused feature f=Concat(t4,t5,t6,z). If Token-SA is turned off, the fused feature degenerates to f=Concat(t4,t5,t6). Therefore, the fusion module and the upstream modules have a multi-source convergence relationship: simultaneously receiving "local-mesoscale-high-scale information" and "global semantic summary".

[0065] Classification Header Module Feature fusion (discriminating output relationships) The classification head module performs fully connected mapping, nonlinear activation, and regularization on the fused feature f, outputting classification scores (logits) y for the four seedling conditions, which can be obtained as probabilities p through Softmax. Therefore, the classification head and the fusion module have an end-to-end output relationship: their inputs are entirely determined by the aforementioned attention enhancement, cross-scale modeling, and fused features.

[0066] This invention enables high-precision identification of wheat seedling conditions in specific areas at different times, balancing lightweight design with high precision. It allows for on-the-fly analysis on mobile or edge devices, making it suitable for high-frequency monitoring and precise management at the smallholder scale.

[0067] This invention also provides an intelligent classification system for wheat seedling conditions based on mobile phone images, comprising: (1) Acquisition module: used to acquire mobile phone images of wheat in the field and metadata such as shooting time and angle, and to perform sharpness, exposure and occlusion checks on the images; (2) Preprocessing module: used to perform size uniformity, color / brightness standardization, approximate white balance and secondary quality screening; (3) Model inference module: used to perform feature extraction and classification head calculation of WheatNeXt-Mini, and output the four probabilities and confidence scores; (4) Training and calibration module: used to perform training, validation, temperature scaling calibration and ECE evaluation offline or periodically online, and output deployable weights; (5) Identification module: used to output the final category based on the confidence threshold, and responsible for the "to be reviewed" logic; (6) Evaluation and Reporting Module: Used to generate confusion matrix, accuracy / F1 / Kappa, reliability curves and verification statistics; (7) Output module: used to provide results to the upstream management system or mobile app in the form of tables, images or APIs.

[0068] The above modules can be integrated within the same computing device or deployed in a distributed manner between the mobile device and the backend server: front-end data collection and some preprocessing are completed on the mobile device, while model inference and report generation can be completed locally or at the edge / cloud to meet different bandwidth and computing power conditions.

[0069] The system can be deployed on a device, which can be a general-purpose computer, an embedded terminal, or a mobile device. It supports offline operation and online updates of weight files. Even when the network is down, the device can still complete local inference and result storage, and automatically synchronize after the network is restored.

[0070] The wheat seedling condition identification method and system of this application have the following beneficial effects: (1) Pure model reasoning and weak threshold dependence: The whole process no longer relies on manually constructed indices based on GLI / CDI, but only uses a uniformly set confidence threshold as engineering control. The classification conclusion is mainly generated by end-to-end probability distribution, and the results are standardized and verifiable. (2) Lightweight and high precision: WheatNeXt-Mini achieves high-precision four-class classification with a small number of parameters and low computational cost, and is suitable for mobile / edge devices; (3) Attention Fusion + TokenSA: SE enhances channel sensitivity, CBAM combines spatial-channel saliency, and TokenSA captures long-range dependencies and group structure, significantly improving robustness under complex lighting / angle / background conditions; (4) Reliability management: Temperature scaling calibration + confidence threshold + "to be verified" mechanism to suppress overconfidence and facilitate production closed loop; (5) Easy to use: The entire process of data collection, standardization, training, reasoning, and evaluation is automated, and the output is directly connected to management actions such as "controlling the peak / maintaining / strengthening / key intervention"; (6) Scalability and portability: The method is applicable to multi-crop seedling identification tasks, and the system and device structure supports modular expansion and cross-platform portability.

[0071] The training process of the wheat seedling condition recognition model WheatNeXt-Mini in this application includes the following steps: 1) Image acquisition and input construction Within a predetermined timeframe, smartphones were used to collect color images of the target wheat population in the field, recording metadata such as shooting time, approximate shooting angle, and shooting equipment information. To ensure sample quality, images that were obviously blurry, severely overexposed or underexposed, or severely obstructed were first manually inspected and removed, retaining only those samples that met basic clarity and integrity requirements for subsequent processes.

[0072] A dataset was constructed based on mobile phone image samples from multiple locations and time periods (e.g., Lianyungang, Huai'an, and Suzhou in Jiangsu Province, covering the 2021-2022 growing season, with a total sample size of more than 3,000).

[0073] The original images undergo quality checks, and samples that are obviously blurry, severely overexposed, or underexposed are removed. The remaining images are then standardized to a size of 224×224 pixels, and bilinear interpolation is used for resampling to ensure consistency in spatial scale across different mobile phone camera resolutions and image sizes. For pixel value normalization, grayscale values ​​from 0 to 255 are first linearly mapped to the [0,1] interval, and then mean-variance normalization is performed on each channel: the pixel value at position (x,y) of the c-th channel is the normalized pixel value I. c (x,y), then the normalized pixel is: ; Where, μ c and σ c These are the mean and standard deviation of the channel, obtained statistically from the training set. This step statistically unifies the brightness and contrast of each channel, which can be regarded as an approximate white balance. This ensures that images from different models and under different lighting conditions have a similar intensity distribution when input into the model, thereby compressing model differences and environmental disturbances within a controllable range and significantly improving the consistency of model input.

[0074] Group by source / date and divide training / verification / testing in a ratio such as 6:2:2 to reduce the risk of information leakage.

[0075] 2) Training set During the training phase, standardized images are augmented online to expand the effective sample space and improve model robustness. Specifically, this includes geometric augmentation such as random horizontal flipping and random cropping / scaling, as well as illumination augmentation such as brightness and contrast, at the input end. Furthermore, RandAugment is introduced as a unified augmentation strategy, which randomly selects several operations and intensity combinations from a set of predefined operators and applies them to the image to simulate different shooting poses and lighting conditions.

[0076] Furthermore, Mixup / CutMix composite enhancement is used at the mini-batch level: let the two images and their one-hot labels be (x... i ,y i ),(x j ,y j If weights λ are sampled from the Beta distribution, then the Mixup augmented sample can be expressed as: , , CutMix achieves region-level blending by spatially cropping and pasting image patches. This type of enhancement significantly increases the combinations of occlusion, overlap, and complex backgrounds without changing the semantic meaning of the labels, giving WheatNeXt-Mini stronger generalization ability for scenarios such as low light, backlight, overlapping leaves, and weed interference. The validation and test sets only use the normalization procedure without applying the above enhancements to ensure the objectivity of the evaluation.

[0077] 3) Training process The WheatNeXt-Mini model, with MobileViT-XS as its backbone, is a lightweight convolutional-transformer hybrid network designed for re-cropping and reassembling field images on mobile phones. MobileViT-XS characterizes detailed features such as leaf texture and row spacing through local convolutional blocks, and perceives the overall canopy structure and long-range dependencies through embedded self-attention. It achieves strong representation capabilities with low parameter and computational costs, providing a basic backbone suitable for mobile deployment in this invention.

[0078] Based on this core structure, this application innovates at the module level by focusing on "attention enhancement + lightweighting". First, an SE channel attention module is inserted in the shallow feature stage. The SE module obtains channel statistics through global average pooling, generates channel weights through two layers of lightweight MLP and sigmoid activation, and adaptively recalibrates feature channels related to leaf color depth, leaf number, and plant compactness, suppressing background noise channels. This significantly improves the sensitivity to subtle differences in seedling condition with only a very small number of parameters. Second, a CBAM module is deployed near the output stage. The CBAM module connects channel attention and spatial attention. It first redistributes weights in the channel dimension and then generates an attention map in the spatial dimension, guiding the network to focus on key areas and texture changes such as wheat rows, sparse strips, weed patches, and lodged areas, thereby maintaining stable discrimination in complex field backgrounds. Furthermore, a lightweight TokenSA module is introduced at the bottleneck layer to compress the high-dimensional feature map into a compact set of tokens. Multi-head self-attention is performed on the token dimension to model the long-range dependencies and group structure between different spatial regions. The enhanced features after modeling are then fused back into the backbone network.

[0079] The classification head maps the global representation after fusion attention and outputs a four-dimensional probability vector and confidence level corresponding to the seedlings of vigorous growth, Class I seedlings, Class II seedlings, and Class III seedlings.

[0080] In one embodiment, the WheatNeXt-Mini model is used for wheat image classification. Experimental results show that, with approximately 2.29M parameters and a computational cost of approximately 0.704 GFLOPs, WheatNeXt-Mini achieves an overall accuracy of over 99.3% in wheat seedling classification. Its F1-macro, Recall-macro, and Kappa coefficients are significantly higher than those of comparable models such as EfficientNet-B0, EfficientNet-B1, and ResNet-18. While maintaining inference speed and model size suitable for mobile deployment, it surpasses the accuracy of existing mainstream convolutional backbone models, demonstrating the comprehensive advantages of modular innovation and overall lightweight design based on MobileViT-XS. The combination of attention fusion and TokenSA maintains robust discrimination even in complex field scenarios such as low light, backlight, overlapping leaves, and weed interference, making it suitable for mobile phone shooting conditions in actual production environments.

[0081] In its implementation, TokenSA's attention weights can be described as "using the similarity between the Query and Key, normalized by softmax, and then weighting the Value to obtain the contextual representation." Its core relationship can be summarized as: Attn(Q,K,V)=softmax(QK) T / √d)·V, where d is the projection dimension. To reduce computational overhead, lightweight designs such as token compression and shared projection are adopted.

[0082] Where Q, K, and V are the query, key, and value obtained from the token features through linear transformation, respectively, and d is the projection dimension. To reduce computational overhead, this invention employs lightweight designs such as token compression and shared projection in TokenSA, performing attention operations only on a small number of tokens, significantly reducing the number of multiply-accumulate operations compared to directly applying global attention to the entire feature map. In engineering implementation, mixed-precision inference and optimized memory layout can be combined to further compress memory usage and latency, making WheatNeXt-Mini feasible to run on general-purpose GPU servers as well as for deployment on mobile or edge devices.

[0083] Without altering the fundamental idea of ​​this invention, further integration is possible: (a) Robust enhancement: Add color perturbation, Cutout, lightweight Mixup / CutMix, etc. during the training phase; (b) Light distillation: guiding WheatNeXt-Mini feature consistency with larger teacher networks (such as EfficientNet-B2 / B3, ResNet-50); (c) Multi-image fusion: Probability averaging or voting is performed on multiple images taken at the same time and location to improve stability in low-light and backlight scenes; (d) Incremental learning: Lightweight retraining or small parameter adaptation is performed as new samples arrive to maintain long-term performance.

[0084] The experiments of this invention were conducted in a computer environment with deep learning training and inference capabilities.

[0085] The experimental hardware and software configurations are as follows: Processor (CPU): Intel(R) Core i7-13700K or equivalent; Graphics Processing Unit (GPU): NVIDIA RTX 4060 Ti, 24GB VRAM; System memory: 64GB DDR5; Storage device: 2TB NVMe solid-state drive; Operating System: Windows 11 x64 and Ubuntu 22.04 LTS dual-environment verification; Deep learning frameworks: PyTorch 2.1.0, CUDA 12.1, cuDNN 8.9; Dependencies include: timm0.9.12, torchvision, pandas, numpy, scikit-learn, matplotlib, thop, etc.

[0086] The training phase utilized a single GPU environment, enabling Automatic Mixed Precision (AMP) and channels_last memory layout optimization to improve throughput and reduce GPU memory usage. The training batch size was set to 32, with an input size of 224×224. The total time for a single forward and backward propagation step was approximately 0.16 seconds, with GPU utilization maintained above 90%. The image dataset contained 3750 images, and the entire training cycle consisted of approximately 100 epochs, taking approximately 0.5 hours on an RTX 4060 Ti environment.

[0087] The optimization method uses the AdamW optimizer with an initial learning rate of 1×10⁻⁶. -3 Weight decay 1×10 -4 The learning rate scheduling strategy is Cosine Annealing LR, which automatically reduces the learning rate in the later stages of training.

[0088] The model loss function is cross-entropy loss, and class weights are introduced as needed based on the proportion of sample classes.

[0089] An early stopping mechanism is introduced during training. When the average F1 score of the validation set macros shows no improvement for five consecutive rounds, training is stopped and the optimal weight file is rolled back.

[0090] To further improve the reliability of the probability output, the model undergoes temperature scaling calibration on the validation set. Let the classification logits vector be z, and the calibration relationship be: z′ = z / T, where T is the temperature parameter. The optimal value is determined by minimizing the negative log-likelihood loss. The calibrated probabilities are then transformed using softmax to obtain the final probabilities. The expected calibration error (ECE) is then evaluated on the validation set.

[0091] Experimental results show that after calibration, the model's ECE decreased from 0.041 to 0.027, the reliability curve is close to the ideal diagonal, and the prediction confidence is consistent with the actual accuracy.

[0092] Under the same dataset partitioning and evaluation protocol, the WheatNeXt-Mini model achieved an overall accuracy of 99.3% on the validation set, a macro-average F1 score of 99.3%, and a Kappa coefficient of 0.991.

[0093] The average processing time for a single image during the inference stage is approximately 35 milliseconds, enabling real-time recognition in a mobile simulation environment.

[0094] Compared with lightweight networks of the same level (such as EfficientNet-B0, ResNet18, MobileNetV3-Small), the model of this invention improves accuracy by 1–2% while increasing inference speed by about 40%, which is significantly better than traditional convolutional structures.

[0095] The inference side uses `conf=max(p)` as the confidence level. When `conf≥0.80`, the class with the highest probability is output directly; when `0.60≤conf<0.80`, it is marked as "pending verification," prompting the user to retake the photo or adopt the majority vote of multiple images of the same scene; when `conf<0.60`, it is directly marked as "pending verification." This mechanism effectively suppresses overconfidence in abnormal scenarios and facilitates the closed-loop execution of "reconfirmation—re-collection—re-judgment" on-site. For easy tracking, a timestamp and sample identifier are recorded for each judgment.

[0096] Secondly, embodiments of this application also provide a wheat seedling condition identification system, including: The image acquisition module is used to acquire raw images of wheat. The image processing module is used to preprocess the original image to obtain the target image; The image recognition module is used to input the target image into the lightweight deep learning model WheatNeXt-Mini for recognition and obtain the wheat seedling condition recognition result. The WheatNeXt-Mini model includes a backbone feature extraction module, an SE channel attention module, a CBAM spatial channel attention module, a Token self-attention module, a feature fusion module, and a classification head module. The backbone feature extraction module uses the MobileViT-XS model to perform multi-scale feature extraction on the input target image to obtain a multi-level feature map sequence; The SE channel attention module is in series and embedded into the shallow feature extraction stage of the MobileViT-XS model to generate channel weights for channel-by-channel recalibration of shallow features. The CBAM spatial channel attention module is cascaded and embedded into the high-level feature extraction stage of the MobileViT-XS model to perform joint attention processing on high-level features in both channel and spatial dimensions, resulting in enhanced high-level features. The Token self-attention module is used to perform multi-scale convergence on the enhanced high-level features to obtain multi-scale vectors, and then use them to form a Token sequence to perform multi-head self-attention calculation to output a global semantic vector. The feature fusion module is used to concatenate multi-scale vectors and global semantic vectors to obtain fused features; The classification head module is used to map the fused features and output the identification results corresponding to different seedling condition categories.

[0097] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0098] The system of this invention can be deployed in multiple forms: (1) Local computer / edge terminal: suitable for offline or weak network environments, to complete preprocessing, inference and report generation; (2) Mobile App: Data collection and some preprocessing are completed on the app, and inference can be completed on the app or the server. (3) Cloud-edge collaboration: The front end completes data collection and light preprocessing, while the edge / cloud performs inference and reporting.

[0099] It supports incremental learning and lightweight distillation, and updates on a rolling basis with new samples; it supports crop expansion and scene transfer, and can quickly adapt to seedling identification of other crops within the same framework.

[0100] The system in this application is secure and compliant. It only processes field images actively collected by users, provides local inference and offline reporting capabilities, and does not force the uploading of original images. If cloud training and evaluation are enabled, the system follows the principle of data minimization, retains necessary statistical and anonymized metadata, and supports deletion as needed.

[0101] Without departing from the spirit and substance of this application, any adjustments to the main structure (equivalent lightweight backbone), the insertion position and number of attention modules, training details (loss function, regularization and scheduling), calibration methods (order-preserving calibrations other than temperature scaling), and threshold settings are all equivalent substitutions or modifications of this invention and fall within the protection scope of this invention.

[0102] In this embodiment, to verify the operability, stability, and applicability of the crop condition classification system based on the WheatNeXt-Mini model, a typical usage process based on the Windows PowerShell environment is provided. This system can be packaged as an executable software package; the package structure is described below. Figure 4 As shown, users can complete model training, validation, inference, and result export via command line without writing any program code, making it suitable for direct deployment by research and production units.

[0103] The system described in this embodiment is based on the improved WheatNeXt-Mini wheat seedling condition recognition model, which supports the automatic classification of wheat field images into the following four seedling condition levels: vigorous growth seedlings, Class I seedlings, Class II seedlings, and Class III seedlings, and provides dual output formats of result files and classification folders.

[0104] (1) Environmental preparation Users install Python and Conda environments on the target computer and extract the installation package provided by this invention to a local directory, for example: E:\wheatmini_envsafe_pkg\.

[0105] In Windows PowerShell, execute the following commands sequentially to complete the environment configuration and system installation (example): conda create -n wheatmini python=3.10 -y conda activate wheatmini pip install -r requirements.txt `pip install -e`. The PowerShell interface looks like this. Figure 5 As shown.

[0106] When the system runs for the first time, it will automatically detect the local GPU / CUDA environment and prioritize GPU acceleration for computing; if no GPU is available, it will automatically switch to CPU mode to ensure system availability.

[0107] The system integrates an environment correction module that can automatically handle issues such as OpenMP multi-library conflicts, eliminating the need for users to manually configure environment variables.

[0108] (2) Model training operation Users set training parameters uniformly through configuration files, for example, specifying them in wheatmini.yaml: Training dataset path: data_root:E: / images_aug Output directory: out_dir:E: / wheatmini_ckpts Parameters include image size, batch size, number of training epochs, learning rate, and whether early stopping is enabled.

[0109] To start training, execute the following command in PowerShell: wheatmini-train--config wheatmini.yaml The system will automatically complete the following steps: Read wheat image data from the field according to the predetermined directory structure; Perform image preprocessing and data augmentation; The WheatNeXt-Mini model is used for iterative training. At the end of each epoch, calculate and output the validation set accuracy, macro-average F1 score, and loss.

[0110] Training process information is displayed in real time via command line and simultaneously saved to: out_dir / train_log.csv: Records metrics such as Loss and Accuracy for each epoch; out_dir / best_model.pt: Saves the weights of the best-performing model; out_dir / curves / : Stores training and validation curves for easy result analysis and record keeping.

[0111] (3) Batch prediction and hierarchical output of results After the model is trained, users can perform batch crop condition identification on the field images to be tested. Users specify the following in the configuration file or command: The path to the trained weights file, for example: weights:E: / wheatmini_ckpts / best_model.pt The path to the folder containing the images to be predicted, for example: infer_dir:E: / wheat_test_images Execute in PowerShell: wheatmini-predict--config wheatmini.yaml The system will automatically complete the following operations: Load the specified WheatNeXt-Mini model weights; Perform inference on each image in the input folder; For each image, assign its category and confidence level; The images are automatically saved to four subdirectories according to the recognition results, for example: ... / Prosperous Seedlings / ... / Class I seedlings / ... / Class II seedlings / ... / Three types of seedlings / The output directory will generate a table like pred_results.csv, which includes image filenames, prediction categories, and corresponding confidence scores. This table is for illustrative purposes only; the actual generated pred_results.csv may contain multiple prediction records.

[0112]

[0113] The entire forecasting process is completed locally, without the need for a network connection, making it suitable for field laptops or offline environments.

[0114] (4) Fast recognition of a single image When rapid crop condition detection is required for a single image, users can specify the path to the single image in the configuration file or pass parameters via the command line (the implementation can be set according to the package version). The system calls the same model for inference, directly returning the crop condition level and confidence score of the image, and can optionally output a result image with category labeling for convenient on-site rapid decision-making.

[0115] (5) Parameter configuration and repeatable operation The core operating parameters of this application system are all concentrated in the configuration file wheatmini.yaml, including: Data path, output path; Model structure and category names (proliferating seedlings / Class I seedlings / Class II seedlings / Class III seedlings); Training rounds, learning rate, batch size, early stopping strategy, etc.

[0116] Users can implement different experimental schemes by modifying the configuration file without modifying the source code.

[0117] The system automatically records the model files, log files, and prediction result files generated each time it runs, which facilitates result traceability and comparative analysis and improves the reproducibility of the experiment.

[0118] (6) System stability and applicability description The encapsulation method described in this embodiment shields the complex details of the underlying deep learning framework, enabling non-program developers to complete the wheat seedling identification task through standard commands.

[0119] The system supports accelerated operation in a GPU environment and can also work normally in a regular CPU environment. It is suitable for deployment and use by scientific research institutions, agricultural technology extension departments and agricultural enterprises under different hardware conditions.

[0120] Through a unified command-line interface and configuration file management mechanism, this system has achieved a complete automated process from model training and seedling identification to result export, and has good engineering portability and promotion and application value.

[0121] Thirdly, this application also provides an electronic device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The processor loads and executes the at least one instruction, at least one program, code set, or instruction set to implement the wheat seedling identification method in this application.

[0122] Fourthly, embodiments of this application also provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the wheat seedling condition identification method in embodiments of this application.

[0123] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0124] The foregoing has shown and described the basic principles, main features, and advantages of this application. Those skilled in the art should understand that the above embodiments do not limit this application in any way, and all technical solutions obtained by equivalent substitution or equivalent transformation fall within the protection scope of this application.

Claims

1. A method for identifying wheat seedling conditions, characterized in that, The method includes: Obtain the raw image of the wheat; The target image is obtained by preprocessing the original image; The target image is input into the lightweight deep learning model WheatNeXt-Mini for recognition to obtain wheat seedling condition recognition results; wherein, the WheatNeXt-Mini model includes a backbone feature extraction module, an SE channel attention module, a CBAM spatial channel attention module, a Token self-attention module, a feature fusion module, and a classification head module; The backbone feature extraction module adopts the MobileViT-XS model to perform multi-scale feature extraction on the input target image to obtain a multi-level feature map sequence; The SE channel attention module is embedded in series with the shallow feature extraction stage of the MobileViT-XS model to generate channel weights for channel-by-channel recalibration of shallow features. The CBAM spatial channel attention module is embedded in series with the high-level feature extraction stage of the MobileViT-XS model to perform joint attention processing on high-level features in both channel and spatial dimensions, thereby obtaining enhanced high-level features. The Token self-attention module is used to perform multi-scale convergence on the enhanced high-level features to obtain multi-scale vectors, and then use them to form a Token sequence to perform multi-head self-attention calculation to output a global semantic vector. The feature fusion module is used to concatenate the multi-scale vector and the global semantic vector to obtain fused features; The classification head module is used to map the fused features and output identification results corresponding to different seedling conditions.

2. The method according to claim 1, characterized in that, The feature fusion module is also used to concatenate the multi-scale vector to obtain fused features when the Token self-attention module is turned off.

3. The method according to claim 1, characterized in that, The preprocessing of the original image to obtain the target image includes: Select a standard template; The original image is processed according to a standard template to unify its size, resolution, and color space. The image after unified processing is normalized to obtain the target image.

4. The method according to claim 1, characterized in that, The original image was captured by a mobile terminal.

5. The method according to claim 1, characterized in that, The mapping of the fused features to output identification results corresponding to different crop condition categories includes: The fusion features are mapped to output a four-dimensional probability vector and confidence level corresponding to the vigorous growth seedlings, Class I seedlings, Class II seedlings, and Class III seedlings; The seedling condition category corresponding to the target image is determined based on the probability vector and the confidence level.

6. The method according to claim 5, characterized in that, The method further includes: generating a result table according to the original image file name, the seedling condition category and the confidence level, and storing or visualizing the recognition result in association with the original image.

7. The method according to claim 5, characterized in that, The method further includes: the confidence level being the maximum value in the four-dimensional probability vector. When the confidence level is greater than or equal to the first preset threshold, output the crop condition category with the highest probability. When the confidence level is between the first preset threshold and the second preset threshold, the original image sample is marked as pending review and a prompt is made to retake the image or vote with multiple images. When the confidence level is lower than the second preset threshold, the original image sample is directly marked as pending review.

8. The method according to claim 5, characterized in that, The method further includes: The sample proportions of vigorous seedlings, Class I seedlings, Class II seedlings, and Class III seedlings within a preset statistical area or time window; Based on the stated proportion, output at least one management recommendation from among controlling excessive growth, maintaining, strengthening, and key intervention.

9. A wheat seedling condition identification system, characterized in that, include: The image acquisition module is used to acquire raw images of wheat. The image processing module is used to preprocess the original image to obtain the target image; The image recognition module is used to input the target image into the lightweight deep learning model WheatNeXt-Mini for recognition, and obtain the wheat seedling condition recognition result; wherein, the WheatNeXt-Mini model includes a backbone feature extraction module, an SE channel attention module, a CBAM spatial channel attention module, a Token self-attention module, a feature fusion module, and a classification head module; The backbone feature extraction module adopts the MobileViT-XS model to perform multi-scale feature extraction on the input target image to obtain a multi-level feature map sequence; The SE channel attention module is embedded in series with the shallow feature extraction stage of the MobileViT-XS model to generate channel weights for channel-by-channel recalibration of shallow features. The CBAM spatial channel attention module is embedded in series with the high-level feature extraction stage of the MobileViT-XS model to perform joint attention processing on high-level features in both channel and spatial dimensions, thereby obtaining enhanced high-level features. The Token self-attention module is used to perform multi-scale convergence on the enhanced high-level features to obtain a multi-scale vector, and then use it to form a token sequence to perform multi-head self-attention calculation to output a global semantic vector. The feature fusion module is used to concatenate the multi-scale vector and the global semantic vector to obtain fused features; The classification head module is used to map the fused features and output identification results corresponding to different seedling conditions.

10. An electronic device, characterized in that, The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the wheat seedling condition identification method as described in any one of claims 1-8.