1. Introduction
Agriculture plays a critical role in a country’s long-term economic health. It goes beyond simply providing food and materials. It’s a major source of jobs, often the primary income source, for a significant portion of the population. The agricultural landscape is constantly changing due to various factors. Rising incomes, globalization, and increased focus on healthy eating all influence how food is produced. In the coming years, the demand for various food items like fruits, vegetables, dairy, seafood, and meat is expected to rise significantly.
Developing nations like Iran face a particular challenge in agriculture: a lack of automation and mechanized processes. Despite this, a substantial portion of Iran’s population (around 58%) relies on agriculture for their livelihood. The country has significant potential for growth in the food processing sector, which could position them well for increased participation in global food trade
. Iran boasts a thriving grocery and food market, with retail sales accounting for a remarkable 70% of total revenue. The food processing industry is also a major contributor, holding a significant 32% share of the country’s entire food market [
1].
The food industry operates in a cutthroat environment where quality is the ultimate differentiator. Consumers are no longer satisfied with the bare minimum. Their heightened awareness and evolving preferences demand a relentless pursuit of excellence [
2]. Despite advancements in technology, a significant portion of food quality evaluation remains stubbornly manual. This reliance on human inspectors, while possessing valuable experience, introduces a layer of subjectivity and inconsistency. Physiological factors like fatigue or even hunger pangs can influence their judgment, leading to fluctuations in the evaluation process
. This traditional method also proves to be inefficient. Manual inspections are time-consuming and labor-intensive, ultimately driving up production costs. To stay ahead of the curve and meet the ever-increasing demands of today’s consumers, the food industry requires a more robust and objective quality evaluation system. Here’s where automation steps in, offering a compelling solution [
3,
4].
Our increasingly globalized world relies heavily on the complex machinery of the food industry. This vast system encompasses everything from the planting of seeds (agriculture) to the products on our supermarket shelves (food processing, marketing, and sales). It’s a tirelessly working engine ensuring a steady flow of food across the globe. However, a crucial element within this industry, food quality evaluation, remains surprisingly reliant on a traditional method: manual assessment by trained individuals. While this approach has served the industry for a long time, it comes with inherent limitations. Manual evaluations are expensive, requiring a significant workforce. Additionally, they are inherently subjective, as human inspectors rely on their own perceptions, which can be influenced by factors like fatigue or even personal preferences. This subjectivity can lead to inconsistencies in the evaluation process, potentially allowing products that don’t meet quality standards to slip through the cracks [
1]. As a result, the food industry faces a growing pressure to elevate its standards of food quality evaluation. The need for objectivity, consistency, and efficiency in this critical process is becoming increasingly important.
The global food industry is a complex and multifaceted giant, weaving together agriculture, food processing, marketing, and sales to bring food from farm to table. Its importance in our interconnected world is undeniable. Yet, a surprising truth lies at the heart of this industry: food quality evaluation often remains a stubbornly manual process, relying on trained individuals. While these inspectors bring valuable experience, this traditional method suffers from several drawbacks. It’s a costly endeavor, requiring significant manpower. More importantly, it’s inherently subjective. Human inspectors, susceptible to fatigue, personal preferences, or even hunger pangs, can introduce inconsistencies into the evaluation process. This subjectivity creates a risk – products that don’t meet quality standards could slip through the cracks. As a result, the industry faces a growing demand for a more robust system – one that prioritizes objectivity, consistency, and efficiency in food quality evaluation [
1].
Almonds (Amygdalus Communis L.) are a fascinating nut, playing a dual role in the world of food and agriculture. Not only are they a valuable source of health benefits, but they also contribute significantly to thriving export industries in many regions. These perennial plants, cultivated in cold and temperate areas, produce energy-packed kernels. Aydin (2003) highlights the impressive nutritional profile of almonds, boasting 6 kcal g-1 of energy, 15.64% protein, and a remarkable oil content ranging from 35.27% to 40%. Notably, almond kernel oil stands out for its high concentration of oleic acid, clocking in at around 40 % [
5]
.
Iran is a major player in the global almond production scene. However, their harvesting and handling methods currently rely heavily on manual labor [
6]. Practices like threshing are often done by hand or with the aid of simple, homemade equipment. To optimize these various processes – threshing, conveying, sorting, and storing – a deeper understanding of the physical and mechanical properties of both the almond nuts and their kernels is crucial. This knowledge can lead to significant improvements in efficiency and overall crop management.
To improve efficiency throughout the almond production chain, from harvesting to storage, researchers are actively investigating the nuts’ physical and mechanical properties. One study explored the relationship between size and rupture strength across ten different almond varieties [
7]. Another delved into how moisture content affects the physical properties of both almond nuts and kernels. Additionally, research has shed light on how factors like irrigation regimes, fertilization types, and even the cultivation year itself can influence the physical properties of almonds [
6]. By understanding these various aspects, researchers can develop strategies to optimize processes like threshing, conveying, sorting, and storing, ultimately leading to a more efficient and productive almond industry.
Currently, the process of grading almonds relies heavily on manual methods. One traditional technique involves calculating “adjusted kernel weight.” This calculation factors in the weight of edible kernels, inedible ones, foreign materials, and excess moisture, using predetermined percentages [
8,
9]. While this method exists, it suffers from several drawbacks. It’s time-consuming, labor-intensive, and ultimately inefficient. Additionally, it struggles with consistency, especially when evaluating visual aspects of the almonds like broken pieces, halves, chips, scratches, splits, and the condition of their shells. In an attempt to improve efficiency, computer-based databases were introduced to replace manual calculations and grading. However, even these digital systems weren’t without flaws. Rounding errors, particularly at the hundredth decimal place, persisted [
8]. This lack of precision could potentially lead to inconsistencies in the final grading results.
While manual methods have traditionally dominated almond grading, recent advancements in image processing and analysis offer a promising alternative. This technology utilizes digital imaging, computer scanning, and specialized software to analyze almond kernels [
10,
11,
12,
13]. The software calculates factors like kernel area and pixel values, allowing for a more objective and automated classification process. Techniques like SHAPE, SeedCount, GrainScan, Smartgrain, and ImageJ have shown potential in effectively classifying different types of kernels
.
However, there are limitations to consider. Some of these techniques are still under development, and others may be too cumbersome or expensive for large-scale applications. The key lies in finding an image processing solution that strikes a balance between accuracy, efficiency, and cost-effectiveness for the high-volume world of almond production.
The world of almond grading is undergoing a fascinating transformation. While manual methods have served the industry well for many years, researchers are increasingly exploring the potential of machine learning to automate and improve the process
. Several studies have shed light on this exciting development. Mirzabe et al. [
14] investigated the physical properties of almonds, employing statistical models and machine learning techniques to analyze factors like bulk density and friction coefficient. Teimouri et al. [
15] took a different approach, utilizing artificial neural networks (ANNs) to successfully categorize almonds into various classes, including normal, broken, wrinkled, and double kernels. Their research yielded impressive results, demonstrating the high sensitivity and accuracy of this approach in detecting almond quality variations
.
Another study (Vidyarthi et al. [
8]) combined image processing with machine learning models like random forest and support vector machines (SVM) to predict the size and mass of almond kernels. This research highlights the versatility of machine learning, showcasing its potential application beyond simple classification tasks. Additionally, Reshadsedghi et al. [
16] explored the use of ANNs to classify almond varieties based on shell characteristics. Their approach involved extracting acoustic features from the shells and feeding them into the ANNs, achieving high classification accuracy for different shell types
. Eski et al. [
17] further broadened the scope of machine learning applications in almond production by designing a system to predict various physical properties based on just three key dimensions – length, width, and thickness. This research demonstrates the potential of machine learning to extract valuable insights from limited data sets
.
While these studies showcase the immense potential of machine learning in almond grading, it’s important to acknowledge that some techniques are still under development. Additionally, cost-effectiveness remains a crucial consideration, particularly for large-scale production. Nevertheless, the research is clear: machine learning holds the promise to revolutionize almond grading, ushering in an era of greater efficiency, accuracy, and consistency.
Almond recognition and quality assessment model presented in this study demonstrate promising real-time outcomes and can seamlessly integrate with camera-based systems for on-the-fly fruit quality analysis. Notably, the AlmondNet-CNN based architecture is characterized by a reduced number of parameters, enhancing its efficiency in training on a large volume of images within a shorter timeframe. Consequently, the model’s processing time for real-world images is minimized, making it highly suitable for precision agriculture applications.
As the world of almond grading seeks to move beyond traditional manual methods, the integration of digital image processing and pattern recognition algorithms has emerged as a game-changer [
18]. Here, computer vision steps in as a powerful tool, offering speed, cost-effectiveness, consistency, and most importantly, precision in inspection tasks
. The food industry, in particular, has witnessed a surge in the application of computer vision for quality assessment. Recognized for its vast potential, computer vision has placed the food industry among the top 10 sectors actively employing this technology [
8]. Its success lies in its ability to perform objective and non-destructive evaluations across a wide variety of food products. This has been a key driver for substantial research and development efforts within the food industry, as the advantages of computer vision - objectivity, speed, and the contactless nature of inspection - have become increasingly clear [
19].
In the context of computer vision for food quality assessment, a well-designed system goes beyond just the software and algorithms. A critical partnership exists between the computer vision system itself and an illumination system. Imagine a personal computer (PC) equipped with specialized software, ready to analyze food products. However, for this analysis to be effective, it needs clear and accurate information. This is where the illumination system comes in. Just like good lighting is essential for taking a clear photograph, the illumination system plays a vital role in capturing high-quality images of food products.
The quality of the captured image has a significant impact on the entire process. A well-lit image allows for faster and less complex image processing steps later on. This translates to a more efficient system overall, and even plays a role in reducing the overall cost. In simpler terms, good lighting upfront means a smoother and more cost-effective computer vision system for food quality evaluation.
This research takes a groundbreaking approach to almond quality assessment by introducing a novel deep learning model called Almond-CNN. This model is specifically designed to identify and evaluate the quality of individual almonds within a mixed batch containing both almonds and shells
. The researchers created a robust dataset for training and testing the model. This dataset is comprised of real-world scenario images, meticulously categorized into two distinct quality classes. The core of the system lies in a convolutional neural network (CNN) architecture. To ensure optimal performance, the model is trained on this comprehensive dataset of 736 images, encompassing a variety of almond and shell combinations, over multiple training cycles (epochs). Finally, the trained deep learning model undergoes rigorous testing to validate its accuracy and effectiveness [
20].
The challenges faced by the researchers in developing the Almond-CNN model were not insignificant. The dataset they compiled to train the model exhibited significant variations, both between different classes (almonds vs. shells) and even within the same class (variations among almond shapes and appearances). Additionally, the real-world scenarios these images captured added another layer of complexity. To address these challenges, the researchers divided their comprehensive dataset of 736 images into three distinct subsets: training, validation, and testing. This meticulous approach allowed them to train the model effectively while also ensuring its generalizability to unseen data.
The results were impressive. The deep learning-based Almond-CNN model surpassed all existing state-of-the-art models, achieving a remarkable 100% accuracy on a test set featuring entirely new images. This speaks volumes about the model’s effectiveness in real-world applications. Beyond accuracy, the researchers also focused on creating a model that could seamlessly integrate into existing workflows. The fruit recognition and quality assessment system they developed demonstrates promising real-time capabilities. In simpler terms, the model can analyze fruits as they appear, without any delays. Furthermore, the architecture of Almond-CNN is designed for efficiency. By using a reduced number of parameters, the model can be trained on large datasets in shorter timeframes. This translates to faster processing times for real-world images, making it ideal for applications in precision agriculture, where speed and efficiency are crucial.