1 Introduction

Thermal imaging, which utilizes temperature profiles to generate images, is widely employed across construction, security, medical, industrial, and automotive industries [1]. Recent advancements have positioned it as a valuable tool in the agricultural and food processing sectors [2]. Its applications range from detecting crop health variations and monitoring soil moisture levels to identifying pests, diseases, potential contamination, and product spoilage [3]. Furthermore, thermal imaging monitors refrigeration units and cold storage rooms to ensure optimal conditions for fruit storage and quality [4]. Artificial Intelligence (AI), a field of computer science focusing on intelligent algorithms, plays a pivotal role in automating sorting, grading, and packaging processes within the fruit industry. Various AI techniques, including machine learning, computer vision, natural language processing, robotics, predictive analytics, autonomous agents, and expert systems, optimize production processes, pricing decisions, and marketing strategies and enhance the overall customer experience [5,6,7] The article underscores the economic and environmental impact of post-harvest fruit loss, with up to 1/3 of fruits being lost, leading to higher prices, reduced incomes for farmers, and increased demands on food processing and transport [8]. Proper cold storage practices such as Controlled Atmosphere (CA), Ultra-Low Oxygen (ULO), and Dynamic Controlled Atmosphere (DCA) are crucial for mitigating post-harvest losses. Inadequate storage and handling practices can result in physical damage, water loss, and microbial growth, leading to significant losses [9]. This paper reviews AI-based thermal imaging applications in post-harvest fruit handling, addressing the gap in the literature. While previous reviews broadly covered food processing, agriculture, and pest detection applications, this review focuses on AI-based thermal imaging approaches in post-harvest fruit applications. Recent research has employed machine learning-based thermal imaging approaches for fruits such as apples, guava, citrus, mango, banana, pineapple, pears, jujube, strawberry, etc. [10,11,12,13,14,15]. These studies utilized machine learning algorithms in conjunction with thermal imaging to assess fruit attributes, including ripening state, maturity, detection of immature fruit, disease classification, and bruise detection.

This article comprehensively reviews artificial intelligence-based thermal imaging systems, encompassing a broad spectrum of applications and use cases while addressing their development and implementation’s significant technical challenges and limitations. It begins by exploring the fundamental principles of thermal imaging and its practical applications, followed by an introduction to artificial intelligence machine learning and an overview of the Convolutional Neural Network (CNN) model. The review then delves into diverse approaches for thermal imaging analysis, highlighting specific algorithms and techniques used in various post-harvest fruit-related activities. These activities include detecting bruises, identifying maturity, categorizing fruits, assessing quality, detecting insects, and monitoring conditions. In addition, the evaluation scrutinizes factors influencing the performance of AI-based thermal imaging systems, including image quality and other relevant variables.

2 Thermal imaging systems

Thermal imaging systems employ cameras that detect infrared radiation emitted from objects, providing a visual representation with color-coded temperature information in the field of view. The resulting image reveals the diverse thermal energy emitted by different objects and materials, enabling the detection of temperature variations, identification of overheating components, and localization of areas with insulation loss. Particularly useful in low-light conditions, thermal imaging cameras visualize objects emitting more infrared radiation than their surroundings [16]. Infrared radiation, with wavelengths ranging from 0.74 to 1000, is invisible to the human eye. The accuracy of a thermogram or thermal map depends on an object’s capacity to emit infrared light. Infrared radiation, situated between visible light and microwaves in the radiation spectra, is emitted by any substance above 0 ℃ [17]. Various types of thermal imaging exist, including infrared (IR), shortwave infrared (SWIR), longwave infrared (LWIR), and thermal imaging cameras. IR imaging employs cameras that detect spatial infrared radiation, creating an image based on the relative temperatures of objects in the scene. SWIR imaging, on the other hand, uses cameras that detect light in the near-infrared range, generating an image based on the relative brightness of objects in the scene. LWIR imaging uses cameras that detect light in the far-infrared range, producing an image based on the relative amount of spatial infrared radiation emitted by objects in the scene. Thermal imaging cameras detect and convert spatial infrared radiation into visible images. The essential components of the simple thermal imaging system are shown in Fig. 1.

Fig. 1
figure 1

The essential components of the simple thermal imaging system

In thermal radiation theory, a blackbody is a hypothetical entity that absorbs all incident radiation and emits a continuous spectrum under Planck’s law, as shown below.

$${L}_{\lambda =\frac{ {2hc}^{3}}{{\lambda }^{5}}\frac{1}{{e}^{\frac{hc}{\lambda {k}_{B}T}}-1}}$$
(1)

Here, Bλ (λ, T) is the spectral radiance per unit wavelength at a given wavelength λ and temperature T, h is the Planck constant, c is the speed of light, and kB is the Boltzmann constant. Stefan Boltzmann’s constant is obtained by integrating Planck’s law over all frequencies and is represented as follows.

$$q=\epsilon \mathrm{A\alpha \sigma }{{\text{T}}}^{4}$$
(2)

Here, ϵ is the emissivity of the emitting surface, σ is the Stefan-Boltzmann constant with a value of 5.67 × 10−8W m−2 K−4 [18].

2.1 Passive and active thermography

Using unenergized infrared light for sample evaluation in passive thermography reveals construction flaws. Temperature disparities between irregularities and their surroundings are crucial in this approach. Passive thermography relies on relative temperature values derived from comparable objects or ambient temperatures in various applications. In contrast, active thermography involves the application of an external energy source to the test material, generating temperature variations between defective and healthy zones. Recognized as a well-established method in non-destructive testing (NDT) applications, active thermography is particularly adept at identifying structural cracks. The distinct thermal properties of the substance under examination significantly influence thermal transfer, inducing alterations in surface temperature in regions with diverse thermal characteristics. Figure 2 shows a Schematic representation of passive and active thermography techniques and their applications.

Fig. 2
figure 2

A schematic representation of passive and active thermography techniques and their various applications

3 Fruit thermal image and its characteristics

A thermal image of a fruit conveys the temperature distribution across the fruit’s surface. This image was acquired using a thermal or infrared camera designed to detect the infrared radiation emitted by the fruit. Thermal characteristics of a fruit’s image yield valuable insights into its quality, ripeness, and internal composition. Several key features are discernible in a fruit’s thermal image:

Uniformity A high-quality fruit typically exhibits a consistent temperature distribution on its surface, whereas damaged or diseased fruits may display temperature variations or hotspots [19].

Ripeness Fruits undergoing ripening generate increased heat due to heightened metabolic activity. Thermal imaging facilitates the non-invasive assessment of fruit ripeness.

Internal structure A thermal image may offer insights into the internal structure depending on the fruit type and camera specifications. For instance, an apple’s thermal image might reveal the cooler location of its core [20].

Surface defects Bruises, cracks, or cuts on the fruit’s surface are detectable through thermal images [21].

Temperature distribution Variations in temperature across different fruit areas can indicate internal damage, disease, or uneven ripening [22].

Moisture content Fruits with varying moisture content exhibit different temperature distributions, as exemplified by the cooler temperature of a juicy watermelon compared with a less juicy one [23].

Environmental factors The temperature distribution in a thermal image is influenced by environmental factors such as air temperature, humidity, and lighting [24].

Fruit type Different fruits may display distinct temperature distributions because of their unique size, shape, and internal structure.

Storage conditions The effects of storage conditions, including temperature and humidity, on fruit quality and ripeness are discernible in thermal images [25].

Harvest time The temperature distribution in a thermal image aids in determining the optimal time to harvest fruit for maximum quality and flavor [26].

Thermal images have distinctive characteristics that distinguish them from other images. Thermal imaging provides temperature information and offers a unique data point for analysis. These images capture non-visible infrared radiation emitted by objects, providing insights beyond what is visible to the naked eye. With an extended dynamic range, thermal imaging can capture scorching and freezing temperatures, enabling precise assessment of temperature distribution. Moreover, it is a non-contact and non-destructive technique, allowing measurements without physical contact or harm to the object being imaged. In some cases, thermal cameras can also capture multi-spectral information, enhancing the understanding of temperature distribution at different wavelengths.

4 Introduction to artificial intelligence

Artificial Intelligence (AI) is a prominent domain within computer science dedicated to creating intelligent machines capable of executing tasks traditionally within human intelligence. These tasks encompass visual perception, speech recognition, decision-making, and language translation. AI is realized by developing algorithms and computer programs to analyze data, derive insights, and execute decisions or predictions based on the researched information [27].

The applications of AI extend across diverse fields, including healthcare, finance, manufacturing, and transportation, as evidenced by its incorporation in numerous domains [28,29,30,31]. The potential impact of AI on various industries is immense, with the capacity to revolutionize societal structures and redefine how we live and work. The practical implementation of AI hinges on key components such as data availability, robust algorithms, and significant computing power. Moreover, it necessitates human expertise, ethical considerations, and a feedback loop to facilitate continuous learning and improvement.

The evolution of AI has been propelled by the development of diverse machine learning algorithms, which have contributed to the refinement and advancement of the technology. While it remains challenging for computers to accurately measure and extract quality attributes of specific fruit types from images, AI’s advantages outweigh the complexities in crafting intricate algorithms and training models. Figure 3 visually illustrates the classification of AI and its various facets.

Fig. 3
figure 3

AI classification

4.1 Machine learning

A branch of artificial intelligence, machine learning techniques encompasses the study of algorithms that enhance computer programs through experiential learning. This method uses data sets comprising examples of precise attributes or features manifested as numeric values or binary digits. The assessment of a machine learning model’s performance in a specific task is gauged using a performance metric that refines with accumulated experience. Diverse mathematical and statistical models serve to quantify the efficacy of machine learning models and algorithms. Following the conclusion of the learning process, the trained model is poised to classify, predict, or cluster new examples (testing data) based on the experience accrued during the training phase. This method categorizes the data into overarching classifications predicated on learning types (supervised/unsupervised), learning models (classification, regression, clustering, dimensionality reduction), and reinforcement or learning models employed for task-specific incorporation [32].

4.1.1 Learning phase

The learning phase of machine learning (ML) involves training a model against a dataset to find patterns and relationships. The process consists of data preprocessing, model selection, training, validation, and hyperparameter tuning. The model iteratively adjusts its parameters based on the input data to improve accuracy and make better predictions over time. Data quality, algorithm selection, and parameter tuning are vital to ensure optimal performance during the learning phase of ML models.

4.1.2 Dimensionality reduction

Dimensionality Reduction (DR) is a technique that creates a simplified, lower-dimensional dataset representation while preserving as much of the original data as possible. This technique is employed in both supervised and unsupervised learning. It is often used before running classification or regression models to minimize the effects of high dimensionality. The following are some of the most often-used DR algorithms:

(i) principal component analysis, (ii) partial least squares regression, (iii) linear discriminant analysis, and (iv) Autoencoders [33].

4.1.3 Classification and regression

Classification uses a computer program to assign data points into distinct groups or classes based on specific characteristics. The program is initially trained on the training dataset, which it then uses to categorize new data points. Classification Algorithms can be further divided into the following types: Logistic Regression (LR), K-Nearest Neighbors (KNN), Support Vector Machines (SVM), Kernel SVM (KSVM), Naïve Bayes (NB), Decision Tree Classification (DTC), Random Forest Classification (RFC) and neural networks. Determining the correlations between the dependent and independent variables is known as regression. It aids in the prediction of continuous variables. Simple Linear Regression, Multiple Linear Regression, Polynomial Regression, Support Vector Regression, Decision Tree Regression, and Random Forest Regression.

4.2 Deep learning

Deep learning is a type of machine learning that uses artificial neural networks to learn and make predictions from data. It uses a multi-level structure to interpret image properties, leading to improved image recognition accuracy. It is based on the principle that models should be able to interpret problems utilizing a hierarchical structure of concepts. Machine learning techniques, such as supervised, unsupervised, and artificial neural networks, are used to develop DL models [34]. Understanding the primary algorithms available is essential for selecting an appropriate algorithm for a deep learning model. There is no perfect network. However, some algorithms may be more suitable for specific tasks than others. Several deep-learning models have been used for fruit quality assessment. However, one of the most used models is Convolutional Neural Networks (CNNs) [35]. CNNs are well suited for image classification tasks, including fruit quality assessment, as they can automatically learn features from images without requiring manual feature engineering. In the case of fruit quality assessment, CNNs can be trained to classify fruit based on various quality attributes such as color, size, shape, bruises, and other defects. There have been several studies that have used CNNs for fruit quality assessment. For example, researchers have used CNNs to assess the quality of apples, tomatoes, and bananas based on their appearance [36]. In these studies, the CNNs were trained using large datasets of fruit images and achieved high levels of accuracy in fruit quality classification. One of the advantages of using CNNs for fruit quality assessment is that they can be easily retrained to recognize new fruit varieties or adapt to environmental conditions [37].

In addition, CNNs can be combined with other machine learning techniques, such as data augmentation, to improve performance. CNNs have proven to be a powerful tool for fruit quality assessment. They can learn complex patterns and relationships from images and easily adapt to new fruit varieties or environmental conditions [38]. The various types of CNN models are shown in Fig. 4. The following section briefly explains the CNN architecture and its parameters.

Fig. 4
figure 4

Types of CNN models

4.2.1 Convolutional neural networks (CNNs)

Convolutional Neural Networks (CNNs) are the most common DL architectures in image classification. In the past five years (2018 to 2023), CNN has been used extensively for fruit recognition and has shown excellent results using new models or pre-trained transfer-learning networks. Table 1 shows a brief overview of CNN architectures. CNN is an artificial neural network that operates on at least one layer with convolution. Since 2012, CNNs have been a competitive tool for image classification in various fields. CNNs have gained tremendous popularity as practical tools for image classification. In agriculture, CNN-based approaches are commonly employed for fruit classification and detection [39, 40]. An improved version of CNN is the multi-layer perceptron. All layers of a multilayered perceptron are connected, i.e., each neuron in one layer is connected to the next. Convolution procedures, unlike CNNs, are employed in at least one of its layers.

Table 1 Brief overview of CNN architectures

4.3 Phases of CNN architecture

4.3.1 Convolution layer

The convolutional layer is a crucial building element of CNN (Conv layer). It consists of a sequence of learned filters K, which are nearly invariably square, and each filter has a width and a height. These filters are modest (in spatial dimensions), yet they extend to the volume’s maximum depth [41].

4.3.2 Activation function (AF.)

An activation layer represents the input volume and performs the specified AF. Because an element-specific activation function is used, the output dimension of the activation layer has always been the same as the input dimension [42]. A CNN needs to deploy a non-linear activation layer after every Conv layer. There are various activation functions, including the sigmoid function, the tanh function (hyperbolic tangent), the ReLU (rectified linear unit function), ELU, and any other Leaky ReLU versions. The sigmoid activation function is defined as

$$\upsigma ({\text{x}}) = \frac{1}{1+{{\text{e}}}^{-{\text{x}}}}$$
(3)

when the activation function is run via a sigmoid function, it creates a non-linear function that outputs numerous neurons. It has a form and a value ranging from 0 to 1.

The tanh activation function is a mathematically twisted variant of the sigmoid function that outperforms it. The value ranges from -1 to + 1, and it is mathematically defined as

$$tanh\left( x \right) = \frac{{e^{x} - e^{ - x} }}{{e^{x} + e^{ - x} }}\,or\,2\sigma \left( {2x} \right) {-} 1$$
(4)

The ReLU (rectified linear unit function) is currently the most widely used activation layer, which outputs \(x\) if \(x\) is positive and otherwise zero. It is mathematically illustrated as

$$RELU \left(x\right)=\left\{\begin{array}{c}x, if x\ge 0\\ 0, Otherwise\end{array}\right.$$
(5)

Compared to the sigmoid and tanh activation functions, the ReLU activation function is computationally efficient. The Leaky ReLU function is an enhanced variant of the ReLU activation function that specifies a minor linear component instead of declaring the ReLU function 0 for \(x\) less than 0. The Leaky ReLU activation function is defined mathematically as

$$f\left(x\right)=\left\{\begin{array}{c}x, x\ge 0\\ \alpha x, x\le 0\end{array}\right.$$
(6)

4.3.3 Pooling or subsampling layer

Reducing the network parameters reduces the convolutional outputs’ number and geographic size and improves computational efficiency. Sub-sampling layers operate independently for all input depths, using either max pooling, typically performed in the center of the CNN-architectural structure to minimize the input size, or average pooling, which is usually performed as the final network layer in the process (such as ResNet, GoogleNet, and Squeeze Net) where FC layers are to be avoided.

4.3.4 Fully connected layers (FC layers)

FC layers are frequently located near the network’s termination. For object recognition, FC layers use the results of the convolution and pooling operations (i.e., label). Neurons in the FC layers are interconnected to the previous layer, i.e., the activation layer, which is the default for feedforward neural networks. The number of neurons in a fully connected layer can be adjusted based on the complexity of the task and the amount of data available. Finally, each neuron is assigned a unique label value.

4.3.5 Dropout

Dropout is a sort of regularisation that seeks to increase the test accuracy to minimize overfitting, sometimes at the loss of training accuracy [43]. We utilize dropouts to reduce overfitting by changing the network design immediately during training. Random dropouts ensure that no one node in the network “activates” when a specific pattern is displayed. (5) denotes the mathematical representation of a dropout.

Let \(x\) be the input vector, \(\omega\) be the weight vector, b be the bias term, and p be the dropout probability. The output of a neuron with the Dropout layer applied can be expressed as:

$$z = \omega^{T} x^{\prime} + b$$
(7)

where x′ is the input vector with a binary mask d applied element-wise:

$$x^{\prime} = x \odot dx^{\prime}.d$$

The binary mask d is a vector of the same shape as \(x\), where each element.

is set to 1 with probability (1 − p) and 0 with probability p:

$${\text{di }} = d_{i} = \left\{ {\begin{array}{*{20}c} {1, with \,probability \,1 - p } \\ {0, with \,probability \,p} \\ \end{array} } \right.$$

During training, a different binary mask d is applied to x during each iteration to drop out a fraction p of the input units randomly. During inference or testing, the Dropout layer is typically turned off, and the full network is used to make predictions.

4.4 Hyperparameters

Hyperparameters are parameters that a machine learning model does not learn during training but are set by the user beforehand. They play a critical role in determining the model’s performance, and choosing the right hyperparameters is essential for achieving good results. Every problem belongs to a separate category, and each technique to accomplish it is unique; hence, hyperparameters assist in refining the model to address the specific problem at hand. Tuning deep neural network hyperparameters is challenging since it delays training due to the various parameters that must be adjusted. To overcome these, semiautomatic tools such as Grid search, Random search, Bayesian optimization, Gradient-based optimization, and Genetic algorithms can be used to automate the hyperparameter tuning process and improve the performance of machine learning models.

Learning Rate is the rate at which the neural network’s weights change between iterations. A rapid learning rate may cause significant weight fluctuations and never attain optimal levels. A low learning rate is reasonable, but converging the model will require more iterations. Using an adaptive learning rate allows one to begin with a fixed learning rate and gradually decrease the learning rate until it reaches an optimal level. It determined the learning rate in terms of the decay rate using momentum.

$${n}_{n+1}=\frac{{\eta }_{n}}{1+{d}_{n}}$$
(7)

where η represents the learning rate, d represents decay parameters, and n indicates the iteration step. Calculating the learning rate in terms of schedule, we calculate the decay application:

$${\eta }_{n}= {n}_{0}{d}^{1+\frac{n}{r}}$$
(8)

where \({\eta }_{n}\) denotes the learning rate at \(n\) iteration, \({n}_{0}\) denotes the initial learning rate, and \(d\) denotes the rate at which it drops, while \(r\) denotes how often the dropout is applied. The Exponential learning scheduler is calculated as

$${\eta }_{n = {n}_{0}{e}^{-dn}}$$
(9)

where d denotes the decay parameter. Using the adaptive learning rate, one can choose from the different adaptive gradient descent algorithms such as Adam, AdaDelta, AdaGrad, RMSprop, stochastic gradient descent, and Stochastic Gradient Descent (SGD) with momentum embedded into the deep learning libraries (Keras and PyTorch).

In training Convolutional Neural Networks (CNNs), critical considerations include the number of epochs, defining the iterations of the entire training set, and the batch size, specifying the number of subsamples input before updating parameters. A prolonged epoch is advised for models initiated from scratch to facilitate effective learning. Conversely, pre-trained models benefit from more minor epochs due to prior extensive training. Momentum, often set between 0.5 and 0.9, aids in comprehending the relationship between iterations. The choice of a cost or loss function, a mathematical measure aligning predicted and actual outputs, is problem-dependent. Backpropagation, a fundamental CNN algorithm, computes gradients of the loss function for weight updates. Mini-batch training enhances efficiency by dividing the dataset into subsets updating weights based on computed gradients for each mini-batch. Batch normalization ensures input consistency across CNN layers, calculating mean and variance over mini-batches for normalization. This technique, proven to enhance convergence and mitigate overfitting, contributes to the overall stability and performance of the model.

5 Applications of artificial intelligence thermal imaging in post-harvest fruit quality assessment

Thermal imaging is a non-intrusive technique that comprehensively assesses temperature variations across a sample. While traditional temperature measurement methods, such as thermocouples, thermometers, thermistors, and resistance temperature sensors, have been employed for monitoring food and agricultural products, thermal imaging offers the distinct advantage of simultaneous, real-time monitoring of large areas. This capability enables the detection of subtle temperature fluctuations that may indicate incipient quality defects or physiological changes. Additionally, thermal imaging provides rapid data acquisition, significantly reducing processing time compared to conventional methods. The recent application of thermal imaging in fruits is shown in Table 2. The following sections explore applying AI-powered thermal imaging techniques in various post-harvest fruit handling operations.

Table 2 Recent application of thermal imaging in fruits

5.1 Bruise detection

Bruising, the prevalent surface damage sustained by crops, particularly during post-harvest handling and transportation, manifests as thermal variations between bruised and non-bruised produce. Thermal imaging has emerged as a promising tool for detecting bruises, capitalizing on the differential thermal properties of bruised and sound tissues. Numerous studies have explored the application of thermal imaging in bruise detection for various fruits, including apples, blueberries, guavas, pears, jujubes, and strawberries. The realm of precision agriculture has witnessed a surge in the adoption of non-destructive and non-invasive techniques for fruit quality evaluation. Thermal imaging, a robust technology that captures temperature variations, has emerged as a frontrunner. In apple bruise detection, pulsed-phase thermal imaging has demonstrated superior accuracy compared to traditional visual inspection methods [44].

Moreover, thermal imaging has successfully assessed bruise depths, paving the way for precise bruise characterization [45]. Thermal imaging has also proven its versatility in blueberry bruise identification. By leveraging a combination of multivariate algorithm feature sets, researchers achieved an impressive 88% accuracy rate in detecting blueberry bruises [46]. Recent studies have further explored the applicability of thermal imaging in guava bruise evaluation, examining the impact of temperature variations on bruise detectability [47]. Additionally, a thermal imaging system designed explicitly for pear bruise identification and classification has been developed, demonstrating the adaptability of this technology across different fruit types [14]. To address jujube fruit bruise detection, researchers have proposed a novel approach that integrates thermal imaging with a convolution neural network (CNN) [15]. This hybrid system achieved promising results, highlighting the potential of deep learning in enhancing bruise detection accuracy. Similarly, thermal imaging-based CNNs have been successfully applied to strawberry bruise identification, showcasing the versatility of this technique in a wide range of fruit applications [48]. Collectively, these studies highlight the potential of thermal imaging as a non-destructive and accurate tool for defect detection in food products, thereby enhancing quality control and minimizing waste within the food industry.

5.2 Maturity identification

Thermal imaging has emerged as a valuable tool for fruit maturity assessment, offering a non-destructive and efficient method to determine the ripening stage of various produce. This technique relies on detecting infrared radiation emitted by fruits, which varies in intensity based on their physiological and biochemical properties. As fruits mature, their metabolic activity increases, resulting in a rise in surface temperature. Thermal imaging captures this temperature variation, providing a reliable indicator of maturity level. Researchers have successfully utilized thermal imaging to identify immature green citrus fruits, providing a non-destructive method for assessing citrus maturity [49]. Furthermore, a prototype thermal detector has been developed to evaluate the maturity stages of fresh fruit bunches from oil palm trees, offering a rapid and efficient approach for maturity assessment in this important crop [50].

Thermal imaging has also proven its versatility in fruit counting. A novel active thermal imaging technology has been proposed to count fruits accurately in thermal videos, demonstrating the potential of this technique for automated fruit-counting applications [11]. An active thermography approach has also been developed to differentiate between ripe and unripe fruits, providing a valuable tool for optimizing harvest timing[51]. Similarly, thermal imaging has been employed to distinguish between distinct pineapple cultivars, offering a potential tool for cultivar identification and classification [13].

Incorporating machine learning methods into thermal imaging-based maturity assessment has further enhanced the accuracy and efficiency of this technique. These methods enable the development of robust classification models that can effectively identify fruits at different maturity stages. In conclusion, thermal imaging is a powerful tool for fruit maturity identification, offering a non-destructive, rapid, and reliable method to optimize harvesting and storage strategies, thereby minimizing post-harvest losses and ensuring the delivery of high-quality produce to consumers.

5.3 Condition monitoring

Thermal imaging has emerged as a promising tool for fruit condition monitoring, offering a non-invasive and efficient method to assess the quality and health of various produce. This technique detects infrared radiation emitted by fruits, which varies in intensity based on their physiological and pathological states. In disease detection, thermal imaging has proven to be an effective tool for distinguishing between healthy and virus-infected tomatoes [52]. Researchers observed a notable temperature drop in infected tomatoes compared to healthy ones, suggesting potential disease-induced alterations in metabolic processes. This paves the way for the development of thermal imaging-based disease detection systems for tomatoes and potentially other crops. Further advancements in thermal imaging have led to creating a machine-learning system capable of diagnosing powdery mildew in tomatoes with an impressive classification accuracy of 92% [53]. This highlights the potential of thermal imaging for automated disease diagnosis, offering a rapid and non-destructive approach to disease monitoring in agricultural settings. Thermal imaging has also emerged as a valuable tool for maturity assessment in oil palm and olive fruits. By monitoring the surface temperature of oil palm fruit during maturation, researchers observed distinct temperature patterns associated with different maturity stages [54] and employed a pseudo-color thermal vision system to monitor the surface temperature of oil palm fruit during maturation. They observed distinct temperature patterns associated with different maturity stages, providing a non-destructive method for maturity assessment. This provides a non-destructive method for maturity assessment, facilitating optimal harvest timing and maximizing fruit quality.

Similarly, thermal imaging has been employed to track the cooling rate of six olive cultivars under controlled conditions [55]. Significant differences in cooling rates were observed among cultivars, suggesting the potential of thermal imaging for cultivar identification and quality evaluation. This opens up new avenues for cultivar-specific management practices and quality control measures. These studies collectively demonstrate the efficacy of thermal imaging in fruit condition monitoring, emphasizing its ability to detect temperature variations associated with various fruit conditions, including ripeness, damage, and disease. As fruits ripen, they undergo changes in respiration and transpiration that alter their thermal profiles. Similarly, damaged or diseased fruit may exhibit elevated temperatures due to increased metabolic activity or cellular damage. Thermal imaging can capture these subtle temperature variations, detecting defects and quality issues early.

5.4 Grading and sorting

Thermal imaging has become a sophisticated tool for precisely grading and sorting fruits, leveraging key quality parameters such as size, color, shape, and texture. This technology delves into the unique thermal fingerprint of each fruit, revealing intricate details about its internal attributes, ripeness level, and overall freshness. By systematically analyzing temperature distribution across fruits via thermal imaging, hidden defects, including bruises, skin blemishes, and concealed insect infestations, typically undetectable to the naked eye, can be effectively unmasked. The strength of thermal imaging lies in its ability to automate the categorization of fruits into distinct quality grades, thereby reducing waste and enhancing economic viability. Furthermore, integrating machine learning algorithms amplifies the precision of fruit grading and sorting based on thermal imaging data. Researchers have developed an automated system for grading diverse crops, utilizing thermal imaging technology to differentiate bruised fruits based on their morphological parameters, dimensions, and color attributes [50]. This system eliminates manual inspection, ensuring consistent and accurate grading across various fruit types. In pursuing enhanced damage detection in apples, researchers have comprehensively evaluated various segmentation algorithms, demonstrating the effectiveness of thermal imaging in facilitating sorting and grading operations based on crop quality and maturity variables [56]. Thermal imagery provides a detailed representation of temperature variations, enabling the identification of even subtle defects that may be overlooked by visual inspection.

A particularly notable advancement in thermal imaging-based fruit grading has been the introduction of an advanced deep-learning framework capable of identifying anomalies within thermal images of perishable commodities, such as fruits and vegetables [57]. This system achieved a remarkable mean average precision (mAP) of 95.67% by utilizing the You Only Look Once Version 5 (YOLOV5) algorithm for anomaly detection and localization. This demonstrates the potential of deep learning to automate and enhance the accuracy of fruit quality assessment. Thermal imaging has also proven its efficacy in detecting thermal blushing, a physiological response associated with infected tissues in guava fruits [58]. With an impressive detection rate of 95%, this technique holds promise for early detection of spoilage and quality deterioration, contributing to reduced losses and enhanced consumer satisfaction.

The integration of machine learning algorithms into thermal imaging-based fruit grading and sorting systems further enhances the precision and automation of these processes. This integration facilitates the development of intelligent systems capable of analyzing large volumes of thermal data in real-time, enabling rapid and accurate classification of fruits based on quality parameters. In conclusion, thermal imaging has emerged as a powerful tool for fruit grading and sorting, offering a non-destructive, rapid, and reliable method to assess fruit quality, identify defects, and determine ripeness. Integrating machine learning algorithms further enhances the precision and automation of these processes, contributing to improved efficiency, reduced waste, and enhanced economic viability in the fruit industry. Thermal imaging technology has the potential to revolutionize the fruit industry, transforming grading and sorting practices and ensuring the delivery of high-quality produce to consumers.

5.5 Pest and disease detection

Thermal imaging offers a non-destructive and promising approach to detecting pests and diseases in fruits, capitalizing on the distinct thermal signatures of infected or infested produce resulting from alterations in their metabolic activity. Thermal imaging cameras can effectively capture these temperature variations, generating images that reveal subtle temperature differences facilitating the identification of affected fruits. This method proves invaluable for early pest and disease detection, mitigating disease transmission, and reducing crop losses. In the realm of temperature monitoring, researchers have employed thermal imaging to accurately track the surface temperature of apples stored in both plastic and cardboard containers [59] This study achieved impressive estimated errors of 0.410 and 0.086 for plastic and cardboard containers, respectively, highlighting the effectiveness of thermal imaging for monitoring temperature variations under different packaging conditions. Thermal imaging has also proven its value in optimizing post-harvest treatment processes. A study investigating cactus pear cauterization employed thermal imaging to determine the optimal equipment settings [60]. The researchers discovered that cauterization at 200 °C resulted in the most extended shelf life, demonstrating the potential of thermal imaging in guiding post-harvest treatment decisions.

Furthermore, thermal imaging has been applied to enhance fruit detection within orange canopies. A study combined thermocouples with infrared cameras to investigate the heat transfer distribution of fruit juices on packaging surfaces [61]. The researchers also developed a thermal and visible image fusion approach, with fuzzy logic outperforming LPT in image fusion indices. This suggests that thermal imaging can be effectively integrated with other imaging techniques for improved fruit detection and identification.

In addition, thermal imaging for pest and disease detection in fruits has been explored for various fruit types, including apples, peaches, and mangoes. However, further research is imperative to establish standardized protocols and algorithms that ensure precise and reliable pest and disease detection through thermal imaging. This entails validating thermal signatures, optimizing imaging parameters, developing data collection and analysis protocols, integrating other detection methods, and testing in diverse scenarios. In conclusion, thermal imaging presents a valuable tool for pest and disease detection in fruits, offering a non-invasive, rapid, and reliable method for identifying affected produce and mitigating post-harvest losses. Further research and development are crucial to optimize thermal imaging techniques and establish standardized protocols for widespread adoption in the agricultural industry.

5.6 Packaging and supply chain

Thermal imaging technology has gained significant traction recently as a valuable tool for enhancing food logistics and processing operations. This technology offers comprehensive temperature monitoring capabilities, complementing existing techniques and providing a more holistic view of product conditions. In a move towards streamlining monitoring processes and reducing reliance on physical sensors such as RFID/WSN, studies conducted by [62, 63] have demonstrated the potential of thermal imaging to effectively track and monitor the movement of goods throughout the food supply chain. This non-contact approach offers a more efficient and cost-effective alternative to traditional methods, reducing the need for manual intervention and minimizing the risk of human error.

Researchers have also explored the feasibility of thermal imaging for temperature measurement with pallet covers. While the accuracy of thermal images depends on the emissivity of the target object, thermal imaging offers a non-intrusive method for assessing temperature distribution and identifying potential hotspots or cold spots within pallet loads [64]. This information is crucial for ensuring that products are maintained within their optimal temperature range during transportation and storage. Thermal imaging has also proven its value in evaluating and optimizing packaging systems for fruits and other perishable goods. By measuring the surface temperature of both the fruit and the packaging, it becomes possible to detect temperature fluctuations and gradients that might indicate inadequate packaging or ventilation [65]. This information is invaluable for selecting packaging materials and designs that best maintain the desired temperature and humidity levels during storage and transportation. Thermal imaging further facilitates the assessment of the effectiveness of different packaging materials and designs in maintaining optimal storage conditions. This capability enables researchers and food industry professionals to identify and select packaging solutions that effectively extend the shelf life of fruits and reduce waste by ensuring optimal packaging practices.

In conclusion, thermal imaging has become a powerful tool for enhancing food logistics and processing. Its versatility and effectiveness in temperature monitoring, packaging optimization, and shelf life extension make it a valuable asset for the food industry. As thermal imaging technology continues to evolve, its role in ensuring food safety, quality, and sustainability is poised to grow even further.

5.7 AI-based thermal imaging challenges and deployment strategies

Recent advancements in thermal imaging technology have witnessed the development of lightweight and portable imaging devices, the integration of more sophisticated image analysis software, and the enhancement of imaging sensor capabilities. Modern thermal imaging cameras can capture high-resolution images in both the visible and infrared spectra, improving the accuracy of temperature measurements. These advancements have paved the way for integrating artificial intelligence (AI) into thermal imaging systems, introducing a new era of superior accuracy and precision in temperature assessment and anomaly detection. AI algorithms can analyze thermal images in real time, enabling faster and more accurate decision-making.

Despite these advancements, AI-based thermal imaging faces several challenges, primarily ensuring precision and managing the complexities of data processing. The intricacy of thermal imagery necessitates careful consideration of equipment quality, environmental variables, and subject stability to maintain accurate measurements. Also, managing extensive thermal image datasets can be costly and computationally demanding.

Integrating thermal imaging systems into existing fruit sorting and grading frameworks requires careful planning and consideration of compatibility issues, data interoperability, and the inherent variability within fruit specimens. These challenges can hinder precise quality assessment.

To effectively address these challenges, a comprehensive approach is necessary. This includes:

Equipment selection Utilizing high-quality equipment tailored to the specific fruit varieties being evaluated.

Data management Implementing efficient data management strategies to handle large datasets.

Integration planning Conducting thorough preemptive integration planning to ensure compatibility and data interoperability.

Training and support Providing comprehensive training and support to users to optimize system utilization.

System monitoring and enhancement Commit to continuous monitoring and enhancement to maintain precision and effectiveness.

To enhance the accuracy of thermal imaging, several strategies can be implemented:

Training datasets Procuring high-quality training datasets specific to the evaluated fruit varieties.

Machine learning algorithms Utilizing advanced machine learning algorithms to analyze thermal images.

Calibration Conducting precise calibration of thermal imaging systems to ensure accurate temperature measurements.

Integration with existing systems Integrating thermal imaging systems with existing fruit sorting and grading frameworks for a seamless quality assessment process.

Maintenance and updates Maintaining system precision and effectiveness through regular calibration, data scrutiny, and system updates.

By addressing the challenges and implementing these strategies, AI-based thermal imaging can revolutionize fruit quality assessment, reducing waste, enhancing productivity, and ensuring the delivery of high-quality produce to consumers. recent Thermal cameras and their specifications are given in Table 3.

Table 3 Recent Thermal cameras and its specifications

6 Conclusion and future trends

The utilization of artificial intelligence (AI) methodologies for fruit quality assessment has gained significant traction in recent times. While thermal imaging is a versatile and powerful tool for fruit quality evaluation, it represents just one facet of the evolving spectrum of AI-based approaches. Machine learning algorithms can be trained to discern patterns and identify distinctive attributes signifying fruit quality by analyzing extensive spectral datasets. Computer vision, another AI-driven method, analyzes fruit images for quality determination. Applications have been designed to appraise fruit quality through image capture employing this method. Computer vision algorithms can also detect defects such as bruises and decay when analyzing images of fruit surfaces. Despite their potential, spectral imaging and computer vision face certain limitations. Spectral imaging is costly and intricate due to the requisite specialized equipment. Spectral imaging cameras entail higher costs than thermal imaging cameras and demand meticulous calibration for precise measurements. Furthermore, spectral imaging is susceptible to variations in lighting conditions and environmental factors, potentially impacting data quality.

Likewise, a drawback of computer vision lies in its demand for substantial computing power to analyze images and extract pertinent information. This can render computer vision less optimal for applications necessitating real-time or near-real-time analysis, such as in-line inspection in fruit processing. Additionally, computer vision algorithms can be sensitive to factors such as lighting conditions and the orientation of the fruit, which can affect the accuracy of the analysis. In contrast, thermal imaging offers several advantages. It is a non-destructive, non-invasive, and objective methodology capable of furnishing comprehensive data about surface temperature, moisture content, and various fruit characteristics. Thermal imaging can also detect hidden defects in fruits and is suitable for in-line inspection during processing, making it a versatile and powerful tool for assessing fruit quality.

Additionally, thermal imaging is an eco-friendly technology devoid of waste production or emissions of harmful substances. AI-empowered thermal imaging has evolved into a robust instrument for appraising fruit quality, categorization, sorting, maturity identification, pest and disease detection, and packaging evaluation. Recent investigations have demonstrated the utility of AI-driven thermal imaging across diverse fruit-handling domains, encompassing mangoes, apples, strawberries, guavas, and tomatoes. Further research and development efforts are crucial to refine AI-based thermal imaging for post-harvest fruit management and align it with practical commercial applications. In light of burgeoning technological advancements and the proliferation of applications across various sectors, including post-harvest fruit processing, the future trajectory of AI-infused thermal imaging systems seems auspicious. Forecasts anticipate that AI-enhanced thermal imaging systems will witness enhancements in efficiency, accuracy, and cost-effectiveness. Fusing machine learning algorithms and deep learning methodologies with thermal imaging apparatus will yield more reliable and precise outcomes in fruit grading, sorting, and quality assessment. Moreover, integrating AI-driven thermal imaging systems with other technologies, such as robotics and automation, is anticipated to culminate in more sophisticated and efficient fruit-handling solutions.

Another forthcoming focus will involve the creation of a portable and user-friendly thermal imaging apparatus, streamlining its adoption by growers and fruit handlers for real-time monitoring and analysis. In conclusion, integrating AI methodologies into fruit quality assessment is a promising advancement capable of augmenting fruit quality evaluation's accuracy, efficiency, and uniformity. Anticipations hold that AI-powered thermal imaging systems will assume an increasingly pivotal role in post-harvest fruit management, with substantial potential for broader applications across agriculture and related industries. The selection of an appropriate technique necessitates the consideration of several factors, encompassing the fruit variety, the anticipated precision, and the accessible resources. The incorporation of AI methodologies into fruit quality assessment holds the potential to bring about a revolution in the fruit industry, enhancing fruit quality and diminishing wastage. The continued development of infrared imagers with higher resolution, sensitivity, and speed, as well as lower cost and portability, will further enhance the capabilities of AI-based thermal imaging systems for fruit quality assessment.