Diagnosis by SAM Linked to Machine Vision Systems in Olive Pitting Machines - Luis Villanueva Gandul; Antonio Madueño-Luna; José Miguel Madueño-Luna; Miguel Calixto López-Gordillo; Manuel Jesús González-Ortega (Applied Sciences, 2025)
Computer Vision (CV) has proven to be a powerful tool for automation in agri-food industrial processes, offering high-precision solutions tailored to specific working conditions. Recent advancements in Artificial Neural Networks (ANNs) have revolutionized CV applications, enabling systems to autonomously learn and optimize tasks. However, ANN-based approaches often require complex development and lengthy training periods, making their implementation a challenge. In this study, we explore the use of the Segment Anything Model (SAM), a pre-trained neural network developed by META AI in 2023, as an alternative for industrial segmentation tasks in the table olive (Olea europaea L.) processing industry. SAM’s ability to segment objects regardless of scene composition makes it a promising tool to improve the efficiency of olive pitting machines (DRRs). These machines, widely employed in industrial processing, frequently experience mechanical inefficiencies, including the “boat error,” which arises when olives are improperly oriented, leading to defective pitting and pit splinter contamination. Our approach integrates SAM into n CV workflow to diagnose and quantify boat errors without designing or training an additional task-specific ANN. By analyzing the segmented images, we can determine both the percentage of boat errors and the size distribution of olives during transport. The results validate SAM as a feasible option for industrial segmentation, offering a simpler and more accessible solution compared to traditional ANN-based methods. Moreover, our statistical analysis reveals that improper calibration—manifested as size deviations from the nominal value—does not significantly increase boat error rates. This finding supports the adoption of complementary CV technologies to enhance olive pitting efficiency. Future work could investigate real-time integration and the combination of CV with electromechanical correction systems to fully automate and optimize the pitting process.