Next Article in Journal
Potential of Deep Learning Models for Point Cloud-Based Infrastructure Management
Previous Article in Journal
AdamN: Accelerating Deep Learning Training via Nested Momentum and Exact Bias Handling
Previous Article in Special Issue
High-Speed Thin-Film Lithium Niobate Modulator Based on Novel Dual-Capacitor Electrode Design
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Physics-Informed Neural Network-Assisted Imaging for Oil Palm Fruit Ripeness Classification

by
Kuan-Huei Ng
1,2,
Mohd Ikmal Hafizi Azaman
1,2,3,
Waldo Udos
1,
Mohd Ramdhan Mohd Khalid
3,
Mohd Azwan Mohd Bakri
3 and
Kok-Sing Lim
1,*
1
Photonics Research Centre, University of Malaya, Kuala Lumpur 50603, Malaysia
2
Institute for Advanced Studies, University of Malaya, Kuala Lumpur 50603, Malaysia
3
Malaysian Palm Oil Board, 6, Persiaran Institusi, Bandar Baru Bangi 43000, Malaysia
*
Author to whom correspondence should be addressed.
Electronics 2026, 15(3), 671; https://doi.org/10.3390/electronics15030671
Submission received: 11 December 2025 / Revised: 2 January 2026 / Accepted: 9 January 2026 / Published: 3 February 2026
(This article belongs to the Special Issue Trends and Challenges in Integrated Photonics)

Abstract

In this work, we present a Physics-Informed Neural Network (PINN) framework for the classification of oil palm fresh fruit bunch (FFB) ripeness using RGB images. Unlike conventional Convolutional Neural Networks (CNNs) that learn solely from visual patterns, the proposed PINN integrates a physics-based index—derived from the red-to-green pixel intensity ratio—directly into the network architecture and loss function. This hybrid design embeds wavelength-dependent physical knowledge related to chlorophyll degradation during ripening, enabling the model to learn more robust and generalizable features even with limited and imbalanced training data. The PINN model achieves a peak accuracy of 0.73, outperforming the purely data-driven CNN baseline (0.68) by a margin of 5%. Overall, the PINN demonstrates superior performance in minority-class detection and maintains stable convergence under three different lighting conditions (different light spectra). These results highlight the effectiveness of integrating domain-specific physical insights into deep learning models, offering a promising pathway toward reliable, non-destructive, and automated ripeness assessment for agricultural applications.

1. Introduction

The accurate and objective determination of ripeness in oil palm fresh fruit bunches (FFBs) is a critical factor influencing both oil yield and quality, holding significant economic importance for the global agricultural industry [1]. Traditional ripeness assessment methods are predominantly manual, subjective, and labor-intensive, frequently leading to inconsistencies, human error, and potential economic losses. Consequently, there is a strong and pressing demand for automated, non-destructive, and objective quality control methods [2].
In recent years, deep learning, particularly via Convolutional Neural Networks (CNNs), has emerged as a powerful tool for image-based classification tasks in agriculture. Various CNN-based architectures have been successfully applied for FFB ripeness classification [3,4]. These models excel at learning complex visual patterns directly from image data. However, purely data-driven CNNs face significant practical challenges in real-world agricultural settings. Their performance is highly contingent on large, diverse, and well-annotated datasets [5,6]. Acquiring such extensive and balanced datasets is often impractical in agriculture. Standard CNNs may therefore struggle to generalize, especially when faced with (1) limited or imbalanced training data and (2) variations in environmental conditions, such as non-uniform lighting and shadows. These limitations highlight a gap in “black-box” deep learning approaches, which often fail to incorporate known domain-specific or physical knowledge that governs the outcome of the modeling.
Physics-Informed Neural Networks (PINNs) offer a promising hybrid modeling paradigm to bridge this gap. By integrating governing physical principles or domain knowledge directly into the neural network architecture—either as input features or as constraints within the loss function—PINNs can significantly enhance model robustness, improve data efficiency, and provide more generalizable solutions, particularly when training data is scarce.
Most research on PINNs is currently focused on simulation and inversion problems in mechanical engineering (e.g., computational fluid dynamics, finite difference/element) [7] and, to a lesser extent, in biomedical sciences [8,9]. To our knowledge, the use of PINNs for agricultural applications remains scarce.
The use of color-based pixel intensities has been widely adopted for ripeness classification for various fruits, including oil palm fruits [10,11]. This can be attributed to the strong correlation between the detected color intensities and the pigment concentrations in the fruit epidermis tissues [12,13]. However, a classification model that solely relies on color intensity has limitations, as this simple indicator indiscriminately includes noise from non-fruit elements such as thorns, empty fruit sockets, stains, or specular highlights, potentially leading to erroneous predictions.
This study investigates the potential of a PINN model to achieve improved classification of oil palm FFB ripeness. We propose an easy-to-implement hybrid model that fuses deep visual features extracted from a standard CNN with a physical-based metric index—the ratio of red to green pixel values, γRG. This ratio is an indirect, yet effective, measure of this underlying pigment change. The proposed PINN model aims to leverage the respective strengths of both methods, balancing the robust, high-level visual feature extraction of the CNN against the reliable, low-level physical guidance provided by γRG. The model is further guided by a loss function that regularizes the network’s predictions to be consistent with this underlying physical heuristic. In this investigation, the performance of the proposed PINN will be compared against a standard, purely data-driven CNN. The technique demonstrated is also applicable and extendable to other agricultural areas where physics-informed classifications are required.

