FDMNet: A Multi-Task Network for Joint Detection and Segmentation of Three Fish Diseases
Abstract
1. Introduction
- We present FDMNet, a lightweight multi-task model that integrates a YOLOv8 detection head and a semantic segmentation branch to simultaneously detect and segment three fish diseases (bacterial hemorrhagic septicemia, saprolegniasis, and fish lice).
- We adapt the C2DF module by integrating dynamic feature fusion into C2f blocks. C2DF replaces C2f modules in the neck and the segmentation branch, improving the local-detail representation and boundary modelling.
- The study adopts a multi-task optimisation strategy that combines uncertainty-based loss weighting with PCGrad to improve training stability and reduce inter-task gradient interference.
- This study developed a multi-disease fish image dataset and evaluated all modules used in the dataset. We compared FDMNet with Faster R-CNN, YOLOv8n, YOLOv11n, RT-DETR, YOLO-FD, and Mask R-CNN for the detection task. We compared FDMNet with U-Net, DeepLabv3-ResNet50, DeepLabv3+-ResNet50, YOLO-FD and Mask R-CNN for the segmentation task. On our dataset, FDMNet achieved competitive performance on both tasks, aligning with the needs of image-based fish disease diagnosis.
2. Related Work
3. Materials and Methods
3.1. Dataset Acquisition
3.2. Overall Structure of FDMNet
3.2.1. C2DF Module
3.2.2. Multi-Scale Semantic Segmentation Branch
3.3. Multi-Task Optimisation Strategy
3.3.1. Weight Uncertainty
3.3.2. PCGrad
4. Results
4.1. Experimental Details
4.2. Experimental Results
4.2.1. Evaluation Metrics
4.2.2. Object Detection Results
4.2.3. Semantic Segmentation Results
4.3. Ablation Experiments
5. Discussion
5.1. Model Evaluation
5.2. Model Limitations and Future Work
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Jiang, Q.J.; Wu, M.M.; Zhang, D.Y. Evidence of the Contribution of the Technological Progress on Aquaculture Production for Economic Development in China-Research Based on the Transcendental Logarithmic Production Function Method. Agriculture 2023, 13, 544. [Google Scholar] [CrossRef]
- Verdegem, M.; Buschmann, A.H.; Latt, U.W.; Dalsgaard, A.J.T.; Lovatelli, A. The contribution of aquaculture systems to global aquaculture production. J. World Aquac. Soc. 2023, 54, 206–250. [Google Scholar] [CrossRef]
- Garlock, T.M.; Asche, F.; Anderson, J.L.; Eggert, H.; Anderson, T.M.; Che, B.; Chavez, C.A.; Chu, J.J.; Chukwuone, N.; Dey, M.M.; et al. Environmental, economic, and social sustainability in aquaculture: The aquaculture performance indicators. Nat. Commun. 2024, 15, 5274. [Google Scholar] [CrossRef] [PubMed]
- Li, D.L.; Li, X.; Wang, Q.; Hao, Y.F. Advanced Techniques for the Intelligent Diagnosis of Fish Diseases: A Review. Animals 2022, 12, 2938. [Google Scholar] [CrossRef]
- Ina-Salwany, M.Y.; Al-saari, N.; Mohamad, A.; Mursidi, F.A.; Mohd-Aris, A.; Amal, M.N.A.; Kasai, H.; Mino, S.; Sawabe, T.; Zamri-Saad, M. Vibriosis in Fish: A Review on Disease Development and Prevention. J. Aquat. Anim. Health 2019, 31, 3–22. [Google Scholar] [CrossRef]
- Zhao, S.L.; Zhang, S.; Liu, J.C.; Wang, H.; Zhu, J.; Li, D.L.; Zhao, R. Application of machine learning in intelligent fish aquaculture: A review. Aquaculture 2021, 540, 736724. [Google Scholar] [CrossRef]
- Ziarati, M.; Zorriehzahra, M.J.; Hassantabar, F.; Mehrabi, Z.; Dhawan, M.; Sharun, K.; Bin Emran, T.; Dhama, K.; Chaicumpa, W.; Shamsi, S. Zoonotic diseases of fish and their prevention and control. Vet. Q. 2022, 42, 95–118. [Google Scholar] [CrossRef]
- Li, K.; Jiang, R.T.; Qiu, J.Q.; Liu, J.L.; Shao, L.; Zhang, J.H.; Liu, Q.G.; Jiang, Z.J.; Wang, H.; He, W.H.; et al. How to control pollution from tailwater in large scale aquaculture in China: A review. Aquaculture 2024, 590, 741085. [Google Scholar] [CrossRef]
- Anjur, N.; Sabran, S.F.; Daud, H.M.; Othman, N.Z. An update on the ornamental fish industry in Malaysia: Aeromonas hydrophila-associated disease and its treatment control. Vet. World 2021, 14, 1143–1152. [Google Scholar] [CrossRef] [PubMed]
- Wang, C.; Li, Z.; Wang, T.; Xu, X.B.; Zhang, X.S.; Li, D.L. Intelligent fish farm-the future of aquaculture. Aquac. Int. 2021, 29, 2681–2711. [Google Scholar] [CrossRef] [PubMed]
- Liu, H.C.; Ma, X.; Yu, Y.N.; Wang, L.; Hao, L. Application of Deep Learning-Based Object Detection Techniques in Fish Aquaculture: A Review. J. Mar. Sci. Eng. 2023, 11, 867. [Google Scholar] [CrossRef]
- Ahmed, M.S.; Aurpa, T.T.; Azad, M.A. Fish Disease Detection Using Image Based Machine Learning Technique in Aquaculture. J. King Saud Univ.-Comput. Inf. Sci. 2022, 34, 5170–5182. [Google Scholar] [CrossRef]
- Waleed, A.; Medhat, H.; Esmail, M.; Osama, K.; Samy, R.; Ghanim, T.M. Automatic Recognition of Fish Diseases in Fish Farms. In Proceedings of the 2019 14th International Conference on Computer Engineering and Systems (ICCES), Cairo, Egypt, 17 December 2019; pp. 201–206. [Google Scholar]
- Islam, S.I.; Ahammad, F.; Mohammed, H. Cutting-edge technologies for detecting and controlling fish diseases: Current status, outlook, and challenges. J. World Aquac. Soc. 2024, 55, e13051. [Google Scholar] [CrossRef]
- Yu, G.; Zhang, J.; Chen, A.; Wan, R. Detection and Identification of Fish Skin Health Status Referring to Four Common Diseases Based on Improved YOLOv4 Model. Fishes 2023, 8, 186. [Google Scholar] [CrossRef]
- Hamzaoui, M.; Ould-Elhassen Aoueileyine, M.; Romdhani, L.; Bouallegue, R. An Improved Deep Learning Model for Underwater Species Recognition in Aquaculture. Fishes 2023, 8, 514. [Google Scholar] [CrossRef]
- Zhou, S.Y.; Cai, K.W.; Feng, Y.H.; Tang, X.M.; Pang, H.S.; He, J.Q.; Shi, X. An Accurate Detection Model of <i>Takifugu rubripes</i> Using an Improved YOLO-V7 Network. J. Mar. Sci. Eng. 2023, 11, 1051. [Google Scholar] [CrossRef]
- Li, Y.J.; Hu, Z.Y.; Zhang, Y.X.; Liu, J.H.; Tu, W.; Yu, H. DDEYOLOv9: Network for Detecting and Counting Abnormal Fish Behaviors in Complex Water Environments. Fishes 2024, 9, 242. [Google Scholar] [CrossRef]
- Cai, Y.Y.; Yao, Z.K.; Jiang, H.B.; Qin, W.; Xiao, J.; Huang, X.X.; Pan, J.J.; Feng, H. Rapid detection of fish with SVC symptoms based on machine vision combined with a NAM-YOLO v7 hybrid model. Aquaculture 2024, 582, 740558. [Google Scholar] [CrossRef]
- Zhang, J.S.; Wang, Y. A New Workflow for Instance Segmentation of Fish with YOLO. J. Mar. Sci. Eng. 2024, 12, 1010. [Google Scholar] [CrossRef]
- Long, W.; Wang, Y.W.; Hu, L.X.; Zhang, J.T.; Zhang, C.; Jiang, L.H.; Xu, L.H. Triple Attention Mechanism with YOLOv5s for Fish Detection. Fishes 2024, 9, 151. [Google Scholar] [CrossRef]
- Ben Tamou, A.; Benzinou, A.; Nasreddine, K. Targeted Data Augmentation and Hierarchical Classification with Deep Learning for Fish Species Identification in Underwater Images. J. Imaging 2022, 8, 214. [Google Scholar] [CrossRef]
- Li, D.S.; Yang, Y.F.; Zhao, S.W.; Yang, H.H. A fish image segmentation methodology in aquaculture environment based on multi-feature fusion model. Mar. Environ. Res. 2023, 190, 106085. [Google Scholar] [CrossRef]
- Kong, J.L.; Tang, S.N.; Feng, J.M.; Mo, L.P.; Jin, X.B. AASNet: A Novel Image Instance Segmentation Framework for Fine-Grained Fish Recognition via Linear Correlation Attention and Dynamic Adaptive Focal Loss. Appl. Sci. 2025, 15, 3986. [Google Scholar] [CrossRef]
- Cai, X.J.; Zhu, Y.; Liu, S.W.; Yu, Z.Y.; Xu, Y.Y. FastSegFormer: A knowledge distillation-based method for real-time semantic segmentation of surface defects in navel oranges. Comput. Electron. Agric. 2024, 217, 108604. [Google Scholar] [CrossRef]
- Paul, S.; Patterson, Z.; Bouguila, N. FishSegSSL: A Semi-Supervised Semantic Segmentation Framework for Fish-Eye Images. J. Imaging 2024, 10, 71. [Google Scholar] [CrossRef] [PubMed]
- Li, X.F.; Zhao, S.L.; Chen, C.L.; Cui, H.W.; Li, D.L.; Zhao, R. YOLO-FD: An accurate fish disease detection method based on multi-task learning. Expert Syst. Appl. 2024, 258, 125085. [Google Scholar] [CrossRef]
- Wang, Y.; Zhang, H.W.; Fu, J.X.; Tian, H. MSCB-UNet: Elevating skin lesion segmentation performance with Multi-scale Spatial-Channel Bridging Network. Biomed. Signal Process. Control. 2025, 110, 107986. [Google Scholar] [CrossRef]
- Xiao, T.T.; Liu, Y.C.; Zhou, B.L.; Jiang, Y.N.; Sun, J. Unified Perceptual Parsing for Scene Understanding. In Proceedings of the 15th European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 432–448. [Google Scholar]
- Kendall, A.; Gal, Y.; Cipolla, R. Multi-Task Learning Using Uncertainty to Weigh Losses for Scene Geometry and Semantics. In Proceedings of the 31st IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–23 June 2018; pp. 7482–7491. [Google Scholar]
- Yu, T.; Kumar, S.; Gupta, A.; Levine, S.; Hausman, K.; Finn, C. Gradient Surgery for Multi-Task Learning. arXiv 2020, arXiv:2001.06782. [Google Scholar] [CrossRef]
Disease Type | Images | Train | Validation | Test | Objects | Masks |
---|---|---|---|---|---|---|
bacterial hemorrhagic septicemia | 528 | 370 | 106 | 52 | 989 | 1002 |
saprolegniasis | 512 | 358 | 102 | 52 | 913 | 925 |
fish lice | 508 | 355 | 102 | 51 | 907 | 919 |
Healthy | 600 | 420 | 120 | 60 | 0 | 0 |
Total | 2148 | 1503 | 430 | 215 | 2809 | 2846 |
Configuration | Parameter |
---|---|
CPU | 12th Gen Intel Core i7-12800HX (Intel, Santa Clara, CA, USA) |
GPU | NVIDIA GeForce RTX 4070 |
Operating system | Windows 11 |
Accelerated environment | CUDA Toolkit: 12.4 |
Development environment | Visual Studio Code |
Deep learning framework | PyTorch 2.5.0 |
Algorithms | Precision | Recall | mAP50 | Parameters (M) | Speed |
---|---|---|---|---|---|
Faster R-CNN | 0.742 | 0.694 | 0.834 | 41.3 M | 9.6 ms |
YOLOv8n | 0.914 | 0.907 | 0.936 | 3.2 M | 3.8 ms |
YOLOv11n | 0.892 | 0.855 | 0.928 | 2.59 M | 4.3 ms |
RT-DETR | 0.961 | 0.770 | 0.961 | 43.7 M | 14.5 ms |
Mask R-CNN | 0.762 | 0.709 | 0.831 | 37.7 M | 65.9 ms |
YOLO-FD | 0.933 | 0.898 | 0.945 | 3.23 M | 5.9 ms |
FDMNet | 0.953 | 0.921 | 0.970 | 3.33 M | 6.8 ms |
Algorithms | mIoU | Params | FLOPs | Speed |
---|---|---|---|---|
U-Net | 0.648 | 4.3 M | 40.1 G | 18.6 ms |
Deeplabv3-MobileNet | 0.719 | 5.1 M | 5.8 G | 7.4 ms |
Deeplabv3-ResNet50 | 0.734 | 39.6 M | 51.1 G | 23.5 ms |
Deeplabv3+-MobileNet | 0.751 | 5.2 M | 16.8 G | 8.0 ms |
Deep-labv3+-ResNet50 | 0.767 | 39.9 M | 62.4 G | 28.1 ms |
Mask R-CNN | 0.695 | 37.7 M | 95.7 G | 65.9 ms |
YOLO-FD | 0.803 | 3.23 M | 14.7 G | 5.9 ms |
FDMNet | 0.857 | 3.33 M | 15.1 G | 6.8 ms |
Algorithms | Precision | Recall | mAP50 | mIoU |
---|---|---|---|---|
Det only | 0.914 | 0.907 | 0.936 | — |
Seg only | — | — | — | 0.808 |
Multi-task (C2f) | 0.933 | 0.898 | 0.945 | 0.823 |
Multi-task (C2DF) | 0.953 | 0.921 | 0.970 | 0.857 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Liu, Z.; Yan, Z.; Li, G. FDMNet: A Multi-Task Network for Joint Detection and Segmentation of Three Fish Diseases. J. Imaging 2025, 11, 305. https://doi.org/10.3390/jimaging11090305
Liu Z, Yan Z, Li G. FDMNet: A Multi-Task Network for Joint Detection and Segmentation of Three Fish Diseases. Journal of Imaging. 2025; 11(9):305. https://doi.org/10.3390/jimaging11090305
Chicago/Turabian StyleLiu, Zhuofu, Zigan Yan, and Gaohan Li. 2025. "FDMNet: A Multi-Task Network for Joint Detection and Segmentation of Three Fish Diseases" Journal of Imaging 11, no. 9: 305. https://doi.org/10.3390/jimaging11090305
APA StyleLiu, Z., Yan, Z., & Li, G. (2025). FDMNet: A Multi-Task Network for Joint Detection and Segmentation of Three Fish Diseases. Journal of Imaging, 11(9), 305. https://doi.org/10.3390/jimaging11090305