Fig 1.
Examples of the types of pattern element present in dataset 1.
Spots are pattern elements that develop a single spot of color. Eyespots are pattern elements that develop spots and rings of color. These include discal and marginal eyespots. The first are eyespots that develop around a cross-vein and are found in the center of the wing, and the second develop closer to the margin of the wing. (a) Spots. (b) Eyespots.
Fig 2.
Illustration of ground truth created for Bicyclus anynana wing image, where white regions correspond to areas we wish to measure and for which we also have obtained manual measurements.
(a) The original RGB image with two marginal eyespots. (b) Image with ground truth circles superimposed on each eyespot. (c) Large eyespot crop resized to 128x128 pixels. (d) Large eyespot center ground truth mask. (e) Large eyespot rings ground truth mask. (f) Small eyespot crop resized to 128x128 pixels. (g) Small eyespot center ground truth mask. (h) Small eyespot rings ground truth mask.
Fig 3.
Overview of the two CNNs approach for first detecting and then measuring, spots or eyespots on images of butterfly wings.
Table 1.
Number of pattern elements of each type in the training/validation and test set for dataset1.
Fig 4.
Examples of images from dataset1.
Image of a complete butterfly and two butterfly images with left wing erased.
Table 2.
Scores achieved by YOLO, RetinaNet and EfficienDet-D0 models for the three eyespot detection tasks on the test data from dataset1.
Table 3.
Scores achieved by the three RetinaNet models for eyespot detection on dataset2.
Table 4.
Evaluation of U-Net segmentation models trained with different cost functions (CCE and WCCE).
Fig 5.
Example of U-Net segmentation results using different number of classes and cost functions.
(a) Original RGB eyespot image and its two-class ground truth segmentation, (b) Predicted segmentation using CE loss function and corresponding contours. (c) Predicted segmentation using weighted CE loss function and corresponding contours. (d) Original RGB eyespot image and its ground truth segmentation, (e) Predicted segmentation using CE loss function and corresponding contours. (f) Predicted segmentation using weighted CE loss function and corresponding contours.
Table 5.
Comparison of our U-Net segmentation models with U-net models trained on the entire wings.
Table 6.
Average error and error standard deviation between manual and automatic measurements of the total eyespot and center areas.
Relative errors and errors in mm2 are presented.
Fig 6.
Left column shows detections of the two-class model (spots in pink and eyespots in orange), middle column shows detections of one-class (no distinction between spot or eyespot types) and right column shows detections of “Marginal eyespots only” RetinaNet. The first image in a row is annotated for the ground truth (GT) in terms of total number of spots (S) and eyespots (E), with eyespots marked with white arrows, and spots with pink arrows. In the other images we score the true positives (TP), the false negatives (FN) and the false positives (FP) and we add an asterisk (*) next to the undetected or misclassified pattern elements.