2. Methods

2.1. Dataset Acquisition

A total of 112 images of oil palm fresh fruit bunches were acquired using a CMOS camera for this study. To ensure model robustness against environmental variations, images were captured under three distinct lighting conditions: a standard halogen lamp, a halogen lamp filtered by a blue filter, and a halogen lamp filtered by a red filter (Figure 1).
The dataset was categorized into three classes of ripeness (see Figure 2): 18 unripe (Class 1), 49 underripe (Class 2), and 45 ripe (Class 3) bunches. To maintain high data quality and relevance, care was taken to ensure that for at least 50% of the images, the frame was predominantly filled with pure oil palm fruitlets, minimizing the presence of confounding elements such as thorns, empty fruit sockets, or stains. The numbers of unripe, underripe, and ripe samples with different lighting conditions are listed in Table 1.

2.2. Data Preprocessing and Feature Extraction

For Physics-Informed Neural Networks (PINNs), a specific feature is extracted from the raw images to serve as the physical indicator. For each image, the median pixel values of the red (R) and green (G) channels were computed. The median was used instead of the mean because it is less affected by extreme values originating from non-fruit artifacts such as thorns, empty fruit sockets, stains, or specular reflections. Using these median values, the colorimetric index γRG is calculated based on the red-to-green ratio (R/G). This ratio serves as the scalar physical indicator for the PINN model. As a wavelength-dependent parameter, γRG captures the color transition from dark to red, which is primarily driven by the reduction in chlorophyll content during ripening [12,13]. Importantly, this ratio is inherently more robust and less sensitive to variations in ambient lighting intensity. In this investigation, a total of 112 RGB images were prepared; 62 of them were randomly selected for the training set, while the remaining 50 images were reserved for the testing set (Due to the small unripe sample sets, 13 random unripe samples were always allocated to the training data set). A total of 15 random splits were carried out to ensure generalization, and results are reported in Section 3.

2.3. Model Architectures

Two distinct models were developed in this study: a Convolutional Neural Network (CNN) and Physics-Informed Neural Network (PINN).

2.3.1. Convolutional Neural Network (Pure CNN)

This conventional CNN baseline model uses only fruit images. Its architecture includes a convolutional base with three Conv2D layers (8, 16, and 32 filters, respectively) and MaxPooling2D layers to extract visual features. These features are then flattened and passed to a classifier head with two Dense layers for final classification into the three ripeness stages (Figure 3).

2.3.2. Physics-Informed Neural Network (PINN)

