Article ID: 26007
Accurate extraction of organ contours from images remains a major bottleneck in quantitative analyses of crop morphology. Here, I present MEGAcontour, a Python-based graphical user interface that streamlines contour extraction and normalized elliptic Fourier descriptor (nEFD) analysis, and demonstrate its utility through genomic prediction of eggplant (Solanum melongena L.) fruit contours. To enable robust extraction under challenging imaging conditions, MEGAcontour integrates the salient object detection model U2-Net. I further fine-tuned U2-Net for eggplant fruit segmentation to improve specificity, particularly by excluding attached fruit branches from extracted contours. PCA of nEFDs indicated that the dominant axis of variation corresponded to fruit elongation. Using DNA markers, I performed leave-one-accession-out genomic prediction for selected nEFD coefficients, reconstructed contours from the predicted coefficients, and evaluated agreement with observed contours using intersection over union (IoU). IoU of reconstructed contours ranged from 0.34 to 0.99 depending on accession. These results provide a practical workflow for contour extraction and support the feasibility of genomic prediction for eggplant fruit shape in breeding programs.