Invasive species threaten crops and ecosystems worldwide. Therefore, we sought to understand the relationship between the geographic distribution of species populations and the characteristics of seeds using new techniques such as seed image analysis, multivariate analysis, and machine learning. This study aimed to characterize Leucaena leucocephala (Lam.) de Wit. seeds from spatially dispersed populations using digital images and analyzed their implications for genetic studies. Seed size and shape descriptors were obtained using image analysis of the five populations. Several analyses were performed including descriptive statistics, principal components, Euclidean distance, Mantel correlation test, and supervised machine learning. This image analysis technique proved to be efficient in detecting biometric differences in L. leucocephala seeds from spatially dispersed populations. This method revealed that spatially dispersed L. leucocephala populations had different biometric seed patterns that can be used in studies of population genetic divergence. We observed that it is possible to identify the origin of the seeds from the biometric characters with 80.4% accuracy (Kappa statistic 0.755) when we applied the decision tree algorithm. Digital imaging analysis associated with machine learning is promising for discriminating forest tree populations, supporting management activities, and studying population genetic divergence. This technique contributes to the understanding of genotype-environment interactions and consequently identifies the ability of an invasive species to spread in a new area, making it possible to track and monitor the flow of seeds between populations and other sites.