FSA-GhostNet:面向部署导向型作物生长监测的频域-空间自适应轻量化网络
面向作物监测的轻量化网络研究,方法新颖但应用范围有限,时效性一般。
针对温室图像光照变化与遮挡难题,内蒙古农业大学团队构建黄瓜生长数据集 CGD 并提出轻量化骨干 FSA-GhostNet(参数2.07M,RTX 3060 上 13.96 ms/张);在 CGD 上生长阶段分类准确率 98.22%、播后天数回归 MAE 0.93 天、R² 0.9962,ImageNet-100 上准确率 78.98%,为温室智慧农业边缘部署提供算力-精度均衡方案。
1. Introduction
Smart agriculture increasingly relies on computer vision and Agricultural Internet of Things (IoT) systems to convert continuous field or greenhouse observations into actionable management information [1,2,3,4]. Recent studies show that visual sensing platforms, including fixed cameras and unmanned aerial systems, can support crop growth monitoring, phenotyping, and production management in agricultural environments [5,6]. In such settings, recognition models must remain computationally efficient while delivering reliable performance, because agricultural monitoring systems often operate under tight constraints on computing, memory, and energy [7,8,9]. Edge-side analysis may also offer practical advantages over cloud-only processing in greenhouse monitoring [10,11], including lower bandwidth demand for image transmission, shorter end-to-end latency [12], and greater continuity when network connectivity is unstable. These conditions motivate the development of compact visual backbones, even though full hardware-level deployment validation remains beyond the scope of the present study.
Within this broader setting, greenhouse crop growth monitoring remains challenging [13,14]. Among protected-cultivation vegetables, cucumber is a particularly relevant target for visual monitoring [15] because commercial production depends on repeated assessment of plant condition, including leaf development, flowering, and fruit set, all of which inform management decisions. In the greenhouse scenario considered here, cucumber images exhibit illumination variation, partial occlusion, and cluttered backgrounds composed of soil, irrigation facilities, and reflective plastic surfaces [16]. Adjacent growth states may also differ only through subtle morphological and textural cues [17]. Growth monitoring is therefore sensitive to both background interference and fine-grained temporal variation. The practical question addressed in this study is how to preserve reliable growth recognition and temporal estimation within a compact visual model.
Existing lightweight convolutional neural networks (CNNs), including ShuffleNet, MobileNetV3, and GhostNet-based variants, have shown favorable accuracy–efficiency trade-offs on generic benchmarks [7,8,18]. More recent lightweight architectures have incorporated transformer-based or frequency-related mechanisms to strengthen contextual modeling [19,20,21]. At the same time, deep learning has been widely applied in smart agriculture for disease recognition, target detection, yield estimation, and crop monitoring [5,6,22,23,24,25,26]. Even so, comparatively few studies have considered lightweight backbone design, dense greenhouse crop growth monitoring, and the joint prediction of discrete growth categories and continuous developmental progress within a single framework. This gap matters in practical greenhouse monitoring, where compactness and sensitivity to temporal change are both required.
Against this background, this study aimed to develop a lightweight visual backbone for greenhouse crop growth monitoring that improves feature representation under complex backgrounds while preserving computational compactness. Greenhouse cucumber was selected as the application scenario, and the proposed model was evaluated on both ImageNet-100 and a self-constructed Cucumber Growth Dataset (CGD). A joint learning setting was further examined for simultaneous growth-stage classification and continuous Days After Planting (DAP) regression. The main contributions of this study are as follows: (1) a Frequency–Spatial Adaptive (FSA) attention mechanism was introduced and incorporated into a lightweight backbone to support frequency–spatial feature modulation; (2) an FSA-GhostNet lightweight network was constructed by integrating FSA with enhanced lightweight modules and evaluated in terms of the accuracy–efficiency relationship; (3) a Cucumber Growth Dataset (CGD) was established for dense greenhouse cucumber growth monitoring and used for domain-specific assessment; and (4) a joint prediction framework was developed and validated for simultaneous classification and regression to support finer-grained crop growth analysis.
2. Materials and Methods
This section describes the research design, data sources and sampling strategy, variables and instruments, model components, analytical procedure, validation strategy, and evaluation criteria used to assess FSA-GhostNet in both general-domain and agricultural crop-monitoring scenarios.
2.1. Study Design
A comparative design with two linked evaluation stages was adopted. In the first stage, ImageNet-100 served as a general-domain benchmark for assessing the classification capacity and generalization behavior of lightweight backbones under a unified protocol. In the second stage, the self-constructed Cucumber Growth Dataset (CGD) was used to evaluate performance in greenhouse crop monitoring and to extend the analysis from single-task classification to joint classification-regression prediction.
The target operating condition was periodic image-based greenhouse monitoring under resource-constrained agricultural IoT conditions. More specifically, the intended scenario involves repeated RGB image acquisition in a greenhouse environment, limited local computing and memory resources, and the need for timely model response without full dependence on continuous cloud communication. The overall workflow comprised CGD acquisition and labeling, model construction, general-domain benchmarking, greenhouse-domain validation, and joint task analysis. In the agricultural task, the analytical unit was a single image, and each image was associated with either a discrete timestamp category, a continuous Days After Planting (DAP) value, or both, depending on the experiment. All benchmark and domain-validation experiments were conducted under the same data partitioning scheme, augmentation strategy, training schedule, and computing environment.
2.2. Dataset and Sampling
Two data sources were used: the self-constructed Cucumber Growth Dataset (CGD) for the agricultural task and ImageNet-100 for general-domain benchmark comparison.
2.2.1. Cucumber Growth Dataset (CGD)
CGD was established to address the shortage of dense time-series image data for crop growth monitoring under realistic greenhouse conditions. Cucumber was selected as the target crop because it is an important protected-cultivation crop in the study region, exhibits clear phenotypic change across the production cycle, and requires timely management during cultivation. The dataset was therefore designed to support dense temporal observation of crop development and downstream prediction of both growth-stage category and continuous DAP. Data were collected in Shandong Province, China, a major vegetable production region with substantial demand for smart agricultural technologies. The acquisition site was a standardized temperature-controlled greenhouse of Shandong Ruyuan Chunqiu Gengdu Culture Co., Ltd., located in Xizhou Town, Qufu City, Shandong Province, China (117.056° E, 35.537° N).
Images were acquired from December 2025 to February 2026 using a REDMI Turbo 4 smartphone, manufactured by Xiaomi Communications Co., Ltd., Beijing, China. Here, the smartphone served only as an image collection device under routine greenhouse conditions rather than as the target deployment platform for inference. A total of 16,840 images were collected across 22 independent acquisition sessions spanning from the first day after planting (DAP1) to the 71st day after planting (DAP71), yielding a dense temporal dataset with 22 timestamped categories. To improve comparability across time points, images were captured from fixed observation positions, primarily at eye level and from top-down views, and each image was aligned with the actual chronological growth age of the cucumber plants.
For downstream analysis, CGD provides both discrete and continuous labels. The timestamped categories were used as classification labels for growth-stage-related recognition, whereas the corresponding DAP values were retained as continuous targets for regression in the joint prediction setting. In the experimental implementation, the regression target was parsed directly from the numeric DAP value encoded in each timestamp folder name, so the target represented actual chronological age rather than an ordinal stage index. Because neighboring acquisition sessions in CGD were typically separated by short but irregular temporal intervals, most commonly about 2–4 days, the regression evaluation also considered whether a prediction fell within an acceptable 3-day tolerance window. In practical terms, the dataset was intended to support visual estimation of greenhouse crop developmental status and thereby provide a basis for time-sensitive cultivation decisions such as growth assessment, management scheduling, and harvesting planning.
2.2.2. ImageNet-100
ImageNet-100 is a randomly selected subset of ImageNet-1K (ILSVRC 2012) [27] containing 100 object categories. In this study, it served as a standardized reference benchmark for head-to-head architectural comparison under a unified computational budget. The use of this dataset enabled the proposed backbone improvements to be assessed in a general visual recognition setting before domain-specific validation on greenhouse crop imagery.
For both datasets, samples were partitioned into training, validation, and testing subsets at a ratio of 6:2:2. A fixed global random seed (42) was used during data partitioning and data loading so that all comparison models were evaluated under the same underlying data distribution. For the joint prediction experiment, the same CGD split was retained and paired with the corresponding continuous DAP labels.
2.3. Variables, Instruments, and Model Components
The independent variable was model configuration, including backbone choice in the benchmark comparisons and module composition in the ablation analysis. The dependent variables were classification accuracy, trainable parameter count, mean absolute error (MAE), root mean square error (RMSE), coefficient of determination ($R^{2}$), and the 3-Day Tolerance Rate (3DTR), depending on the experimental setting.
Two categories of instruments were involved. The first was the image acquisition device used to construct CGD, namely the REDMI Turbo 4 smartphone described above. The second was the training and evaluation platform used for model development and testing. Table 1 summarizes the hardware configuration and runtime environment used in this study. This platform corresponds to the model development and evaluation environment rather than to a physical agricultural edge device.
Table 1. Training Hardware and Runtime Environment.
The model examined in this study was FSA-GhostNet, a lightweight visual backbone for agricultural temporal monitoring. Its main components are a hierarchical GhostNet-style backbone, the Frequency–Spatial Adaptive (FSA) attention module, an enhanced Ghost block, two context-aware activation functions, and a joint task prediction head.
2.3.1. FSA-GhostNet Architecture
FSA-GhostNet follows a hierarchical feature extraction structure. The input image tensor is defined as
$$
X \in \mathbb{R}^{B \times 3 \times H \times W} ,
$$
(1)
where B denotes batch size and H and W denote the spatial height and width of the input image. The network first performs shallow feature mapping through a standard $3 \times 3$ convolutional stem. A $3 \times 3$ kernel was used at this stage to capture local spatial structure in the raw image while preserving a sufficiently broad receptive field for early visual encoding. The backbone then comprises four stacked FSA-GhostNetBlock stages, which progressively perform spatial downsampling and channel expansion to 32, 64, 128, and 256 channels, respectively, thereby producing multi-scale feature representations.
After feature extraction, a global adaptive average pooling layer compresses the two-dimensional feature map into a one-dimensional representation, which is passed to a shared feature layer. The network then branches into two task-specific heads: a classification head for discrete Days After Planting (DAP) category prediction and a regression head for continuous DAP estimation. A parallel two-head design was adopted rather than a serial design so that the regression branch could learn continuous developmental progress directly from the shared representation rather than from discretized class predictions. This design reduces the dependence of regression on accumulated classification errors while preserving joint optimization of the two related tasks. The overall model structure is shown in Figure 1.
Figure 1. Overall workflow and model structure of FSA-GhostNet. The figure shows the global processing pipeline, while detailed module operations are described mathematically in Section 2.3.2, Section 2.3.3, Section 2.3.4 and Section 2.3.5.
2.3.2. Frequency–Spatial Adaptive Attention
The Frequency–Spatial Adaptive Attention (FSA) module was used to incorporate frequency-domain information into local convolutional processing. Given the input feature tensor defined above, with C denoting the number of channels, the module first applies channel compression using a bias-free $1 \times 1$ convolution to obtain the compressed feature $X_{c}$. A $1 \times 1$ kernel was selected here because it performs lightweight channel mixing and dimensionality reduction without introducing additional spatial aggregation, thereby reducing the computational burden of the subsequent frequency-domain transform. To improve numerical stability during mixed-precision (FP16) training, $X_{c}$ is converted to single precision (FP32) before the two-dimensional Fast Fourier Transform (2D-FFT) is applied. The mapping to the complex frequency domain is written as:
$$
\mathcal{F} \left(\right. u , v \left.\right) = \sum_{h = 0}^{H - 1} \sum_{w = 0}^{W - 1} X_{c} \left(\right. h , w \left.\right) e^{- j 2 \pi \left(\frac{u h}{H}+\frac{v w}{W}\right)} .
$$
(2)
Here, $\mathcal{F} \left(\right. u , v \left.\right)$ denotes the complex-valued frequency response at frequency coordinate $\left(\right. u , v \left.\right)$, h and w are spatial indices, and j is the imaginary unit. In physical terms, this transformation separates broad structural information and slowly varying illumination patterns from sharper local transitions such as leaf edges, vein textures, and background boundaries. In the frequency domain, the features are decomposed into a magnitude spectrum $\mathcal{M} = \left|\right. \mathcal{F} \left|\right.$ and a phase spectrum $\mathcal{P} = \angle \mathcal{F}$. The FSA mechanism then generates adaptive low-frequency and high-frequency weights, denoted as $w_{low}$ and $w_{high}$, via Global Average Pooling (GAP) and a lightweight Multi-Layer Perceptron (MLP):
$$
\left[w_{low},w_{high}\right] = Softmax \left(Conv_{1 \times 1}\left(ReLU\left(Conv_{1 \times 1}\left(GAP\left(\right.X_{c}\left.\right)\right)\right)\right)\right) .
$$
(3)
In this expression, GAP denotes global average pooling and $w_{low}$ and $w_{high}$ denote adaptive weights for the low-frequency and high-frequency components, respectively. Based on a predefined frequency retention ratio $\rho$ (set to 0.25 in this study), a low-frequency mask matrix $M_{low}$ and its complementary high-frequency mask matrix $M_{high} = 1 - M_{low}$ are constructed. The adaptive modulation process of the magnitude spectrum is expressed as:
$$
\mathcal{M}^{'} = \left(\right. \mathcal{M} \bigodot M_{low} \left.\right) \cdot w_{low} + \left(\right. \mathcal{M} \bigodot M_{high} \left.\right) \cdot w_{high} .
$$
(4)
Here, $\mathcal{M}^{'}$ is the modulated magnitude spectrum and ⊙ denotes the Hadamard product. The modulated magnitude spectrum is then combined with the original phase spectrum $\mathcal{P}$, and $X_{spatial}$ is reconstructed in the spatial domain via the inverse Fast Fourier Transform (iFFT). The output feature $Y_{FSA}$ is then obtained through spatial attention generation and depth-wise convolutional gating:
$$
Y_{FSA} = \left(X\bigodot\sigma\left(Conv_{1 \times 1}\left(\right. X_{spatial} \left.\right)\right)\right) \bigodot \sigma \left(DWConv\left(\right.X\left.\right)\right) .
$$
(5)
In this equation, $\sigma \left(\right. \cdot \left.\right)$ denotes the Sigmoid activation function and $DWConv \left(\right. \cdot \left.\right)$ denotes depth-wise convolution.
2.3.3. Enhanced Ghost Module
An enhanced Ghost module was used to strengthen interaction between the primary and cheap branches. Given the input features of an intermediate layer, the primary branch generates intrinsic features $F_{pri}$ through standard convolution, whereas the cheap branch generates redundant features $F_{cheap}$ through depth-wise separable convolution. Rather than concatenating the two branches directly, $F_{cheap}$ is passed through a lightweight Feed-Forward Network (FFN) to generate an enhancement weight matrix $W_{enhance}$ with the same dimensions as $F_{pri}$. The refinement of the primary features is expressed as:
$$
F_{enhanced} = F_{pri} \bigodot \left(\right. 1 + W_{enhan