A PINN can be seen as a hybrid model that fuses information from both the images and the physical parameter, γRG (see Figure 4). The image is first processed by the same convolutional base as the CNN. The resulting feature vector is then concatenated with γRG. This combined, multimodal feature vector is then processed by the classifier head to produce the final prediction, allowing the model to learn the interplay between visual appearance and the underlying physical color index. Custom training loops based on the following loss function were implemented:
L t o t a l = L c l s + λ × L p h y s
where L t o t a l is total loss and L c l s is the sparse categorical cross-entropy, which measures the error in the model’s classification based on the actual data. L p h y s denotes the mean squared error (MSE) between the PINN’s predicted class and the class predicted by the γRG linear model equations (Equation (2)).
L p h y s = 1 N i = 1 N C p h y s i E ^ P I N N i 2
where N is the number of samples in the batch and C p h y s i   is the deterministic class index (a hard value of 0, 1, or 2) predicted by γRG for the i-th sample.   E ^ P I N N i   is the expected class index predicted by the PINN for the i-th sample, calculated as a weighted average of the class indices (Equation (3)), and P j i is the probability assigned to class j for the i-th sample.
E ^ P I N N i = j = 0 2 j · P j i
This term constrains the network’s predictions to be consistent with the physical model. L p h y s can be any function that is able to classify the ripeness stage. A comprehensive summary of all symbols is provided in Table 2, while the network architecture and training settings for the CNN and PINN are detailed in Table 3. In our case, linear equations are fit using least squares regression from the training γ R G data (see Table 4) and are limited to the range of [0, 3], as any value greater than 3 is clipped to 3. λ is physics loss weighting coefficient, a hyperparameter that balances the influence of the data-driven classification loss and the physics-based regularization term.

2.4. Training and Validation

For both the CNN and PINN models, the dataset was partitioned using an 80/20 stratified random split to maintain proportional representation of all three ripeness classes (unripe, underripe, ripe) in both the training and validation sets. This ensured that class imbalance did not bias model performance. All models were trained with a batch size of 16 using the Adam optimizer (learning rate = 0.001) [14]. To mitigate the issue of overfitting and improve generalization, early termination with a patience of 10 epochs was applied, in which the total validation loss for the PINN was carefully monitored and assessed in each epoch. The training was halted when no further improvement was observed within the patience window, and the model weights corresponding to the best validation performance were registered (Table 3).
Table 3. Summary of network architecture and training settings for CNN and PINN.
Table 3. Summary of network architecture and training settings for CNN and PINN.
CategoryDetails
CNN
Architecture
Input: Image (128, 128, 3)
Layers: 1. Conv2D (8 filters, 3 × 3, ReLU) → MaxPooling2D (2 × 2)
2. Conv2D (16 filters, 3 × 3, ReLU) → MaxPooling2D (2 × 2)
3. Conv2D (32 filters, 3 × 3, ReLU) → MaxPooling2D (2 × 2)
4. GlobalAveragePooling2D
5. Dense (32 units, ReLU, L2 reg)
6. Dropout (0.4)
7. Output Dense (Softmax)
PINN
Architecture
Inputs: Image (128, 128, 3) and Scalar γ R G Value (1)
Structure:
• Image branch identical to CNN
• Concatenates image features with the scalar γ R G input
• Followed by same Dense block (32 units) → Dropout → Output
OptimizerAdam (used for both CNN and PINN)
Learning Rate0.001 (used for both CNN and PINN)
Batch Size16
Epochs500 (maximum; early stopping triggered for all training sets before this limit was reached)
AugmentationNone
Regularization• L2 Regularization: Factor of 0.01 on 32-unit Dense layer
• Dropout: Rate of 0.4
• Early Stopping: Patience of 10 epochs, restoring best weights.
• Physics Loss: Weighted regularization applied to PINN predictions based on linear regression constraints
This procedure was repeated for each value of λ, and the best-performing validation model for each setting is presented in the following section. A comprehensive evaluation was then conducted on a held-out test set, using confusion matrices to quantitatively compare the predictions of the PINN with those of the CNN. Table 4 tabulates linear model equations with slope, intercept, and the R2 of 15 randomly split training sets’ data.
Table 4. RG-based linear model equations ( m is the slope and c is the intercept of the linear equation) and R2 acquired from 15 randomly split training sets’ data.
Table 4. RG-based linear model equations ( m is the slope and c is the intercept of the linear equation) and R2 acquired from 15 randomly split training sets’ data.
Linear Model Equations R i p e n e s s I n d e x = m × γ R G + c
m ∈ [2.04, 2.53], c ∈ [−2.65, −1.84]
R2R2 ∈ [0.61, 0.71]

