Abstract
Zebrafish (Danio rerio) is an ideal model organism for biological research due to its ease of breeding, maintenance, observation, and complete genome sequencing. As a small aquatic organism with a body length of about 3–5 cm, zebrafish mainly exhibits its behavior through swimming in water. Therefore, trajectory tracking is crucial for a deep understanding of zebrafish behavior and physiological states, as well as for revealing its associations with specific diseases. In addition, zebrafish is widely used for drug screening and toxicology testing to explore the underlying neural and physiological mechanisms. Because of the high efficiency, accuracy, structural simplicity, and versatility of YOLO series models in object detection, they have become one of the preferred deep learning models for many researchers and developers. In this study, a model trained using YOLOv7 was proposed to track the movement trajectories of zebrafish and classify their behaviors into three categories: swimming, sinking, and static, through time-series sorting. According to experimental testing, our method exhibits excellent performance in detecting zebrafish movement trajectories. On a test set consisting of one frame per second, the model achieved a 100% accuracy rate and a 100% recall rate, demonstrating its potential in automated trajectory tracking.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
Zebrafish is a small tropical fish native to Southeast Asia, known for its external fertilization, transparent embryos, and short life cycle. In addition, its genome was fully sequenced in 2013 [1], and its genetic structure shares up to 70% similarity with that of humans. Zebrafish offers numerous advantages as a model organism: (1) it is small in size and has a high survival rate, (2) it is less expensive to maintain than mice, (3) it can produce hundreds of eggs per week, providing a large number of embryos for research, (4) up to 84% of genes related to human diseases have corresponding genes in zebrafish, and (5) as a vertebrate with major organ systems that are similar to those of humans, it shares many similar characteristics with humans. Zebrafish has been widely used as a model organism in laboratory research for many years [2], with its analysis extending to numerous research applications, including drug safety, behavioral genetics, ecotoxicology, circadian rhythms [3,4,5,6,7], and many others. Moreover, zebrafish has a unique ability to regenerate heart muscle, which makes it a valuable tool for studying heart-related diseases.
1.1 Zebrafish Applied to Biomedicine
Zebrafish (Danio rerio) has rapidly emerged as a promising tool for disease modeling and drug discovery in the field of biomedical research [2, 8]. As an experimental animal, zebrafish has a wide range of applications in the medical field. Their genome is simple, easy to manipulate, and they grow quickly, making them useful for studying the mechanisms, treatments, and drug screening of various diseases [9,10,11]. In recent years, the use of zebrafish in cancer research, neuroscience [12, 13], and cardiology has gradually increased. Moreover, zebrafish has also been used to study ecotoxicology [14] to assess the impact of certain chemicals on organisms, thus protecting public health.
As a research model organism, zebrafish (Danio rerio) has been widely used in scientific and medical fields [15, 16]. Therefore, objective, impartial, and reproducible data collection and analysis methods are necessary to ensure the credibility and accuracy of experimental results [17]. Such methods can eliminate subjectivity and bias, reduce uncertainty in experiments, and help scientists further understand the experimental results. In addition, objective, impartial, and reproducible data collection and analysis methods make it easier for other scientists to verify and replicate experimental results, thereby further enhancing the reliability and sustainability of research outcomes. Therefore, objective, impartial, and reproducible data collection and analysis methods are crucial for zebrafish experiments and other scientific research fields.
1.2 Deep Learning Applied to Zebrafish Research
The use of deep learning techniques and zebrafish imaging studies can provide more accurate tracking and analysis of zebrafish behavior and movement trajectories. In recent years, many research teams have applied deep learning techniques to zebrafish image analysis [18,19,20], such as using convolutional neural networks to detect zebrafish movement and track their trajectories [21,22,23]. With these techniques, valuable features can be extracted from large amounts of zebrafish image data, and accurate models can be established to predict zebrafish behavior and study their movement trajectories [24,25,26]. These research findings help to deepen our understanding of zebrafish movement and behavior, providing important foundational information for biological and medical research. Additionally, utilizing deep learning techniques and zebrafish imaging studies can also develop more advanced image analysis tools, improving the automated analysis of zebrafish images, and providing more possibilities for the study of zebrafish behavior and physiology [12].
1.3 Introduction to YOLOv7
Dr. Chien-Yao Wang, Alexey Bochkovskiy, and Director Hung-Yu Liao successively introduced YOLOv4, ScaledYOLOv4, and YOLOR in 2020–2021, and recently launched their latest masterpiece - YOLOv7 [27] in early July of this year. YOLOv7 outperforms all known object detectors in terms of speed and accuracy within the range of 5 FPS to 160 FPS and at 30 FPS on GPU V100. The YOLOv7-E6 object detector (56 FPS V100, 55.9% AP) outperforms the transformer-based detector SWIN-L Cascade-Mask R-CNN (9.2 FPS A100, 53.9% AP) by 509% in speed and accuracy and the convolution-based detector ConvNeXt-XL Cascade Mask R-CNN (8.6 FPS A100, 55.2% AP) by 551% in speed and 0.7% AP in accuracy. Moreover, YOLOv7 surpasses YOLOR, YOLOX, Scaled-YOLOv4, YOLOv5, DETR, Deformable DETR, DINO-5scale-R50, ViT-Adapter-B, and many other object detectors in terms of speed and accuracy. Additionally, they trained YOLOv7 from scratch only on the MS COCO dataset without using any other datasets or pre-trained weights (Fig. 1).
YOLOv7 reduces the parameter count and computation cost of today’s real-time object detection SOTA by about 40% and 50%, respectively. It mainly optimizes the model architecture and training process, proposing extended and scaling methods for effective utilization of parameters and computation costs in the model architecture optimization. As for the training process optimization, the authors proposed the “bag-of- freebies” method in YOLOv4, which increases accuracy at the cost of training, but does not increase inference cost, and in YOLOv7, they used re-parameterized techniques to replace the original modules and dynamic label assignment strategy to assign labels more efficiently to different output layers (Fig. 2).
2 Method
In this study, self-recorded videos were first converted to images and labeled. These labeled data were then used to train a convolutional neural network model. A small amount of test samples were input to confirm the accuracy and usability of the model. The videos containing the desired behavior to be detected were then input, and the behavior category was determined by detecting the position of zebrafish and its timeline. Finally, the results were output on a self-designed UI interface (Fig. 3).
2.1 Data Collection and Processing
We collected our own video footage to build the dataset, accumulating a total of 1 h 59 min and 52 s of video material. Subsequently, the videos were edited using Potplayer, and the annotations of the area of interest were performed using the LabelImg software (Fig. 4).
2.2 Model Training and Behavioral Judgment
After preprocessing, the images were divided into training, validation, and test sets. YOLOv7.pt among the six initial weights of YOLOv7 was used as the weight for training the model. After detecting the position of the zebrafish, the behavior category was determined by comparing the current position with the previous position.
In this experiment, zebrafish behavior was classified into three categories: normal movement, bottom-dwelling, and stationary. A timing unit of 1.5 s was used, and if the coordinates appeared within the bottom 20% of the tank during the detection process, meaning within the range of 4 cm from the tank bottom upwards, the behavior was defined as bottom-dwelling. If the coordinates did not move within 1.5 s, the behavior was considered stationary.
2.3 Experimental Environment
All deep learning is trained and evaluated on a machine equipped with AMD R5 5600X, 32GM RAM, NVIDIA GeForce RTX 3070Ti, and the operating system uses Window10 x64. Use Python 3.9.13 for table creation and data encoding. Use LabelImg to label datasets. Network construction and training verification are all run on the virtual environment of Anaconda3 architecture. The videos required for the experiments in this study were all shot by iPhone 12, and the size of the fish tank used was 30*16*20 in length, width and height.
2.4 Evaluation Indicators
In terms of evaluating the classification network, the precision and recall (also known as sensitivity or true positive rate (TPR)) were used as the evaluation metrics. The calculation formula is as follows:
3 Results
The first batch of training used a total of 1200 labeled data, trained nine times with different parameters, and selected two of them for detection testing. However, the accuracy and recall rate were not satisfactory in the testing videos. Therefore, the amount of training data was increased to 2000, and the results showed that both the accuracy and recall rate reached 97% (Fig. 5). In the confusion matrix, TP also achieved a good performance of 98% (Fig. 6). Furthermore, in the videos with a speed of one frame per second, the accuracy and recall rate reached 100%, and the behavior categories were successfully automatically determined (Fig. 7).
4 Conclusion
The present study successfully utilizes the combination of object position identification and the time axis to achieve zebrafish behavior recognition, indicating great potential in automating trajectory tracking. Through this approach, we can accurately track the movement trajectories of zebrafish and obtain valuable data and information, which can further help us understand zebrafish behavior and ecological habits and play an important role in scientific research both in laboratory and field settings. Therefore, the application prospects of this method are extremely broad and will make significant contributions to the development of zebrafish research and related fields.
References
Schier, A.F.: Zebrafish earns its stripes. Nature 496, 443–444 (2013)
Lieschke, G.J., Currie, P.D.: Animal models of human disease: zebrafish swim into view. Nat. Rev. Genet. 8(5), 353–367 (2007). https://doi.org/10.1038/nrg2091
Darland, T., Dowling, J.E.: Behavioral screening for cocaine sensitivity in mutagenized zebrafish. Proc. Natl. Acad. Sci. USA 98(20), 11691–11696 (2001). https://doi.org/10.1073/pnas.191380698
Gerlai, R., Lahav, M., Guo, S., Rosenthal, A.: Drinks like a fish: zebra fish (Danio rerio) as a behavior genetic model to study alcohol effects. Pharmacol. Biochem. Behav. 67(4), 773–782 (2000). https://doi.org/10.1016/s0091-3057(00)00422-6
Guo, S.: Linking genes to brain, behavior and neurological diseases: what can we learn from zebrafish? Genes Brain Behav. 3(2), 63–74 (2004). https://doi.org/10.1046/j.1601-183x.2003.00053.x
Levin, E.D., Chrysanthis, E., Yacisin, K., Linney, E.: Chlorpyrifos exposure of developing zebrafish: effects on survival and long-term effects on response latency and spatial discrimination. Neurotoxicol. Teratol. 25(1), 51–57 (2003). https://doi.org/10.1016/s0892-0362(02)00322-7
Linney, E., Upchurch, L., Donerly, S.: Zebrafish as a neurotoxicological model. Neurotoxicol. Teratol. 26(60), 709–718 (2004). https://doi.org/10.1016/j.ntt.2004.06.015
Fetcho, J.R., Liu, K.S.: Zebrafish as a model system for studying neuronal circuits and behavior. Ann. N. Y. Acad. Sci. 860, 333–345 (1998). https://doi.org/10.1111/j.1749-6632.1998.tb09060.x
Rink, E., Wullimann, M.F.: Connections of the ventral telencephalon and tyrosine hydroxylase distribution in the zebrafish brain (Danio rerio) lead to identification of an ascending dopaminergic system in a teleost. Brain Res. Bull. 57(3–4), 385–387 (2002). https://doi.org/10.1016/s0361-9230(01)00696-7
Demin, K.A., et al.: Developing zebrafish experimental animal models relevant to schizophrenia. Neurosci. Biobehav. Rev. 105, 126–133 (2019). https://doi.org/10.1016/j.neubiorev.2019.07.017
Egan, R.J., et al.: Understanding behavioral and physiological phenotypes of stress and anxiety in zebrafish. Behav. Brain Res. 205(1), 38–44 (2009)
Bozhko, D.V., et al.: Artificial intelligence-driven phenotyping of zebrafish psychoactive drug responses. Prog. Neuropsychopharmacol. Biol. Psychiatry 112, 110405 (2022). https://doi.org/10.1016/j.pnpbp.2021.110405
Lillesaar, C., Stigloher, C., Tannhauser, B., Wullimann, M.F., Bally-Cuif, L.: Axonal projections originating from raphe serotonergic neurons in the developing and adult zebrafish, Danio rerio, using transgenics to visualize raphe-specific pet1 expression. J. Comp. Neurol. 512(2), 158–182 (2009). https://doi.org/10.1002/cne.21887
Paganotto Leandro, L., et al.: Behavioral changes occur earlier than redox alterations in developing zebrafish exposed to Mancozeb. Environ. Pollut. 268(Pt B), 115783 (2021). https://doi.org/10.1016/j.envpol.2020.115783
Yang, P., Takahashi, H., Murase, M., Itoh, M.: Zebrafish behavior feature recognition using three-dimensional tracking and machine learning. Sci. Rep. 11(1), 13492 (2021). https://doi.org/10.1038/s41598-021-92854-0
Al-Imari, L., Gerlai, R.: Sight of conspecifics as reward in associative learning in zebrafish (Danio rerio). Behav. Brain Res. 189(1), 216–219 (2008). https://doi.org/10.1016/j.bbr.2007.12.007
Stuart, G.W., Vielkind, J.R., McMurray, J.V., Westerfield, M.: Stable lines of transgenic zebrafish exhibit reproducible patterns of transgene expression. Development 109(3), 577–584 (1990). https://doi.org/10.1242/dev.109.3.577
Qian, Z.M., Chen, Y.Q.: Feature point based 3D tracking of multiple fish from multi-view images. PLoS ONE 12(6), e0180254 (2017). https://doi.org/10.1371/journal.pone.0180254
Gao, Y., et al.: A high-throughput zebrafish screening method for visual mutants by light-induced locomotor response. IEEE/ACM Trans. Comput. Biol. Bioinform. 11(4), 693–701 (2014). https://doi.org/10.1109/TCBB.2014.2306829
Mikut, R., et al.: Automated processing of zebrafish imaging data: a survey. Zebrafish 10(3), 401–421 (2013). https://doi.org/10.1089/zeb.2013.0886
Jalal, A., Salman, A., Mian, A., Shortis, M., Shafait, F.: Fish detection and species classification in underwater environments using deep learning with temporal information. Ecol. Inf. 57, 101088 (2020). https://doi.org/10.1016/j.ecoinf.2020.101088
Wang, H., Zhang, S., Zhao, S., Wang, Q., Li, D., Zhao, R.: Real-time detection and tracking of fish abnormal behavior based on improved YOLOV5 and SiamRPN++. Comput. Electr. Agric. 192, 106512 (2022). https://doi.org/10.1016/j.compag.2021.106512
Barreiros, M.D.O., Dantas, D.D.O., Silva, L.C.D.O., Ribeiro, S., Barros, A.K.: Zebrafish tracking using YOLOv2 and Kalman filter. Sci. Rep. 11(1), 3219 (2021). https://doi.org/10.1038/s41598-021-81997-9
Xu, Z., Cheng, X.E.: Zebrafish tracking using convolutional neural networks. Sci. Rep. 7, 42815 (2017). https://doi.org/10.1038/srep42815
Sun, M., Li, W., Jiao, Z., Zhao, X.: A multi-target tracking platform for zebrafish based on deep neural network. In: IEEE 9th Annual International Conference on CYBER Technology in Automation (2019)
Breier, B., Onken, A.: Analysis of video feature learning in two-stream CNNs on the example of zebrafish swim bout classification. In: ICLR 2020 Conference (2020)
Wang, C.-Y.: YOLOv7 Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. arXiv (2022)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Fan, YL., Hsu, FR., Lu, JY., Chung, MJ., Chang, TC. (2024). The Application of Artificial Intelligence to Support Behavior Recognition by Zebrafish: A Study Based on Deep Learning Models. In: Hung, J.C., Yen, N., Chang, JW. (eds) Frontier Computing on Industrial Applications Volume 4. FC 2023. Lecture Notes in Electrical Engineering, vol 1134. Springer, Singapore. https://doi.org/10.1007/978-981-99-9342-0_27
Download citation
DOI: https://doi.org/10.1007/978-981-99-9342-0_27
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-99-9341-3
Online ISBN: 978-981-99-9342-0
eBook Packages: EngineeringEngineering (R0)