ORIGINAL RESEARCH article

Front. Anim. Sci., 26 June 2026

Sec. Animal Breeding and Genetics

Volume 7 - 2026 | https://doi.org/10.3389/fanim.2026.1830206

Transforming categorical scores to quantitative traits by automated image analysis increases fish shape heritability

  • 1. Animal Breeding and Genomics, Wageningen University & Research, Wageningen, Netherlands

  • 2. Agricultural Biosystems Engineering, Wageningen University & Research, Wageningen, Netherlands

  • 3. Galaxidi Marine Farm S.A., Galaxidi, Greece

Abstract

Introduction:

Body shape is a biologically and economically important trait in aquaculture breeding programs, yet objective and quantitative measurement of shape remains challenging. In practice, fish shape is commonly evaluated using subjective categorical scoring systems, which are labor-intensive, prone to bias, and limited in resolution. In this study, we propose a novel method for quantifying body shape in gilthead seabream (Sparus aurata) using image-derived traits.

Methods:

Expert-based visual scores were collected on five morphological regions for 3,421 breeding candidates together with images. Using elliptic Fourier descriptors and generalized Procrustes analysis, we visualized both ideal and less desirable reference shapes as average best and average worst contours.

Results:

Two quantitative traits, Distance to the Best (DtB) and Distance to the Worst (DtW), represent the individual deviation from ideal and undesirable reference shapes, respectively. Genetic analyses showed moderate heritability for DtB (0.33 ± 0.04), and lower heritability for DtW (0.23 ± 0.03) and the score traits. A lower DtB is associated with higher expert scores, while DtW captured a wider range of less desirable shape variations.

Discussion:

This approach provides an automated, objective, and visually intuitive method for integrating preferences on body shape into aquacultural breeding programs, with potential for economic valuation. Beyond fish morphology, the study offers broad applicability for transforming categorical phenotypes into quantitative traits for animal breeding and precision phenotyping.

1 Introduction

