arXiv:2610.01480cs.CVOct 2026

Manuscript Offprint

arXiv:2610.01480

FiVOS: A Fish Segmentation Algorithm Based on Interactive Video Object Segmentation and Filter Enhancement

Yuqing Duan, Song Zhang, Shili Zhao, Daoliang Li, Ran Zhao

Abstract

With the continuous expansion of aquaculture, precise and efficient monitoring of fish behavior has become increasingly critical for improving farming efficiency and reducing economic losses. In particular, with the ongoing enhancement of computational capabilities in deep learning models, vision-based fish segmentation methods are garnering growing attention. By analyzing video segmentation results, fish behavior can be effectively tracked, thereby providing reliable data support for the precise regulation of aquaculture environments. However, existing deep learning-based video segmentation methods for aquaculture scenarios often overlook the dynamic correlations between video frames. In contrast, Interactive Video Object Segmentation (IVOS) employs an interaction-propagation scheme to achieve high-precision segmentation while minimizing user effort, thereby enhancing monitoring efficiency. Yet, IVOS applications in aquaculture remain limited due to data scarcity, and are susceptible to error accumulation and mask loss over long sequence propagation due to high intra-class similarity. In response, this paper proposes an improved interactive video object segmentation method (FiVOS) and constructs two fish-specific datasets. FiVOS utilizes a mask block filter to enable early detection and correction of erroneous propagated mask blocks, enhancing filtering accuracy through a rule-based thresholding approach. Additionally, it serializes noise filters to further eliminate erroneous mask noise, thereby improving model robustness. Experimental results demonstrate that FiVOS achieves state-of-the-art (SOTA) performance in fish video segmentation tasks, providing robust technical support for fish behavior research.

Keywords: Intelligent Aquaculture, Fish Behavior Analysis, Interactive Video Object Segmentation, Space-Time Memory Networks, Fish characterization

1 Introduction

Information on fish characterization not only provides essential data support for the aquaculture sector, helping scientists and researchers better understand fish growth, health conditions, and behavioral patterns to optimize aquaculture management and resource allocation [1,2], but also serves as foundational data for studying fish adaptability in ecological environments, contributing to a deeper understanding of fish physiology and behavioral characteristics [3].

However, conventional methods, such as manual observation, direct identification, and sensory evaluation, face notable limitations in data acquisition efficiency and accuracy, and may even adversely affect fish welfare and growth. Thus, there is an urgent need for advanced techniques to efficiently extract fish characterization information. The rise and development of computer vision and artificial intelligence technologies have introduced efficient and non-invasive solutions for extracting fish characterization information. In recent years, researchers have conducted extensive exploration of image data through computer vision technologies, using techniques such as segmentation, object detection, and object tracking [4–6]. These techniques have initially facilitated the development of various fish-related models, such as fish identification [7, 8], behavior analysis [9, 10], and quantity estimation [11], among others [12–14]. Meanwhile, the integration of video data has further propelled research in fish characterization. Video data holds significant value not only in fish behavior analysis, health monitoring, and ecosystem observation but also in unveiling fish behavior patterns, social structures, and ecological adaptability across different environmental conditions [15, 16]. Through the analysis of fish video data, researchers can gain a deeper understanding of fish stress responses, feeding habits, and reproductive behaviors, establishing a critical foundation for more precise tracking and analysis of fish activity patterns. Although fish characterization research has made substantial progress in aquaculture and ecology, significant challenges remain in efficiently and accurately extracting dynamic behavior features of fish, particularly in complex aquatic environments. Consequently, this study presents an interactive fish video object segmentation method tailored for aquaculture scenarios, designed to enhance the accuracy and efficiency of fish characterization information extraction. This method offers a novel tool for identifying and analyzing fish behavior and health status, holding significant implications for intelligent aquaculture management.

In recent years, fish behavior monitoring has gained significant attention in aquaculture and ecological conservation. Researchers have developed various segmentation, recognition, and tracking models to extract fish characterization information from video data, addressing the needs of automated monitoring and behavior analysis. These studies have laid a solid foundation for the development of algorithmic models [17]. Rapid identification of abnormal behavior in fish is crucial for aquaculture management. Early fish behavior monitoring research was largely based on traditional computer vision techniques such as frame differencing, background subtraction, and optical flow [18, 19]. However, these methods have difficulty capturing fish motion information along the depth axis, which affects the accuracy of behavior analysis. For instance, VM Papadakis et al. [20] employed background subtraction to detect changes in fish speed and position, analyzing escape and net-biting behaviors. Nonetheless, because it is limited to a two-dimensional plane, this method could not fully leverage the depth information of fish swimming, a crucial behavioral characteristic. To enhance the comprehensive capture of fish swimming information, Pedersen et al. [21] developed an RGB 3D video dataset of zebrafish and applied background subtraction and head localization to detect fish head positions, enabling three-dimensional trajectory reconstruction. However, this method is prone to target loss during detection and tracking, which decreases detection accuracy. To tackle this challenge, Weiran Li et al. [22] developed a multi-fish tracking model (TFMFT) based on the Transformer architecture [23], which effectively overcomes tracking loss in complex backgrounds, thereby enhancing accuracy in individual trajectory monitoring and health evaluation. Although these methods have achieved satisfactory results, their ability to identify local abnormal behaviors remains limited. To address this issue, Jian Zhao et al. [24] employed a combination of an improved Motion Influence Map and a Recurrent Neural Network (RNN) to systematically detect, locate, and identify local abnormal behaviors of fish in intensive aquaculture environments, markedly improving the accuracy of local abnormal behavior detection in dense conditions. In summary, fish behavior monitoring technology has progressed from traditional methods to extensive applications of deep learning, offering effective tools for precise monitoring in complex aquatic and dense aquaculture environments, thus promoting the realization of automation and efficiency.

