Determining the end-date of long-ripening cheese maturation using NIR hyperspectral image modelling: A feasibility study

Near-infrared (874–1734 nm) hyperspectral (NIR-HS) imaging, coupled with chemometric tools, was used to explore the relationship between spectroscopic data and cheese maturation. A predictive tool to determine the end-date of cheese maturation (E-index, in days) was developed using a set of 425 NIR-HS images acquired during industrial-scale cheese production. The NIR-HS images were obtained by scanning the cheeses at 14, 16, 18 and 20 months of ripening, before a final sensorial assessment in which all cheeses were approved by 20 months. Regression modelling by partial least squares (PLS) was used to explore the relationship between average spectra and E-index. The best PLS model achieved 69.6% accuracy in the prediction of E-index when standard normal variate (SNV) correction and mean centring pre-processing were applied. Thus, NIR-HS image modelling can be useful as a complementary tool to optimise the logistics/efficiency of cheese ripening facilities by rapid and non-destructive prediction of the end-date of ripening for individual cheeses. However, the commercial application will require future improvements in the predictive capacity of the model, e.g. for larger datasets and repetitive scans of cheeses on random occasions.


Introduction
Dairies generally have limited storage facilities for cheese ripening, so efficient logistics planning is crucial to ensure prompt dispatch of fully matured cheeses to consumers. Some of the challenges and problems with storing and marketing cheeses described previously in the literature (Zehren, 1984), e.g. balancing supply and demand to minimise storage losses and help manage inventories, remain unresolved. The increasing demand for premium-quality, long-ripening cheeses requires automation of processing steps, which in turn requires the transformation of production techniques through novel practices (Johnson, 2017). Long-ripening cheeses display individual variations in the rate of maturation that are not directly related to age (Priyashantha et al., 2020), creating a need for tools that can be used for more accurate planning in ripening facilities.
The flavour, texture and appearance of cheese develop during ripening through a complex process of decomposition of fat, protein and acids brought about by the activity of microorganisms and endogenous enzymes within the cheese. The chemical compounds resulting from ripening contribute to the organoleptic characteristics of the cheese (Johnson, 2017). Assessment and monitoring of cheese ripening are challenging, so complementary analytical tools for effective quality control of cheeses are urgently needed (Khattab et al., 2019). At present, the determination of the end-date of cheese maturation is decided primarily by a trained sensory panel, which evaluates the cheeses on predefined occasions during the ripening process and grades them against a set of sensory standards (Priyashantha et al., 2020). Although sensory analysis is of indisputable importance, evaluation by the sensory panel is time-consuming and expensive. With ongoing process optimisation and automation, simple and direct methods are needed for faster, simpler and cheaper instrumental monitoring of cheese maturation in ripening facilities.
The aim of the present study was to develop a model to predict the expected end-date of the cheese ripening process, based on near-infrared hyperspectral (NIR-HS) imaging. One of the major advantages of using NIR-HS based techniques is the possibility of using simultaneous quality parameters in model development, unlike in existing conventional methods (Karoui et al., 2003). Moreover, NIR-HS is a prospective potent tool for non-destructive food analysis (Gowen et al., 2007). The complete NIR spectrum of each pixel in the hyperspectral image can be used to characterise complex biological matrices (Geladi et al., 2004), in this case, cheese. Qualitative and quantitative analyses of NIR-HS images can be made using spectroscopic multivariate calibration modelling techniques (Burger & Geladi, 2005). Recently, NIR-HS imaging has shown a wide array of food applications as an effective tool in classifying the shelf-life of cakes (Sricharoonratana et al., 2021), ingredient quantification in bread flour recipes (Blanch-Perez-del-Notario et al., 2020), visualization of fish freshness (Zhang et al., 2021), detecting anomalies during the packaging (Medus et al., 2021) and spatial mapping of cheese ripening process (Malegori et al., 2021;Priyashantha et al., 2020). Therefore, we examined the feasibility of using NIR-HS imaging, coupled with chemometric techniques and NIR-HS image processing, to predict the expected finishing date of the ripening process for long-ripening hard cheese covered in paraffin wax kept in a commercial cheese ripening facility.

