/Minnow_Traits

Using trait segmentation to understand minnow trait evolution across an ecological gradient

Primary LanguageRMIT LicenseMIT

minnowTraits

We use a segmentation model to extract morphological traits from minnows (Family: Cyprinidae). We expand upon work already done by BGNN, including metadata collection (by the Tulane Team and Drexel Team, see Leipzig et al. 2021, Pepper et al. 2021, and Narnani et al. 2022) and a segementation model developed by the Virginia Tech Team. We incorporate these tools into the BGNN_Snakemake, develop new morphology extraction tools with the help of the Tulane Team, and present a case study.

minnowTraits_workflow

Goals

  • Highlight BGNN_Snakemake workflow
  • Show utility of using a machine learning segmentation model to accelerate trait extraction from images of specimens without sacrificing accuracy.

Folder Organization

Scripts

  • code used for image selection

Files

  • contains files used in the code

OSC

PDFs

  • papers relevant to the trait selection

Traits

  • csv for trait selection and definition
  • images to describe trait selection

Prelim Results

  • contains plots from preliminary statistics

Minnow image selection

The fish images are from the Great Lakes Invasives Network (GLIN) and stored on the Tulane server. We're using images specifically from the Illinois Natural History Survey (INHS images) and from the University of Wisconsin Zoological Museum (UWZM images).

Selection of images to run through the workflow

This section describes the creation of minnow.filtered.from.imagequalitymetadata_7Jun2022.csv using minnowSelectionImageQualityMetadata.R
R code (Minnows.R) was used to filter out high quality, minnow images using:

  • Image_Quality_Metadata_v1_202111206_151204.csv : list of fish, url species information
  • Image_Metadata_v1_20211206_151152.csv. : List of quality metadata including manually extracted information on the quality of the images and their content.

Those two lists are download from Tulane sever. The lists have been generated using the Tulane worflow.

List of criteria chosen :

  • family == "Cyprinidae"
  • specimen_viewing == "left"
  • straight_curved == "straight"
  • brightness == "normal"
  • color_issues == "none"
  • has_ruler == "True"
  • if_overlapping == "False"
  • if_focus == "True"
  • if_missing_parts == "False"
  • if_parts_visible == "True"
  • fins_folded_oddly == "False"
  • from either INHS or UWZM institutions
    • Note: there currently is not any image quality metadata for UWZM, so this institution is omitted
  • no duplicated original_file_names
  • removed any images that had an empty file or where the URL did not resolve
  • at least 10 images per species

The resulting dataset of 41 species and 6300 images.

We ignored if_background_uniform == "True" because it reduced the sample size too much.

The resulting dataset was then merged with the Image_Metadata_v1_20211206_151152.csv.

Selection of which segmented images to analyze

Each segmented image has the following traits: trunk, head, eye, dorsal fin, caudal fin, anal fin, pelvic fin, and pectoral fin. For each segmented trait, there may be more than one "blob", or group of pixels identifying a trait. We created a matrix of presence.absence.matrix.csv.

We removed images where a trait was missing. That removed only 40 images.

For each trait, we counted the number of blobs and the percentage of the largest blob. We analyzed this matrix using the selectionCriteriaSegmentedImages.R in Scripts and results can be found in the folder Preliminary Results.

Based on these results, we chose a criteria of blob size of 95% (that is, the biggest blob is 95% of the sum of all the blobs for a trait).

This results in 39 species and 4,663 images.

Selecting only the species in Burress et al. 2017, We are left with 446 images and 8 species

  • Notropis volcucellus (145)
  • Notropis texanus (97)
  • Notropis leuciodus (71)
  • Notropis rubellus (46)
  • Notropis photogenis (33)
  • Notropis baileyi (16)
  • Notropis ammophilus (15)
  • Notropis stilbius (23)

Analyses on segmented images

This section will describe the analyses

Minnow trait selection

These images below contain all the traits discussed by our team. This section outlines which traits we are focusing on for this study. We have created descriptions of the traits for measurements and landmarks.

Measurements

Minnow Measurements

All traits except head depth through the midline of the eye (HH) were done using both landmarks (with suffix "_lm") and a bounding box (with suffix "_bbox"). See Minnow_Measurements_Burress_et_al_2017.csv for descriptions of the measurements.

Standard length (SL): edge of head to beginning of caudal fin along nose line[ Nagel & Simons 2012; Burress et al. 2017].

Head length (HL): tip of snout to posterior tip of opercle; anterior-posterior length of head segmentation [Burress et al. 2017].

Eye diameter (ED): anterior-posterior length of eye segmentation [Burress et al. 2017].

Head height (HH): vertical distance of head dorso-ventrally through the center of the eye [called head depth in Burress et al. 2017].

Preorbital depth (pOD): anterior tip of head to anterior eye [called snout length (SnL) in Burress et al. 2017].

Landmarks

Fin and eye positions: a series of landmarks [Armbruster 2012]; we can use the segmentation to our advantage:

Minnow Landmarks

See Minnow_Landmarks_Burress_et_al_2017.csv for descriptions of the position of the landmarks.

  1. Anterior portion of head
  2. Posterior caudal fin connection with trunk
  3. Posterior part of head segmentation
  4. posterior of eye
  5. anterior of eye
  6. centroid of eye

###Trait extraction More information on trait extraction can be found on the Morphological Analysis repository