Image Segmentation and Measurement of Trout Using a Convolutional Neural Network and Transformer Architecture

Aquaculture plays a vital role in meeting global food demands, necessitating technological innovations for sustainable production. This study investigates deep learning-based semantic image segmentation for enhanced monitoring of rainbow trout (<i>Oncorhynchus mykiss</i>) in Puno, Peru....

Full description

Saved in:
Bibliographic Details
Main Authors: Jose Cruz, Luis Baca, Raul Castillo, Eudes Apaza, Christian Romero, Ferdinand Pineda
Format: Article
Language:English
Published: MDPI AG 2025-06-01
Series:Applied Sciences
Subjects:
Online Access:https://www.mdpi.com/2076-3417/15/12/6873
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1849467562809622528
author Jose Cruz
Luis Baca
Raul Castillo
Eudes Apaza
Christian Romero
Ferdinand Pineda
author_facet Jose Cruz
Luis Baca
Raul Castillo
Eudes Apaza
Christian Romero
Ferdinand Pineda
author_sort Jose Cruz
collection DOAJ
description Aquaculture plays a vital role in meeting global food demands, necessitating technological innovations for sustainable production. This study investigates deep learning-based semantic image segmentation for enhanced monitoring of rainbow trout (<i>Oncorhynchus mykiss</i>) in Puno, Peru. We conducted three experiments using UNET and UNETR architectures, varying image resolution, loss functions, and optimizers on a dataset of 1200 high-resolution images. Experiment 1, with UNET and 256 × 256 pixel images, achieved an IoU of 0.942854 after 20 epochs, using MSELoss and Adam, demonstrating superior segmentation accuracy. Experiment 2, utilizing UNET with 512 × 512 pixel images, resulted in an IoU of 0.803244 after 50 epochs, with L1Loss and Adam, indicating satisfactory performance despite increased complexity. Experiment 3, employing UNETR with 256 × 256 pixel images, yielded lower IoU scores, with a best IoU of 0.253928, highlighting the challenge of training Transformer-based models with limited data. A critical aspect of this study was the use of a coin as a scale reference in all experiments, enabling precise conversion of pixel measurements to physical dimensions. This, combined with OpenCV for contour detection, allowed for accurate fish size estimations, validated by comparisons with real images. The results underscore UNET’s effectiveness for aquaculture image segmentation, while also emphasizing data requirements for UNETR. This approach provides a non-invasive, automated method for monitoring fish growth and health, contributing to sustainable aquaculture practices.
format Article
id doaj-art-fd6fbae2726142adaed84a050dcf32e3
institution Kabale University
issn 2076-3417
language English
publishDate 2025-06-01
publisher MDPI AG
record_format Article
series Applied Sciences
spelling doaj-art-fd6fbae2726142adaed84a050dcf32e32025-08-20T03:26:10ZengMDPI AGApplied Sciences2076-34172025-06-011512687310.3390/app15126873Image Segmentation and Measurement of Trout Using a Convolutional Neural Network and Transformer ArchitectureJose Cruz0Luis Baca1Raul Castillo2Eudes Apaza3Christian Romero4Ferdinand Pineda5E.P. Ingenieria Electronica, Universidad Nacional del Altiplano, Puno 21002, PeruE.P. Ingenieria Electronica, Universidad Nacional del Altiplano, Puno 21002, PeruE.P. Ingenieria Electronica, Universidad Nacional del Altiplano, Puno 21002, PeruE.P. Ingenieria Electronica, Universidad Nacional del Altiplano, Puno 21002, PeruE.P. Ingenieria Electronica, Universidad Nacional del Altiplano, Puno 21002, PeruE.P. Ingenieria Electronica, Universidad Nacional del Altiplano, Puno 21002, PeruAquaculture plays a vital role in meeting global food demands, necessitating technological innovations for sustainable production. This study investigates deep learning-based semantic image segmentation for enhanced monitoring of rainbow trout (<i>Oncorhynchus mykiss</i>) in Puno, Peru. We conducted three experiments using UNET and UNETR architectures, varying image resolution, loss functions, and optimizers on a dataset of 1200 high-resolution images. Experiment 1, with UNET and 256 × 256 pixel images, achieved an IoU of 0.942854 after 20 epochs, using MSELoss and Adam, demonstrating superior segmentation accuracy. Experiment 2, utilizing UNET with 512 × 512 pixel images, resulted in an IoU of 0.803244 after 50 epochs, with L1Loss and Adam, indicating satisfactory performance despite increased complexity. Experiment 3, employing UNETR with 256 × 256 pixel images, yielded lower IoU scores, with a best IoU of 0.253928, highlighting the challenge of training Transformer-based models with limited data. A critical aspect of this study was the use of a coin as a scale reference in all experiments, enabling precise conversion of pixel measurements to physical dimensions. This, combined with OpenCV for contour detection, allowed for accurate fish size estimations, validated by comparisons with real images. The results underscore UNET’s effectiveness for aquaculture image segmentation, while also emphasizing data requirements for UNETR. This approach provides a non-invasive, automated method for monitoring fish growth and health, contributing to sustainable aquaculture practices.https://www.mdpi.com/2076-3417/15/12/6873segmentationtroutUNETtransformer
spellingShingle Jose Cruz
Luis Baca
Raul Castillo
Eudes Apaza
Christian Romero
Ferdinand Pineda
Image Segmentation and Measurement of Trout Using a Convolutional Neural Network and Transformer Architecture
Applied Sciences
segmentation
trout
UNET
transformer
title Image Segmentation and Measurement of Trout Using a Convolutional Neural Network and Transformer Architecture
title_full Image Segmentation and Measurement of Trout Using a Convolutional Neural Network and Transformer Architecture
title_fullStr Image Segmentation and Measurement of Trout Using a Convolutional Neural Network and Transformer Architecture
title_full_unstemmed Image Segmentation and Measurement of Trout Using a Convolutional Neural Network and Transformer Architecture
title_short Image Segmentation and Measurement of Trout Using a Convolutional Neural Network and Transformer Architecture
title_sort image segmentation and measurement of trout using a convolutional neural network and transformer architecture
topic segmentation
trout
UNET
transformer
url https://www.mdpi.com/2076-3417/15/12/6873
work_keys_str_mv AT josecruz imagesegmentationandmeasurementoftroutusingaconvolutionalneuralnetworkandtransformerarchitecture
AT luisbaca imagesegmentationandmeasurementoftroutusingaconvolutionalneuralnetworkandtransformerarchitecture
AT raulcastillo imagesegmentationandmeasurementoftroutusingaconvolutionalneuralnetworkandtransformerarchitecture
AT eudesapaza imagesegmentationandmeasurementoftroutusingaconvolutionalneuralnetworkandtransformerarchitecture
AT christianromero imagesegmentationandmeasurementoftroutusingaconvolutionalneuralnetworkandtransformerarchitecture
AT ferdinandpineda imagesegmentationandmeasurementoftroutusingaconvolutionalneuralnetworkandtransformerarchitecture