Runs of homozygosity (ROH) are key elements of the genetic structure of populations, reflecting inbreeding levels, selection history, and potential associations with phenotypic traits. This study proposes a novel approach to ROH analysis through visualization and classification using convolutional neural networks (CNNs). Genetic data from Large White (n = 568) and Duroc (n = 600) pigs were used to construct ROH maps, where each homozygous segment was classified by length and visualized as a color-coded image. The analysis was conducted in two stages: (1) classification of animals by breed based on ROH maps and (2) identification of the presence or absence of a phenotypic trait (limb defects). Genotyping was performed using the GeneSeek® GGP SNP80x1_XT chip (Illumina Inc., San Diego, CA, USA), and ROH segments were identified using the software tool PLINK v1.9. To visualize individual maps, we utilized a modified function from the HandyCNV package. The results showed that the CNN model achieved 100% accuracy, sensitivity, and specificity in classifying pig breeds based on ROH maps. When analyzing the binary trait (presence or absence of limb defects), the model demonstrated an accuracy of 78.57%. Despite the moderate accuracy in predicting the phenotypic trait, the high negative predictive value (84.62%) indicates the model’s reliability in identifying healthy animals. This method can be applied not only in animal breeding research but also in medicine to study the association between ROH and hereditary diseases. Future plans include expanding the method to other types of genetic data and developing mechanisms to improve the interpretability of deep learning models. © 2025 Elsevier B.V., All rights reserved.