An official website of the United States government
Here's how you know
Official websites use .gov
A
.gov website belongs to an official
government organization in the United States.
Secure .gov websites use HTTPS
A lock (
) or https:// means you've safely
connected to the .gov website. Share sensitive
information only on official, secure websites.
As a library, NLM provides access to scientific literature. Inclusion in an NLM database does not imply endorsement of, or agreement with,
the contents by NLM or the National Institutes of Health.
Learn more:
PMC Disclaimer
|
PMC Copyright Notice
High-throughput plant phenotyping with hyperspectral imaging (HSI) is pivotal for accelerating crop improvement to address global food security. Adoption is limited by a data-processing bottleneck, forcing a trade-off between costly, inflexible commercial software and programming-intensive open-source libraries. To overcome this barrier, we developed PlantSpecLab, an open-source, no-code platform that unifies the HSI workflow from image processing to modeling within a single interactive interface. The platform introduces spectrally guided segmentation strategies (Range Averaging, Difference Enhancement) and a spectral Fractional-Order Differencing (FOD) preprocessor to enhance extraction of subtle, physiologically relevant features. Across diverse in-house and public datasets, FOD-preprocessed spectra improved model performance over conventional pipelines, yielding a mean classification accuracy of 82.86 % for tomato maturity and average R2 = 0.8638 for fruit firmness. In cross-software benchmarks, PlantSpecLab matched the accuracy of ENVI and code-based Python pipelines while reducing end-to-end workflow time by over 90 % (from approximately 80 minutes to about 8 minutes). PlantSpecLab provides a transparent, efficient analytical environment that lowers the technical barrier to HSI analysis. This enables researchers to prioritize biological interpretation while minimizing computational overhead.
Securing global food supplies amid climate change requires rapid development of crop varieties with higher yields, greater resilience and improved nutritional quality [1]. High-throughput phenotyping (HTP) accelerates this process by providing large-scale, quantitative measurements of plant traits that bridge genomics and field performance [2]. Among non-invasive sensing technologies, hyperspectral imaging (HSI) uniquely captures spatial and spectral information across hundreds of contiguous wavelengths. This capability enables non-destructive assessment of diverse physiological and biochemical properties, including nutrient status [3], water stress [4], disease progression [5] and fruit quality [6].
Despite its promise, adoption of HSI in plant science is hampered by a data-processing bottleneck [7]. The high dimensionality and volume of HSI data necessitate a complex, multi-stage workflow comprising radiometric calibration, segmentation, spectral extraction, extensive preprocessing such as scatter correction and derivative transformations, and development of robust models. Effective execution requires expertise across chemometrics, computer vision and programming, creating a substantial barrier for biologists, agronomists and breeders who possess deep domain knowledge but may lack computational skills.
Existing tools force researchers into a trade-off. Commercial packages (e.g., ENVI, The Unscrambler) offer user-friendly interfaces but are costly, inflexible and rely on proprietary “black-box” algorithms that hinder reproducibility [8]. By contrast, open-source libraries in Python or R (e.g., Spectral Python, scikit-learn, PlantCV) offer transparency and flexibility but require substantial programming and often yield fragmented, non-interactive workflows. Consequently, the accessibility gap persists, slowing integration of HSI into mainstream plant-phenotyping research.
To address these limitations, we developed PlantSpecLab: an open-source, end-to-end, GUI-based analytical environment that consolidates the entire hyperspectral workflow—from raw image ingestion to spectral modeling—into a unified, interactive and fully reproducible framework. Unlike systems that simply aggregate existing libraries, PlantSpecLab implements a structured workflow architecture with explicit process tracking, standardized parameter exposure and automated provenance management. This design enables users to experiment with alternative preprocessing and modeling strategies while ensuring that each analytical step can be replicated, audited or shared without ambiguity.
Beyond unifying the workflow, PlantSpecLab integrates several domain-optimized spectral enhancement tools that reduce user burden and improve modeling robustness. The embedded segmentation strategies, Range Averaging (RA) and Difference Enhancement (DE), provide spectrally guided object isolation that minimizes pixel-level noise and improves consistency across heterogeneous plant organs—offering a more stable and user-friendly alternative to conventional thresholding-based approaches. Furthermore, the fractional-order differencing (FOD) preprocessor enables continuous control over derivative intensity, yielding a more flexible and noise-tolerant enhancement of subtle biochemical signatures than traditional integer-order differentiation. These methods not only improve modeling performance but also reduce the extensive trial-and-error typically required when applying derivative-based preprocessing to plant spectra.
This paper presents the architecture and experimental validation of PlantSpecLab. The main contributions of this work are threefold:
1.
A unified, no-code and reproducible workflow solution: PlantSpecLab provides a complete, browser-based analytical workbench that integrates image processing, spectral preprocessing and machine-learning modeling within a traceable, end-to-end pipeline.
2.
Domain-optimized and user-friendly spectral analysis tools: The platform incorporates spectrally guided segmentation (RA, DE) and a flexible fractional-order differencing module (FOD), each designed to enhance usability and robustness for plant-specific HSI data.
3.
Comprehensive benchmark validation: Through extensive evaluations on multiple in-house and public datasets, including repeated statistical analysis, we demonstrate the platform's reliability, efficiency and versatility across both classification and regression tasks in plant phenotyping.
2. Materials and methods
2.1. Plant material and experimental design
2.1.1. Tomato fruit: Maturity staging and firmness measurement
Experiments were performed at the Shihezi Academy of Agricultural Sciences (85°03′E, 44°33′N) in 2022 using five representative processing tomato cultivars: Tunhe 306, Tunhe 6501, Tunhe 1701, Tunhe 6619, and Shifan 42 [9]. A total of 827 defect-free fruits were randomly collected across four defined maturity stages: mature green (33 days after anthesis, DAA), breaker (40 DAA), ripening (48 DAA), and fully ripe (55 DAA). Fruit firmness was determined using a handheld firmness tester following the protocol of [10], and the mean value was recorded for each fruit.
2.1.2. Tomato plant: Abiotic stress treatments
For abiotic stress evaluation, 370 tomato plants (Shiji Baoguan) were obtained from Shihezi University. The dataset followed the experimental design and treatment protocols described by [11], comprising control, drought, and low-temperature stress treatments.
2.1.3. Hyperspectral imaging
Hyperspectral images of tomato fruits and plants were acquired using two spectrally complementary imaging systems (Surface Optics Corporation, SOC, USA). The SOC-701-VP system, operating in the Visible and Near-Infrared (VNIR) range (376.1 nm–1043.7 nm), was used for fruit imaging, whereas the SOC-701-SWIR system, covering the Short-Wave Infrared (SWIR) range (915.5 nm–1698.7 nm), was employed for whole-plant imaging. For fruit imaging, 20 samples were positioned in each frame to enable high-throughput acquisition, necessitating subsequent individual object segmentation. Each fruit was imaged on both its adaxial (front) and abaxial (back) sides to capture comprehensive spectral information. For plant imaging, each frame contained a single plant. All acquisition and post-processing procedures followed the standardized protocol of [12]. Reflectance calibration was performed using white and dark reference corrections with the SRAnalysis710e software provided by the manufacturer. Detailed imaging parameters are summarized in Table S1.
2.2. The PlantSpecLab platform
This paper introduces PlantSpecLab, an open-source platform designed to provide a comprehensive, no-code solution for hyperspectral data analysis. Developed entirely in Python , PlantSpecLab utilizes the Dash framework to deliver a dynamic, browser-based graphical user interface (GUI), thereby eliminating the need for any user-side scripting. The platform's end-to-end analytical pipeline is logically structured into three core modules: Feature Extraction, Data Preprocessing, and Modeling. As illustrated in Fig. 1, the GUI is designed to reflect this modularity, providing dedicated workspaces for each stage of the analysis. Within each workspace, users can interact with intuitive controls (e.g., file uploaders, parameter sliders), while intermediate results—including false-color images, overlaid spectra, and model performance plots—are rendered interactively via Plotly callbacks. This architecture, with a Python back-end relying on standard scientific libraries (e.g., NumPy, Pandas, Scikit-learn) and a web-based front-end, ensures that PlantSpecLab is operating-system-agnostic and can be deployed locally or on a cloud server without compilation.
The platform's internal data flow and algorithmic stack are detailed in Fig. 2. Raw hyperspectral cubes are first ingested into the Feature Extraction Module, where users can employ one of two novel mask generation strategies—Range Averaging (RA) or Difference Enhancement (DE)—to produce an informative single-band image. This image then drives automated background and, where applicable, object-level segmentation. The spectrally averaged data from each resulting region of interest (ROI) are subsequently passed to the Data Preprocessing Module. This module allows for a flexible chain of operations, including scatter-correction methods such as Standard Normal Variate (SNV) and Multiplicative Scatter Correction (MSC), fractional-order differencing (FOD), and smoothing techniques such as the Savitzky-Golay(SG) filter. Each transformation is visualized in real time to provide immediate qualitative feedback. Finally, in the Modeling Module, the processed spectra can undergo optional feature selection or dimensionality reduction before being partitioned and fed into one of ten integrated machine learning algorithms for regression or classification tasks. To ensure full reproducibility, every stage allows for the export of its artifacts. A complete analysis yields: (i) serialized model files (.pkl); (ii) machine-readable performance reports (.csv) containing metrics such as Accuracy, F1-score, R2, and MAE; and (iii) all intermediate data, including ROI masks and preprocessed spectral matrices.
Overview of the end-to-end workflow implemented in PlantSpecLab. The platform consists of three modular components: Feature Extraction, Data Preprocessing, and Modeling. External input streams enable independent loading of hyperspectral images or spectra at any processing stage, whereas internal input streams allow optional reuse of outputs from upstream steps to facilitate flexible, iterative analysis.
Crucially, PlantSpecLab is built on a modular, open-source architecture designed for future extensibility. The platform's algorithmic toolkit, detailed in Table 1, combines our novel methods with wrappers for established libraries. This integrated collection is intended as a robust starting point rather than a fixed limitation. We therefore strongly encourage community contributions, as the platform's structure empowers researchers to easily integrate and benchmark their own custom algorithms. To facilitate this community-driven development, the entire codebase, user manual, and demonstration datasets are publicly available under the permissive MIT license at https://github.com/Another-Train/PlantSpecLab.
Table 1.
Algorithmic toolbox currently integrated in PlantSpecLab.
ROI extraction is a foundational step that leverages the rich information within a hyperspectral cube to enable robust spectral modeling. The first critical step in this process is background segmentation, which aims to precisely isolate all target foreground material from irrelevant background elements. While traditional approaches exist, such as thresholding a single spectral band or applying a fixed vegetation index, their performance is often unreliable. These methods underutilize the full spectral dimension and can be compromised by poor band selection, signal saturation, or variable illumination.
To fully exploit the spectral dimension for a more robust and flexible solution, PlantSpecLab implements two novel spectrally-guided methods for creating high-contrast 2D index maps prior to binarization: Range Averaging (RA) and Difference Enhancement (DE). These techniques are designed to transform the hyperspectral data into an optimal representation for segmentation.
RA computes the mean reflectance within a user-defined spectral window [λ1, λ2]:
(1)
where H(x, y, λ) is the reflectance at pixel (x, y) and wavelength λ. By aggregating information from a continuous spectral region, this method's core mechanism enhances the signal-to-noise ratio and captures broad spectral trends, rather than relying on a single, potentially unrepresentative band. This makes it particularly effective for improving segmentation stability for spectrally homogenous targets or across different growth stages and sensor setups [43].
DE allows users to create a customized index map by exploiting the unique spectral signatures of the target and background. It operates by calculating the pixel-wise reflectance difference between two user-selected wavelengths, λ1 and λ2:
(2)
The core mechanism of this method relies on selecting a wavelength pair that maximizes the reflectance contrast between the foreground and background. For instance, to segment vegetation from soil, a chlorophyll absorption valley near 675 nm can be chosen as λ1, while λ2 can be set to a high-reflectance region in the near-infrared around 800 nm. For vegetation pixels, the resulting Idiff value becomes large and positive, whereas for soil pixels with flat spectral responses, the value approaches zero. This operation, which mechanistically approximates a first-order spectral derivative, transforms the data into a high-contrast grayscale index map.
Once an index map is generated using either RA or DE, a final binary mask is produced using one of several integrated thresholding algorithms such as Otsu and K-means, as detailed in Table 1. The platform also provides interactive tools for users to fine-tune thresholding parameters and visually verify the segmentation quality in real time. The output of this stage is a clean binary mask representing the entire foreground region, which serves as the input for subsequent analysis.
2.3.2. Interactive workflow for multi-object segmentation
For multi-object scenes where each sample requires individual analysis, an additional workflow is necessary to segment and label each object within the foreground mask produced by background segmentation.
This process begins with separating any adjacent or touching objects. PlantSpecLab employs a customizable sequence of morphological operations (such as opening and closing) to erode the connections between objects. Following this, a connected-component analysis algorithm is applied to the cleaned mask. This algorithm identifies each distinct region, assigns it a unique label, and generates a corresponding bounding box, thus completing the individual object detection.
A critical subsequent challenge is to establish the correct correspondence between these algorithmically detected, unordered ROIs and their ground-truth labels, which are often stored externally and may include information such as sample identifiers or genotype annotations. To address this issue, PlantSpecLab incorporates an intuitive user-in-the-loop mechanism. The platform displays the image with the generated bounding boxes and allows the user to click on them in any preferred sequence, whether following a row-wise pattern or another order consistent with their experimental records. The selected sequence is then recorded to ensure that each extracted spectrum is assigned to its correct label. This interactive approach offers a robust and flexible solution to the label-mapping problem, avoids reliance on complex programmatic ordering rules, and accommodates the use of custom user-provided ROI names.
2.3.3. Spectral feature extraction and preprocessing
Following ROI segmentation, the analysis workflow proceeds by first extracting a representative spectrum for each ROI via spatial averaging, and then applying preprocessing techniques to refine it for modeling. PlantSpecLab offers a rich, modular toolkit for this purpose, encompassing methods for normalization, smoothing, and derivative-based enhancement. The core algorithms are concisely summarized in Table S2.
At the core of PlantSpecLab's preprocessing is a modern implementation of Fractional-Order Differencing (FOD) re-engineered for hyperspectral imaging. While conventional integer-order derivatives are widely used, they operate locally and may amplify high-frequency noise while distorting the broad absorption features that characterize plant spectra. FOD overcomes these limitations by generalizing differentiation to any real-valued order , enabling tunable feature enhancement well suited to biological reflectance signatures.
The fractional derivative of a spectrum is defined using the classical Grünwald–Letnikov (G–L) formulation [44]:
(3)
While theoretically elegant, the direct G–L operator is computationally infeasible for high-throughput HSI because each derivative value depends on all preceding spectral samples, resulting in an infinite-memory operator with a complexity of O(N2) for spectra of length N. However, the mathematical structure of the G–L weights naturally suggests an efficient approximation: the rapidly decaying coefficients justify truncating the memory to a finite window, and their recursive definition allows weights to be generated without repeated Gamma evaluation. These insights form the basis for the implementation in Algorithm 1, where the G–L operator is reformulated into a tractable finite-memory convolution with a reduced complexity of O(NL), where L ≪ N, enabling real-time spectral processing for high-throughput phenotyping.
To ensure robustness in practical sensor conditions, PlantSpecLab incorporates several refinements around the core truncated convolution. When spectral sampling is not uniform, the spectrum is first resampled to an evenly spaced grid to maintain correct differential weighting. Symmetric mirror padding reduces boundary artifacts while preserving local spectral continuity. A final optional standardization step improves numerical stability and cross-instrument comparability. The complete procedure is summarized in Algorithm 1.
Algorithm 1
Efficient Implementation of Fractional-Order Differencing
This optimized implementation allows PlantSpecLab to practically exploit the core advantage of fractional differentiation—its long-memory property [45]. Each derivative value incorporates information from multiple preceding wavelengths, enabling biologically relevant broadband variations—such as those associated with water, structural carbohydrates, and pigment absorption—to be retained rather than suppressed. By capturing this extended spectral context, FOD enhances subtle but systemic trait-related features that local operators may overlook, thus providing a refined and physiologically meaningful representation for downstream modeling within the platform.
The preprocessing workflow thus converts raw, noisy spectral data into a refined feature set. By applying these advanced signal processing techniques, we aim to suppress instrument- and sample-induced artifacts while amplifying the underlying biological signal. The quality and relevance of this final feature set are paramount, as it forms the direct input for the subsequent development of robust and accurate predictive models.
To address the high dimensionality of hyperspectral data and reduce risks of multicollinearity, computational overhead, and model overfitting, PlantSpecLab incorporates two complementary approaches: dimensionality reduction and band selection. Dimensionality reduction through methods such as Principal Component Analysis (PCA) projects spectra onto a smaller set of components for visualization and exploratory analysis, whereas band selection using techniques like the Successive Projections Algorithm (SPA) retains a subset of original wavelengths, thereby enhancing model transparency and biological interpretability. Users can flexibly apply either strategy—or bypass this step—before model training. The platform offers a range of established algorithms for both categories (Table 1), supported by automatic visualizations, including importance-ranking plots and selected-band maps, to facilitate informed decision-making.
2.3.4. Phenotypic modeling and evaluation
The final stage of the PlantSpecLab workflow is the development and validation of predictive models within the platform's dedicated Modeling Module. After preprocessing, the refined spectral data are used for supervised learning. The module integrates a suite of ten common machine learning algorithms, including five for regression and five for classification, as detailed in Table S3. This collection serves as a robust baseline, and the platform's open-source, modular design explicitly supports the future integration of additional community-contributed algorithms. All critical aspects of the modeling process, such as dataset partitioning strategies and key algorithm hyperparameters, are fully configurable through the interactive graphical interface.
To ensure objective assessment, model performance is evaluated using a suite of standard metrics that are automatically computed and reported. For regression tasks, performance is quantified using the Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and the coefficient of determination (R2):
(4)
(5)
(6)
(7)
where n is the number of samples, yi is the true value, is the predicted value, and is the sample mean.
For classification tasks, the evaluation suite includes overall accuracy, precision, recall, and the F1-score:
(8)
(9)
(10)
(11)
where TP, TN, FP, and FN denote the counts of true positives, true negatives, false positives, and false negatives, respectively.
Ensuring end-to-end reproducibility is a core design principle of PlantSpecLab. To this end, the module facilitates the export of all critical artifacts from the modeling process, including the serialized trained models (.pkl files), comprehensive metric reports (.csv), and the model's predictions. These artifacts provide a transparent and verifiable record of the analysis, which is essential for external benchmarking.
3. Results and discussion
3.1. Platform overview and capabilities
PlantSpecLab streamlines the complex hyperspectral analysis workflow into a cohesive, modular pipeline, as illustrated in Fig. S1. The platform logically guides the user through four primary stages. The process begins with (1) Image Import and ROI Segmentation, where raw hyperspectral images are loaded and target regions are isolated from the background. For images containing multiple subjects, an object segmentation step automatically separates them for individual analysis. The workflow proceeds to (2) Feature Extraction, in which representative spectra are extracted and refined using a suite of preprocessing techniques. Subsequently, during (3) Feature Simplification, users can perform dimensionality reduction or feature band selection to optimize the dataset for modeling. The final stage, (4) Modeling and Export, facilitates the development, validation, and export of predictive models. Crucially, each module provides interactive visualizations and allows for the export of key artifacts (such as processed spectra, model files, and performance metrics), ensuring end-to-end reproducibility without requiring any user scripting.
3.2. Performance of novel segmentation strategies
The proposed spectrally guided segmentation methods, Range Averaging (RA) and Difference Enhancement (DE), were evaluated to determine their effectiveness in improving spectral consistency before downstream modeling. Both strategies were designed to address limitations of conventional pixelwise or threshold-based segmentation, which frequently introduce spectral instability due to heterogeneous illumination conditions, tissue-level structural variability and sensor noise.
Across all datasets, RA and DE produced more homogeneous spectral signatures within biological regions of interest. RA accomplishes this by averaging reflectance within wavelength-specific stability ranges, thereby reducing local outliers and suppressing micro-scale spatial fluctuations that are irrelevant to physiological interpretation. DE, in contrast, enhances the contrast between target regions and background by amplifying wavelength differences that are known to exhibit class-dependent separation. This facilitates more reliable mask generation in cases where classical thresholding struggles, such as when plant organs exhibit weak reflectance contrast at RGB-visible wavelengths.
Overall, RA and DE provide robust, domain-aware segmentation that enhances the reliability of features delivered to subsequent preprocessing and modeling steps.
3.2.1. SWIR plant background segmentation with Difference Enhancement
Plant segmentation in the SWIR range is inherently challenging due to weak surface texture, low spectral contrast between classes, and the presence of confounding background structures such as containers or shadows. To address these difficulties, widely used spectral indices such as the Normalized Difference Water Index (NDWI) [46] and the Global Vegetation Moisture Index (GVMI) [47] are often employed to enhance plant-background separability by leveraging water-related absorption features.
However, these conventional approaches exhibit significant limitations in practice. As illustrated in Fig. 3a, grayscale maps generated from NDWI and GVMI often lead to noisy segmentation masks, which include residual artifacts from the background and halo-like outlines around plant boundaries. Furthermore, the common practice of applying a fixed threshold to these index maps suffers from instability. Identifying an optimal threshold requires tedious manual adjustment and is highly sensitive to shifts in the image histogram caused by minor variations in illumination, camera alignment, or scene composition, often failing to transfer between imaging batches.
Segmentation performance comparison across SWIR tomato plants and VNIR tomato fruits. (a) SWIR tomato plants: “Original” is a false-color composite from selected SWIR bands. “Gray” indicates the grayscale maps used for mask generation. DE is the proposed difference between 959.1 and 1455.5 nm; NDWI and GVMI are index-based baselines. (b) VNIR tomato fruits: “Original” is an RGB composite extracted from VNIR bands. RA denotes the spectral average from 698.1 to 1043.7 nm; 836.3 nm (effective) and 522.1 nm (ineffective) are single-band baselines. For both (a) and (b), GMM, k-means, Otsu, and hard thresholding were used to generate binary masks under identical thresholding settings.
In contrast, we propose the Difference Enhancement (DE) strategy, which produces high-contrast grayscale images by calculating the pixel-wise reflectance difference between two user-selected wavelengths (e.g., 959.1 nm and 1455.5 nm for this study). The fundamental advantage of DE lies in its operational principle: instead of relying on absolute intensity cutoffs, it operates on relative spectral gradients that are intrinsically more robust to external variability. The selection of the wavelength pair is physically grounded, guided by maximizing the spectral contrast between representative foreground and background samples. Because these spectral signatures are typically consistent for a given tissue type, the selection process is highly reproducible, and the same band pair can be reused across samples without modification.
This contrast-based approach enables DE to generate cleaner and more adaptive inputs for subsequent segmentation algorithms (such as Otsu or GMM). As demonstrated in Fig. 3a, the resulting masks show clearer boundary detection and greater integrity while suppressing background interference, thereby improving segmentation robustness across diverse phenotyping scenarios.
3.2.2. VNIR fruit background segmentation with Range Averaging
In contrast to SWIR imaging, segmentation in the VNIR range appears more straightforward due to strong chromatic features. A common approach is to select a single spectral band for thresholding. However, the success of this method is critically dependent on identifying an optimal band, a process that can be both unreliable and laborious. Fig. 3b example illustrates the challenge: an empirically well-chosen band at 836.3 nm yields an acceptable segmentation, but a suboptimal choice, such as the 522.1 nm band, completely fails to distinguish ripe fruit from the background. The manual, trial-and-error process required to find an effective band for each specific task and dataset is time-consuming and undermines the goal of high-throughput analysis.
The proposed Range Averaging (RA) method is designed to directly address this challenge. It replaces the precarious search for a single optimal band with the selection of a broader, more forgiving spectral range (e.g., 698.1–1043.7 nm for this task). By integrating the reflectance across this interval, RA effectively averages out the idiosyncrasies of individual bands and reduces noise, resulting in a grayscale map with consistently high contrast across different fruit maturity stages and lighting conditions.
This strategy enhances the robustness of the final segmentation and also streamlines the workflow. This approach removes the need for manual single-band optimization, which can be time-consuming and unreliable. As demonstrated by the clean masks produced with GMM or Otsu in Fig. 3b, RA provides an efficient path to accurate segmentation with minimal manual intervention.
In addition to their empirical advantages, the choice of RA and DE over deep learning-based segmentation models reflects a deliberate design decision grounded in the practical realities of hyperspectral plant phenotyping. Contemporary models such as Segment Anything Model (SAM) [48] perform well on RGB imagery, yet they are not natively compatible with high-dimensional HSI data. Extending such architectures to hundreds of spectral bands would require substantial computational resources, specialized GPU hardware, and large annotated training sets—requirements that are unrealistic for most plant science laboratories and fundamentally at odds with our goal of providing an accessible, desktop-deployable workflow. Moreover, the performance of deep learning models often degrades when transferred across sensors, cultivars or illumination regimes unless domain-specific fine-tuning is performed, further increasing maintenance cost. In contrast, RA and DE rely on wavelength-dependent reflectance characteristics that are physically stable across imaging sessions and plant organs, allowing segmentation to be driven directly by intrinsic spectral priors rather than learned image semantics. This makes the approach label-free, training-free, and robust to illumination variability, while ensuring execution speed and reproducibility on standard hardware. These considerations, collectively, provided strong motivation to adopt spectrally guided, physics-based segmentation methods that better align with the platform's emphasis on usability, computational efficiency and methodological transparency. While these considerations motivated our adoption of spectrally guided, physics-based segmentation in the current version, the platform is intentionally designed with extensibility in mind, and lightweight HSI-adapted deep models may be incorporated in future releases as computationally efficient and well-validated architectures become available.
3.2.3. Multi-object segmentation and interactive labeling
The multi-object segmentation and labeling capabilities of PlantSpecLab were validated using the VNIR hyperspectral dataset of tomato fruits. For each hyperspectral image cube, which contained multiple fruits, a two-stage workflow was executed to isolate individual samples, as visually detailed in Fig. S2.
The first stage involved automated segmentation. This process utilized a series of image processing algorithms, including intensity thresholding and morphological operations (both opening and closing), to effectively create a binary mask distinguishing the fruits from the background. As shown in Figure S2a and Figure S2b, this successfully separated adjacent or touching fruits. Following this, a connected-component analysis was applied to generate a unique bounding box for each detected object, which was then overlaid on a false-color representation of the hyperspectral image for verification (Fig. S2c).
The second stage leveraged the platform's core interactive labeling feature. This function provides the user with complete flexibility to select any detected object in any desired order by simply clicking on their bounding boxes. This allows for the easy implementation of common sequential patterns, such as column-first (Fig. S2d) or row-first (Fig. S2e) processing, or for the selection of specific, non-contiguous targets (Fig. S2f). Furthermore, the platform supports the import of custom filenames, ensuring that the extracted spectral data for each ROI is accurately mapped to its corresponding ground-truth label.
3.3. Visualization of extracted spectral features
After segmentation, PlantSpecLab derives representative spectra by averaging reflectance within each region of interest (ROI). The extracted features are summarized in Fig. S3 and Fig. S4 for the tomato-fruit (VNIR) and tomato-plant (SWIR) datasets, respectively, through class-wise mean curves, individual sample spectra, and low-dimensional embeddings.
For the fruit samples, distinct spectral signatures emerge across the four maturity stages (Fig. S3). In the mean reflectance curves (Fig. S3a), spectra overlap below 500 nm where cuticular properties dominate, but diverge thereafter. Mature-green fruit (S1) exhibit pronounced chlorophyll absorption troughs at 550 and 675 nm. As ripening progresses, these troughs gradually diminish while the intervening plateau rises, reflecting pigment degradation and carotenoid accumulation. Beyond 700 nm, the red-edge inflection shifts toward longer wavelengths, and the near-infrared (750–900 nm) shoulder increases monotonically, consistent with cell wall softening and enlarged intercellular spaces. These class-specific signatures are reproducible across individual samples (Fig. S3b–e).
Dimensionality reduction further highlights the robustness of these features (Fig. S3f–h). PCA reveals a smooth linear trajectory corresponding to the ripening process, while t-SNE and UMAP emphasize local neighborhood structures, producing compact, well-separated clusters. Although some overlap occurs between adjacent S3 and S4 stages, the overall embeddings demonstrate that the extracted spectral features effectively capture the phenotypic gradient.
A similar analysis of the plant samples demonstrates the platform's efficacy in detecting physiological stress (Fig. S4). The mean spectra for the three treatment groups show clear separation (Fig. S4a). Control plants exhibit a characteristic peak near the 970 nm water absorption band. In contrast, drought-stressed plants show a suppressed 970 nm peak and elevated reflectance in the 1150–1250 nm range, indicative of reduced water content and canopy compaction. Low-temperature stress induces a different signature, most notably a deeper absorption trough around 1450 nm, potentially reflecting altered internal water distribution or ice crystallization effects. These distinct spectral fingerprints are consistently observed across individual plant samples (Fig. S4b–d). Consequently, the embeddings generated by PCA, t-SNE, and UMAP show well-separated clusters corresponding to the control, drought, and low-temperature conditions (Fig. S4f–h), confirming that the ROI-averaged spectra contain sufficient information for robust classification.
The analyses indicate that PlantSpecLab's feature extraction pipeline effectively preserves biologically relevant variation. The resulting high-quality feature sets are well-suited for the downstream development of accurate classification and regression models.
3.4. Performance of fractional-order differencing
To investigate the role of differencing order in spectral enhancement and downstream modeling, we performed a systematic ablation experiment on the tomato-fruit VNIR dataset using the fractional-order differencing (FOD) module implemented in PlantSpecLab. All steps, from spectral preprocessing to modeling, were conducted within the platform's workflow.
Fig. 4 illustrates the transformed spectra obtained by applying differencing orders ranging from 1.0 to 3.0 (in 0.2 increments), including standard integer differencing (D1–D3) and the original (0-order) spectrum. These transformations were directly computed from raw reflectance data, prior to any normalization.
Transformation of tomato hyperspectral reflectance under different derivative orders (integer and fractional, 0–3). Vertical dashed lines mark key biochemical absorption regions in the chlorophyll-sensitive range (550–680 nm) and the near-infrared water absorption range (890–970 nm). Moderate fractional orders yield clearer separation between ripening stages in the pigment absorption region (stage contrast), whereas higher orders further enhance discriminability near the water absorption band (NIR contrast).
The integer-order operators produce exaggerated spectral slopes and introduce abrupt discontinuities, especially beyond 800 nm, where the native phenotypic contrast becomes spectrally diluted. These distortions disrupt the inter-class smoothness typically associated with physiological progression (e.g., fruit ripening), and obscure subtle yet informative variation patterns. While steep gradients can theoretically emphasize transitions near known absorption features (e.g., chlorophyll at 675 nm), they also tend to mask broadband curvature and inflate noise artifacts, rendering them suboptimal for multivariate classification and regression tasks.
In contrast, FOD offers a continuum of transformations that modulate spectral detail in a more progressive and structurally coherent manner. Intermediate orders (e.g., 1.4 to 2.6) gradually enhance spectral contrast while preserving inflection symmetry and band topology. Higher orders such as 2.8 exhibit marked enhancement of task-relevant features—most notably, increased curvature at 890 nm—without disrupting global spectral alignment. This balance arises from the mathematical structure of fractional calculus. Unlike integer-order differencing, which applies fixed local weights and induces abrupt slope changes, FOD distributes its weights across an extended spectral neighborhood via a generalized binomial kernel. Mathematically, the Grünwald–Letnikov formulation enables the incorporation of “spectral memory,” in which each output value reflects a weighted accumulation of preceding reflectance points. This structure introduces a tunable low-pass filtering effect that progressively suppresses high-frequency noise while retaining and amplifying smooth, task-relevant gradients. From a signal processing standpoint, this corresponds to a continuum of frequency responses adjustable by the fractional order, offering far greater control than the discrete jump between D1, D2, and D3. In hyperspectral phenotyping, where physiological transitions (e.g., pigment degradation or water loss) manifest as broad, low-amplitude features rather than sharp discontinuities, such multi-scale enhancement aligns well with the underlying biological signal structure [44,45].
To quantify these transformations’ effects on phenotyping performance, we conducted supervised modeling within PlantSpecLab using random forest (RF) classifiers and regressors. For each differencing order, spectra were first preprocessed using multiplicative scatter correction (MSC), then split into 80/20 training/test sets and modeled using RF.
Fig. 5 shows the resulting classification accuracy (fruit maturity) and regression R2 (firmness). Both performance curves exhibit a non-monotonic trend with clear inflection points. Integer differencing (D1–D3) produces inferior or volatile results, highlighting the detrimental impact of over-differentiation and local overfitting. Specifically, D2 and D3 display significant drops in both tasks, consistent with their visual oversteepening of spectra in Fig. 4. These outcomes suggest that excessive derivative amplification introduces high-frequency artifacts misaligned with physiological changes.
Modeling performance under different differencing orders using RF with MSC preprocessing. (a) Accuracy for fruit maturity classification; (b) R2 for fruit firmness regression. Integer-order differencing (D1–D3) underperforms relative to optimal fractional orders.
In contrast, fractional orders from 1.4 to 2.8 lead to consistent performance gains. Classification accuracy improves steadily, peaking at 87.3 % for r = 2.8, while the regression R2 reaches 0.878, outperforming all integer-order baselines. This reinforces the interpretation that FOD selectively amplifies class-separating variation—particularly in smooth, broadband regions—without destabilizing low-variance bands.
3.5. Performance of phenotypic prediction models
3.5.1. Classification performance with advanced spectral preprocessing
To systematically evaluate how preprocessing strategies interact with spectral characteristics and learning algorithms, we benchmarked the full workflow space implemented in PlantSpecLab across two fundamentally different hyperspectral phenotyping targets: tomato plant stress classification using SWIR spectra and tomato fruit maturity classification using VNIR spectra. The results reported in Table 2 and summarized in Fig. 6 collectively demonstrate that pipelines incorporating fractional-order derivatives (FOD) consistently improve classification accuracy over traditional normalization alone. Although the magnitude of improvement varies by task, the best-performing workflow in both datasets still relies on FOD-enhanced spectra, confirming its broad applicability in plant spectral modeling.
Table 2.
Classification accuracy (mean ± standard deviation from 20 repeated random train–test splits) under different preprocessing pipelines and classifiers for the tomato plant stress (SWIR) and tomato fruit maturity (VNIR) tasks. For each task, the best result for each classifier is shown in bold; the overall best-performing workflow within each task is additionally underlined.
Comparative classification performance across preprocessing pipelines and classifier architectures. (a) Accuracy results for tomato plant stress classification using the best-performing model (SVM), showing statistically significant improvements with the SNV + FOD pipeline over SNV and SNV + SG (paired t-test, p < 0.01). (b) Accuracy achieved by multiple classifiers on the tomato fruit maturity task using the best-performing preprocessing pipeline (MSC + FOD), illustrating the strong model dependence of VNIR-based classification. (c) Radar profiles of preprocessing effects under different classifiers for the SWIR stress task, where SNV-based pipelines — especially SNV + FOD — consistently achieve superior performance. (d) Radar profiles for the VNIR maturity task showing minimal sensitivity to preprocessing but clear separation across classifier choices, with LDA achieving the highest accuracy.
The benefit of FOD is most prominent in the SWIR domain, where variations in leaf water status and cell-structure hydration—key physiological indicators of abiotic stress—manifest as subtle intensity modulations in water absorption bands. Such small yet biologically relevant shifts are effectively amplified by FOD while suppressing low-frequency baseline variations, leading to significantly better separability between drought and control plants. As shown in Fig. 6a, the SNV + FOD workflow improves SVM accuracy from 75.28 % (SNV) to 76.94 %, and this enhancement is statistically significant (paired t-test, p < 0.01) against both SNV and SNV + SG. The corresponding radar visualization in Fig. 6c further confirms that FOD improves or maintains the leading performance envelope across classifiers in the stress task.
For the VNIR-based maturity task, the performance gains from FOD remain positive but are more modest relative to the strong baselines already achieved by established normalization and scattering correction methods (Fig. 6d). This behavior reflects intrinsic spectral chemistry: pigment development in ripening fruit introduces major absorption variations in the visible domain, resulting in high class separability even before high-order feature enhancement. Nevertheless, the overall best-performing maturity workflow is still MSC + FOD paired with LDA (Fig. 6b), confirming that FOD brings additive, albeit less visually prominent, benefits even in spectrally well-separated datasets. These findings reinforce that lack of large statistical deviation does not indicate lack of utility—instead, certain tasks are inherently less preprocessing-sensitive due to rich biochemical contrast.
Beyond preprocessing, the comparative classifier responses reveal a clear divergence in task-model compatibility. In SWIR stress detection, maximum-margin learning (SVM) consistently dominates, reflecting the high-dimensional yet localized feature shifts associated with water regulation, where hyperplane-based boundaries outperform global variance models. In contrast, VNIR maturity classification exhibits strong between-class covariance structures caused by coordinated pigment accumulation, making LDA the most effective model by exploiting linear discriminant directions aligned with physiological gradients. These complementary outcomes, visible in Fig. 6b–d, highlight the biologically driven nature of model sensitivity—classifier choice is a core component of spectral workflow design, not an afterthought.
Together, these analyses illustrate the practical significance of the platform. Rather than prescribing a single universal solution, PlantSpecLab enables the rapid, transparent, and statistically grounded discovery of task-optimal preprocessing-model combinations, which is precisely what real-world phenotyping requires. In the SWIR domain, SNV + FOD + SVM emerges as the optimal workflow for detecting early stress signals, while in the VNIR domain, MSC + FOD + LDA provides the most accurate maturity classification. By supporting parallel evaluation and visual comparison of preprocessing pipelines, classifier architectures, and performance stability, PlantSpecLab transforms spectral modeling from heuristic trial-and-error into a reproducible, data-driven optimization process. This capability is essential for scaling hyperspectral phenotyping workflows toward broader biological applications and field-deployable instrumentation.
3.5.2. Regression performance with effective wavelength selection
Beyond classification, the platform's capabilities were further validated on a quantitative regression task: the prediction of tomato-fruit firmness. This experiment specifically evaluated the effectiveness of three prominent effective wavelength (EW) selection algorithms integrated in PlantSpecLab—SPA, UVE, and CARS—in reducing data dimensionality compared to using the full spectrum (FS).
Fig. 7 illustrates the complete selection workflows. Fig. 7a displays raw reflectance spectra across four maturity stages. SPA minimizes collinearity by maximizing projection spread. Its selected EWs (Fig. 7c) span the entire spectral range with notable density at 411.0 nm and 994.0 nm, ensuring coverage of both early visible and late NIR domains. UVE discards low-contribution wavelengths based on PLS coefficient stability. As shown in Fig. 7f, its retained EWs cluster around 517.0, 713.9, and 928.3 nm—regions with low intra-class variability and consistent slopes. However, its narrow-band preference omits broader NIR features. CARS applies Monte Carlo sampling with adaptive coefficient weighting. The final selection Fig. 7k concentrates on 568.2, 666.7, and 890.2 nm—wavelengths with sharp inter-class inflections in Fig. 7a. Compared to SPA's distributed coverage and UVE's statistical parsimony, CARS favors dense, task-specific contrast. These selection patterns are summarized in Fig. 7d, highlighting their methodological divergence.
Band-selection workflows for tomato-fruit firmness regression. (a) Raw VNIR reflectance curves for four maturity stages; (b) SPA—RMSEC versus number of selected wavelengths (minimum at 45 bands); (c) SPA—selected wavelengths overlaid on mean spectra; (d) Distribution of wavelengths selected by SPA, UVE, and CARS; (e) UVE—RMSEC versus number of retained wavelengths (minimum at 46 bands); (f) UVE—selected wavelengths overlaid on mean spectra, colored by information score; (g) Influence of number of Monte Carlo sampling runs and maximum number of PLS latent variables on RMSECV; (h) CARS—number of sampled variables versus number of Monte Carlo runs; (i) CARS—RMSEC versus number of Monte Carlo runs (minimum at 13 with 44 bands); (j) CARS—regression coefficient paths over Monte Carlo runs; (k) CARS—selected wavelengths overlaid on mean spectra.
Modeling performance derived from twenty repeated train–test splits (Table S4) provides a comprehensive evaluation of how different wavelength-selection strategies affect firmness prediction.
For tree-based regressors, LightGBM and RFR both exhibit high predictive power and relatively small variability. Under LightGBM, SPA-based selection yields a slight but consistent improvement over FS, with a higher mean R2 (0.8523 compared with 0.8508) and lower RMSEP and MAE. This behavior aligns with SPA's design: by minimizing collinearity while preserving broad spectral coverage, it removes redundant bands without discarding key firmness-related information. UVE and CARS perform similarly to FS under LightGBM, indicating that when the learner already incorporates internal feature-weighting mechanisms, aggressive pruning offers limited additional gains.
For SVR and PLSR, wavelength-selection strategies induce moderate but interpretable shifts in performance. SVR combined with SPA achieves the best results within its block and slightly outperforms FS, whereas UVE and CARS show minor degradation. In contrast, PLSR benefits more substantially from UVE and CARS, both of which achieve higher R2 and lower MAE than FS. This outcome reflects the sensitivity of PLS-based models to multicollinearity and noise; stability-oriented or sparsity-driven band pruning provides cleaner, more structured inputs that better align with the latent-variable formulation of PLS.
The most pronounced improvement appears for linear regression. Although FS-LR already provides a competitive baseline, both SPA-LR and UVE-LR yield noticeably better predictive accuracy, with CARS-LR achieving the best overall performance across all tested workflows (R2 = 0.8638 ± 0.0246). These results highlight the complementarity between CARS and LR: CARS concentrates on a compact set of wavelengths associated with strong spectral inflections, thereby enhancing contrast in firmness-related absorption features, while LR capitalizes on this targeted subset to fit a simple yet highly discriminative model.
Overall, the regression results demonstrate that effective wavelength selection in PlantSpecLab can reduce VNIR spectral dimensionality by more than 65 % while maintaining or improving predictive performance. These flexible strategies enable users to align model complexity, feature selection, and phenotyping objectives within a unified visual workflow.
3.6. External validation on multiple public HSI benchmarks
To validate the generalizability and robustness of PlantSpecLab beyond our in-house data, we conducted a comprehensive benchmark on four distinct public datasets. These datasets were selected to represent a spectrum of common and difficult challenges in plant phenotyping, ranging from end-to-end image processing to advanced spectral modeling. A summary of these datasets and the specific validation points they address is provided in Table S5.
3.6.1. Validation of the end-to-end image-to-model workflow
The platform's end-to-end workflow was validated on two public datasets with distinct image processing challenges. For the Apple Tree Leaves dataset [49], the Difference Enhancement (DE) strategy effectively segmented leaf tissue from the background (Fig. 8a). The extracted spectra were then preprocessed with an SG + SNV filter. Of the classifiers tested, the K-Nearest Neighbors (KNN) model performed best, successfully distinguishing healthy from diseased leaves with an accuracy of 77.42 % (Table S6).
Comprehensive validation of the PlantSpecLab end-to-end workflow on public datasets. (a) Segmentation workflow for the Apple Tree Leaves dataset. The top row shows the original false-color images, while the bottom row presents the corresponding segmentation results, including a single-band mask (771.61 nm) and a false-color representation. (b) Robustness of the multi-object segmentation pipeline demonstrated on diverse broccoli samples. The top row showcases a variety of challenging scenes from the SpectroFood-Broccoli dataset, featuring multiple, irregularly positioned florets. The bottom row displays the final output, where individual florets have been successfully detected and isolated with unique bounding boxes. (c) shows the original image with selected regions of interest and the spectral validation of background segmentation, confirming the process successfully removes the non-plant background spectrum. (d) displays the final individual segmentation result with unique IDs (F1-F5) and its spectral validation, where the clear variation among spectra from each floret demonstrates the necessity of multi-object segmentation for capturing intra-sample variability.
For the more complex, multi-object SpectroFood-Broccoli dataset [50], the DE-based pipeline robustly segmented individual florets across diverse and challenging scenes (Fig. 8b). Spectral validation confirmed successful background removal (Fig. 8c) and highlighted the necessity of individual segmentation to capture the inherent variability between florets (Fig. 8d). After applying the same SG + SNV preprocessing, the Linear Regression (LR) model was found to be the most effective for predicting dry matter, yielding an of 0.51 (Table S6). This moderate performance is primarily due to a limitation in the public dataset's labeling: a single, bulk-sample ground-truth value is provided for multiple florets. Our workflow, however, generates high-resolution, individual spectra for each floret, revealing significant variability (Fig. 8d). This inherent mismatch between a single, low-resolution label and multiple, high-resolution spectral inputs fundamentally limits the achievable predictive accuracy, thus the captured correlation is considered meaningful.
3.6.2. Validation of flexible and precise target extraction
The HFD100-Scenes dataset [51], with its complex natural backgrounds, served as an ideal testbed for the flexibility and precision of PlantSpecLab's segmentation capabilities. As shown in Fig. 9, our platform allowed for the flexible extraction of different scientifically relevant targets from the same image, such as the entire flower contour (Fig. 9b) and the surrounding leaf tissue (Fig. 9c). This precise, non-rectangular ROI definition ensures that the extracted spectral signature is pure and originates solely from the target tissue, avoiding contamination from adjacent background or other plant parts. This differs substantially from information-limited square patches used in the original study (shown for comparison in Fig. 9d), which inevitably include non-target pixels.
Flower and leaf extraction comparison between PlantSpecLab and the patch-based method. Examples originate from the same cultivar group in the HFD100 dataset. PlantSpecLab enables organ-specific segmentation for both flowers and leaves (columns a–c), whereas the patch method crops local regions directly from the original scene images (flower patches in column d and leaf patches in column e). Since the public dataset does not provide scene-to-organ correspondences, flowers and leaves are matched by cultivar category, with pairing further assisted by spectral angle similarity where possible to ensure a consistent visual comparison.
3.6.3. Validation of advanced spectral data processing and modeling
To validate the platform's downstream analysis modules, particularly the FOD preprocessor, we further assessed its impact on a quantitative regression task using the Grape Berries dataset [52]. A Random Forest regressor was trained under five preprocessing conditions—raw spectra, first-, second-, and third-order derivatives, and FOD—and each workflow was evaluated twenty repeated random 80/20 train-test splits to ensure statistical robustness.
As summarized in Table 3, the conventional integer-order derivatives do not consistently improve predictive performance over the raw baseline and, in several cases, introduce higher error and variance. In contrast, FOD exhibits superior stability across repeated experiments, yielding both the highest mean R2(0.7237 ± 0.0917) and the lowest RMSEP. Paired t-tests conducted between FOD and each alternative preprocessing method further confirm this advantage: FOD achieves significantly higher R2 values than the raw spectra and the first-order derivative (p < 0.05), and markedly outperforms the second- and third-order derivatives (p < 0.001). These results indicate that while integer-order differentiation may amplify high-frequency structure, it can also increase noise sensitivity, reducing regression reliability. Fractional differentiation, by contrast, provides a more balanced enhancement of subtle spectral variations, making FOD a more robust and effective preprocessing strategy for quantitative spectral regression within PlantSpecLab.
Table 3.
Regression performance on the Grape Berries dataset under 20 repeated random 80/20 train–test splits using different random seeds. Paired t-tests are computed against the Fractional-Order Differencing (FOD) workflow.
To objectively evaluate the operational advantages and positioning of PlantSpecLab within the current analytical software landscape, we conducted a cross-software benchmark. The platform was benchmarked against two established standards: the leading commercial software ENVI (Ver. 5.6) and a custom Python script (Ver. 3.9, utilizing the Scikit-learn library, Ver. 1.1). A standardized end-to-end analytical pipeline—comprising background segmentation, SG + SNV preprocessing, and KNN classification—was implemented on all three platforms to perform binary classification (healthy compared with diseased) on the public Apple Tree Leaves dataset [49]. This benchmark was designed not merely to compare final model accuracy, but to critically assess key performance indicators including workflow efficiency, user accessibility, and scientific reproducibility.
Within PlantSpecLab, the entire process was executed in a single GUI. The workflow was linear and visually guided, allowing the user to proceed from data loading to model evaluation without any scripting. In contrast, the analysis in ENVI necessitated the sequential use of several distinct tools (e.g., Band Math, Rule-Based Classification). To precisely replicate the specific SG + SNV preprocessing chain and the KNN classifier's hyperparameters, a custom procedure had to be developed and executed in the Integrated Data Language (IDL), as this functionality was not natively available in a single, configurable GUI module. The Python-based approach required the development of a dedicated script, demanding proficiency in multiple libraries (spectral, OpenCV, NumPy, Scikit-learn) and involving the manual coding and debugging of each analytical step, from segmentation to classification.
The results of the benchmark are summarized in Table 4. Critically, all three platforms achieved statistically indistinguishable classification accuracy, confirming the validity of the underlying algorithms and the successful implementation of the pipeline across all systems. However, the benchmark exposed significant disparities in operational efficiency and accessibility. The total time required to complete the workflow from initial data loading to final result, inclusive of necessary development and setup, was markedly different: PlantSpecLab required approximately 8 min; the ENVI-based workflow took 38 min for GUI operations plus an additional 45 min for IDL script development and debugging; the Python approach, while fastest in pure execution time (2 min), demanded over 120 min of initial script development, testing, and debugging. These temporal differences are directly attributable to the workflow models. PlantSpecLab's integrated and no-code design streamlined the process, whereas ENVI's modularity and Python's reliance on manual coding introduced significant time overheads.
Table 4.
Cross-software benchmark results for apple leaf disease classification, comparing PlantSpecLab with ENVI + IDL and a custom Python script.
To ensure a fair comparison, all algorithms were executed using an identical, literature-supported set of preprocessing and KNN parameters, rather than relying on software-specific defaults. This design choice avoids bias toward any platform while establishing a stable baseline representative of common practice in plant spectral analysis. We acknowledge that the Python implementation has the highest ceiling for performance under extensive hyperparameter tuning or custom model design. However, this flexibility necessarily requires substantial expertise and development effort, whereas PlantSpecLab is intended to deliver a reliable, high-performing baseline with minimal configuration.
This empirical evidence indicates that PlantSpecLab balances usability with analytical flexibility. It provides the accessibility and guided workflow of a commercial package like ENVI but without the associated high cost, proprietary ”black-box” limitations, and need for specialized scripting for customization. Simultaneously, it retains the zero-cost, transparency, and high flexibility of the Python ecosystem while abstracting away the steep learning curve and fragmented, time-consuming nature of manual scripting. The ability to achieve comparable analytical outcomes in a fraction of the time demonstrates the platform's high efficiency. By lowering the technical barrier, PlantSpecLab makes hyperspectral analysis more accessible to the broader plant science community.
4. Conclusion
Addressing the core challenge within plant science, where the application of hyperspectral imaging is hindered by complex data processing workflows and limited analytical tools, this study presents the design, development, and validation of PlantSpecLab, an open-source, no-code platform for HSI analysis. This platform integrates the entire analytical pipeline, from raw image import to final model deployment, into a unified, browser-driven GUI, aiming to bridge the gap between expensive, proprietary commercial software and programming-intensive open-source libraries.
Through a systematic evaluation across multiple in-house and public datasets, this research comprehensively validated the efficacy, generalizability, and robustness of PlantSpecLab. The results demonstrate that the platform's novel segmentation strategies, Range Averaging and Difference Enhancement, enable the precise extraction of foreground targets based on the distinct characteristics of VNIR and SWIR spectral data. Critically, this study confirms that Fractional-Order Differencing offers significant advantages as an advanced spectral preprocessing technique. In our in-house dataset evaluations, an optimized FOD (r = 2.8) enhanced the average classification accuracy for the four-class tomato maturity classification task to 82.86%across repeated random splits and achieved a average coefficient of determination (R2) of 0.8638 for fruit firmness prediction. The platform's generalizability was further validated on public datasets, achieving an accuracy of 77.42 % in a binary classification task for apple leaf disease and demonstrating robust regression performance (R2 = 0.7237± 0.0917) with FOD preprocessing for grape berry sugar content prediction.
The primary contribution of PlantSpecLab lies in its operational efficiency and usability. Rigorous benchmarking against the leading commercial software ENVI and a custom Python script quantitatively demonstrated its superiority: while achieving statistically indistinguishable analytical accuracy, PlantSpecLab reduced the end-to-end workflow duration to just 8 min, a significant improvement over the alternatives, while substantially lowering the required expertise in programming and complex software operation. This result clearly indicates that PlantSpecLab achieves a balance between user-friendliness and analytical flexibility, providing researchers with a highly efficient, zero-cost, and fully transparent solution.
In summary, PlantSpecLab is an analytical toolbox that connects plant science domain knowledge with data science methodologies. By making hyperspectral analysis more accessible, the platform enables a broader community of agronomists, breeders, and biologists, thereby fostering innovation, acceleration, and reproducibility in high-throughput plant phenotyping. Looking forward, the platform's modular, open-source architecture is poised to support community-driven extensions, such as the integration of advanced deep learning models, the implementation of multi-source data fusion strategies, and support for cloud deployment to provide scalable, online analytical services, ensuring its continued relevance and impact in addressing global challenges in food security and climate change.
All data and code that support the findings of this study will be made publicly available upon publication. The PlantSpecLab source code is available at https://github.com/Another-Train/PlantSpecLab (MIT License), with a versioned release archived alongside the data.
Funding
This work was supported by the National Natural Science Foundation of China (Grant Nos. 62265015 and 32360750), the Xinjiang Uygur Autonomous Region Key R&D Program (Grant No. 2023B02028-3), and the Finance Plan Project of the 8th Division of the Xinjiang Production and Construction Corps & Shihezi City (Grant No. 2024TD01).
Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
3.Liu N., Townsend P.A., Naber M.R., Bethke P.C., Hills W.B., Wang Y. Hyperspectral imagery to monitor crop nutrient status within and across growing seasons. Rem. Sens. Environ. 2021;255 [Google Scholar]
4.Ge Y., Bai G., Stoerger V., Schnable J.C. Temporal dynamics of maize plant growth, water use, and leaf water content using automated high throughput rgb and hyperspectral imaging. Comput. Electron. Agric. 2016;127:625–632. [Google Scholar]
5.Mahlein A.-K., Steiner U., Hillnhütter C., Dehne H.-W., Oerke E.-C. Hyperspectral imaging for small-scale analysis of symptoms caused by different sugar beet diseases. Plant Methods. 2012;8(1):3. doi: 10.1186/1746-4811-8-3. [DOI] [PMC free article] [PubMed] [Google Scholar]
6.ElMasry G., Wang N., ElSayed A., Ngadi M. Hyperspectral imaging for nondestructive determination of some quality attributes for strawberry. J. Food Eng. 2007;81(1):98–107. [Google Scholar]
7.Minervini M., Scharr H., Tsaftaris S.A. Image analysis: the new bottleneck in plant phenotyping [applications corner] IEEE Signal Process. Mag. 2015;32(4):126–131. [Google Scholar]
8.Peng R.D. Reproducible research in computational science. Science. 2011;334(6060):1226–1227. doi: 10.1126/science.1213847. [DOI] [PMC free article] [PubMed] [Google Scholar]
9.Zhao M., Cang H., Chen H., Zhang C., Yan T., Zhang Y., Gao P., Xu W. Determination of quality and maturity of processing tomatoes using near-infrared hyperspectral imaging with interpretable machine learning methods. Lwt. 2023;183 [Google Scholar]
10.Jantra C., Slaughter D.C., Roach J., Pathaveerat S. Development of a handheld precision penetrometer system for fruit firmness measurement. Postharvest Biol. Technol. 2018;144:1–8. [Google Scholar]
11.Ruan S., Cang H., Chen H., Yan T., Tan F., Zhang Y., Duan L., Xing P., Guo L., Gao P., et al. Hyperspectral classification of frost damage stress in tomato plants based on few-shot learning. Agronomy. 2023;13(9):2348. [Google Scholar]
12.Tan F., Cang H., Gao X., Wu N., Di R., Zhang Y., Gao P., Lv X., Zhang C. Early detection of cotton verticillium wilt based on generative adversarial networks and hyperspectral imaging technology. Ind. Crop. Prod. 2025;231 [Google Scholar]
13.Otsu N. A threshold selection method from gray-level histograms. IEEE Trans. Syst. Man Cybern. 1979;9(1):62–66. [Google Scholar]
14.Ridler T.W., Calvard S. Picture thresholding using an iterative selection method. IEEE Trans. Syst. Man Cybern. 1978;8(8):630–632. [Google Scholar]
15.MacQueen J. vol. 1. University of California Press; 1967. Some methods for classification and analysis of multivariate observations; pp. 281–297. (Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability). [Google Scholar]
16.Dempster A.P., Laird N.M., Rubin D.B. Maximum likelihood from incomplete data via the em algorithm. J. Roy. Stat. Soc. B. 1977;39(1):1–22. [Google Scholar]
17.Li C.-H., Tam P.K.S. An iterative algorithm for minimum cross entropy thresholding. Pattern Recognit. Lett. 1998;19(8):771–776. [Google Scholar]
19.Gonzalez R.C., Woods R.E. second ed. Prentice Hall; 2002. Digital Image Processing. [Google Scholar]
20.Hastie T., Tibshirani R., Friedman J. second ed. Springer; 2009. The Elements of Statistical Learning: Data Mining, Inference, and Prediction. [Google Scholar]
21.Barnes R.P., Dhanoa M.S., Lister S.J. Standard normal variate transformation and de-trending of near-infrared diffuse reflectance spectra. Appl. Spectrosc. 1989;43(5):772–777. [Google Scholar]
22.Geladi P., Martens H., Næ T. A user-friendly guide to multivariate calibration and classification. Anal. Chim. Acta. 1985;185:249–268. [Google Scholar]
23.Savitzky A., Golay M.J.E. Smoothing and differentiation of data by simplified least squares procedures. Anal. Chem. 1964;36(8):1627–1639. [Google Scholar]
24.Oppenheim A.V., Schafer R.W. second ed. Prentice Hall; 1989. Discrete-Time Signal Processing. [Google Scholar]
26.Jolliffe I.T. second ed. Springer; 2002. Principal Component Analysis. [Google Scholar]
27.Zou H., Hastie T., Tibshirani R. Sparse principal component analysis. J. Comput. Graph Stat. 2006;15(2):265–286. [Google Scholar]
28.van der Maaten L., Hinton G. Visualizing data using t-sne. J. Mach. Learn. Res. 2008;9:2579–2605. [Google Scholar]
29.McInnes L., Healy J., Melville J. Umap: uniform manifold approximation and projection for dimension reduction. arXiv preprint arXiv:1802.03426. 2018 [Google Scholar]
30.Kruskal J.B. Multidimensional scaling by optimizing goodness of fit to a nonmetric hypothesis. Psychometrika. 1964;29(1):1–27. [Google Scholar]
31.Araújo M.S., Ferreira J.M., Ferré J., Chauchard F., Cabanas D. The successive projections algorithm for variable selection in spectroscopic multicomponent analysis. Chemometr. Intell. Lab. Syst. 2001;57(2):65–73. [Google Scholar]
32.Centner V., de Noord O., de Jong S., Vandeginste B., Sterna C. Elimination of uninformative variables for multivariate calibration. Anal. Chem. 1996;68(19):3851–3858. doi: 10.1021/ac960321m. [DOI] [PubMed] [Google Scholar]
33.Li H., Wang W., Song J.-P., Xia L.-Q. Competitive adaptive reweighted sampling for wavelength selection in multivariate calibration. Anal. Chim. Acta. 2009;648(1):77–84. doi: 10.1016/j.aca.2009.06.046. [DOI] [PubMed] [Google Scholar]
34.Breiman L. Random forests. Mach. Learn. 2001;45(1):5–32. [Google Scholar]
35.Wold S., Sjöström M., Eriksson L. Pls-regression: a basic tool of chemometrics. Chemometr. Intell. Lab. Syst. 2001;58(2):109–130. [Google Scholar]
36.Smola A.J., Schölkopf B. A tutorial on support vector regression. Stat. Comput. 2004;14(3):199–222. [Google Scholar]
37.Draper N.R., Smith H. third ed. Wiley; 1998. Applied Regression Analysis. [Google Scholar]
38.Ke G., Meng Q., Finley T., Wang T., Chen W., Ma W., Ye Q., Liu T.-Y. Lightgbm: a highly efficient gradient boosting decision tree. Adv. Neural Inf. Process. Syst. 2017;30:3146–3154. [Google Scholar]
42.Rumelhart D.E., Hinton G.E., Williams R.J. Learning representations by back-propagating errors. nature. 1986;323(6088):533–536. [Google Scholar]
43.Mishra P., Schmuck M., Roth S., Nicol A., Nordon A. 2019 10th Workshop on Hyperspectral Imaging and Signal Processing: Evolution in Remote Sensing (WHISPERS) IEEE; 2019. Homogenising and segmenting hyperspectral images of plants and testing chemicals in a high-throughput plant phenotyping setup; pp. 1–5. [Google Scholar]
44.Podlubny I. Academic Press; 1999. Fractional Differential Equations. [Google Scholar]
45.Zununjan Z., Turghan M.A., Sattar M., Kasim N., Emin B., Abliz A. Combining the fractional order derivative and machine learning for leaf water content estimation of spring wheat using hyper-spectral indices. Plant Methods. 2024;20(1):97. doi: 10.1186/s13007-024-01224-0. [DOI] [PMC free article] [PubMed] [Google Scholar]
46.Gao B.-C. Ndwi—A normalized difference water index for remote sensing of vegetation liquid water from space. Rem. Sens. Environ. 1996;58(3):257–266. [Google Scholar]
47.Ceccato P., Flasse S., Gregoire J.-M. Designing a spectral index to estimate vegetation water content from remote sensing data: part 2. validation and applications. Rem. Sens. Environ. 2002;82(2–3):198–207. [Google Scholar]
48.Kirillov A., Mintun E., Ravi N., Mao H., Rolland C., Gustafson L., Xiao T., Whitehead S., Berg A.C., Lo W.-Y., et al. Proceedings of the IEEE/CVF International Conference on Computer Vision. 2023. Segment anything; pp. 4015–4026. [Google Scholar]
49.Gaci B., Abdelghafour F., Ryckewaert M., Mas-Garcia S., Louargant M., Verpont F., Laloum Y., Moronvalle A., Bendoula R., Roger J.-M. Visible–near infrared hyperspectral dataset of healthy and infected apple tree leaves images for the monitoring of apple fire blight. Data Brief. 2023;50 doi: 10.1016/j.dib.2023.109532. [DOI] [PMC free article] [PubMed] [Google Scholar]
50.Malounas I., Vierbergen W., Kutluk S., Zude-Sasse M., Yang K., Zhao M., Argyropoulos D., Van Beek J., Ampe E., Fountas S. Spectrofood dataset: a comprehensive fruit and vegetable hyperspectral meta-dataset for dry matter estimation. Data Brief. 2024;52 doi: 10.1016/j.dib.2024.110040. [DOI] [PMC free article] [PubMed] [Google Scholar]
51.Zheng Y., Zhang T., Fu Y. A large-scale hyperspectral dataset for flower classification. Knowl. Base Syst. 2022;236 [Google Scholar]
52.Ryckewaert M., Héran D., Feilhes C., Prezman F., Serrano E., Courand A., Mas-Garcia S., Metz M., Bendoula R. Dataset containing spectral data from hyperspectral imaging and sugar content measurements of grapes berries in various maturity stage. Data Brief. 2023;46 doi: 10.1016/j.dib.2022.108822. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
All data and code that support the findings of this study will be made publicly available upon publication. The PlantSpecLab source code is available at https://github.com/Another-Train/PlantSpecLab (MIT License), with a versioned release archived alongside the data.