The Mexican fruit fly (Anastrepha ludens, Loew, Diptera: Tephritidae) and the Mediterranean fruit fly (Ceratitis capitata, Wiedemann, Diptera: Tephritidae) are among the world's most damaging pests affecting fruits and vegetables. The Sterile InsectTechnique (SIT), which consists in the mass-production, irradiation, and release of insects in affected areas is currently used for their control. The appropriate time for irradiation, one to two days before adult emergence, is determined through the color of the eyes, which varies according to the physiological age of pupae. Age is checked visually, which is subjective and depends on the technician's skill. Here, image processing and Machine Learning techniques were implemented as a method to determine pupal development using eye color. First, MultiTemplate Matching (MTM) was used to correctly crop the eye section of pupae for 96.2% of images from A. ludens and 97.5% of images for C. capitata. Then, supervised Machine Learning algorithms were applied to the cropped images to classify the physiological age according to the color of the eyes. Algorithms based on Inception v1, correctly identified the physiological age of maturity at 2 d before emergence, with a 75.0% accuracy for A. ludens and 83.16% for C. capitata, respectively. Supervised Machine Learning algorithms based on Neural Networks could be used as support in determining the physiological age of pupae from images, thus reducing human error and uncertainty in decisions as when to irradiate. The development of a user interface and an automatization process could be further developed, based on the data obtained on this study.