3. Results and Discussion

3.1. The Impact of Physics Loss Weighting Coefficient

The performance of the PINN is critically sensitive to the physics loss weighting coefficient, λ, which is used in the composite loss function (Equation (1)). This function creates dual-objective optimization, balancing the physics-based loss function, Lphys, against the data-driven one, Lcls (see Figure 5).
Optimal performance is observed at low λ values (0.1–1.5), yielding accuracies of 0.70–0.73 compared to the baseline CNN’s 0.68. The best result of 0.73 ± 0.05 is achieved at λ = 0.6, representing a synergistic balance between the competing losses. Lphys stabilizes the model above the robust 0.69 baseline, while Lcls continues to guide the extraction of discriminative visual features, producing a hybrid effect that outperforms either component alone.
At higher λ values (e.g., λ ≥ 5), accuracy begins to decline as the imbalance between the two loss components disrupts the optimization process. For instance, at λ = 5 and λ = 50, the recorded accuracy drops to 0.69 and 0.53, respectively. In these cases, the network fails to converge on a solution that simultaneously satisfies the image data and the linear physical model, resulting in a sub-optimal equilibrium where neither objective is sufficiently minimized.

3.2. CNN vs. PINN Per-Class Performance

The per-class metrics further highlight the superior performance of the PINN (λ = 0.6) over the conventional CNN. As shown in Table 5, the impact of the PINN is most noticeable in Class 1 (Unripe). The CNN struggled significantly with this class, with a lower precision of 0.41 ± 0.11. In contrast, the PINN recorded a precision of 0.59 ± 0.21. This indicates that the PINN is more robust at identifying minority classes or features than the standard CNN, likely indicating that the training data in this class is limited.
For Class 2 (Underripe) and Class 3 (Ripe), both the PINN (λ = 0.6) and CNN achieved similar precision, but the PINN (λ = 0.6) demonstrated superior reliability, with higher recall and F1-scores, suggesting that the “physics-informed” aspect of the network helps reduce false negatives, ensuring that more actual instances of Class 2 are correctly identified. The PINN model can overcome this limitation by incorporating γRG into the loss function, introducing stronger wavelength-dependent constraints that provide a more robust physical basis for classification.
In general, increasing the λ values beyond 5 leads to a decline in per-class precision for the PINN model. For instance (Table 5), at λ = 5, the precisions for Classes 1, 2, and 3 drop to 0.50, 0.66, and 0.86, respectively. At λ = 50, the model’s performance collapses for all classes, recording precision values of only 0.26 for Class 1, 0.33 for Class 2, and 0.70 for Class 3.
The findings demonstrate the strengths of the PINN model. The integration of physical parameters and a physics-based loss function can improve classification accuracy. Notably, the PINN exhibits greater robustness in handling minority Class 1 despite the limited and imbalanced training dataset. This capability is particularly valuable for applications where access to large training datasets is constrained.
The model’s optimal performance within a specific λ range suggests the importance of balancing conventional color-based feature extraction with physics-informed constraints. This balance allows the PINN to leverage both visual information and underlying physical relationships, providing a significant advantage in scenarios where data imbalance is a persistent challenge in real-world classification tasks.

3.3. CNN vs. PINN Under Different Lighting Conditions

