Intelligent Fish Detection System with Similarity-Aware Transformer
Shengchen Li, Haobo Zuo, Changhong Fu, Zhiyong Wang, Zhiqiang Xu
TL;DR
This work tackles the challenge of real-time, accurate fish detection in water-land transfer, where dense and visually similar fish impede conventional detectors. It introduces FishViT, a lightweight Transformer-based system with a ResNet18 backbone, a similarity-aware multi-level encoder (parallel branches with pooling positional encoding), and a soft-threshold attention mechanism that denoises backgrounds and sharpens fish edges. Key contributions include the STAttention module, a parallel multi-level encoder for robust multi-scale features, and an IoU-aware decoder for end-to-end detection, validated on a newly collected 85-sequence benchmark achieving up to 82 FPS and AP$_{50}$ of 94.7, with strong performance under challenging attributes. The proposed system demonstrates practical viability for on-device, high-speed fish detection, enabling downstream tasks such as tracking, sizing, and counting in real-world water-land transfer setups.
Abstract
Fish detection in water-land transfer has significantly contributed to the fishery. However, manual fish detection in crowd-collaboration performs inefficiently and expensively, involving insufficient accuracy. To further enhance the water-land transfer efficiency, improve detection accuracy, and reduce labor costs, this work designs a new type of lightweight and plug-and-play edge intelligent vision system to automatically conduct fast fish detection with high-speed camera. Moreover, a novel similarity-aware vision Transformer for fast fish detection (FishViT) is proposed to onboard identify every single fish in a dense and similar group. Specifically, a novel similarity-aware multi-level encoder is developed to enhance multi-scale features in parallel, thereby yielding discriminative representations for varying-size fish. Additionally, a new soft-threshold attention mechanism is introduced, which not only effectively eliminates background noise from images but also accurately recognizes both the edge details and overall features of different similar fish. 85 challenging video sequences with high framerate and high-resolution are collected to establish a benchmark from real fish water-land transfer scenarios. Exhaustive evaluation conducted with this challenging benchmark has proved the robustness and effectiveness of FishViT with over 80 FPS. Real work scenario tests validate the practicality of the proposed method. The code and demo video are available at https://github.com/vision4robotics/FishViT.
