Tomato (Solanum lycopersicum (Solanaceae)), susceptible to significant yield loss due to pests, is particularly impacted by Tuta absoluta (Meyrick) (Lepidoptera: Gelechiidae), a pest that directly and profoundly influences tomato yields. Consequently, early detection of T. absoluta damage intensity on leaves using machine learning or artificial intelligence-based algorithms is crucial for effective pest control. In this ground-breaking study, the galleries generated by T. absoluta were examined via field images using the Decision Trees (DTs) algorithm, a machine learning method. The unique advantage of DTs over other algorithms is their inherent capacity to identify complex and vague shapes without the necessity of feature extraction, providing a more streamlined and effective approach. The DTs algorithm was meticulously trained using pixel values from the leaf images, leading to the classification of pixels within regions with and without galleries on the leaves. Accordingly, the gallery intensity was determined to be 9.09% and 35.77% in the test pictures. The performance of the DTs algorithm, as evidenced by a high coefficient of determination (R²) and an accuracy rate of 0.98 and 0.99 respectively, testifies to its robust predictive and classification abilities. This pioneering study has far-reaching implications for the future of precision agriculture, potentially informing the development of advanced algorithms that can be integrated into autonomous vehicles. The integration of DTs in such applications, thanks to their distinctive ability to handle complex and indistinct shapes without the need for feature extraction, sets the stage for a new era of efficient and effective pest control strategies.