We compared PINN (λ = 0.6) and CNN performance under different lighting environments, with specific results for halogen (Table 6), blue-filter (Table 7), and red-filter (Table 8) conditions.
Under illumination using the original halogen lamp, the results indicate that the PINN model achieves superior performance in Classes 2 and 3 across all evaluated metrics, including precision, recall, and F1-score. Specifically, for Class 3, the PINN reached an F1-score of 0.84 ± 0.09, outperforming the CNN’s 0.82 ± 0.11. Conversely, the CNN exhibited better performance in Class 1, which corresponds to unripe fruit. This phenomenon can be attributed to the spectral profile of the halogen lamp, where intensity increases steadily with wavelength. The high-absorption characteristics of unripe fruit bunches in this range result in a muted spectral response, creating a lack of contrast that hinders the PINN’s ability to distinguish specific color features and wavelength signatures. In this data-sparse environment, the CNN’s standard feature extraction proves more resilient than the physics-constrained approach.
The application of a blue filter shifted the performance advantage toward the PINN, particularly in Classes 1 and 2. In Class 1, the PINN achieved a precision of 0.47 ± 0.29 compared to the CNN’s 0.32 ± 0.15, representing a significant gain in reliability. While the CNN maintained a marginal lead in Class 3 F1-score (0.61 versus 0.59), the PINN’s general improvement stems from the blue filter’s ability to enhance spectral distinctions within the 550–650 nm and 650–780 nm ranges. This increased contrast facilitates superior feature extraction, allowing the physics-informed architecture to better model the underlying reflectance properties of the fruit and leading to higher overall classification accuracy.
In the case of the red filter, the CNN demonstrated superior performance in Classes 2 and 3, whereas the PINN maintained greater precision only in Class 1. The red filter effectively blocks shorter wavelengths, permitting only the “red” region of the spectrum to pass. This isolation enhances the characteristic color features of ripeness, providing the CNN with a highly focused and clear set of visual indicators to facilitate accurate decision-making. Under these specific conditions, the PINN’s additional physical constraints may become redundant or even introduce spectral noise, resulting in lower performance relative to the CNN in the ripened classes. However, the PINN’s slight advantage in Class 1 (0.52 ± 0.43 precision) suggests that it remains more effective than the CNN when dealing with the high-absorption, low-feature profile of unripe fruit, even under filtered-light conditions.

4. Conclusions

This study successfully demonstrates the effectiveness of a Physics-Informed Neural Network for the classification of oil palm FFB ripeness. By fusing visual data from images with a physics-based colorimetric index (γRG), the proposed PINN model achieved a classification accuracy of 0.72, demonstrating superior performance compared to the conventional data-driven CNN (0.68), with an improvement of 5% even when using different light sources (different spectral compositions). Note that this improvement is achieved without any additional instruments, just with raw image data. The results underscore the value of integrating physical knowledge into deep learning frameworks to create more robust and accurate predictive models. This hybrid approach represents a significant step forward for developing automated, non-destructive quality control systems in the agricultural sector, promising to enhance efficiency and maximize economic returns.

Author Contributions

Conceptualization, K.-H.N. and K.-S.L.; Methodology, K.-H.N. and K.-S.L.; Software, K.-H.N.; Validation, K.-H.N., M.I.H.A. and K.-S.L.; Formal analysis, K.-H.N. and K.-S.L.; Investigation, K.-H.N., M.I.H.A., W.U., M.A.M.B. and K.-S.L.; Resources, W.U., M.R.M.K. and K.-S.L.; Writing—original draft, K.-H.N.; Writing—review & editing, K.-H.N. and K.-S.L.; Supervision, M.A.M.B. and K.-S.L.; Project administration, K.-H.N., W.U., M.R.M.K., M.A.M.B. and K.-S.L.; Funding acquisition, M.A.M.B. and K.-S.L. All authors have read and agreed to the published version of the manuscript.

Funding

The authors acknowledge funding from Malaysian Palm Oil Board (GA021-2025).

Data Availability Statement