Video Object Segmentation (VOS) is designed to perform high-quality foreground/background segmentation of target objects in video sequences, with wide applications in video analysis, comprehension, and editing. Based on the degree of user intervention, VOS methods are divided into Automatic Video Object Segmentation (AVOS), Semi-automatic Video Object Segmentation (SVOS), and Interactive Video Object Segmentation (IVOS). IVOS facilitates the segmentation process with simple user interactions (e.g., points, scribbles, or bounding boxes), achieving efficient segmentation of target objects at a low annotation cost, which offers distinct advantages in flexibly segmenting specific objects. In earlier studies [25], IVOS was implemented by combining two separate modules: an interactive image segmentation model [26,27] to generate a target mask for a single frame based on user annotations, and an SVOS model [28,29] to propagate this mask from the annotated frame to other frames. Later, SW Oh proposed a more compact solution [30], where the model still used two separate modules for interaction and propagation, but incorporated internal connections through intermediate feature exchange and introduced external conditional links, enabling cooperation between the two modules. In IVOS-ATNet [31], this design was continued, with further optimization of the propagation module to separately handle tracking and propagation of lo-cal (neighboring frames) and global (distant frames) masks. However, these methods [25,31] require re-running forward computations in each interaction round, leading to a gradual decline in efficiency as interaction rounds increase. To enhance efficiency, MA-Net [32] proposed a more efficient solution, centered on generating pixel embedding features through a unified encoder at the initial stage, and introducing two small branch networks for interactive segmentation and mask propagation. This model extracts pixel embeddings for all frames only in the initial round, while subsequent rounds perform forward computations solely within the two shallow branches, significantly boosting interaction efficiency. In summary, IVOS enables real-time interaction between user and task, offering high flexibility, rapid response, and low annotation costs, making it a practical solution for fish behavior detection.

Current methods for fish behavior analysis do not deeply utilize dynamic correlations between video frames and lack specific object focus, making it prone to interference when capturing individual fish behavior characteristics. This limitation is particularly evident in multi-object environments, where target confusion and feature loss are common issues. In comparison, interactive video object segmentation provides an advantage by focusing on specific objects, allowing for more targeted tracking. Nevertheless, while current interactive video object segmentation algorithms excel on public datasets, they encounter challenges in fish farming environments, not only due to data scarcity but also from interference by complex factors such as water flow and lighting, which make high precision difficult to sustain. Even after multiple rounds of interactive correction, segmentation accuracy remains limited. Furthermore, in fish farming, it is common to concentrate fish of the same species and growth stage within the same environment. This practice leads to high intra-class similarity between individuals, making it difficult to distinguish them during propagation and intensifying the error accumulation effect in interactive video segmentation. As illustrated in Fig. 1. Interactive video object segmentation also faces the problem of “catastrophic forgetting”, which refers to the potential loss of target masks during long-sequence propagation.

To address the aforementioned issues, this paper introduces an innovative interactive

Figure

Fig. 1: Users annotate a single frame with simple clicks or scribbles (red for positive, yellow for negative), generating a high-precision mask via Scribble-to-Mask (S2M). The propagation module then propagates the mask throughout the video sequence. The two rows on the right compare the propagation results of the baseline model and FiVOS. Unlike the baseline, which suffers from irreversible error accumulation, FiVOS effectively mitigates this issue.

video object segmentation method (FiVOS) and develops two fish-specific datasets for training FiVOS. The first dataset contains static images of 1,350 fish instances, offering a wealth of fish appearance features. The second pseudo-dynamic dataset comprises 23 image sequences, with each sequence containing 10 consecutive frames to capture fish motion characteristics. Both datasets include pixel-level mask annotations, offering precise supervisory information for model training. In the FiVOS method, to alleviate error accumulation due to high intra-class similarity, a specialized mask block filter is designed, enabling the model to detect and filter erroneous mask blocks early in the propagation process. To further eliminate residual erroneous noise potentially left by the mask block filter, this method incorporates a noise filter equipped with median filtering to remove erroneous mask noise, thereby enhancing the model's robustness. Finally, a rule-based thresholding method is employed to set the optimal distance threshold, enhancing the accuracy of erroneous mask detection. The contributions of this paper include the following:

  1. This paper proposes an interactive video object segmentation method for aquaculture, termed FiVOS. This method achieves state-of-the-art (SOTA) performance on fish videos, offering a powerful tool for fish behavior feature analysis.

  2. A novel filtering scheme is introduced for the detection and correction of erroneous mask blocks. This scheme comprises a serial arrangement of a mask block filter and a noise filter, which enhances the accuracy of generated masks by refining dynamically generated coarse masks during propagation. It substantially improves segmentation performance for tasks with high intra-class similarity and in challenging environments.

  3. Two fish-specific datasets were developed for FiVOS training: a static image dataset containing 1,350 fish instances, and a pseudo-dynamic dataset comprising 23 image sequences extracted from videos, with each sequence containing 10 consecutive frames to capture local movement characteristics of fish.

References (26)