*Article* **Automated Processing and Phenotype Extraction of Ovine Medical Images Using a Combined Generative Adversarial Network and Computer Vision Pipeline**

**James Francis Robson \*, Scott John Denholm and Mike Coffey**

Scotland's Rural College (SRUC), Animal and Veterinary Sciences, Peter Wilson Building, Kings Buildings, West Mains Road, Edinburgh EH9 3JG, UK; scott.denholm@sruc.ac.uk (S.J.D.); mike.coffey@sruc.ac.uk (M.C.) **\*** Correspondence: james.robson@sruc.ac.uk

**Abstract:** The speed and accuracy of phenotype detection from medical images are some of the most important qualities needed for any informed and timely response such as early detection of cancer or detection of desirable phenotypes for animal breeding. To improve both these qualities, the world is leveraging artificial intelligence and machine learning against this challenge. Most recently, deep learning has successfully been applied to the medical field to improve detection accuracies and speed for conditions including cancer and COVID-19. In this study, we applied deep neural networks, in the form of a generative adversarial network (GAN), to perform image-to-image processing steps needed for ovine phenotype analysis from CT scans of sheep. Key phenotypes such as gigot geometry and tissue distribution were determined using a computer vision (CV) pipeline. The results of the image processing using a trained GAN are strikingly similar (a similarity index of 98%) when used on unseen test images. The combined GAN-CV pipeline was able to process and determine the phenotypes at a speed of 0.11 s per medical image compared to approximately 30 min for manual processing. We hope this pipeline represents the first step towards automated phenotype extraction for ovine genetic breeding programmes.

**Keywords:** generative adversarial network; machine learning; automated medical image processing; deep neural network; animal science; CT scans; computer vision