The data supporting the findings of this study are currently unavailable as they remain the proprietary property of the Malaysian Palm Oil Board and are part of an ongoing research project.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
CNNConvolutional Neural Network
PINNPhysics-Informed Neural Network
FFBFresh Fruit Bunch

References

  1. Hassan, M.A.; Farid, M.A.A.; Zakaria, M.R.; Ariffin, H.; Andou, Y.; Shirai, Y. Palm oil expansion in Malaysia and its countermeasures through policy window and biorefinery approach. Environ. Sci. Policy 2024, 153, 103671. [Google Scholar] [CrossRef]
  2. Rizzo, M.; Marcuzzo, M.; Zangari, A.; Gasparetto, A.; Albarelli, A. Fruit ripeness classification: A survey. Artif. Intell. Agric. 2023, 7, 44–57. [Google Scholar] [CrossRef]
  3. Lai, J.W.; Ramli, H.R.; Ismail, L.I.; Hasan, W.Z.W. Real-Time Detection of Ripe Oil Palm Fresh Fruit Bunch Based on YOLOv4. IEEE Access 2022, 10, 95763–95770. [Google Scholar] [CrossRef]
  4. Rosbi, M.; Omar, Z.; Khairuddin, U.; Majeed, A.P.; Bakar, S.A. Machine learning for automated oil palm fruit grading: The role of fuzzy C-means segmentation and textural features. Smart Agric. Technol. 2024, 9, 100691. [Google Scholar] [CrossRef]
  5. Yamashita, R.; Nishio, M.; Do, R.K.G.; Togashi, K. Convolutional neural networks: An overview and application in radiology. Insights Imaging 2018, 9, 611–629. [Google Scholar] [CrossRef] [PubMed]
  6. Oyedare, T.; Park, J.-M.J. Estimating the Required Training Dataset Size for Transmitter Classification Using Deep Learning. In Proceedings of the 2019 IEEE International Symposium on Dynamic Spectrum Access Networks (DySPAN), Newark, NJ, USA, 11–14 November 2019; pp. 1–10. [Google Scholar] [CrossRef]
  7. Zhao, C.; Zhang, F.; Lou, W.; Wang, X.; Yang, J. A comprehensive review of advances in physics-informed neural networks and their applications in complex fluid dynamics. Phys. Fluids 2024, 36, 101301. [Google Scholar] [CrossRef]
  8. Kharazmi, E.; Cai, M.; Zheng, X.; Zhang, Z.; Lin, G.; Karniadakis, G.E. Identifiability and predictability of integer- and fractional-order epidemiological models using physics-informed neural networks. Nat. Comput. Sci. 2021, 1, 744–753. [Google Scholar] [CrossRef] [PubMed]
  9. Alkhadhr, S.; Liu, X.; Almekkawy, M. Modeling of the Forward Wave Propagation Using Physics-Informed Neural Networks. In Proceedings of the 2021 IEEE International Ultrasonics Symposium (IUS), Xi’an, China, 11–16 September 2021; pp. 1–4. [Google Scholar] [CrossRef]
  10. Sabri, N.; Ibrahim, Z.; Isa, D. Evaluation of Color Models for Palm Oil Fresh Fruit Bunch Ripeness Classification. Indones. J. Electr. Eng. Comput. Sci. 2018, 11, 346–353. [Google Scholar] [CrossRef]
  11. Fadilah, N.; Mohamad-Saleh, J.; Abdul Halim, Z.; Ibrahim, H.; Syed Ali, S.S. Intelligent Color Vision System for Ripeness Classification of Oil Palm Fresh Fruit Bunch. Sensors 2012, 12, 14179–14195. [Google Scholar] [CrossRef]
  12. Makky, M.; Soni, P. In situ quality assessment of intact oil palm fresh fruit bunches using rapid portable non-contact and non-destructive approach. J. Food Eng. 2014, 120, 248–259. [Google Scholar] [CrossRef]
  13. Tzuan, G.T.H.; Hashim, F.H.; Raj, T.; Huddin, A.B.; Sajab, M.S. Oil Palm Fruits Ripeness Classification Based on the Characteristics of Protein, Lipid, Carotene, and Guanine/Cytosine from the Raman Spectra. Plants 2022, 11, 1936. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
  14. Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar] [CrossRef]
