Abstract:Waterin aquaculture is a necessary place for aquatic animals to survive and live. The deterioration of water quality will directly lead to the decline of aquaculture production, and in severe cases, it will lead to the death of a large number of aquatic organisms and cause serious economic losses to aquaculture enterprises.Therefore, the real-time monitoring of water quality parameters in aquaculture is of great significance.A method for water quality monitoring based on fish behavior was proposed with Oplegnathus punctatus as research object.The method can non-invasively complete the real-time monitoring of water quality parameters through the image data captured by the camera, avoiding the tedious installation of complex equipment and the quantification of fish behavior.To increase the inference speed and reduce the amount of model parameters, this method combined RepVGG block with GhostNet.Aiming at the problems of rapid water quality monitoring and accurate water quality monitoring, the Cheap Ghost operation and the Expensive Ghost operation were proposed.Finally, the three branches were merged through model reparameterization, which greatly reduced the amount of model parameters and improved the model inference speed.The results showed that the G-RepVGG operated by Cheap Ghost achieved an accuracy of 96.21% in the test set and can infer 442.27 images per second. The G-RepVGG model operated with Expensive Ghost achieved 97.63% accuracy in the test set and can infer 349.42 images per second. Therefore, it still had a high inference speed under the premise of ensuring high accuracy, and had better robustness in testing in multiple data sets. The research result can quickly and accurately monitor water quality, detect water quality deterioration in time, and reduce losses caused by water quality deterioration, providing ideas and methods for water quality monitoring.