Material and methods
In an industrial-scale trial, a set of 425 NIR-HS images was taken of cheeses with paraffin wax and ripened for at least 14 months.
The cheese production procedure, cheese dimensions, ripening conditions, sample handling and imaging procedure were as previously described by Priyashantha et al. (2020). In brief, the cheeses were evaluated for the development of organoleptic quality by an industrial sensory panel every two months from 14 months of storage up to 20 months. A cheese was considered fully mature and ready to be sent to market when it had developed all characteristics described in a set of defined standards. Cheeses were evaluated against an in-house standard protocol concerning outer appearance, flavour, smell and texture. Potential quality remarks for the different cheese batches were noted in a protocol, e.g. flavour and smell (e.g. cheese flavour, acidic taste, saltiness, sweetness, rancidity, burned, fruity), the appearance of a cut surface (e.g. number and distribution of holes, colour, mould or smear formation), and texture (e.g. with a finger, i.e. hardness, toughness and with the mouth, i.e. chewing resistance, dryness, grainy, rubbery etc.). This procedure is used to determine the point when the cheese meets the characteristic sensory profile of the mature cheese and thus can be distributed to the market. If a cheese was considered not to meet the standards during the evaluation, it was returned to the ripening facility and re-evaluated after another two months of storage. During this process, NIR-HS images at various maturity levels were acquired. The end-date of ripening was then calculated for each cheese, based on the difference between scanning occasion (14, 16, 18, 20 months) and the date of final sensory approval ( Fig. 1).
An Umbio Inspector device (Umbio AB, Umeå, Sweden) was used for acquiring NIR-HS images, as described by Hetta et al. (2017). Hyperspectral images were taken of cheeses covered with a 1-mm layer of paraffin wax, as explained by Priyashantha et al. (2020), during M-index (i.e. maturity) development. The average spectra of the images (cheese pixels) were calculated and modelled using Breeze software (Prediktera AB, Umeå, Sweden). Each image had approximately 3.5 × 10 5 pixels, of which approximately 37% represented background pixels. These unnecessary background pixels (e.g. conveyer belt) were excluded by segmenting the absorbance values over 1.5 at band 55 (1279 nm), to achieve the highest contrast between the samples and the background ( Fig. 2A).
The image set was split into a training set (n = 100 NIR-HS images) and a test set (n = 325 NIR-HS images), with the same distribution of scanning occasions. Objects in the images smaller than 1000 square pixels in the total area were also removed. The average spectra in NIR-HS images for each cheese were considered in predicting the expected end-date of ripening for the entire cheese. Wavelengths between 1000 and 2191 nm (an amalgamation of c and d ranges) were considered (Fig. 3) since the spectra outside this range (beyond d) were noisy. In addition, the wavelengths 1645 to 1815 were removed (Fig. 2B), since those were mainly associated with the paraffin wax (Palou et al., 2014). The spectra were subjected to various pre-processing steps and spectra were always mean-centred. The resulting partial least squares (PLS) discriminant models were evaluated for their performance (e.g. prediction ability) using two diagnostics, coefficient of determination for calibration (R 2 ) and root mean squared error of calibration (RMSEC), as previously described by Priyashantha et al. (2020).

Results and discussion
Examples of a digital red-green-blue (RGB) image and a raw NIR-HS image of a ripening cheese, and first principal component (PC1) images of the cheese at different ages, coloured according to PC1 values, are shown in Fig. 4. A score scatter plot was created to interpret these images (Fig. 4, left panel). It was possible to identify two main pixel clusters in the score scatter plot, corresponding to the chronological ages 14 and 16 months (E*, F*; younger) and 18 and 20 months (C*, D*; older). This may indicate that pixels in sub-clusters of 14 and 16 months (and in sub-clusters of 18 and 20 months), were similar. The scatter plot also revealed a high pixel density area in the middle of each cluster. These pixel clusters and the intensity gradients may relate to the Fig. 1. Flowchart of sample handling and study design. On the scanning occasions at 14, 16, 18 and 20 months (m), NIRhyperspectral imaging and sensory evaluation were performed. If the sensory panel approved the cheese, it was sent to market. If not, it was allowed to continue ripening. The difference between date of sensory approval and scanning was used to calculate E-index development. *The basis for the maturity index (M-index) development is described in Priyashantha et al. (2020), where differences in days between scanning and cheese production was modelled. maturity of the cheeses, as described by Priyashantha et al. (2020). They could thus reflect the variation in the progression of the ripening process for individual cheeses, and for cheeses on different scanning occasions.
Several predictive PLS models with varying pre-processing steps were developed to evaluate the effect of pre-processing on model performance (data not shown). Comparison and evaluation of the performance of the resulting models using R 2 and RMSEC showed that the best combination (R 2 = 0.696, RMSEC = 49 days) was achieved by SNV correction. Pre-processing of NIR-HS images is an essential step to eliminate any abnormalities in the spectra (Jia et al., 2020). This improves the subsequent multivariate regression modelling and exploratory analysis, as reviewed by Rinnan et al. (2009). The SNV-corrected model was found to be the best predictive model in this study, with six components sufficient for optimal model performance. Model performance was further improved (R 2 increased by 18%) when wavelengths reported being associated with paraffin wax were removed from the spectral matrix and the training dataset was balanced (by the selection of smaller and representative subsets of samples for the training set).
The performance of the SNV-corrected PLS model in assessing Eindex during cheese ripening is shown in Fig. 5. Predicted E-index of the ripening cheeses and reported age of the cheeses at sensory approval showed a linear relationship, except for the cheeses scanned at 14 months, for which a shift in linearity was observed. This indicates that for young cheeses (up to 14 months), the time needed to reach maturity varies widely and it is difficult to predict E-index for these cheeses since they seem to follow differing maturation patterns. There was a large variation in E-index for the cheeses at each particular scanning occasion. In the SNV-corrected PLS model, there was also one negative prediction at zero-days, i.e. the date when the cheese was approved by the sensory panel.
This may mean that the cheese was already mature at an earlier date according to the model, but that the sensory panel decided to retain the cheese in the ripening facility for longer. However, it may also mean that the model does not cover all parameters behind the decision by the sensory panel regarding sensory approval, and might need further refinement.
The variation in E-index was larger within cheeses scanned at 14 months of ripening than in cheeses scanned at 20 months, for which the lowest variation was observed (Fig. 6). Moreover, most of the cheeses that were approved by the sensory panel, and thus removed from the ripening facility, belonged to the 16, 18 and 20-month scanning Due to the high costs of storage and sensory evaluation, the cheese industry is considering alternative strategies to make the production more sustainable and economically viable (Teixeira et al., 2020). In this regard, the results of the present investigation are promising as an innovative strategy to effective control in dispatching properly matured cheeses to the market with minimal involvement of the sensory panel. In practice, cheese ripening is a complex and multifactorial food process, where the casein matrix is hydrolysed through enzyme-mediated proteolysis to create characteristic texture and flavours to the resulting cheese (Ardö et al., 2017). However, the cheese ripening process is currently not highly automated (Murtaza et al., 2014) and thus the quality of the matured cheese depends on the know-how and unique skills of the cheese-maker. The NIR-HS image-based method developed in this study may be an important feasible alternative by providing the cheese-maker with information on variation in cheese ripening time, enabling more efficient logistics in cheese-ripening facilities. Cheeses sent to the market should be uniformly ripened, without any quality defects, but rigorous quality control is laborious due to the current use of a trained sensory panel. Complementary analyses, such as computer-based assessment of NIR-HS images to determine the approximate end-date of maturity, could be a valuable tool in this regard. It would reduce the overall cost of cheese ripening by predicting the readiness of cheeses for the market, enabling thereby efficient planning of sales. It would also optimise the handling of cheese wheels, reducing the manual work, and avoid the extensive sensory analysis  needed for large cheese batches. However, exploring relationships between instrumental (e.g. NIR-HS image analysis) and sensory test are challenging and required careful control of the method development process for better analysis and predictability of the results (Foegeding & Drake, 2007;Gowen et al., 2011).
The results in this study can act as a basis for future studies aimed at developing predictive tools to optimise the logistics in cheese-ripening facilities. Advanced process control tools are timely needed in the dairy industry, to mitigate production and quality disturbances in the process lines. For this, mathematical models and instrumental analytical methods must be used in combination to ensure real-time quality control of the product (Tajammal Munir et al., 2015). The proposed NIR-HS image-based PLS model also can be implemented as a real-time process analytical tool to control the quality of the cheese, by facilitating the concurrent release of matured cheese to the market. Better predictability in the model in this study was obtained with the removal of wavelengths associated with paraffin wax (Palou et al., 2014), which may be due to the uneven presence of paraffin on cheeses interfering with the collection of pure and representative data matrix for the cheese. To further improve model performance, tests on more cheese samples of varying levels of maturity and repetitive scans of cheeses to adjust the rate of ripening are needed. Detailed systematic sensory analysis focusing on the ripening process, as opposed to the current industrial practice, and accounting for the development of off-flavours, systematic sensory grading by multiple sensory panellists, use of wet-chemistry to evaluate fat and protein degradation products and analysis of cheese volatiles would also improve model performance. In our previous study, we achieved 76% maturity prediction (Priyashantha et al., 2020), compared with 69.6% for the SNV-corrected model in the present study. The slightly lower predictive values in this study likely depend on smaller variation in the input variable dataset compared with our previous study. Since each individual cheese in a batch will develop characteristic properties at varying rates, and thus mature differently, further investigation of the variation in cheese ripening within and between batches using NIR-HS modelling is needed. A more comprehensive study design would enable greater distinction of cheeses based on variation in speed of ripening. Thus, NIR-HS imaging has great potential as a non-destructive technique for monitoring cheese ripening in in-line process analysis using chemometric modelling of spectroscopic signatures that might otherwise be hidden within a huge amount of data. Besides, this technique will overcome some limitations associated with human-involved methods by providing speed, reliability, accuracy, lowered human error in the analysis and not be destructive for the sample (Siche et al., 2016).

Conclusions
This study showed that NIR-HS imaging can become a powerful, nondestructive method to complement the use of a sensory panel to determine the end-date of the cheese ripening process. NIR-HS images were Fig. 5. Performance of the best predictive partial least squares (PLS) model (obtained with standard normal variate (SNV) pre-processing) for predicting the end-date of cheese ripening. Time from scanning occasion to sensory approval (approximately 0, 64, 127 and 190 days, corresponding to scanning occasions 20, 18, 16 and 14 months, respectively) was taken as the difference (days) between the date of sensory approval and imaging date. processed using chemometrics and other exploratory techniques (PCA, PLS) and used to predict the end-date of ripening (E-index) and cheese maturity. Choice of pre-processing method had an impact on model performance, with SNV correction giving the best model (R 2 = 0.696, RMSEC = 49 days) for predicting the end-date of ripening. Further development can improve the accuracy and precision of the model in predicting the E-index. Thus NIR-HS has good potential in applications in the cheese industry to predict the expected end-date of maturation of long-ripening cheese.

Declaration of competing interest
The authors declare no conflict of interest.
pertaining to Breeze software.