FishSeg: 3D Fish Tracking Using Mask R-CNN in Large Ethohydraulic Flumes
Abstract
:1. Introduction
2. Fish Videos
3. 3D Fish Tracking
3.1. Stereo Camera Calibration
3.2. Background Subtraction
3.3. Automated Fish Detection and Tracking
3.3.1. FishSeg Architecture
- The frame is passed through a convolutional network;
- The output of the first Conv Nets is fed to the Region Proposal Network (RPN), which creates different anchor boxes (Regions Of Interest, ROI) for any detected objects;
- The anchor boxes are passed through to the ROI Align stage, which converts ROIs into the same size required for further processing;
- The outputs of the normalized ROIs are sent to fully connected layers, which classify the object in the specific region and locate the position of the bounding box;
- The outputs from the ROI Align stage are parallelly sent to Conv Nets in order to generate a mask of the object pixels.
3.3.2. Application of FishSeg in Fish Tracking
3.3.3. Converting Masks to Tracks
3.4. Conversion into 3D Flume Coordinates
4. Results
5. Discussion
5.1. Improvements and Limitations of FishSeg
5.2. Comparison with Other R-CNN-Based Models
6. Conclusions
Supplementary Materials
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Albayrak, I.; Boes, R.M.; Kriewitz, C.R.; Peter, A.; Tullis, B.P. Fish guidance structures: Hydraulic performance and fish guidance efficiencies. J. Ecohydraulics 2020, 5, 113–131. [Google Scholar] [CrossRef]
- Beck, C.; Albayrak, I.; Meister, J.; Peter, A.; Boes, R.M. Swimming Behavior of Downstream Moving Fish at Innovative Curved-Bar Rack Bypass Systems for Fish Protection at Water Intakes. Water 2020, 12, 3244. [Google Scholar] [CrossRef]
- Silva, A.T.; Lucas, M.C.; Castro-Santos, T.; Katapodis, C.; Baumgartner, L.J.; Thiem, J.D.; Aarestrup, K.; Pompeu, P.S.; O’brien, G.C.; Braun, D.C.; et al. The future of fish passage science, engineering, and practice. Fish Fish. 2018, 19, 340–362. [Google Scholar] [CrossRef]
- Meister, J.; Selz, O.M.; Beck, C.; Peter, A.; Albayrak, I.; Boes, R.M. Protection and guidance of downstream moving fish with horizontal bar rack bypass systems. Ecol. Eng. 2022, 178, 106584. [Google Scholar] [CrossRef] [PubMed]
- Lehmann, B.; Bensing, K.; Adam, B.; Schwevers, U.; Tuhtan, J.A. Ethohydraulics: A Method for Nature-Compatible Hydraulic Engineering; Springer Nature: New York, NY, USA, 2022. [Google Scholar]
- Noldus, L.P.J.J.; Spink, A.J.; Tegelenbosch, R.A.J. EthoVision: A versatile video tracking system for automation of behavioral experiments. Behav. Res. Methods Instrum. Comput. 2001, 33, 398–414. [Google Scholar] [CrossRef] [PubMed]
- Roth, M.S.; Wagner, F.; Tom, R.; Stamm, J. Ethohydraulic Laboratory Experiments on Fish Descent in Accelerated Flows. Wasserwirtschaft 2022, 112, 31–37. [Google Scholar]
- Graving, J.M.; Chae, D.; Naik, H.; Li, L.; Couzin, I.D. DeepPoseKit, a software toolkit for fast and robust animal pose estimation using deep learning. elife 2019, 8, e47994. [Google Scholar] [CrossRef]
- Mathis, A.; Mamidanna, P.; Cury, K.M.; Abe, T.; Murthy, V.N.; Mathis, M.W.; Bethge, M. DeepLabCut: Markerless pose estimation of user-defined body parts with deep learning. Nat. Neurosci. 2018, 21, 1281–1289. [Google Scholar] [CrossRef]
- Pereira, T.D.; Aldarondo, D.E.; Willmore, L.; Kislin, M.; Wang, S.S.; Murthy, M.; Shaevitz, J.W. Fast animal pose estimation using deep neural networks. Nat. Methods 2019, 16, 117–125. [Google Scholar] [CrossRef]
- Pereira, T.D.; Tabris, N.; Li, J.; Ravindranath, S.; Murthy, M. SLEAP: Multi-Animal Pose Tracking; Cold Spring Harbor Laboratory: New York, NY, USA, 2020. [Google Scholar]
- Romero-Ferrero, F.; Bergomi, M.G.; Hinz, R.C.; Heras, F.J.; De Polavieja, G.G. Idtracker. ai: Tracking all individuals in small or large collectives of unmarked animals. Nat. Methods 2019, 16, 179–182. [Google Scholar] [CrossRef]
- Walter, T.; Couzin, I.D. TRex, a fast multi-animal tracking system with markerless identification, and 2D estimation of posture and visual fields. eLife Sci. 2021, 10, e64000. [Google Scholar] [CrossRef] [PubMed]
- Rodriguez, Á.; Bermúdez, M.; Rabuñal, J.R.; Puertas, J.; Dorado, J.; Pena, L.; Balairón, L. Optical fish trajectory measurement in fishways through computer vision and artificial neural networks. J. Comput. Civ. Eng. 2011, 25, 291–301. [Google Scholar] [CrossRef]
- Hedrick, T.L. Software techniques for two- and three-dimensional kinematic measurements of biological and biomimetic systems. Bioinspiration Biomim. 2008, 3, 34001. [Google Scholar] [CrossRef] [PubMed]
- Butail, S.; Paley, D.A. Three-dimensional reconstruction of the fast-start swimming kinematics of densely schooling fish. J. R. Soc. Interface 2012, 9, 77–88. [Google Scholar] [CrossRef] [PubMed]
- Neuswanger, J.R.; Wipfli, M.S.; Rosenberger, A.E.; Hughes, N.F. Measuring fish and their physical habitats: Versatile 2D and 3D video techniques with user-friendly software. Can. J. Fish. Aquat. Sci. 2016, 73, 1861–1873. [Google Scholar] [CrossRef]
- Detert, M.; Schütz, C.; Czerny, R. Development and tests of a 3D fish-tracking videometry system for an experimental flume. In Proceedings of the 9th International Conference on Fluvial Hydraulics, Lyon-Villeurbanne, France, 5–8 September 2018. [Google Scholar]
- Detert, M.; Albayrak, I.; Boes, R.M. A New System for 3D Fish-Tracking; FIThydro Report; Laboratory of Hydraulics, Hydrology and Glaciology (ETH): Zurich, Switzerland, 2019. [Google Scholar] [CrossRef]
- Meister, J.; Moldenhauer-Roth, A.; Beck, C.; Selz, O.M.; Peter, A.; Albayrak, I.; Boes, R.M. Protection and Guidance of Downstream Moving Fish with Electrified Horizontal Bar Rack Bypass Systems. Water 2021, 13, 2786. [Google Scholar] [CrossRef]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Spatial pyramid pooling in deep convolutional networks for visual recognition. IEEE Trans. Pattern Anal. Mach. Intell. 2015, 37, 1904–1916. [Google Scholar] [CrossRef]
- Alshdaifat, N.F.F.; Talib, A.Z.; Osman, M.A. Improved deep learning framework for fish segmentation in underwater videos. Ecol. Inform. 2020, 59, 101121. [Google Scholar] [CrossRef]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards real-time object detection with region proposal networks. In Proceedings of the NIPS’15: Proceedings of the 28th International Conference on Neural Information Processing Systems, Montreal, QC, Canada, 7–12 December.
- Ditria, E.M.; Lopez-Marcano, S.; Sievers, M.; Jinks, E.L.; Brown, C.J.; Connolly, R.M. Automating the analysis of fish abundance using object detection: Optimizing animal ecology with deep learning. Front. Mar. Sci. 2020, 7, 429. [Google Scholar] [CrossRef]
- Li, X.; Shang, M.; Qin, H.; Chen, L. Fast accurate fish detection and recognition of underwater images with Fast R-CNN. In Proceedings of the OCEANS 2015-MTS/IEEE, Washington, DC, USA, 19–22 October 2015. [Google Scholar]
- Spampinato, C.; Palazzo, S.; Boom, B.; Fisher, R.B. Overview of the LifeCLEF 2014 Fish Task. CLEF (Working Notes). 2014. Available online: https://ceur-ws.org/Vol-1180/CLEF2014wn-Life-SpampinatoEt2014.pdf (accessed on 1 June 2014).
- Mandal, R.; Connolly, R.M.; Schlacher, T.A.; Stantic, B. Assessing fish abundance from underwater video using deep neural networks. In Proceedings of the International Joint Conference on Neural Networks (IJCNN), Rio de Janeiro, Brazil, 8–13 July 2018. [Google Scholar]
- Abdulla, W. Mask R-CNN for Object Detection and Instance Segmentation on Keras and Tensorflow. 2017. Available online: https://github.com/matterport/Mask_RCNN (accessed on 1 April 2019).
- He, K.; Gkioxari, G.; Dollár, P.; Girshick, R. Mask R-CNN. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017. [Google Scholar]
- Conrady, C.R.; Ebnem, S.; Colin, G.A.; Leslie, A.R. Automated detection and classification of southern African Roman seabream using Mask R-CNN. Ecol. Inform. 2022, 69, 101593. [Google Scholar] [CrossRef]
- Yang, F.; Moldenhauer, A.; Albayrak, I. FishSeg (Code); ETHZ: Zurich, Switzerland, 2023. [Google Scholar] [CrossRef]
- Scaramuzza, D.; Martinelli, A.; Siegwart, R. A toolbox for easily calibrating omnidirectional cameras. In Proceedings of the 2006 IEEE/RSJ International Conference on Intelligent Robots and Systems, Beijing, China, 9–13 October 2006; pp. 5695–5701. [Google Scholar]
- Zivkovic, Z. Improved adaptive Gaussian mixture model for background subtraction. In Proceedings of the 17th International Conference on Pattern Recognition, Cambridge, UK, 26 August 2004. [Google Scholar]
- Zivkovic, Z.; Van Der Heijden, F. Efficient adaptive density estimation per image pixel for the task of background subtraction. Pattern Recognit. Lett. 2006, 27, 773–780. [Google Scholar] [CrossRef]
- Rosebrock, A. Simple Object Tracking With OpenCV. 2018. Available online: https://www.pyimagesearch.com/2018/07/23/simple-object-tracking-with-opencv/ (accessed on 23 July 2018).
- Everingham, M.; Van Gool, L.; Williams, C.K.; Winn, J.; Zisserman, A. The pascal visual object classes (voc) challenge. Int. J. Comput. Vis. 2010, 88, 303–338. [Google Scholar] [CrossRef]
- Francisco, F.A.; Nührenberg, P.; Jordan, A. High-resolution, non-invasive anima tracking and reconstruction of local environment in aquatic ecosystems. Mov. Ecol. 2020, 8, 27. [Google Scholar] [CrossRef] [PubMed]
- Lin, T.; Maire, M.; Belongie, S.; Hays, J.; Perona, P.; Ramanan, D.; Dollár, P.; Zitnick, C.L. Microsoft COCO: Common objects in context. In Computer Vision—ECCV 2014, Proceedings of the 13th European Conference, Zurich, Switzerland, 6–12 September 2014; Springer: Berlin/Heidelberg, Germany, 2014; Part V 13. [Google Scholar]
- Crouse, D.F. On implementing 2D rectangular assignment algorithms. IEEE Trans. Aerosp. Electron. Syst. 2016, 52, 1679–1696. [Google Scholar] [CrossRef]
- Goldberger, J.; Hinton, G.E.; Roweis, S.; Salakhutdinov, R.R. Neighbourhood components analysis. In Advances in Neural Information Processing Systems 17; The MIT Press: Cambridge, MA, USA, 2004. [Google Scholar]
- Rodriguez, A.; Rico-Diaz, A.J.; Rabunal, J.R.; Puertas, J.; Pena, L. Fish monitoring and sizing using computer vision. In Bioinspired Computation in Artificial Systems, Proceedings of the International Work-Conference on the Interplay Between Natural and Artificial Computation, IWINAC 2015, Elche, Spain, 1–5 June 2015; Springer: Berlin/Heidelberg, Germany, 2015; Part II 6. [Google Scholar]
Dataset | Trout Model | Eel Model |
---|---|---|
Training | 304 (600) | 406 (455) |
Validation | 115 (224) | 57 (67) |
Fish Species | Methods | freq | lg | num | CR |
---|---|---|---|---|---|
Trout | FishSeg | 2 | 2738 | 18 | 3.13 |
Detert’s code | 1 | 6804 | 70 | ||
Eel | FishSeg | 2 | 823 | 5 | 3.42 |
Detert’s code | 1 | 2512 | 26 |
Sources | R-CNN | Fish Species | Images | Annotations | mAP Values |
---|---|---|---|---|---|
[25] | Fast R-CNN | 12 | 24,277 | \ | 0.814 |
[27] | Faster R-CNN | 50 | 4909 | 12,365 | 0.824 |
[24] | Mask R-CNN | 1 | \ | 6080 | 0.925 for test set; 0.934 for new set; |
[30] | 1 | 2015 | 2541 | 0.803 for validation set; 0.815 for test set; | |
Present study (FishSeg) | Modified Mask R-CNN | 1 | 115 | 224 | 0.837 for trout set |
1 | 57 | 67 | 0.876 for eel set |
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. |
© 2023 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
Yang, F.; Moldenhauer-Roth, A.; Boes, R.M.; Zeng, Y.; Albayrak, I. FishSeg: 3D Fish Tracking Using Mask R-CNN in Large Ethohydraulic Flumes. Water 2023, 15, 3107. https://doi.org/10.3390/w15173107
Yang F, Moldenhauer-Roth A, Boes RM, Zeng Y, Albayrak I. FishSeg: 3D Fish Tracking Using Mask R-CNN in Large Ethohydraulic Flumes. Water. 2023; 15(17):3107. https://doi.org/10.3390/w15173107
Chicago/Turabian StyleYang, Fan, Anita Moldenhauer-Roth, Robert M. Boes, Yuhong Zeng, and Ismail Albayrak. 2023. "FishSeg: 3D Fish Tracking Using Mask R-CNN in Large Ethohydraulic Flumes" Water 15, no. 17: 3107. https://doi.org/10.3390/w15173107
APA StyleYang, F., Moldenhauer-Roth, A., Boes, R. M., Zeng, Y., & Albayrak, I. (2023). FishSeg: 3D Fish Tracking Using Mask R-CNN in Large Ethohydraulic Flumes. Water, 15(17), 3107. https://doi.org/10.3390/w15173107