In animal breeding, many traits related to health and welfare are assessed using qualitative scales, such as lameness in cattle (O'callaghan et al., 2003; Sprecher et al., 1997), gait scores in broilers (Blokhuis et al., 2010; Kestin et al., 1992), disease progression (Hayes et al., 2010; Buczinski et al., 2011) or injuries (Lindberg et al., 2023). While these categorical systems provide evaluation on complex phenotypes, they rely on visual assessment by field experts and are therefore susceptible to personal bias, observer inconsistency, and limited resolution.

Recent advances in precision livestock farming have enabled direct, continuous, and objective measurements of animal phenotypes through imaging and sensor technologies (Fernandes et al., 2020, Norton et al., 2019; Rutten et al., 2013). Deep learning methods have been increasingly applied to predict expert-assigned categorical scores from images and videos (Neethirajan, 2020). However, two major challenges persist: the frequent imbalance in training data, particularly for unfavorable phenotypes such as severe lameness or disease, and potential bias in ground truth data provided by human experts (Szyc et al., 2025). In response, several studies have merged neighboring categories to mitigate imbalance (Russello et al., 2024; Higaki et al., 2024; Stephansen et al., 2023), but this approach risks overlooking critical biological differences between the merged scores. Together, these limitations highlight the need to shift from conventional qualitative scales to novel quantitative measurements that capture more variance in the traits while remaining objective.

This study explored such transformation in the measurement of body shape in gilthead seabream (Sparus aurata). Body shape of fish is a critical trait in aquacultural breeding and management, as it reflects the physiological performance (Xue et al., 2025) and influences the market value of some species (Colihueque and Araneda, 2014; Mørkøre et al., 2001). Fish of the same species can display substantial variation in shape due to environmental factors (Smith et al., 2024; Ndiwa et al., 2016, Collin and Fumagalli, 2011; Marcil et al., 2006, Wimberger, 1992), or due to domestication that further alters shape through selection. For example, wild and domesticated fish can exhibit different body forms (McMaster, 2023, Doğdu and Turan, 2021). In fish species that are sold whole such as sole and seabream, shape is a key commercial trait valued by both breeding companies and consumers (Colihueque and Araneda, 2014).

Body shape is a complex trait. Although it can be simply defined as the external form of the fish body, shape is not a single measurement but a collective expression of various morphological attributes. In flatfish such as sole, shape can be approximated with simple geometric measurements such as fitting an ellipse (Blonk et al., 2010). For round fish such as gilthead seabream, measuring shape becomes more challenging and typical relies on multiple indicators derived from landmarks, dimensions and their ratios (Freitas et al., 2023; Fragkoulis et al., 2021).

Selective breeding for shape can utilize indicator traits, but this is only effective when genetic correlations are sufficiently strong. Landmark-derived indicators (Luo, 2024; Mojekwu and Anumudu, 2015; Park et al., 2013; Loy et al., 2000) might only capture part of the variance, therefore exhibiting a low correlation with the visually perceived shape. Another approach of measuring shape is an expert-based grading system, where shape is scored visually according to pre-defined criteria (Fragkoulis et al., 2017). Compared to using indicator measurements, this method directly reflects the desired shape, with higher scores indicating preferences. However, such an approach is labor intensive, prone to subjectivity and bias (Moccetti et al., 2023). Moreover, scoring systems result in categorical traits with limited granularity in the collected data (Blonk et al., 2010).

To answer the need for a better definition, measurement, and quantification of shape for selective breeding, we proposed an algorithm for automated, quantitative analysis of body shape in gilthead seabream. Currently, five heritable traits contribute to fish appearance, all of which are manually scored by breeding experts. Instead of predicting expert-assigned scores, an image-based contour analysis pipeline was introduced to derive two novel traits: Distance to the Best (DtB) and Distance to the Worst (DtW), which quantify how closely each individual resembles the ideal or least desirable shape, respectively. Furthermore, we investigated the genetic variance of both traits and the potential for shape improvement in breeding programs. By demonstrating how the shape assessment was re-defined, this study aims to inspire similar transformation in other traits and other species for more precise breeding and management decisions.

2 Materials and methods

2.1 Data collection

Images were collected for 3,792 adult gilthead seabream (Sparus aurata), all of which were PIT-tagged breeding candidates from 10 batches with known pedigree information. Data collection was conducted in 10 sessions at different times between 2018 and 2020. Images were taken at the final phenotyping during harvest, where all fish were around 400–500 gram or 2 years of age. Prior to imaging, fish were completely anesthetized using Isoeugenol at a concentration of 40ppm. Each sedated seabream was weighed and placed in a lighting cabinet with three LED panels positioned at the top, side, and bottom (Figure 1). The top horizontal panel is equipped with a built-in RGB camera (Logitech HD Pro Webcam C920). Each seabream was positioned with its right lateral side up on the bottom panel, with a grid paper placed underneath as a reference scale. All images were taken with the same device. The zooming setting, background and image scaling are the same within a batch but different between batches.

Figure 1

Using the corresponding image, each fish was visually scored by two breeding experts on five morphological traits, summarized in Table 1: the shape of the head, the curviness of the dorsal side, width and length of the caudal peduncle, completeness and openness of caudal fin, and the curviness of the ventral side. Each trait was assessed on a scale from 1 to 3, where a score of 3 indicates a favorable shape for selection and a score of 1 an unfavorable shape. The score for each trait added up to a total score per individual. Only individuals with available images, pedigree information, and complete trait scores were kept in the dataset.

Table 1

Traits nameDefinition
HeadShape of the head
Dorsal sideCurviness of the dorsal side
Caudal peduncleWidth and length of the caudal peduncle
Caudal finCompleteness and openness of caudal fin
Ventral sideCurviness of the ventral side
Total scoreThe sum score of all traits above

Score traits and their definitions, with fish image as reference.

2.2 Definition of shape traits

To distinguish between the visual scores used to describe preferences in shape, and traits derived from image analysis, we refer to the former as score traits and the latter as shape traits. All image analyses to derive shape traits were conducted using Python 3.9 (Van Rossum et al., 1995). To ensure consistency across images, a standardized image processing workflow was implemented. The processing steps are described in the following sections and in Table 2 as pseudo codes.

Table 2

Input: Set of fish images I = {I1, I2,…, In} with associated scores
Input: target total score
Initialize empty lists:
 Contours ← [ ]
 Scores ← [ ]
Forimage Ii in Ido:
 Segment fish using SAM (Segment Anything Model)
 Center segmented fish on a 640×360 white background
 Detect contour using OpenCV
 Compute Elliptic Fourier Descriptors (EFD)
 Reconstruct contour using first 7 harmonics (1000 key points)
 Align contour orientation using PCA
 Append aligned contour to Contours
 Append the sum of all associated scores to Scores
End for
BestSet ← {contour ∈ Contours | score = 3 for all traits}
WorstSet ← {contour ∈ Contours | score = 1 for all traits OR total score< 8}
BestContour ← GeneralizedProcrustesAnalysis(BestSet)
Average best contour<-Plot(BestContour)
WorstContour ←GeneralizedProcrustesAnalysis (WorstSet)
Average worst contour<-Plot(WorstContour)
Initialize empty lists:
 DtB ← [ ]
 DtW ← [ ]
Forcontour in Contoursdo:
 d_best ← ProcrustesDistance(contour, BestContour)
 d_worst ← ProcrustesDistance(contour, WorstContour)
 Append d_best to DtB
 Append d_worst to DtW
End for
ReturnDtB and DtW

Algorithm to compute the Distance to the Best (DtB) & Distance to the Worst (DtW).

Bold values indicate the start and the end of the algorithm and of the loops within it.

2.2.1 Segmentation

We applied the Segment Anything Model (SAM) (Kirillov et al., 2023) to segment fish from their backgrounds using SamAutomaticMaskGenerator. All detected masks were ranked by area, and the largest mask was assumed to correspond to the fish. Because images from different batches varied in resolution and fish positions, each selected fish mask was centrally aligned and placed onto a white background of fixed dimensions (640 × 360 pixels) to standardize the segmented images.

2.2.2 Contour detection

The segmented fish images were processed using OpenCV (Bradski et al., 2000) function findContours to extract the fish outline. The largest detected outer contour was retained as the representation of the fish-body shape, and the coordinates of the contour points were saved for subsequent analysis.

2.2.3 Elliptic Fourier descriptor

Using the elliptic Fourier descriptors (Kuhl and Giardina, 1982) analysis, the extracted contours were decomposed into a series of curves, where each captures different levels of details of the contour: first harmonics provide low-frequent information about the general description of the contour, while the later harmonics provide higher-frequent descriptions of the details of the contour shape.

Elliptic Fourier descriptors (EFDs) consist of harmonics and Fourier coefficients that can be used to reconstruct the original curve. Each harmonic in the EFD framework uses a pair of sine and cosine functions to describe the periodic changes in both the x and y coordinates of the contour over time(t). Specifically, the parametric equations are defined as:

Where t is the normalized time parameter (t ∈ [0, 1]) along the closed contour, ω is the fundamental angular frequency equal to 2π, n is the harmonic number, and an, bn, cn, dn are the corresponding coefficients. While a0 and c0 are the average x and y position over t, these terms are often set to 0 to center the shape. To achieve scale and rotation invariance, the coefficients are normalized by the amplitude of the first harmonic, defined as:

The normalized contour is then described by:

This transformation ensures that the descriptors are invariant to scale and orientation of the original contour, such that comparisons between contours reflect only their intrinsic shape characteristics.

2.2.4 Contour reconstruction

The original fish contour can be reconstructed and visualized using harmonics (Figure 2). While using more harmonics will capture more details in shape and better resemble the original contour, it increases the risk of including noise, such as protruded ventral fin which is not considered as part of the natural body shape. To balance these two aspects, we assess the proportion of shape variance captured by a given number (k) of harmonics in EFDs.

Figure 2

The power or contribution of each harmonic can be quantified as the sum of squares of its coefficients, reflecting the harmonic’s amplitude:

The total harmonic power across all N harmonics considered is then:

The proportion of variance explained by the first k harmonics is computed as:

For this study, 30 harmonics (N = 30) were used in total and 7 (k = 7) were used for reconstruction, which explains 99% of the variance out of 30 harmonics of the original contour. This choice was based on the visual resemblance of the reconstructed and original contour (Figure 2). Each reconstructed contour was resampled with 1,000 equally spaced points. Using the same number and equal spacing of points allows comparison of corresponding positions along the contours of different fish. Python package pyefd (Blidh, 2021) was used to generate both EFDs and the reconstructed contours.

2.2.5 Contour alignment

To ensure directional consistency across all fish when plotting for visualization, each reconstructed contour was aligned based on its principal axes using Principal Component Analysis (PCA) (Karl Pearson, 1901). Python package scikit-learn (Pedregosa et al., 2011) was used for principal component analysis. The directions of the first and second principal components of the reconstructed contours were used for orientation, which corresponds to the anterior and dorsal axis of fish, respectively. The alignment of the principal components ensures all fish appear facing right, with the dorsal side upwards. Besides, the starting point of each contour was reindexed to begin at the most anterior point of the fish, and the coordinates of the contour points were plotted in an order clockwise along the contour.

2.2.6 Generalized Procrustes analysis

We selected all fish that received the maximum value (3) for all score traits and used their reconstructed contours to represent the ideal shape. Generalized Procrustes analysis (GPA) (Gower, 1975) was applied on the reconstrued contours to calculate the average best contour.

As all contours were centered through EFDs reconstruction and aligned through principal components, given N contours with score 3 for all traits, each with m corresponding points:

The average best contour is calculated as:

Same was applied to fish that received low values for all score traits, resulting in an average worst contour (). Since there were only 3 fish with 1 for all traits, we included all fish with a total score smaller than 8 to compute a more generalized . The use of average reference shapes was motivated by two considerations. First, to mitigate subjectivity and potential mis-assignment for individuals located near the boundaries between neighboring score categories. Besides, an average reference shape can preserve sufficient phenotypic variation by defining a less restrictive standard, thereby allowing the inclusion of individuals that deviate moderately from the most or least ideal while still conforming to the overall best or worst shape.

2.2.7 Calculation of shape traits

Both average best and worst contours served as geometric references for the derivation of shape traits. For each fish, the Procrustes distance (Mitteroecker and Gunz, 2009) between its contour and the average best contour () was computed as Distance to the Best (DtB):

Similarly, Distance to the Worst (DtW) was also calculated relative to the average worst contour (). DtB and DtW quantify how far each fish deviates from the two reference contours. A lower DtB or higher DtW indicates that the shape of this individual is closer to the ideal and further from the less desired shape and is therefore more favorable for selection.

Python package Scipy (Virtanen et al., 2020) was used for both generalized Procrustes analysis and the calculation of Procrustes distance.

2.3 Agreement between score traits and shape traits

After calculating the Distance to the Best (DtB) and Distance to the Worst (DtW), outlier removal and distribution transformations were performed. Most (99.0%) of the DtB and DtW values were between 0 and 0.06. However, distance values were disproportionately high for images where image analysis pipeline failed, ranging from 0.49 to 0.95, with a mean of 0.63. To ensure these failed detections were excluded, an empirical threshold of 0.1 was applied, which effectively removed all such cases. Subsequently, both DtB and DtW were transformed from a Gamma distribution to a normal distribution using function gamma2norm in R package faux (DeBruine, 2025). Both traits were also standardized with a mean of 0 and a standard deviation of 1. The outlier removal, distribution transformations and standardization were performed using R 4.2.1 (R Core Team, 2019).

To assess how well the shape traits align with score traits, boxplots of DtB and DtW values were plotted against the total scores to examine the relationship of distance and score traits. This was performed in Python 3.9 using package Seaborn (Waskom, 2021).

Genetic analyses of all traits were conducted with ASReml-R 4.2 (Butler, 2021), using a univariate linear mixed model, fitted to estimate the heritability of all traits, represented by the equation:

where y is a vector of phenotypes, β is the vector of fixed effect batch number, υ is the vector of random animal additive genetic effects , where A is the relationship matrix and is the additive genetic variance of the trait, and e is the vector of random residual effects , where I is an identity matrix and is the residual variance of the trait. X and Z are the design matrices that relate observations to the fixed effects and additive genetic effects, respectively. Heritability (h2) is calculated as the proportion of total phenotypic variance explained by additive genetic variance:

The phenotypic (rp) and genetic (rg) correlations of shape traits with score traits were estimated using the bivariate model:

where y is the concatenated vector of phenotypes of the two traits, β is the vector of fixed effect batch number, υ is the vector of random additive genetic effects , where A is the genetic relationship matrix, is the additive genetic variance of trait 1(2), ra,12 is the genetic correlation between traits 1 and 2, and e is the vector of residual effect , where I is an identity matrix, is the residual variance of trait 1(2), re,12 is the residual correlation between traits 1 and 2. X and Z are the design matrices that relate observations to the fixed effects and additive genetic effects, respectively. The genetic correlation between trait 1 and 2 is calculated as:

Where σa,12 is the genetic covariance between trait 1 and 2.

The founders of the population originated from 23 different sources, and their genetic contributions to the offspring within each batch are uneven. Therefore, for both the univariate and bivariate models, the genetic analysis was performed with genetic groups to account for differences between the sources of founders. Batch number was tested as fixed effect and was included for traits where this effect was significant.

3 Results

3.1 Descriptive statistics

Table 3 summarizes the basic statistics for each score trait. Overall, the distribution of fish across scores was unbalanced, with fewer individuals receiving a score of 1. A similar pattern was observed for the total score (Figure 3), where most fish were scored around the average. Only three fish received a score of 1 on all traits, while 129 fish achieved the maximum score of 3 on all traits.

Table 3

TraitsNumber of fishMean (unit: score)Standard deviation
(unit: score)
score 1score 2score 3
Head352195714822.300.63
Dorsal side308128821962.500.64
Caudal peduncle301202914612.310.61
Caudal fin220174018322.430.60
Ventral side78320599502.040.67

For each trait, the number of fish per score, mean and standard deviation.

Figure 3

Manual inspection identified 234 images for which segmentation failed, and no DtB/DtW values were calculated for these cases. A distance value of 0.1 on the original output was used as the threshold to flag failed image analyses. Outliers exceeding four standard deviations from the mean DtB and DtW were also removed from the transformed output under a normal distribution, resulting in a total of 3,452 fish included in the estimation of genetic parameters. Figure 4 shows the Gamma and transformed normal distributions of DtB and DtW.

Figure 4

3.2 The average best and average worst contour

Figure 5 shows the visualization of average best (N = 129) and average worst (N = 62) contours. The largest deviation between the two contours is observed at the ventral side of the fish, indicating that a rounder ventral side is less favorable. Additionally, the caudal peduncle of the fish with lower scores appears to have a wider, or less straight, connection with the body. However, the width of this region, when defined as the narrowest part of the peduncle, does not seem to differ between low and high-scoring fish. Low and high-scoring fish exhibit similar roundness on the dorsal side. Nevertheless, the transition from the dorsal to the head region is more gradual in high-scoring fish. In contrast, this transition is steeper in low-scoring fish.

Figure 5

The phenotypic relation between Distance to the Best (DtB), Distance to the Worst (DtW), and the score traits are visualized in Figure 6. For the mean value of DtB across the total scores, a clear trend is evident: as the total score increases, DtB decreases, indicating that the corresponding fish shape is closer to the average best shape, as expected. Additionally, the variance of DtB decreases when the overall score increases.

Figure 6

In contrast, the average of DtW and the variation in DtW does not show a clear trend when total score becomes smaller. The differences in average DtW are small across all the classes of total score and the minimum DtW is seen with intermediate scores of 8 and 9. When the overall score is above 10, there is a tendency for DtW to increase with higher scores, suggesting that the corresponding fish shape is further from the average worst shape. Conversely, for scores ranging from 5 to 10, DtW decreases as the score increases. Besides, the variance in DtW is low for total score 5, higher for score 6 and 7, and similar for overall scores between 8 and 15.

The high and variable DtW for low scoring fish suggests that strong deviations from the perfect shape occur in multiple directions. This interpretation is supported when plotting all the individual contours that were used to compute the best and worst shape (Figure 7). The best fish contours are much closer to their average than the worst fish’ contours, suggesting that the ideal shape is uni-directional: there is a clear ‘perfect’ shape that individuals converge toward when highly scored. However, there are many ways to have the ‘wrong’ shape. Some of the undesirable extremes can cancel each other out in the averaging process for the average worst shape, especially around caudal fin, resulting in the average worst shape closely resembles the average best shape.

Figure 7

3.3 Genetic parameter estimates

Table 4 shows the results of the genetic analysis among all score traits, shape traits DtB and DtW, and harvest weight. The analysis revealed that DtB exhibited moderate heritability; 0.33 ± 0.04. In contrast, all score traits, together with DtW, showed low heritabilities between 0.14 ± 0.03 and 0.25 ± 0.04. The total score trait also has a low heritability of 0.20 ± 0.03. Harvest weight had the highest heritability 0.47 ± 0.04.

Table 4

HeadDorsal side*Caudal peduncleCaudal finVentral sideTotal score*Harvest weight*DtB*DtW*
Head0.21 ± 0.030.09 ± 0.0060.04 ± 0.0050.013 ± 0.0060.045 ± 0.0060.26 ± 0.0080.09 ± 0.01-0.001 ± 0.0010.0003 ± 0.0007
Dorsal side*0.70 ± 0.090.17 ± 0.030.054 ± 0.0050.024 ± 0.0050.08 ± 0.0060.30 ± 0.0070.055 ± 0.012-0.003 ± 0.001-0.0003 ± 0.0007
Caudal peduncle0.17 ± 0.13-0.04 ± 0.140.14 ± 0.030.043 ± 0.0050.08 ± 0.0060.26 ± 0.0070.014 ± 0.012-0.012 ± 0.0010.0009 ± 0.0007
Caudal fin-0.06 ± 0.13-0.05 ± 0.140.29 ± 0.130.17 ± 0.030.01 ± 0.0060.19 ± 0.0080.08 ± 0.01-0.007 ± 0.001-0.005 ± 0.0007
Ventral side0.20 ± 0.120.20 ± 0.120.49 ± 0.110.02 ± 0.130.25 ± 0.040.30 ± 0.001-0.15 ± 0.01-0.01 ± 0.0010.007 ± 0.0007
Total score*0.69 ± 0.070.61 ± 0.080.61 ± 0.090.34 ± 0.110.69 ± 0.060.20 ± 0.030.03 ± 0.01-0.012 ± 0.001-0.0014 ± 0.001
Harvest weight*0.27 ± 0.100.23 ± 0.10-0.18 ± 0.03-0.14 ± 0.11-0.35 ± 0.10-0.10 ± 0.100.44 ± 0.040.004 ± 0.001-0.01 ± 0.0007
DtB*0.31 ± 0.110.36 ± 0.11-0.34 ± 0.11-0.15 ± 0.12-0.35 ± 0.10-0.05 ± 0.110.42 ± 0.080.33 ± 0.040.01 ± 0.0004
DtW*0.18 ± 0.110.08 ± 0.120.30 ± 0.12-0.06 ± 0.130.41 ± 0.100.35 ± 0.11-0.44 ± 0.08-0.06 ± 0.110.23 ± 0.03

Genetic parameter estimates of score traits, image-derived shape traits, and harvest weight.

* Traits are estimated with fixed effect.

Diagonal: heritability. Above the diagonal: phenotypic correlations. Below the diagonal: genetic correlations. Plus-minus sign (±) indicates the standard error of the estimate. Green highlight indicates genetic correlations between anatomically neighboring traits.

4 Discussion

This study introduced a novel transformation of five subjective qualitative measurements of fish shape into objective quantitative shape traits. The five score traits collectively captured the preferred body shape in the breeding program, each focusing on a different morphological region. In contrast, the image-derived shape traits: Distance to the Best (DtB) and Distance to the Worst (DtW), were based on visual representations that summarize either the ideal or the less desired shapes of gilthead seabream.

Although manual visual scoring is prone to subjectivity, all five score traits were heritable, indicating that scoring was consistent and repeatable. Genetic correlations were stronger between neighboring traits (ranging from –0.10 to 0.70, Table 4, green highlight) than between non-neighboring traits (–0.15 to 0.17), with possible biological explanations. For instance, a good ventral side often indicates low visceral fat content, so the caudal peduncle may also tend to be leaner. However, the assessment of one region may also influence the scoring of adjacent regions, resulting in similar regional scores.

Scores may become biased due to differences in the average level between batches. Batch effect was significant for dorsal side, total score, harvest weight, and both image-derived shape traits. In batches with lower quality, average assigned scores could be biased upwards. Such bias may lead to unequal numbers of score 3 and score 1 fish per batch contributing to the average best and average worst contour, respectively. Consequently, fish from certain batches might have lower DtB and higher DtW as their batch score is on average higher.

Notably, the image-derived shape trait Distance to the Best (DtB) exhibited the highest heritability among all score and shape traits. This suggests that DtB could offer greater potential for genetic gain if used as an indicator trait for selection, compared to individual score traits. Our results highlight a crucial point: combining scores from different regions may not realistically represent the overall shape evaluation and could lead to unfavorable selection consequences. For example, the genetic correlation between total score and harvest weight was close to 0, suggesting trivial effect on harvest weight when selecting for overall shape based on total score. In contrast, DtB shows a moderate positive genetic correlation (0.40 ± 0.08) with harvest weight, unfavorable for improving production together with shape. Furthermore, the genetic correlation between DtB and total score (−0.05 ± 0.11) is smaller than that between DtW and total score (0.35 ± 0.11), suggesting that DtW captured more genetic variance in the total score than DtB, which aligns with the larger phenotypic variation in DtW per total score.

Both DtB and DtW open new avenues for shape-related breeding, especially in the areas of automated phenotyping and economic evaluation. In this study, DtB was derived from the average ideal shape calculated from the best shapes present in the population, based on expert annotation. As more images are collected, the algorithm could select new images based on the established preferences and update the reference contour based on similarity to the current average best. This approach can reduce the need for iterative manual grading and annotation, which is often required for every batch and generation. In other situations, the target shape could be defined independently of the current population, for example, by referencing the natural shape of wild fish or shapes preferred in ornamental species.

Furthermore, multiple subtypes of undesirable shapes, such as specific deformities or disproportions, can potentially be identified by applying clustering methods to the images of fish with a low total score. The genetic variance in the total score captured by DtW suggests that DtW currently provides only a crude assessment of undesirable shapes that are visually distinct from one another. If clear clusters of undesirable shapes exist, the distances of individual fish to the average contour of each cluster (DtW per cluster) could serve as a quantitative measure of deformity or other undesirable shapes, thereby enabling selection against several distinct categories of poor morphology.

At present, the shape of fish lacks direct economic evaluation. Shape preferences differ between markets and among farmers, retailers, processors, and consumers (Mehar et al., 2020), making its economic value difficult to quantify. In this study, the shape traits were derived based on expert scores, but the methodology can extend directly to applications that quantify shape differences between populations; a target shape based on consumer preference scores; or a target based on commercial data from product batches where shape or appearance plays a role in pricing. The visualization of average best and worst shapes allows breeders, as well as farmers and consumers, to perceive and understand the concept of shape ideals and to express their preferences. This intuitive, image-based approach can support surveys and other research into establishing economic values for shape. Alternatively, with our algorithm, any price-relevant preference for shape could be translated into quantitative traits, enabling estimation of genetic parameters and breeding values for selection candidates. Quantifying the value of shape differences would allow breeders to assign appropriate weights and formally incorporate shape into their selection index.

This study employed an innovative approach to visualize how image analysis derives heritable, descriptive shape traits. Conventional landmark-based methods capture shape and growth-related shape changes through predefined regions of interest (Fragkoulis et al., 2021), but are limited to separate anatomical points and may miss visually subtle shape variance. Elliptic Fourier Descriptors (EFDs) overcome this limitation by summarizing high-dimensional contour features (Valizadeh and Babapour Mofrad, 2022), yet their coefficients describe abstract curvature frequencies rather than discrete morphological structures, making their biological and genetic interpretation difficult. Combining EFDs with principal component analysis (PCA) can describe shape changes associated with specific morphological traits (Gayo et al., 2023), but the resulting principal components are orthogonal in phenotypic variance and therefore expected to show little or no genetic correlation among them. In contrast, our contour-based approach offers a balanced combination of interpretability and efficiency in overall shape variance analysis. By preserving the contour, it captures shape variance that landmarks overlook while retaining, through visualization, the biological interpretability that EFD coefficients and principal components lack. That said, for research focused on more targeted regions or specific anatomical features, a landmark-based approach is still recommended for higher precision in trait definition.

Furthermore, the advantages of shifting from categorical to continuous trait definitions are reflected by the increased heritability of DtB compared to that of score traits, likely due to higher data resolution. While total trait variance may be similar, low-resolution traits carry higher measurement error at the individual record level, leading to lower heritability estimates (Blonk et al., 2010). Continuous traits reduce this error and allow for greater selection intensity (Smith et al., 2021, Crain et al., 2017), as each individual measurement is more distinctive.

This study can also be extended beyond body shape to a broad range of traits, such as locomotion dynamics and behavioral phenotypes. Any recorded activity that can be represented as a continuous pattern may, in principle, be analyzed using a similar methodology. For instance, gait energy images that capture limb trajectories over time often have corresponding gait scores assigned by experts. In such images, contour geometry reflects multiple movement attributes, including stride length, limb extension, step frequency, and movement symmetry. By standardizing the observation time window, these images can be treated as closed contours, allowing lameness or locomotion quality to be quantified as the distance between an individual movement pattern and an average “ideal movement” reference derived from lameness scores. A similar approach can be applied to high-frequency sensor data, such as feeding activity or heart rate. These potential applications can help establish population-level baselines based on expert-derived ground truth, while reducing reliance on large volumes of manual annotation, which are often difficult to obtain and may be subjective, particularly for individuals near class boundaries. Transforming categorical scores into continuous quantitative traits can facilitate more accurate genetic parameter estimation, enhance selection response, and improve the integration of complex phenotypes into breeding programs.

5 Conclusion

This study demonstrated how to integrate automated image analysis into aquaculture breeding by quantifying fish body shape into two novel traits, Distance to the Best (DtB) and Distance to the Worst (DtW). By leveraging expert-defined shape preferences and contour-based methods, we established heritable, visually intuitive, and continuous traits. This approach provides an objective assessment of body shape with genetic evaluation, providing opportunities for economic valuation and alternative breeding goals, such as natural shape, or differences in shape ideals from farmers and consumers. Overall, this study represents a valuable step toward transforming categorical phenotypes into quantitative traits for better decision-making in selective breeding.

Statements

Data availability statement

The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.

Ethics statement

Ethical approval was not required for the study involving animals in accordance with the local legislation and institutional requirements because data was collected in Galaxidi Marine Farm S.A. who operates in full alignment with the ethical production methods for aquaculture. See https://www.galaxidi.com/giving-back/.

Author contributions

YX: Conceptualization, Formal analysis, Investigation, Methodology, Visualization, Writing – original draft, Writing – review & editing. GK: Writing – review & editing, Methodology, Supervision. HK: Conceptualization, Funding acquisition, Project administration, Resources, Supervision, Writing – review & editing. SK: Data curation, Methodology, Writing – review & editing. KT: Data curation, Methodology, Writing – review & editing. JB: Conceptualization, Data curation, Funding acquisition, Methodology, Project administration, Resources, Supervision, Writing – review & editing.

Funding

The author(s) declared that financial support was received for this work and/or its publication. This project receives financial support from Topsector Agri & Food.

Conflict of interest

Authors SK and KT are employed by Galaxidi Marine Farm S.A.

The remaining author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The author(s) declared that generative AI was not used in the creation of this manuscript.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher’s note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

References

  • 1

    BlidhH. (2021). pyefd 1.6.0 python packages.

  • 2

    BlokhuisH. J.VeissierI.MieleM.JonesB. (2010). The Welfare Quality® project and beyond: Safeguarding farm animal well-being. Acta Agriculturae Scand. Section A., 129–140. doi: 10.4324/9780203701737-6

  • 3

    BlonkR. J. W.KomenJ.TengheA.KamstraA.Van ArendonkJ. A. M. (2010). Heritability of shape in common sole, Solea solea, estimated from image analysis data. Aquaculture, 6–11. doi: 10.1016/j.aquaculture.2010.06.025

  • 4

    BradskiG.KaehlerA.others (2000). OpenCV. Dr. Dobb’s J. Software Tools.

  • 5

    BuczinskiS.BoccardoA.PravettoniD. (2011). Clinical scores in veterinary medicine: what are the pitfalls of score construction, reliability, and validation? A general methodological approach applied in cattle. Animals, 3244. doi: 10.3390/ani11113244

  • 6

    ButlerD. (2021). asreml: Fits the linear mixed model ( R. Package Version).

  • 7

    ColihuequeN.AranedaC. (2014). Appearance traits in fish farming: progress from classical genetics to genomics, providing insight into current and potential genetic improvement. Front. Genet., 251. doi: 10.3389/fgene.2014.00251

  • 8

    CollinH.FumagalliL. (2011). Evidence for morphological and adaptive genetic divergence between lake and stream habitats in European minnows (Phoxinus phoxinus, Cyprinidae). Mol. Ecol., 4490–4502. doi: 10.1111/j.1365-294x.2011.05284.x

  • 9

    CrainJ.ReynoldsM.PolandJ. (2017). Utilizing high-throughput phenotypic data for improved phenotypic selection of stress-adaptive traits in wheat. Crop Sci., 648–659. doi: 10.2135/cropsci2016.02.0135

  • 10

    DeBruineL. (2025). Faux: Simulation for Factorial Designs ( R package version 1.2.2).

  • 11

    DoğduA. S.TuranC. (2021). Genetic and morphological impact of the cultured gilthead sea bream (Sparus aurata Linnaeus 1758) populations on wild stocks. Egypt. J. Aquat. Biol. Fish., 499–511.

  • 12

    FernandesA. F. A.DóreaJ. R. R.de Magalhães RosaG. J. (2020). Image analysis and computer vision applications in animal sciences: an overview. Front. Vet. Sci., 551269. doi: 10.3389/fvets.2020.551269

  • 13

    FragkoulisS.et al. (2017). Scaling of body-shape quality in reared gilthead seabream Sparus aurata L. Consumer preference assessment, wild standard and variability in reared phenotype. Aquacult. Res., 2402–2410. doi: 10.1111/are.13076

  • 14

    FragkoulisS.KerasovitisD.BatargiasC.KoumoundourosG. (2021). Body-shape trajectories and their genetic variance component in gilthead seabream (Sparus aurata L.). Sci. Rep., 16964. doi: 10.1038/s41598-021-95726-9

  • 15

    FreitasM. V.et al. (2023). High-throughput phenotyping by deep learning to include body shape in the breeding program of pacu (Piaractus mesopotamicus). Sci. Rep., 738847. doi: 10.1016/j.aquaculture.2022.738847

  • 16

    GayoP.BerbelC.KoroziE.ZeroloR.ManChadoM. (2023). Assessment of body shape variation using Elliptic Fourier descriptors and ellipse fitting estimators and their genetic estimates in the flatfish Senegalese sole. Aquaculture, 739948. doi: 10.1016/j.aquaculture.2023.739948

  • 17

    GowerJ. C. (1975). Generalized procrustes analysis. Psychometrika, 33–51. doi: 10.1007/bf02291478

  • 18

    HayesG.MathewsK.KruthS.DoigG.DeweyC. (2010). Illness severity scores in veterinary medicine: what can we learn? J. Vet. Intern. Med., 457–466. doi: 10.1111/j.1939-1676.2010.0483.x

  • 19

    HigakiS.et al. (2024). Leveraging computer vision-based pose estimation technique in dairy cows for objective mobility analysis and scoring system. Comput. Electron. Agric., 108573. doi: 10.1016/j.compag.2023.108573

  • 20

    KestinS. C.KnowlesT. G.TinchA. E.GregoryN. G. (1992). Prevalence of leg weakness in broiler chickens and its relationship with genotype. Vet. Rec., 190–194. doi: 10.1136/vr.131.9.190

  • 21

    KirillovA.et al. (2023). “ Segment anything”, in: Proceedings of the IEEE/CVF International Conference on Computer Vision, 4015–4026.

  • 22

    KuhlF. P.GiardinaC. R. (1982). Elliptic Fourier features of a closed contour. Comput. Graphics Image Process., 236–258. doi: 10.1016/0146-664x(82)90034-x

  • 23

    LindbergS.-K.DurlandE.HeiaK.NobleC.AlvestadR.DiffordG. F. (2023). Digital scoring of welfare traits in Atlantic salmon (Salmo salar L.)-a proof of concept study quantifying dorsal fin haemorrhaging via hyperspectral imaging. Front. Anim. Sci., 1162384. doi: 10.3389/fanim.2023.1162384

  • 24

    LoyA.BusilacchiS.CostaC.FerlinL.CataudellaS. (2000). Comparing geometric morphometrics and outline fitting methods to monitor fish shape variability of Diplodus puntazzo (Teleostea: Sparidae). Aquacult. Eng., 271–283. doi: 10.1016/s0144-8609(99)00035-7

  • 25

    LuoD. (2024). Quantitative analysis of fish morphology through landmark and outline-based geometric morphometrics with free software. Bio-protocol. doi: 10.21769/bioprotoc.5087

  • 26

    MarcilJ.SwainD. P.HutchingsJ. A. (2006). Genetic and environmental components of phenotypic variation in body shape among populations of Atlantic cod (Gadus morhua L.). Biol. J. Linn. Soc, 351–365. doi: 10.1111/j.1095-8312.2006.00656.x

  • 27

    McMasterA. C. (2023). Genetic and environmental influences on morphological traits in salmonids. University of British Columbia. doi: 10.14288/1.0435723

  • 28

    MeharM.MekkawyW.McDougallC.BenzieJ. A. (2020). Fish trait preferences: a review of existing knowledge and implications for breeding programmes. Rev. Aquacult., 1273–1296. doi: 10.1111/raq.12382

  • 29

    MitteroeckerP.GunzP. (2009). Advances in geometric morphometrics. Evol. Biol., 235–247. doi: 10.1007/s11692-009-9055-x

  • 30

    MoccettiP.et al. (2023). Is shape in the eye of the beholder? Assessing landmarking error in geometric morphometric analyses on live fish. PeerJ, e15545. doi: 10.7717/peerj.15545

  • 31

    MojekwuT. O.AnumuduC. I. (2015). Advanced techniques for morphometric analysis in fish. J. Aquaculture Res. Dev., 1–6. doi: 10.4172/2155-9546.1000354

  • 32

    MørkøreT.et al. (2001). Fat content and fillet shape of Atlantic salmon: relevance for processing yield and quality of raw and smoked products. J. Food Sci., 1348–1354.

  • 33

    NdiwaT. C.NyingiD. W.AgnèseJ.-F. C. (2016). Morphological variations of wild populations of Nile tilapia (Oreochromis niloticus) living in extreme environmental conditions in the Kenyan Rift-Valley. Environ. Biol. Fishes, 473–485. doi: 10.1007/s10641-016-0492-y

  • 34

    NeethirajanS. (2020). The role of sensors, big data and machine learning in modern animal farming. Sens. Bio-Sens. Res., 100367. doi: 10.1016/j.sbsr.2020.100367

  • 35

    NortonT.ChenC.Vestbjerg LarsenM. L.BerckmansD. (2019). Precision livestock farming: Building ‘digital representations’ to bring the animals closer to the farmer. Animal, 3009–3017.

  • 36

    O'callaghanK. A.CrippsP. J.DownhamD. Y.MurrayR. D. (2003). Subjective and objective assessment of pain and discomfort due to lameness in dairy cattle. Anim. Welfare, 605–610.

  • 37

    ParkP. J.AguirreW. E.SpikesD. A.MiyazakiJ. M. (2013). Landmark-based geometric morphometrics: what fish shapes can tell us about fish evolution. Proc. Assoc. For. Biol. Lab. Educ., 361–371.

  • 38

    PearsonK. (1901). LIII. On lines and planes of closest fit to systems of points in space. London Edinburgh Dublin Philos. Magazine J. Sci., 559–572. doi: 10.1080/14786440109462720

  • 39

    PedregosaF.et al. (2011). Scikit-learn: machine learning in python. J. Mach. Learn. Res., 2825–2830.

  • 40

    R Core Team (2019). R: A Language and Environment for Statistical Computing Vol. 2014 (Vienna, Austria: R Foundation for Statistical Computing).

  • 41

    RusselloH.van der TolR.HolzhauerM.van HentenE. J.KootstraG. (2024). Video-based automatic lameness detection of dairy cows using pose estimation and multiple locomotion traits. Comput. Electron. Agric., 109040. doi: 10.1016/j.compag.2024.109040

  • 42

    RuttenC. J.VelthuisA. G. J.SteeneveldW.HogeveenH. (2013). Invited review: Sensors to support health management on dairy farms. J. Dairy Sci., 1928–1952. doi: 10.3168/jds.2012-6107

  • 43

    SmithB. A.CostaA. P.KristjánssonB. K.ParsonsK. J. (2024). Experimental evidence for adaptive divergence in response to a warmed habitat reveals roles for morphology, allometry and parasite resistance. Ecol. Evol., e10907. doi: 10.1002/ece3.10907

  • 44

    SmithD. T.PotgieterA. B.ChapmanS. C. (2021). Scaling up high-throughput phenotyping for abiotic stress selection in the field. Theor. Appl. Genet., 1845–1866. doi: 10.1007/s00122-021-03864-5

  • 45

    SprecherD. J.HostetlerD. E.KaneeneJ. B. (1997). A lameness scoring system that uses posture and gait to predict dairy cattle reproductive performance. Theriogenology, 1179–1187. doi: 10.1016/s0093-691x(97)00098-8

  • 46

    StephansenR. B.Manzanilla-PechC. I.GebreyesusG.SahanaG.LassenJ. (2023). Prediction of body condition in Jersey dairy cattle from 3D-images using machine learning techniques. J. Anim. Sci., skad376. doi: 10.1093/jas/skad376

  • 47

    SzycK.HebdaM.DembińskiK.ZdunekM.UnoldO. (2025). Video-based automated lameness detection for dairy cows. Sensors, 5771. doi: 10.3390/s25185771

  • 48

    ValizadehG.Babapour MofradF. (2022). A comprehensive survey on two and three-dimensional Fourier shape descriptors: biomedical applications. Arch. Comput. Methods Eng., 4643–4681. doi: 10.1007/s11831-022-09750-7

  • 49

    Van RossumG.DrakeF. L.others (1995). Python Reference Manual ( Centrum voor Wiskunde en Informatica Amsterdam).

  • 50

    VirtanenP.et al. (2020). SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat. Methods, 261–272. doi: 10.1038/s41592-019-0686-2

  • 51

    WaskomM. L. (2021). Seaborn: statistical data visualization. J. Open Source Software, 3021. doi: 10.21105/joss.03021

  • 52

    WimbergerP. H. (1992). Plasticity of fish body shape. The effects of diet, development, family and age in two species of Geophagus (Pisces: Cichlidae). Biol. J. Linn. Soc, 197–218. doi: 10.1111/j.1095-8312.1992.tb00640.x

  • 53

    XueY.et al. (2025). Genetic analysis of swimming performance in rainbow trout (Oncorhynchus mykiss) using image traits derived from deep learning. Aquaculture, 742607. doi: 10.2139/ssrn.4846005

Summary

Keywords

body shape, elliptic Fourier descriptor, objectivity, quantitative traits, score traits

Citation

Xue Y, Kootstra G, Komen H, Karapanagiotis S, Tsakoniti K and Bastiaansen JWM (2026) Transforming categorical scores to quantitative traits by automated image analysis increases fish shape heritability. Front. Anim. Sci. 7:1830206. doi: 10.3389/fanim.2026.1830206

Received

13 March 2026

Revised

18 May 2026

Accepted

22 May 2026

Published

26 June 2026

Volume

7 - 2026

Edited by

Francisco Javier Navas González, University of Cordoba, Spain

Reviewed by

Ana Azevedo, University of Porto, Portugal

Nimet Turgut, Selçuk University, Türkiye

Updates

Copyright

*Correspondence: Yuuko Xue,

†Present address: Yuuko Xue, Center for Quantitative Genetics and Genomics, Aarhus University, Aarhus, Denmark

Disclaimer

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.

Outline

Figures

Cite article

Copy to clipboard


Export citation file


Share article

Article metrics