Figure 1. Normalized spectra of different light sources.
Figure 1. Normalized spectra of different light sources.
Electronics 15 00671 g001
Figure 2. Example of unripe (a), underripe (b), and ripe (c) oil palm fruits with different lighting conditions: (i) halogen lamp (ii), with red filter (iii), and with blue filter.
Figure 2. Example of unripe (a), underripe (b), and ripe (c) oil palm fruits with different lighting conditions: (i) halogen lamp (ii), with red filter (iii), and with blue filter.
Electronics 15 00671 g002
Figure 3. CNN architecture.
Figure 3. CNN architecture.
Electronics 15 00671 g003
Figure 4. PINN architecture.
Figure 4. PINN architecture.
Electronics 15 00671 g004
Figure 5. Accuracy (mean ± standard deviation) of ripeness classification vs. physics loss weighting coefficient λ.
Figure 5. Accuracy (mean ± standard deviation) of ripeness classification vs. physics loss weighting coefficient λ.
Electronics 15 00671 g005
Table 1. Number of unripe, underripe, and ripe samples with different lighting conditions.
Table 1. Number of unripe, underripe, and ripe samples with different lighting conditions.
Ripeness ClassHalogen LampWith Red FilterWith Blue FilterTotal
Unripe65718
Underripe14181749
Ripe16151445
Table 2. Comprehensive summary of all symbols.
Table 2. Comprehensive summary of all symbols.
SymbolDefinition
γ R G Median of red-to-green ratio from raw image
L t o t a l Total loss
L c l s Sparse categorical cross-entropy loss
λ Physics loss weighting coefficient
C p h y s i Deterministic class index predicted by γRG for i-th sample
E ^ P I N N i Expected class index predicted by PINN for i-th sample
P j i Probability assigned to class j for i-th sample
Table 5. Precision, recall, F1-score, and support (mean ± standard deviation) for CNN and PINN (λ = 0.6, 5, and 50).
Table 5. Precision, recall, F1-score, and support (mean ± standard deviation) for CNN and PINN (λ = 0.6, 5, and 50).
ModelClass PrecisionRecallF1-ScoreSupport
CNNClass 10.41 ± 0.110.76 ± 0.220.51 ± 0.125.00 ± 0.00
Class 20.69 ± 0.080.68 ± 0.080.68 ± 0.0523.60 ± 2.12
Class 30.87 ± 0.070.67 ± 0.120.75 ± 0.0721.40 ± 2.12
PINN (λ = 0.6)Class 10.59 ± 0.210.64 ± 0.260.56 ± 0.155.00 ± 0.00
Class 20.69 ± 0.070.79 ± 0.100.73 ± 0.0623.60 ± 2.12
Class 30.88 ± 0.070.68 ± 0.120.76 ± 0.0721.40 ± 2.12
PINN (λ = 5)Class 10.52 ± 0.210.61 ± 0.200.53 ± 0.165.00 ± 0.00
Class 20.66 ± 0.060.73 ± 0.120.69 ± 0.0723.60 ± 2.12
Class 30.85 ± 0.090.67 ± 0.120.74 ± 0.0621.40 ± 2.12
PINN (λ = 50)Class 10.26 ± 0.070.93 ± 0.120.40 ± 0.075.00 ± 0.00
Class 20.33 ± 0.370.12 ± 0.150.17 ± 0.2123.60 ± 2.12
Class 30.70 ± 0.060.87 ± 0.060.77 ± 0.0421.40 ± 2.12
Table 6. Precision, recall, and F1-score (mean ± standard deviation) for CNN and PINN (λ = 0.6) under halogen lamp (original).
Table 6. Precision, recall, and F1-score (mean ± standard deviation) for CNN and PINN (λ = 0.6) under halogen lamp (original).
Halogen Lamp (Original)
PINN (λ = 0.6)CNN
ClassPrecisionRecallF1-ScorePrecision RecallF1-Score
10.36 ± 0.47 0.33 ± 0.45 0.33 ± 0.43 0.46 ± 0.47 0.47 ± 0.48 0.44 ± 0.44
20.69 ± 0.10 0.92 ± 0.08 0.78 ± 0.08 0.68 ± 0.13 0.84 ± 0.12 0.75 ± 0.12
30.93 ± 0.09 0.78 ± 0.15 0.84 ± 0.09 0.89 ± 0.11 0.78 ± 0.16 0.82 ± 0.11
Table 7. Precision, recall, and F1-score (mean ± standard deviation) for CNN and PINN (λ = 0.6) under halogen lamp with blue filter.
Table 7. Precision, recall, and F1-score (mean ± standard deviation) for CNN and PINN (λ = 0.6) under halogen lamp with blue filter.
Halogen Lamp with Blue Filter
PINN (λ = 0.6)CNN
ClassPrecisionRecallF1-Score Precision RecallF1-Score
10.47 ± 0.29 0.83 ± 0.31 0.54 ± 0.25 0.32 ± 0.15 0.98 ± 0.09 0.46 ± 0.17
20.63 ± 0.12 0.71 ± 0.18 0.65 ± 0.12 0.60 ± 0.16 0.52 ± 0.18 0.53 ± 0.13
30.98 ± 0.06 0.46 ± 0.21 0.59 ± 0.19 0.99 ± 0.04 0.47 ± 0.18 0.61 ± 0.16
Table 8. Precision, recall, and F1-score (mean ± standard deviation) for CNN and PINN (λ = 0.6) under halogen lamp with red filter.
Table 8. Precision, recall, and F1-score (mean ± standard deviation) for CNN and PINN (λ = 0.6) under halogen lamp with red filter.
Halogen Lamp with Red Filter
PINN (λ = 0.6)CNN
ClassPrecisionRecallF1-Score Precision RecallF1-Score
10.52 ± 0.43 0.57 ± 0.46 0.52 ± 0.40 0.49 ± 0.39 0.67 ± 0.45 0.52 ± 0.36
20.76 ± 0.13 0.77 ± 0.13 0.75 ± 0.08 0.80 ± 0.15 0.74 ± 0.11 0.76 ± 0.07
30.77 ± 0.13 0.77 ± 0.21 0.75 ± 0.14 0.79 ± 0.14 0.74 ± 0.21 0.73 ± 0.13
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ng, K.-H.; Azaman, M.I.H.; Udos, W.; Khalid, M.R.M.; Mohd Bakri, M.A.; Lim, K.-S. Physics-Informed Neural Network-Assisted Imaging for Oil Palm Fruit Ripeness Classification. Electronics 2026, 15, 671. https://doi.org/10.3390/electronics15030671

AMA Style

Ng K-H, Azaman MIH, Udos W, Khalid MRM, Mohd Bakri MA, Lim K-S. Physics-Informed Neural Network-Assisted Imaging for Oil Palm Fruit Ripeness Classification. Electronics. 2026; 15(3):671. https://doi.org/10.3390/electronics15030671

Chicago/Turabian Style

Ng, Kuan-Huei, Mohd Ikmal Hafizi Azaman, Waldo Udos, Mohd Ramdhan Mohd Khalid, Mohd Azwan Mohd Bakri, and Kok-Sing Lim. 2026. "Physics-Informed Neural Network-Assisted Imaging for Oil Palm Fruit Ripeness Classification" Electronics 15, no. 3: 671. https://doi.org/10.3390/electronics15030671

APA Style

Ng, K.-H., Azaman, M. I. H., Udos, W., Khalid, M. R. M., Mohd Bakri, M. A., & Lim, K.-S. (2026). Physics-Informed Neural Network-Assisted Imaging for Oil Palm Fruit Ripeness Classification. Electronics, 15(3), 671. https://doi.org/10.3390/electronics15030671

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop