Artificial intelligence (AI) is defined as a field in computer science that imitates human thinking processes, learning ability, and storage of knowledge [12]. AI can be categorized into two types which are strong AI and weak AI. The weak AI principle is to construct the machine to act as an intelligent unit where it mimics the human judgments, while the strong AI principle states that the machine can actually represent the human mind [3]. However, strong AI does not exist yet and the study on this AI is still in progress. The gaming industry, weather forecasting, heavy industry, process industry, food industry, medical industry, data mining, stem cells, and knowledge representation are among the areas that have been utilizing AI methods [411]. AI has a variety of algorithms to choose from such as reinforcement learning, expert system, fuzzy logic (FL), swarm intelligence, Turing test, cognitive science, artificial neural network (ANN), and logic programming [3]. The alluring performance of AI has made it the most favorable tool to apply in industries including decision making and process estimation aiming at overall cost reduction, quality enhancement, and profitability improvement [712].

As the population in the world is rising, food demand is predicted to rise from 59 to 98% by 2050 [13]. Thus, to cater for this food demand, AI has been applied such as in management of the supply chain, food sorting, production development, food quality improvement, and proper industrial hygiene [1416]. Sharma stated that the food processing and handling industries are expected to grow about CAGR of 5% at least until 2021 [15]. ANN has been used as a tool in aiding real complex problem solving in the food industry according to Funes and coworkers [17], while based on Correa et al., the classification and prediction of parameters are simpler when using ANN, which leads to higher usage demand of ANN over the past years [18]. Besides, FL and ANN have also acted as controllers in ensuring food safety, quality control, yield increment, and production cost reduction [1920]. AI technologies have also known to be beneficial in food drying technology and as process control for the drying process [2123].

Previous studies have shown many usages of AI in food industries focusing on individual target and aims. A study has been conducted on the various ANN applications in food process modeling where it has only highlighted the food process modeling using ANN [24]. Apart from that, the implementation of AI such as ANN, FL, and expert system in food industries have been reviewed but specifically focusing on the drying of fresh fruits [23]. A review has been conducted on how food safety has been one of the main concerns in the food industry which leads to the development of smart packaging systems to fulfill the requirements of the food supply chain. Intelligent packaging monitors the condition of foods to give details on the quality of the food during storage and transportation [25]. Another study reviewed on intelligent packaging as a tool to minimize food waste where about 45 recent advances in the field of optical systems for freshness monitoring have been reported. Meat, fish products, fruits, and vegetables were covered in the study as they are the most representative fields of application [25]. Few different studies have been conducted on intelligent packaging, and these studies proved that the usage of intelligent packaging systems plays an important role in the food factory in the context of the food chain as they are able to monitor the freshness of food products and crops [232630].

There are also several other studies that have been conducted on the application of AI and sensors in food; however, the coverage is rather limited. Therefore, a comprehensive review that assembles all AI applications in the food industry as well as its combinations with appropriate sensor will be a great advantage, all of which are unavailable as to the knowledge of the author. Such review will assist in gathering the advantages, limitations, and methodologies as a one-stop guideline and reference for food industry players, practitioners, and academicians. To be exact, different types of AI and their recent application in food industries will be highlighted which comprises several AI techniques including expert system, fuzzy logic, ANN, and machine learning. In addition, the integration of AI with electronic nose (E-nose), electronic tongue (E-tongue), near infrared spectroscopy (NIRS), and computer vision system (CVS) is also provided. This paper is organized as follows. The introduction of AI is explained in the first section followed by the application of different types of AI in the food industry. Following that, the fusion of the AI with the external sensors in the food industry is presented. In the latter part, a critical review is conducted where discussion on the main application of the AI algorithms in the food industry is carried out. A flowchart is presented to assist the researchers on establishing the most appropriate AI model based on their specific case study. Then, the trends on the application of AI in the food industry are illustrated after that section. Finally, a brief conclusion is discussed in this paper.

AI in Food Industry

The application of AI in the food industry has been growing for years due to various reasons such as food sorting, classification and prediction of the parameters, quality control, and food safety. Expert system, fuzzy logic, ANN, adaptive neuro-fuzzy inference system (ANFIS), and machine learning are among the popular techniques that have been utilized in the food industries. Prior to AI implementation, studies related to food have been going on over the years to educate the public about food knowledge as well as to improve the final outcomes related to food properties and the production of foods [3136]. A lot of benefits can be obtained by using the AI method, and its implementation in the food industry has been going on since decades ago and has been increasing till today [373931, 32]. Nevertheless, this paper will focus on the application of AI in food industries from the year 2015 onwards since tremendous increase and innovation are seen in the implementation recently. It is worth noting that several methods such as partial least square, gastrointestinal unified theoretical framework, in silico models, empirical models, sparse regression, successive projections algorithms, and competitive adaptive reweighted sampling which have been used for prediction and enhancement of the food industries are not discussed here; instead it is narrowed down to the wide application of AI in the food industry.

Knowledge-based Expert System in Food Industry

The knowledge-based system is a computer program that utilizes knowledge from different sources, information, and data to solve complicated problems. It can be classified into three categories which are expert systems, knowledge-based artificial intelligence, and knowledge-based engineering. The breakdown of the knowledge-based system is presented in Fig. 1. The knowledge-based expert system which is widely used in the industries is a decisive and collective computer system that is able to imitate the decision-making ability of human expert [40]. It is a type of knowledge-based system that is known as among the first successful AI models. This system depends on experts for solving the complicated issues in a particular domain. It has two sub-systems, which are knowledge base and inference engine. The facts about the world are stored in the knowledge base, and the inference engine represents the rules and conditions regarding the world which are usually expressed in terms of the IF–THEN rules [41]. Normally, it is able to resolve complicated issues by the aid of a human expert. This system is based on the knowledge from the experts. The main components of the expert system (ES) are human expert, knowledge engineer, knowledge base, inference engine, user interface, and the user. The flow of the expert system is shown in Fig. 2.

Fig. 1
figure 1

Knowledge-based system

Fig. 2
figure 2

Expert system

The food industry has been utilizing ES for various objectives as this system is proven to be useful especially in the decision-making process. The knowledge-based expert system has been applied in white winemaking during the fermentation process for the supervision, intelligent control, and data recovery [42]. Apart from that, a web-based application was developed by implementing the ES to calculate the nutritional value of the food for the users, and the development of ES was able to help the SMIs in obtaining the details required for the qualification in obtaining the food production certificates [43]. Food safety is very important in the food industry,thus, the application of ES that is linked closely to food safety has been used extensively ranging from process design, safety management, quality of food, and risk assessment [44]. Furthermore, a prototype information technology tool and guidelines with corrective actions that considered ES in the model were developed for the food industry where few essential factors such as food safety, nutrition, quality, and cost were studied [45]. In addition, a digital learning tool, namely, MESTRAL, was developed to assist people in food processing by using models developed from research in food science and technology and simulators. This tool is based on the knowledge engineering and reflected real applications which can be mapped with the system scale and knowledge frameworks [46]. A comprehensive review was conducted by Leo Kumar on the application of the knowledge-based expert system in manufacturing planning. The paper has also discussed the utilization of ES in decision making in three wide areas which are the process planning activities, diverse applications, and manufacturing planning [41]. Moreover, Table 1 gathers some of the recent application of ES in the food industry ranging from the raw material to the final production as well as the food safety.

Table 1 Application of expert system in food industry

Fuzzy Logic Technique in the Food Industry

Fuzzy logic (FL) was first introduced by Zadeh in 1965 based on the impeccable capability of human intellect in decision making and unraveling the imprecise, uncertain, and ambiguous data while solving problems [4748]. The fuzzy set theory is recognized in such a manner that an element belongs to a fuzzy set with a certain degree of membership which has a real number in the interval [0, 1] [49]. FL models consist of several steps which are fuzzification, inference system, and defuzzification process [5051]. Fuzzification is a process where the crisp value is converted into a degree of membership and yields the fuzzy input sets. The corresponding degree in the membership functions is normally between 0 and 1. [52]. There are a variety of membership functions to choose from, whereby the commonly used ones are triangular, Z-shaped, S-shaped, trapezoidal, and Gaussian-shaped [52]. The inference system is where the fuzzy input is being translated to get output by using the fuzzy rules. The fuzzy rules are known as IF–THEN rules where it is written such IF premise, THEN consequent whereby the IF comprises input parameters and THEN is the output parameters [53]. The inference system consists of the style which is either the Mamdani or Takagi–Sugeno Kang (TSK). Defuzzification is the ultimate phase in the fuzzy logic model where the crisp values are obtained [54]. There are different methods of defuzzification which are center of gravity, mean of maximum, smallest of maximum, largest of maximum, center of maximum, and centroid of area [55].

FL has been long utilized in the industry due to its simplicity and ability to solve problems in a fast and accurate manner. FL has been employed in the food industry in food modeling, control, and classification and in addressing food-related problems by managing human reasoning in linguistic terms [56]. The food manufacturing system has improved by the implementation of the fuzzy logic where about 7% of electricity losses has been reduced compared to the conventional regulation method [57]. Sensory evaluation of the food is also one of the most common parts where FL plays an important role. Furthermore, a quicker solution to problems can be performed by using a system involving fuzzy rules [58]. Table 2 shows previous applications of FL in the food industry and their attributes. From a previous study, FL has been proven to successfully maintain the quality of the foods, and it acts as a prediction tool and control system for food production processes.

Table 2 Application of fuzzy logic in the food industry
ANN Technique in the Food Industry

ANN is another AI element, which is also commonly applied in the food industry. ANN is designed to mimic the human brain and be able to gain knowledge through learning and the inter-neuro connections which are known as synaptic weights [5960]. Gandhi and coworkers have stated that the configuration of ANN is designed in such a way that it will accommodate certain application such as data classification or pattern recognition [61]. According to Gonzalez-Fernandez, ANN is applicable to a different kind of problems and situations, adaptable, and flexible. In addition, Gonzalez et al. (2019) have also stated that ANN is suitable to model most non-linear systems and is adaptable to new situations even though adjustments are needed. Moreover, the most outstanding features of ANN is its non-linear regression [62]. There are several types of ANN including feedforward neural network, radial basis function neural network, Kohonen self-organizing neural network, recurrent neural network, convolutional neural network, and modular neural network [63]. Multilayer perceptron (MLP), radial basis function networks (RBFNN), and Kohonen self-organizing algorithms are the most effective types of NN when it comes to solving real problems [61]. The most common network that is used for prediction and pattern recognition is the multilayer perceptron [18, 6465]. Besides that, ANN learning could be classified into supervised and unsupervised depending on the learning techniques [17]. In general, the structure of ANN consisted of an input layer, hidden layer, and output layer, either single or many layers [6668]. The architecture comprises activation functions, namely, the feed-forward or feedback [69]. The backpropagation learning algorithm is normally used as it is able to minimize the prediction error by feeding it back as an input until the minimum acceptable error is obtained [18]. An additional input known as bias is added to neurons which allows a portrayal of phenomena having thresholds [70, 71]. In ANN, the dataset is normally associated with a learning algorithm which trained the network and could be categorized into three groups specifically supervised, unsupervised, and reinforcement learning [72]. Then, the data will undergo training and testing for analyzing the outputs. The general structure for the ANN is shown in Fig. 3. The output data can be calculated by using the equation shown based on Fig. 4.

Fig. 3
figure 3

ANN structure in general

Fig. 4
figure 4

General calculation in ANN

Previous studies have highlighted the utilization of ANN in numerous tasks within the food industry. This includes the assessment and classification of the samples, complex calculation such as heat and mass transfer, and analysis of the existing data for control purposes as well as for prediction purposes which are listed in Table 3. All applications have shown satisfactory performances based on the R2 values, showing that ANN can provide results in an accurate and reliable manner.

Table 3 Application of ANN in the food industry

Machine Learning Techniques

Machine learning (ML) is known to be the subset of AI [7374]. It is a computer algorithm that advances automatically with experiences. ML can be classified into three broad categories which are supervised learning, unsupervised learning, and reinforcement learning [1175]. Supervised learning aims to predict the desired target or output by applying the given set of inputs [76]. On the other hand, unsupervised learning does not have any outputs to be predicted and this method is utilized to classify the given data and determine the naturally occurring patterns [77]. Reinforcement learning is when there is an interaction between the program and the environment in reaching certain goals [78]. Among the known models in machine learning are ANN, decision trees (DT), support vector machines (SVM), regression analysis, Bayesian networks, genetic algorithm, kernel machines, and federated learning [7679]. ML has been commonly used for handling complex tasks and huge amount of data as well as variety of variables where no pre-formula or existing formula is available for the problem. Other than that, ML models have the additional ability to learn from examples instead of being programmed with rules [80].

Among the ML methods that are used in the food industry include ordinary least square regression (OLS-R), stepwise linear regression (SL-R), principal component regression (PC-R), partial least square regression (PLS-R), support vector regression (SVM-R), boosted logistic regression (BLR), random forest regression (RF-R), and k-nearest neighbors’ regression (kNN-R) [81]. Studies showed that the usage of ML has helped in reducing the sensory evaluation cost, in decision making, and in enhancing business strategies so as to cater users’ need [82]. Long short-term memory (LSTM) which is an artificial recurrent neural network has been employed in the food industry as pH detection in the cheese fermentation process [83]. On the other hand, GA has been utilized for finding the optimum parameters in food whereas NN has been occupied to predict the final fouling rate in food processing [84]. ML has shown to be advantageous in predicting the food insecurity in the UK [85]. Apart from that, ML has also proven to have predicted the trend of sales in the food industry [86] In addition to that, ML was also able to predict the food waste generated and give an insight to the production system [87]. Major applications of ML in the food industry and its positive highlights are briefly emphasized in Table 4.

Table 4 Application of machine learning in food industries

Adaptive Neuro Fuzzy Inference System (ANFIS) Techniques

ANFIS is a type of AI where FL and ANN are combined in such a way that it integrates the human-like reasoning style of the FL system with the computational and learning capabilities of ANN [56]. In ANFIS, the learning procedure is transferred from the neural network into the FL system where a set of fuzzy rules with suitable membership functions from the data obtained is developed [88]. Mamat et al. [89] stated that uncertainty data could be processed and gain higher accuracy when ANFIS is applied [89]. Besides, ANFIS is also known as a fast and robust method in solving problems [90]. Not only that, Sharma et al. [91] also claimed that ANFIS has a higher performance compared to other models such as ANN and multiple regression models in their study [91]. ANFIS is a fuzzy reasoning system and combination of the parameters trained by ANN-based algorithms. The fuzzy inference system that is normally used is Takagi Sugeno Kang in the ANFIS model with the feedforward neural network consisting of the learning algorithms [92]. The structure of ANFIS is made up of five layers which are fuzzy layer, product layer, normalized layer, defuzzification layer, and total output layer [9331, 32]. The backpropagation algorithm has been normally applied in the model in order to avoid over-fitting from occurring [92]. A high correlation value (R2) indicates that the developed model has high accuracy and is suitable for industrial applications. The general structure of the ANFIS model is illustrated in Fig. 5.

Fig. 5
figure 5

General structure of ANFIS

The first layer in ANFIS has nodes that are adjustable, and it is called as the premise parameters [56]. The second layer in ANFIS has fixed nodes, and the output is the product of all incoming signals. Every output node represents the firing strength of the rule. The third layer consists of fixed node labeled as N. The outputs of the third layer are called normalized firing strengths. Every node in the fourth layer is an adaptive node with a node function, and the parameters in this layer are called as the subsequent parameters [56]. The final layer in the ANFIS layer has a fixed single node which calculates the overall output as the summation of all the incoming signals. The calculation involved in each layer is shown below. The output of the ith model in layer 1 is denoted as 01, i.

Layer 1: \({O}_{1,i}= {\mu }_{Ai}\left(x\right), for i=\mathrm{1,2}\) atau \({O}_{1,i}= {\mu }_{Bi-2}\left(y\right), for i=\mathrm{3,4}\).

Layer 2: \({O}_{2,i}= {w}_{i}={\mu }_{Ai}\left(x\right){\mu }_{Bi}\left(y\right), for i=\mathrm{1,2}\).

Layer 3: \({O}_{3,i}=\overline{w }= \frac{{w}_{i}}{{w}_{1}+{w}_{2}}, i=\mathrm{1,2}\).

Layer 4: \({O}_{4,i}= \overline{w}{f }_{i}={\overline{w} }_{i}({p}_{i}x+{q}_{i}y+{r}_{i}\)); \({w}_{i}\) is the normalized firing strength from layer 3 and.

{\({p}_{i},{q}_{i},{r}_{i}\)} is the parameter set of this node.

Layer 5: \({O}_{\mathrm{5,1}}=\sum_{i}{\overline{w} }_{i}{f}_{i}= \frac{\sum_{i}{w}_{i}{f}_{i}}{\sum_{i}{w}_{i}}\).

The ANFIS model is attractive enough that it could solve problems related to the food industry, which are complicated, practical, and barely solved by other methods and has been widely used in the food industry for prediction and classification purposes. ANFIS has been applied in various food processing involving recent technology which comprised five main categories which are food property prediction, drying of food, thermal process modeling, microbial growth, and quality control of food as well as food rheology [56]. The utilization of ANFIS in the food industry has been commenced years ago, and Table 5 describes those applications.

Table 5 Application of ANFIS in the food industry

Integrating AI with External Sensors for Real-time Detection in Food Industry

FL or ANN is often integrated with several sensors for real-time detection such as electronic nose (E-nose), electronic tongue (E-tongue), machine learning (ML), computer vision system (CVS), and near infrared spectroscopy (NIRS) for real-time detection and to obtain higher accuracy results in a shorter time. These detectors have also combined their elements together for enhancing their accuracy and targeted results. The integration of these sensors with the artificial intelligence methods has been shown quite a number in food industries over the past few years.

Electronic nose also known as E-nose is an instrument created to sense odors or flavors in analogy to the human nose. It consists of an array of electronic chemical sensors where it is able to recognize both simple and complex odors [94]. E-nose has been used in gas sensing where the analysis of each component or mixture of gases/vapors is required. Besides, it plays an important role in the food industry for controlling the quality of the products. Due to its ability to detect complex odors, it has been employed as an environment protection tool and detection of explosives materials [95]. An array of non-specific gas sensors is known to be the main hardware component of E-nose where the sensors will interact with a variety of chemicals with differing strengths. It then stimulates the sensors in the array where characteristic response is extracted known as a fingerprint [94]. The main software component of E-nose is its feature extraction and pattern recognition algorithms where the response is processed, important details are elicited and then chosen. Thus, the software component of the E-nose is greatly important to stimulate its performance. In general, E-nose is divided into three main parts, namely, sample delivery system, a detection system, and a computing system. ANN, FL, and pattern recognitions are the examples of the methodology employed in E-nose [96]. The general system of E-nose is shown in Fig. 6.

Fig. 6
figure 6

E-nose system

E-nose has been widely used to aid in both quality control and assurance in the food industries. Wines, grains, cooking oils, eggs, dairy products, meat and dairy products, meat, fish products, fresh-cut and processed vegetables, tea, coffee, and juices have successfully applied e-nose for sampling classification, detection, and quality control. E-nose has successfully classified samples with different molecular compounds [97]. Besides, Sanaeifar et al. have reviewed and confirmed that e-nose was able to detect defects and contamination in foodstuffs [98]. Classification and differentiation of different fruits have also determined by using e-nose [99]. A review has been conducted on the application of the E-nose for monitoring the authenticity of food [100]. Adding to this, Mohamed et al. have carried out a comprehensive review on the classification of food freshness by using e-nose integrated with the FL and ANN method [101]. Recent application of e-nose with computing methods involving AI in food industries is shown in Table 6.

Table 6 Application of E-nose with AI in food industries

Electronic tongue (E-tongue) is an instrument that is able to determine and analyze taste. Several low-selective sensors are available in E-tongue which is also known as “a multisensory system,” and advanced mathematical technique is being used to process the signal based on pattern recognition (PARC) and multivariate data analysis [102]. For example, different types of chemical substances in the liquid phase samples can be segregated using E-tongue. About seven sensors of electronic instruments are equipped in E-tongue, which enabled it to identify the organic and inorganic compounds. A unique fingerprint is formed from the combination of all sensors that has a spectrum of reactions that differ from one another. The statistical software of E-tongue enables the recognition and the perception of the taste. E-tongue comprises three elements specifically the sample-dispensing chamber or automatic sample dispenser, an array of sensors of different selectivity, and image recognition system for data processing (Ekezie, 2015). Samples in liquid forms could be analyzed directly without any preparation while the samples in solid forms have to undergo preliminary dissolution before measurement is carried out. The process of E-tongue system is shown in Fig. 7 below. The ability to sense any taste like a human olfactory system makes it one of the important devices in the food industry, especially for quality control and assurance of food and beverages [103]. In addition, E-tongue has been used to identify the aging of flavor in beverages [104], identify the umami taste in the mushrooms [105], and assess the bitterness of drinks or dissolved compounds [102]. Jiang et al. performed a summarized review on the application of e-nose in the sensory and safety index detection of foods [106]. Moreover, the demand of E-tongue in the food industry market has risen due to the awareness on delivering safe and higher-quality products. The details of recent applications of E-tongue in the food industry are shown in Table 7.

Fig. 7
figure 7

E-tongue system

Table 7 Application of E-tongue with AI in food industries

The computer vision system (CVS) is a branch of AI that combines the image processing and pattern recognition techniques. It is a non-destructive method that allows the examination and extraction of image’s features to facilitate and design the classification pattern [107]. It is also recognized as a useful tool in extracting the external feature measurement such as the size, shape, color, and defects. In general, it comprised a digital camera, a lighting system, and a software to process the images and carry out the analysis [108]. The system can be divided into two types which are 2D and 3D versions. Its usage is not restricted to various applications in food industries such as evaluating the stages of ripeness in apples [107], predicting the color attributes of the pork loin [109], detecting the roasting degree of the coffee [110], evaluating the quality of table grapes [111], and detecting the defects in the pork [112]. The combination of CVS with soft computing techniques has been said as a valuable and important tool in the food industry. This is because the combination of these systems offers good advantages such as an accurate prediction in a fast manner can be achieved. Table 8 shows the combination of CVS and soft computing that has been used in the food industry. Figure 8 shows the working principle of CVS. An example on the utilization of CVS for the quality control is shown in Fig. 9 [113].

Table 8 Application of CVS with AI in food industries
Fig. 8
figure 8

Working Principle of CVS

Fig. 9
figure 9

CVS-based quality control process

Near infrared spectroscopy (NIRS) is another technique in the food industry as there is no usage of chemicals and results can be obtained accurately as well as precisely within minutes or even continuously [114]. In addition, it is known to be non-destructive, cost effective, quick, and straightforward which makes it a good alternative for the traditional techniques which are expensive and labor intensive and consumes a lot of time [115]. The chemical-free method by NIRS makes it suitable to be used as a sustainable alternative since it will not endanger the environment or the human health. It has a wide range of quantitative and qualitative analysis of gases, materials, slurries, powders, and solid materials. Furthermore, samples are not required to be grounded when light passes through it and certain features or characteristics that are unique to the class of the sample are revealed by the spectra of the light. Complex physical and chemical information on the vibrational of molecular bonds such as C–H, N–H, and O–H groups and N–O, C–N, C–O, and C–C groups in organic materials can be provided by the spectra which can be recorded in reflection, interactance, or in transmission modes [114].

The basic working principle for NIRS is shown in Fig. 10. Recently, NIRS has become an interest in food industries to inspect food quality, controlling the objective of the study and evaluating the safety of the food [114116119]. Several researchers have applied the NIRS in food to obtain its properties for multiple reasons including determining the fatty acid profile of the milk as well as fat groups in goat milk [120]. Apart from that, it is able to aid in the prediction of salted meat composition at different temperatures [121] and in the prediction of sodium contents in processed meat products [122]. The detection and grading of the wooden breast syndrome in chicken fillet in the process line was also able to be performed by using the NIRS technique [123]. Not only that, it is proven to be efficient in determining the maturity of the avocado based on their oil content [124], predicting the acrylamide content in French-fried potato and in the potato flour model system [125], and determining the composition of fatty acid in lamb [126]. There has been a review conducted on the application of the ANN combined with the near-infrared spectroscopy for the detection and authenticity of the food [127]. The ability of the NIRS system in detecting the physical and chemical properties coupled with soft computing techniques such as ANN, FL, and ML allows the classification and prediction of the samples to be performed rapidly and accurately. Table 9 shows the application of NIRS coupled with AI techniques in the food industry.

Fig. 10
figure 10

Basic working principle of CVS

Table 9 Application of NIRS with AI in food industries

Summary on the Application of AI in the Food Industry

From the review so far, it can be shown that AI has been used for various reasons in food industries such as for detection, safety, prediction, control tool, quality analysis, and classification purposes. Ranking of sensory attributes in the foods can be done easily by using the FL model. Not only that, fuzzy logic can be used for classification, control, and non-linear food modeling in the food industry. ES is widely used in the food industry for decision-making process. On the other hand, ANN model is applied widely in the food industry for prediction, classification, and control task as well as for food processing and technology. The supervised ANN method has the ability to learn from examples which allows for the prediction process to be done accurately. Meanwhile, the unsupervised method of ANN is found to be more common for the classification task. Another method that has been utilized for the prediction and classification of the food samples is by using the machine learning (ML) method. ML can be used in solving complicated tasks which involves a huge amount of data and variables but does not have pre-existing equations or formula. This method is known to be useful when the rules are too complex and constantly changing or when the data keep changing and require adaptation. Furthermore, the adaptive neuro fuzzy inference system (ANFIS) is another hybrid AI method that can be used to solve sophisticated and practical problems in the food industry. However, decent data are required for the model to learn in order to perform well. In addition to that, this model is useful for solving analytical mathematical models in the food industry such as studies involving mass and heat transfer coefficients. ANFIS is recommended to be used when complex systems where time-varying processes or complex functional relationships and multivariable are involved. Apart from that, it can be used in descriptive sensory evaluation.

These AI algorithms can be combined with other sensors such as the electronic nose, electronic tongue, computer vision system, and near infrared spectroscopy to glean the data from the samples. Both the E-nose and E-tongue have shown to enhance the quality characteristics in comparison to the traditional detection approach [128]. E-nose can be used to sense the odors or gases while the E-tongue can be applied for the identification of the organic and inorganic compounds. Studies involving the examination and drawing out the features of the samples like shape, color, defects, and size can be carried out by using the CVS sensors. NIRS can be utilized to determine the properties or contents in the samples. The data obtained from these sensors is then merged with the AI algorithms and utilizing their computing strengths to accomplish the desired studies.

Advantages and Disadvantages of AI

AI has been used widely in the industry as it offers a lot of advantages compared to the traditional method. All the algorithms are known to be accurate and reliable, but careful selection should be made by considering the advantages and limitations of the algorithms. The different algorithms have their own strengths and weakness, hence choosing them for a particular application in the food industry needs to be looked on a case-to-case basis. The guideline to choose the most appropriate method is given in the next section. The benefits and constraints that each of the algorithm exhibits are explained briefly in Table 10.

Table 10 Advantages and limitations of AI algorithms

Guidelines on Choosing the Appropriate AI Method

Selecting the appropriate algorithm is important when developing the AI model as it can aid the user to attain an accurate, rapid, and cost-saving results. Therefore, a guideline given in Fig. 3 is an important asset prior to achieving best performances in a case study. The primary step in the selection process is that users should define and finalize the objective of using AI in their research or implementation. Prediction, classification, quality control, detection of adulterants, and estimation are among the common objectives of AI applications in the food industries. Next, decision should be made whether sensors such as E-tongue, E-nose, CVS, and NIRS are required to collect the sampling data or not for collecting the data from the samples. Normally, integration with those sensors is conducted to obtain the parameters and characteristics of the samples to be included in the AI algorithms for sample testing purposes. Upon deciding the necessity of the sensors, users should compare and choose the fitting algorithm with respect to their study. Among the most common AI algorithms that have been employed include the FL, ANN, ANFIS, and ML methods. ANFIS has shown to have a higher accuracy, but the complexity of the model makes it less favorable compared to the other algorithms. It is advisable for the users to determine the complexity of the research in selecting the most appropriate algorithm for their studies. Once the selection of the algorithm has been confirmed, the data available are integrated with the AI algorithms. Finally, the testing and validation based on R2 and MSE are done to analyze the performance of the established model. The AI model has been created successfully once the validation is accepted; otherwise, users should return to the previous step and reselect the algorithm. Figure 11 shows the guideline in choosing and development of the AI model in food industry application.

Fig. 11
figure 11

Flowchart for developing AI model

Trends on the Application of AI in the Food Industry in the Future

The overall trend on the application of AI in the food industry is shown in Fig. 12. From the studies within the past few years, the usage of the AI methods has been observed to increase from 2015 to 2020 and is predicted to rise for the next 10 years based on the current trends. Among the rising factors for the application of AI in the food industry is the introduction of Industrial Revolution 4.0 (IR 4.0). The merging of technologies or intelligent systems into conventional industry is what is known as IR 4.0 and can also be called smart factory [129130]. AI which is categorized under the IR 4.0 technologies focuses on the development of intelligent machines that functions like the humans [131]. IR 4.0 makes a great impact in the product recalls due to the inspections or complains in the food industries. The implementation of the AI integrated in the sensors able to detect the errors during the manufacturing process and rectify the problems efficiently. Apart from that, IR 4.0 also plays a big role in the human behavior as consumers in the twenty-first century often discover information regarding the foods in the internet. The rising concerns on the food quality allow more usage of AI as they are able to enhance the quality of the food and aids during the production process. The highest amount of application of AI in the food industry was seen in the year 2020 as more researchers are carrying out studies using the AI method, and it is believed to continue rising for the upcoming years due to increasing in food demand and the concern on the safety of the foods which are being produced.

Fig. 12
figure 12

Application of AI in the food industry

The comparison between the AI integration with and without sensors for real-time monitoring in the food industry is displayed in Fig. 13. Integration with external sensors has a higher percentage compared to those without the integration of the sensors in the food industries. The purpose of external sensors was to obtain the data from the samples which are then employed into the AI algorithms to carry out various tasks such as classification, prediction, quality control, and others that have been stated earlier. However, the data collection for the year 2017 showed that the percentage for the AI without the external sensors is greater than that with integration with the sensors. This is due to the high amount of research which was conducted without using the external sensors which are listed in this paper. Based on the evaluation carried out during this study, it was found that a high amount of research was done on the integration of CVS sensors with the AI methods. It is explainable as CVS sensors are able to provide important parameters such as the shape, size, colors, and defects which are essential for the quality control in the food industry. However, the integration of the system is mainly dependent on the objectives of the researcher and the industrial players and the availability of the data.

Fig. 13
figure 13

Comparison between integration of AI for real-time monitoring in the food industry

In short, as the AI world is heading towards 2.0 [132], it can be predicted that the rise in the usage of AI in the food industry is definite and inevitable because of the advantages that they can offer such as saving in terms of time, money, and energy as well as the accuracy in predicting the main factors which are affecting the food industries. Apart from that, in the recent pandemic situation due to the Covid-19 virus, it is predicted that more companies will opt for the usage of AI in their industries to cut down the costs and boost the performance of their company. There have been reports by some of the SMEs that their earnings have dropped and some SMEs have claimed that they could only survive for about 1 to 3 months. The high demand of food and the tight standard operating procedure in the companies during the pandemic situation will encourage the industry players to find an alternative to their problems and AI will be one of them to ensure a smooth operation.

Conclusion and Future Outlook

In conclusion, AI has been playing a major role in the food industry for various intents such as for modeling, prediction, control tool, food drying, sensory evaluation, quality control, and solving complex problems in the food processing. Apart from that, AI is able to enhance the business strategies due to its ability in conducting the sales prediction and allowing the yield increment. AI is recognized widely due to its simplicity, accuracy, and cost-saving method in the food industry. The applications of AI, its advantages, and limitations as well as the integration of the algorithms with different sensors such as E-nose and E-tongue in the food industry are critically summarized. Moreover, a guideline has been proposed as a step-by-step procedure in developing the appropriate algorithm prior to using the AI model in the food industry–related field, all of which will aid and encourage researchers and industrial players to venture into the current technology that has been proven to provide better outcome.