An automatic detection method, system, device and storage medium for fish diseases

The automatic fish disease detection system, which combines cameras and sensors with the YOLOv5 deep learning model, solves the problems of low detection efficiency and high cost in traditional fish farming. It enables real-time monitoring and automatic diagnosis, reducing farming costs and increasing annual yield.

CN117457138BActive Publication Date: 2026-11-17XIAMEN HUAXIA UNIV +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311309046.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-10
Publication Date
2026-11-17
Estimated Expiration
2043-10-10

AI Technical Summary

Technical Problem

Traditional fish farming requires a lot of time and labor costs for fish measurement and disease inspection, making real-time monitoring impossible and resulting in low efficiency in detecting fish in multiple aquaculture tanks.

Method used

The system uses cameras to capture images of fish and detects them using the YOLOv5 deep learning model. Combined with environmental data collected by sensors, the data is transmitted in real time to the Tencent Cloud platform for analysis and early warning. It generates electronic medical records for the fish and provides expert prescriptions, enabling intelligent feeding, oxygenation, and harvesting.

Benefits of technology

It enables real-time monitoring and automatic diagnosis of fish growth, reduces aquaculture costs, increases annual yield, and reduces energy consumption through a low-power mode.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117457138B_ABST
    Figure CN117457138B_ABST
Patent Text Reader

Abstract

This invention proposes an automatic detection method, system, device, and storage medium for fish diseases, comprising: acquiring images of fish in a smart net cage; inputting the fish images into a YOLOv5 deep learning model to obtain fish farming data; acquiring environmental data through sensors; transmitting the fish farming data and environmental data to a Tencent Cloud platform for real-time viewing by the user; triggering an alarm device to issue a real-time warning and sending a warning notification to the user if the environmental data exceeds a preset threshold range; and generating an electronic medical record for the fish using image-text description technology and automatically retrieving expert prescriptions corresponding to the fish diseases using text keywords, and sending the electronic medical record and expert prescriptions to the user. This invention can increase annual yield and reduce farming costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of aquaculture technology, specifically to an automatic detection method, system, device, and storage medium for fish diseases. Background Technology

[0002] In traditional fish farming, fish measurement and disease detection are often achieved through manual harvesting, biomedical testing, or judgment based on practical experience. All three methods have disadvantages such as the inability to achieve real-time monitoring and interference with the normal activities of fish. Moreover, measuring and analyzing the diseases of multiple fish in multiple aquaculture tanks requires a significant amount of time and labor.

[0003] In view of this, this application proposes an automatic detection method, system, device and storage medium for fish diseases, which can increase annual output and reduce aquaculture costs. Summary of the Invention

[0004] To address the issues of high time and labor costs associated with fish measurement and disease detection, this application provides an automatic fish disease detection method, system, device, and storage medium to resolve the aforementioned technical deficiencies.

[0005] According to one aspect of the present invention, an automatic detection method for fish diseases is provided, the method comprising the following steps:

[0006] Images of fish in the smart cage are captured by a camera and then input into the YOLOv5 deep learning model to obtain fish farming data, which includes fish morphology, size, color, texture, and gill data.

[0007] Environmental data is collected through sensors, including temperature, humidity, pressure, water temperature, pH value, and dissolved oxygen.

[0008] The fish farming data and environmental data are transmitted to the Tencent Cloud platform via the communication module for users to view in real time.

[0009] In response to the determination that environmental data exceeds the preset threshold range, the alarm device is triggered to issue a real-time warning and a warning notification is sent to the user terminal.

[0010] In response to the discrepancy between the fish farming data and the ideal data in the ideal database, an electronic medical record for the fish is generated using image-text description technology. Expert prescriptions corresponding to fish diseases are automatically retrieved using text keywords, and the electronic medical record and expert prescriptions are sent to the user's terminal.

[0011] Through the above technical solution, this application can use an OV5640 camera to capture images into a frame buffer, a preprocessed frame buffer, and a framework for running neural network inference. The resulting image data from the neural network inference is then sent to a computer via a serial port. The PC can share the data to a tablet using sharing software, and the computer and tablet can display the number and size of the fish in real time. The number and size of the fish are also reported to the cloud via an L610, facilitating remote monitoring by the user.

[0012] In a specific embodiment, the method further includes:

[0013] Fish school images are input into the YOLOv5 deep learning model to obtain fish farming data. The detection network built based on the YOLOv5 deep learning model is used to detect the fish farming data in the fish school images to obtain the detection results.

[0014] The SAM network is used to perform semantic segmentation on the fish in the detection results to obtain the segmentation results of fish in the image;

[0015] Based on the segmentation results, the body shape, size, color, texture, and gills of the fish are determined, and fish farming data are obtained.

[0016] The above technical solution allows for the acquisition of fish farming data for subsequent operations.

[0017] In a specific embodiment, the body shape, size, color, texture, and gills of the fish are determined based on the segmentation results to obtain fish farming data, specifically including:

[0018] The pixel space coordinates of the segmentation results are transformed to actual space coordinates through coordinate transformation in order to calculate the body shape and size of the fish.

[0019] The body color of fish is determined by color recognition, the texture of fish is determined by texture recognition, and the gills of fish are determined by gill comparison.

[0020] In a specific embodiment, the method further includes: in response to determining that environmental data exceeds a preset threshold range, triggering an alarm device for real-time early warning, specifically including:

[0021] If the sensor detects that any one of the temperature, humidity, pressure, water temperature, or pH value exceeds the preset normal threshold range, a buzzer alarm will be triggered and an alarm notification will be sent to the user terminal.

[0022] In response to the determination that the dissolved oxygen level detected by the sensor is less than the preset dissolved oxygen threshold range, a buzzer warning is triggered and the oxygen pump automatically supplies oxygen, and a warning notification is sent to the user terminal. The buzzer warning and oxygen pump supply will stop when the real-time detected dissolved oxygen level returns to the preset dissolved oxygen threshold range.

[0023] Through the above technical solution, this application can automatically supply oxygen to the aquatic environment, thereby increasing annual output and reducing aquaculture costs.

[0024] In a specific embodiment, in response to determining that there is a deviation between the fish farming data and the ideal data in the ideal database, an electronic medical record for the fish is generated using image text description technology, and expert prescriptions corresponding to the fish diseases are automatically retrieved using text keywords. Specifically, this includes:

[0025] The similarity values ​​between fish body shape, size, color, texture, and gill data obtained by Pearson correlation coefficient calculation and the same fish body shape, size, color, texture, and gill data in an ideal database are used. The preset similarity threshold is 0.5. If the similarity value is greater than or equal to 0.5, the fish meet the health requirements. If the similarity value is less than 0.5, the fish have a disease.

[0026] When fish become ill, electronic medical records are generated using image-text description technology, which is achieved through image feature matching.

[0027] By searching the expert knowledge base and diagnostic case database using textual keywords from the fish's electronic medical records, highly relevant expert prescriptions can be identified.

[0028] Through the above technical solution, this application can automatically diagnose fish diseases and provide corresponding expert prescriptions.

[0029] In a specific embodiment, the method further includes:

[0030] In response to the determination that the collected environmental data does not exceed the preset threshold range, it is then determined whether it is time to feed the fish.

[0031] In response to the determination that the feeding time has arrived, the STM32 control system controls the feeding device drive system to open the feeding slot of the feeding device so that the fish bait is put into the smart net cage. After the feeding is finished, the feeding slot of the feeding device is closed.

[0032] Through the above technical solution, this application can realize intelligent feeding and further improve breeding output.

[0033] In a specific embodiment, the method further includes:

[0034] In response to the determination that the feeding time has not yet arrived, the system assesses whether there is a discrepancy between the fish farming data and the ideal data in the ideal database, specifically including:

[0035] In response to the determination that the number of fish collected or the average body size is greater than the preset reference value, the STM32 control system controls the lifting device of the smart net cage to rise. Driven by the lifting device, the smart net cage rises by tightening the rope and pulling the ring at the bottom of the smart net cage, thereby realizing the retraction and folding of the smart net cage.

[0036] When the average size of the collected fish is determined to be zero, the STM32 control system controls the lifting device of the smart net cage to descend, drives the lifting device to release the rope, and the ring at the bottom of the smart net cage descends until the fishing net is opened.

[0037] Through the above technical solution, this application can realize intelligent fishing and reduce labor costs.

[0038] Secondly, this application provides an automatic detection system for fish diseases, which includes the following modules:

[0039] Cameras are configured to capture images of fish within the smart fish cages;

[0040] The detection module is configured to input fish images into the YOLOv5 deep learning model to obtain fish farming data, which includes fish body shape, size, body color, texture, and gill data.

[0041] Sensors are configured to collect environmental data, including temperature, humidity, pressure, water temperature, pH value, and dissolved oxygen level.

[0042] The communication module is configured to transmit fish farming data and environmental data to the Tencent Cloud platform for users to view in real time.

[0043] The first judgment module is configured to trigger an alarm device to issue a real-time warning and send a warning notification to the user terminal when it determines that the environmental data exceeds a preset threshold range.

[0044] The second judgment module is configured to generate electronic medical records for fish through image and text description technology in response to a discrepancy between the fish farming data and the ideal data in the ideal database. It will also automatically retrieve expert prescriptions corresponding to fish diseases through text keywords and send the electronic medical records and expert prescriptions to the user terminal.

[0045] Thirdly, this application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the automatic fish disease detection method as described in any of the above claims.

[0046] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the automatic fish disease detection method described in any of the preceding claims.

[0047] Compared with the prior art, the beneficial results of the present invention are as follows:

[0048] (1) The present invention uses a camera to monitor the fish farming tank in real time. At the same time, the fish in the tank are detected and measured in real time through the video captured, thereby analyzing and judging the growth status and growth environment of the fish, and comparing it with the system database to automatically provide expert solutions for farmers, helping farmers to better change their feeding strategies and avoid economic losses caused by poor fish growth.

[0049] (2) This invention achieves automated control of fish populations through remote manual control and AI intelligent decision-making, including intelligent feeding, intelligent oxygenation, intelligent harvesting, intelligent early warning, and intelligent diagnosis. This leads to an increase in annual yield and a reduction in aquaculture costs.

[0050] (3) This invention designs a low-power mode that wakes up the processor periodically (e.g., every minute) to collect and report sensor data to the cloud platform. After completion, it automatically enters low-power mode to save energy consumption. Through events and interrupts (e.g., serial port interrupts), the processor is woken up to perform specific tasks such as feeding, harvesting, oxygenation, and automatic mode, and then re-enters low-power mode after completion. This reduces energy consumption, lowers electricity costs, and extends battery life. Attached Figure Description

[0051] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments, taken with reference to the accompanying drawings:

[0052] Figure 1 This is a flowchart of the automatic detection method for fish diseases according to this application;

[0053] Figure 2 This is a schematic diagram of the fish disease diagnosis process according to this application;

[0054] Figure 3 This is a structural schematic diagram of the automatic fish disease detection device according to this application;

[0055] Figure 4 This is a structural diagram of the automatic fish disease detection system according to this application;

[0056] Figure 5 This is a schematic diagram of the structure of a computer system suitable for implementing the electronic devices of the present application embodiments.

[0057] Attached diagram: 1. Suspension layer; 2. Net cage; 21. Circular ring; 3. Camera; 4. Sensor module; 5. Net cage lifting device; 6. Feeding device. Detailed Implementation

[0058] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.

[0059] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0060] Figure 1 A flowchart of the automatic detection method for fish diseases according to this application is shown. Please refer to it. Figure 1 The method includes the following steps:

[0061] S1. Images of the fish in the smart net cage are captured by a camera, and the images are input into the YOLOv5 deep learning model to obtain fish farming data. This data includes fish morphology, size, color, texture, and gill data. In this embodiment, the control system should be initialized before capturing the fish images. Preferably, the camera is a B-CAMS-OMV camera.

[0062] S2. Collect environmental data through sensors, including temperature, humidity, pressure, water temperature, pH value and dissolved oxygen.

[0063] S3. The fish farming data and environmental data are transmitted to the Tencent Cloud platform via the ADP-L610-Arduino communication module. Users can view the data anytime and anywhere via WeChat mini-program and APP, and remotely control the device.

[0064] In this embodiment, the control system (MCU) controls the L610 module to connect to the Tencent Cloud platform by sending AT commands and subscribe to relevant topics to receive and publish messages.

[0065] S4. In response to determining that the environmental data exceeds the preset threshold range, the alarm device is triggered to issue a real-time warning and a warning notification is sent to the user terminal.

[0066] S5. In response to the determination that there is a deviation between the fish farming data and the ideal data in the ideal database, an electronic medical record for the fish is generated through image text description technology, and the expert prescription corresponding to the fish disease is automatically retrieved through text keywords. The electronic medical record for the fish and the expert prescription are then sent to the user terminal.

[0067] The automatic fish disease detection method provided in this application can achieve both manual and automatic control modes. The manual control mode is described in detail below:

[0068] Users can tap the "Start Manual Feeding" button on their mobile devices to send control commands to Tencent Cloud. These commands are then transmitted to the STM32 control system via the MQTT protocol, causing the feeding servo to rotate and thus opening the feeding port. Similarly, tapping the "Deactivate Manual Feeding" button sends control commands to Tencent Cloud, which are then transmitted to the STM32 control system via the MQTT protocol, causing the feeding servo to rotate and thus closing the feeding port.

[0069] Users can activate the oxygen pump by clicking the manual oxygenation button on their mobile devices. This sends a control command to Tencent Cloud, which is then transmitted to the STM32 control system via the MQTT protocol. Conversely, users can deactivate the oxygen pump by clicking the manual oxygenation button.

[0070] Users can click the "Start Manual Fishing" button on their mobile devices to send control commands to Tencent Cloud. These commands are then transmitted to the STM32 control system via the MQTT protocol, causing the two fishing servo motors to rotate and raise the intelligent net cage lifting device. Conversely, clicking the "Deactivate Manual Fishing" button sends control commands to Tencent Cloud, which are again transmitted to the STM32 control system via the MQTT protocol, causing the two fishing servo motors to rotate and lower the intelligent net cage lifting device.

[0071] Users can activate low-power mode on their mobile devices by clicking the button to send control commands to Tencent Cloud. These commands are then transmitted to the STM32 control system via the MQTT protocol. The control system enters low-power mode (sleep mode), periodically waking the processor (e.g., every minute) to collect and report sensor data, as well as data on fish morphology, size, color, texture, and gills, to the Tencent Cloud platform. After completion, it automatically enters low-power mode (sleep mode) again to conserve energy. The processor can be woken up by events and interrupts (e.g., serial port interrupts) to perform specific tasks such as feeding, catching, and oxygenation, and then re-enter low-power mode upon completion. Users can deactivate low-power mode by clicking the button to send control commands to Tencent Cloud, which are then transmitted to the STM32 control system via the MQTT protocol, causing the control system to exit low-power mode (sleep mode).

[0072] The following is a detailed introduction to the automatic control method for automatic detection of fish diseases:

[0073] Users can activate the AI-managed mode on their mobile devices by clicking the button to send control commands to Tencent Cloud. These commands are then transmitted to the STM32 control system via the MQTT protocol, enabling timed feeding, intelligent oxygenation, and intelligent alerts based on set parameters. When environmental sensors, such as pH and water temperature, collect data exceeding normal values, a buzzer alarm is triggered, and a notification is sent to the mini-program and app to alert the user. The buzzer alarm stops once the real-time sensor data returns to normal. When dissolved oxygen levels are below normal, a buzzer alarm is triggered, and the oxygen pump automatically supplies oxygen, sending a notification to the mini-program and app to alert the user. This process continues until the dissolved oxygen levels return to normal. Users can deactivate the AI-managed mode by clicking the button to send control commands to Tencent Cloud, which are then transmitted to the STM32 control system via the MQTT protocol, thus exiting the AI-managed mode.

[0074] Specifically, in AI-managed mode, the STM32H747I-DISCO control system determines whether the dissolved oxygen level exceeds the set normal range. If the collected dissolved oxygen level exceeds the set normal range, it sends a warning notification to the user's mobile phone via WeChat mini-program and APP, and turns on the oxygen pump. If the collected dissolved oxygen level returns to the set normal range, it turns off the booster pump.

[0075] The STM32H747I-DISCO control system receives sensor data and data on the number and average size of fish captured by a camera. It then determines whether data such as temperature, humidity, pressure, water temperature, and pH value exceed preset normal ranges. If the collected data exceeds these ranges, an alarm is triggered for real-time warning, and a notification is sent to the user's mobile phone via WeChat mini-program and app, awaiting manual intervention.

[0076] If the collected data such as temperature, humidity, pressure, water temperature, and pH value do not exceed the set normal range, the STM32H747I-DISCO control system receives sensor data and the number of fish and average body size collected from the camera, and determines whether it is time to feed.

[0077] When it's feeding time, the STM32H747I-DISCO control system activates the feeding device drive system, opening the feeding slot and dropping bait into the smart net cage. After feeding, the feeding slot closes.

[0078] If the feeding time has not arrived, the STM32H747I-DISCO control system receives sensor data and data on fish body shape, size, color, texture, and gills collected from the camera, and determines whether the number of fish in the cage, the average size, and the health of the fish are greater than the set values.

[0079] If the average size of the collected fish exceeds the set value, the STM32H747I-DISCO control system controls the cage lifting system to rise. Driven by the cage lifting device, the intelligent cage rises by tightening ropes, pulling the bottom ring of the intelligent cage upwards, causing the intelligent cage to retract and fold. This restricts the fish's movement space, making it easier for fish farmers to harvest adult fish and reintroduce them into fry rearing.

[0080] If the average size of the fish collected is less than the set value, the STM32H747I-DISCO control system receives sensor data and the number and average size of fish collected from the camera.

[0081] If the average size of the fish collected is zero, the STM32H747I-DISCO control system controls the lifting device of the smart net cage to descend, drives the lifting device of the net cage to release the rope, and the bottom ring of the net cage will slowly descend due to gravity until the fishing net is opened.

[0082] If the collected data on fish morphology, size, color, texture, and gills deviate significantly from the system's ideal database, a warning notification will be sent to the user's mobile phone via WeChat mini-program and APP, and an electronic medical record for the fish will be automatically generated, along with an expert prescription. The system's ideal database is obtained by collecting data on the normal growth of fish and includes data on normal morphology, size, color, texture, and gills at various growth stages. The electronic medical record is generated using image-text description technology and automatically retrieves expert prescriptions using text keywords.

[0083] Specifically, fish images are input into the YOLOv5 deep learning model to obtain fish farming data. The detection network built based on the YOLOv5 deep learning model is used to detect the fish farming data in the fish images to obtain the detection results.

[0084] The network architecture of the detection network built on YOLOv5 includes Backbone, Neck, Head, and Output.

[0085] Backbone: Primarily responsible for extracting features from the input fish image. The detection network uses CSPDarknet53 or CSPDarknetLite as the backbone, and can capture object information at different scales by extracting features from different layers. The input is a fish image, and the output is typically a series of feature maps.

[0086] Neck (Feature Fusion Part): Used to fuse feature maps from different levels to provide richer contextual information. The detection network uses PANet (Path Aggregation Network) as its feature fusion part, fusing feature maps from different levels through upsampling and downsampling operations. The input is the feature map from the backbone network, and the output is the fused feature map, typically with the same size as the input.

[0087] The head (detection head) is responsible for generating the predicted bounding box and class probability of the target fish. The detection head of the network consists of a series of convolutional and fully connected layers, used to perform convolution and dimensionality reduction operations on the fused feature map. The input is the fused feature map after feature fusion, and the output is the predicted bounding box and class probability of the fish target.

[0088] Output: This section processes the output from the Head section, performing operations such as Non-Maximum Suppression (NMS) to filter the final results. The input is the output from the Head section, and the output is the final detection result after NMS, typically a series of bounding boxes. Each bounding box contains information such as the fish target's category, coordinates, and confidence level.

[0089] The SAM network is used to perform semantic segmentation on the fish in the detection results to obtain the segmentation results of fish in the image.

[0090] The SAM network architecture mainly consists of three parts: a powerful image encoder (computes image embeddings), a cue encoder (computes cue embeddings), and a lightweight mask decoder (predicts masks in real time).

[0091] Image encoder: Minimally suitable for processing high-resolution input images by using a pre-trained ViT (Vision Transformer).

[0092] The prompt encoder considers two sets of prompts: sparse (points, boxes, text) and dense (masks). Points and boxes are represented by positional encodings, and the learned embeddings for each prompt type and the free-form text are added to the pre-trained text encodings. Dense prompts (i.e., masks) are embedded using convolutions and element-wise summed using image embeddings.

[0093] Mask decoder: The mask decoder effectively maps image embeddings, cue embeddings, and output flags to a mask. The decoding output is the segmentation result.

[0094] Based on the segmentation results, the body shape, size, color, texture, and gills of the fish are determined, and fish farming data are obtained.

[0095] Preferably, based on the segmentation results, the body shape, size, color, texture, and gills of the fish are determined to obtain fish farming data, including:

[0096] The pixel space coordinates of the segmentation results are transformed to actual space coordinates through coordinate transformation to calculate the body shape and size of the fish. Color recognition is used to determine the body color of the fish, texture recognition to determine the texture of the fish, and gill comparison to determine the gills of the fish. The corresponding body shape, size, body color, texture, and gills of the fish are then used as data for fish farming.

[0097] Figure 2 A schematic diagram of the fish disease diagnosis process of this application is shown, such as Figure 2 As shown, in response to the discrepancy between the fish farming data and the ideal data in the ideal database, an electronic medical record for the fish is generated using image-text description technology. Furthermore, expert prescriptions corresponding to fish diseases are automatically retrieved using text keywords. Specifically, this includes:

[0098] 1) The fish farming data obtained from the YOLOv5 deep learning model were compared and analyzed with the ideal data in the ideal database. The ideal data in the ideal database came from standard fish body shape, size, body color, texture, and gill data collected artificially during the normal growth process of the fish.

[0099] The obtained data on fish morphology, size, coloration, texture, and gills are compared and analyzed with ideal data in an ideal database, and the comparison results are then uniformly converted into numerical information. Specifically:

[0100] The similarity values ​​between fish body shape, size, color, texture, and gill data obtained by Pearson correlation coefficient calculation and the same fish body shape, size, color, texture, and gill data in an ideal database are between 0 and 1. A similarity threshold of 0.5 can be set. When the similarity value is greater than or equal to 0.5, the fish meet the health requirements. When the similarity value is less than 0.5, the fish are diseased.

[0101] 2) When fish exhibit disease, electronic medical records are generated using image-text description technology. This technology is implemented through image feature matching. Specifically:

[0102] First, a large number of fish disease images and corresponding textual descriptions are stored in a fish disease analysis database. Then, images exhibiting fish diseases are used as input images, and their color, texture, and shape features are extracted. Finally, the extracted features are compared with the image features in the fish disease analysis database to identify similar images, and the corresponding textual descriptions of the fish diseases are used as electronic medical records for the fish. The fish disease images and corresponding textual descriptions in the fish disease analysis database are sourced from fish disease encyclopedias, related books, and images of fish diseases.

[0103] 3) Automatically retrieve expert prescriptions for fish diseases using text keywords. Specifically:

[0104] By searching the expert knowledge base and diagnostic case database using textual keywords from fish electronic medical records (e.g., dark body color, protruding eyes, ulcers and bleeding spots on the tail), highly relevant expert prescriptions were identified. The expert knowledge base was sourced from aquaculture experts, and the diagnostic case database was sourced from online fish disease diagnostic hospitals.

[0105] Figure 3 A structural diagram of the automatic fish disease detection device of this application is shown, as follows: Figure 3 As shown, the automatic fish disease detection device includes: a suspension layer 1, a net cage 2, a camera 3, a sensor module 4, a net cage lifting device 5, a feeding device 6, and a control system.

[0106] The automatic fish disease detection device is equipped with a suspension layer 1, which has buoyancy to support the weight of the device. Even if the water level rises, the entire automatic fish disease detection device will rise with it and maintain a slight fluctuation around the suspension layer 1.

[0107] Net cage 2 has two rings 21 at the top and bottom to support and secure it. Driven by the net cage lifting device 5, net cage 2 can be raised by pulling the bottom rings 21 with ropes, thus folding the net cage 2. When the ropes are released, the bottom rings 21 will slowly descend due to gravity until the fishing net is opened. A camera 3 is installed in the middle of the top surface of the cage to monitor the growth of the fish inside the net cage 2 in real time. A sensor module 4 detects various parameters inside the net cage 2, such as temperature, humidity, pressure, dissolved oxygen, and pH value. A feeding device 6 is installed on top of the net cage 2; simply driving the feeding device 6 controls the opening and closing of the feeding port to release bait or fish fry.

[0108] Figure 4 A structural diagram of the automatic fish disease detection system of this application is shown, in conjunction with reference. Figure 3 and Figure 4The control system uses an STM32H747I-DISCO main control board. The STM32H747I-DISCO main control board connects to the ADP-L610-Arduino 4G communication module via a USART serial port. AT commands are sent to control the ADP-L610-Arduino communication module to connect to the Tencent Cloud platform, subscribe to relevant topics to receive messages, or publish messages to specified topics.

[0109] The B-CAMS-OMV camera connects to the STM32H747I-DISCO via the DCMI interface, capturing real-time images of fish in the net cage into a frame buffer, a preprocessing frame buffer, and a framework for running neural network inference. The resulting image data from the neural network inference is sent to a computer via serial port, where the number, size, and health status of the fish can be displayed in real time. The PC can be shared to a tablet via sharing software for remote viewing.

[0110] Data such as temperature, humidity, pressure, accelerometer, gyroscope, and magnetometer values ​​from the LSM6DO, LIS2MDL, LIS2DW12, LPS22HH, HTS221, and STTS751 sensors in the X-NUCLEO-IKS01A3 sensor expansion board are acquired via the I2C interface. Voltage values ​​from the pH sensor module are acquired via the ADC interface and converted to pH values ​​using calibration and conversion formulas. Temperature data from the DS18B20 waterproof digital temperature sensor is acquired via a single-bus protocol.

[0111] The L298N motor driver module is connected to the STM32H747I-DISCO. The motor's start and stop are controlled by changing the output states of two GPIO pins, thereby controlling the oxygen pump's on / off state. The feeding device 6 is also connected to the STM32H747I-DISCO, and its PWM pin is used to control it. When the feeding time arrives, the STM32H747I-DISCO control system controls the feeding device to dispense food.

[0112] The net cage lifting device 5 is connected to an STM32H747I-DISCO, and its raising and lowering are controlled via a PWM pin. When the collected data on the number and size of fish exceed a set value, the STM32H747I-DISCO control system raises the net cage lifting device 5. After the fish farmer harvests all the adult fish from the net cage, and the collected data on the number and size of fish are zero, the STM32H747I-DISCO control system lowers the net cage lifting device 5.

[0113] As an implementation of the above method, this application provides an embodiment of an automatic fish disease detection system, which can be specifically applied to various electronic devices. The system includes the following modules:

[0114] Cameras are configured to capture images of fish within the smart fish cages;

[0115] Sensors are configured to collect environmental data, including: temperature, humidity, pressure, water temperature, pH value, and dissolved oxygen level;

[0116] The communication module is configured to transmit the fish farming data and the environmental data to the Tencent Cloud platform for real-time viewing by the user.

[0117] The database is used to store fish farming data, environmental data, and disease samples collected from different periods and species. Users can perform operations such as adding, extracting, updating, and deleting data in the files.

[0118] The detection module is configured to input the fish image into the YOLOv5 deep learning model to obtain fish farming data, which includes fish body shape, size, body color, texture, and gill data.

[0119] The characteristics of the target fish include the color of the body surface, the presence or absence of parasites on the body surface, the integrity of the fin spines and rays, and the presence of special lesions or symptoms on the fish body (spots, white hairs, rotten patches, redness and swelling, edema, congestion, ecchymosis, bleeding, abnormal color, increased mucus, and detached mucus).

[0120] The first judgment module is configured to trigger an alarm device to issue a real-time warning and send a warning notification to the user terminal when it is determined that the environmental data exceeds a preset threshold range.

[0121] The second judgment module is configured to, in response to the determination that there is a deviation between the fish farming data and the ideal data in the ideal database, generate an electronic medical record for the fish using image text description technology, automatically retrieve the expert prescription corresponding to the fish disease using text keywords, and send the electronic medical record and expert prescription to the user terminal.

[0122] This invention employs the YOLOv5 deep learning algorithm, training an optimal model using a deep learning framework. The model is then converted into C code using CubeAI, and the C code replaces the `network` and `network_data` files in the FP_AI_VISION1 package. Labels and displays are updated, and images are cropped, enabling deployment on an STM32H747I-DISCO development board. An OV5640 camera captures images into a frame buffer, a preprocessed frame buffer, and a framework for running neural network inference. The resulting image data is then sent to a computer via serial port. The PC is shared to a tablet using sharing software, and the computer and tablet display the number and size of fish in real time. The number and size of the fish are also reported to the cloud via an L610, facilitating remote monitoring by the user.

[0123] This invention primarily utilizes computer vision technology for online monitoring and data collection of fish activity. Through remote manual control and AI-powered intelligent decision-making, it applies this technology to the automated control of fish populations, including intelligent feeding, oxygenation, harvesting, early warning, and diagnosis. First, fish are detected and located, then tracked and identified. Fish activity data is analyzed, and finally, the data is transmitted to a cloud platform. Real-time monitoring of various sensors can be remotely controlled via computers, mobile phones, etc., allowing for appropriate feeding, oxygenation, and harvesting based on the situation. Alternatively, the system can be managed via AI on the remote control platform. The system will intelligently feed, oxygenate, harvest, issue early warnings, and diagnose based on the fish activity data analyzed by machine vision and real-time monitoring data from various sensors, including temperature, humidity, pressure, a DS18B20 waterproof digital temperature sensor, pH sensor, and dissolved oxygen sensor. When collected data exceeds the set normal range, an alarm device will be triggered, and a warning notification will be sent to the user's mobile phone via WeChat mini-program and APP, thereby increasing annual yield and reducing aquaculture costs.

[0124] This invention uses an STM32H747I-DISCO connected to an ADP-L610-Arduino 4G communication module via a USRT8 serial port. AT commands are sent to control the ADP-L610-Arduino communication module to connect to the Tencent Cloud platform, subscribe to relevant topics to receive messages, or publish messages to specified topics. Data from various sensors is reported to the Tencent Cloud platform in real time. The backend server receives and processes the data from the Tencent Cloud platform, and finally sends it to the Tencent Lianlian mini-program and APP for display. Furthermore, the Tencent Cloud platform, Tencent Lianlian mini-program, and APP allow for real-time remote control of the device for feeding, oxygenation, and harvesting. This enables manual feeding, oxygenation, and harvesting via remote control.

[0125] This invention designs a low-power mode (sleep mode) that wakes the processor every minute to collect and report sensor data to the cloud platform. After completion, it automatically returns to low-power mode (sleep mode) to save energy. The processor can be woken up by events and interrupts (such as serial port interrupts) to perform specific tasks such as feeding, harvesting, oxygenation, and automatic operation, and then returns to low-power mode after completion. This reduces energy consumption, lowers electricity costs, and extends battery life.

[0126] The following is for reference. Figure 5 It shows a schematic diagram of the structure of a computer system 500 suitable for implementing electronic devices according to embodiments of the present application. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0127] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 502 or programs loaded from storage section 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the computer system 500. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0128] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a liquid crystal display (LCD) and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card and a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 510 as needed so that computer programs read from it can be installed into storage section 508 as needed.

[0129] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit (CPU) 501, it performs the functions defined in the methods of this application.

[0130] It should be noted that the computer-readable storage medium described in this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable storage medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0131] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0132] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0133] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.

Claims

1. An automatic detection method for fish diseases, characterized in that, Includes the following steps: Images of fish in a smart net cage are captured by a camera, and the images are input into a YOLOv5 deep learning model to obtain fish farming data. The fish farming data includes fish morphology, size, body color, texture, and gill data. The method also includes detecting the fish farming data in the images using a detection network built on the YOLOv5 deep learning model to obtain detection results. The SAM network is used to perform semantic segmentation on the fish in the detection results to obtain the segmentation results of the fish in the image; Based on the segmentation results, the body shape, size, color, texture, and gills of the fish are determined to obtain the fish farming data, specifically including: The pixel space coordinates of the segmentation results are transformed to actual space coordinates through coordinate transformation in order to calculate the body shape and size of the fish. The body color of fish is determined by color recognition, the texture of fish is determined by texture recognition, and the gills of fish are determined by gill comparison. Environmental data is collected through sensors, including temperature, humidity, pressure, water temperature, pH value, and dissolved oxygen level. The fish farming data and environmental data are transmitted to the Tencent Cloud platform via a communication module for users to view in real time. In response to determining that the environmental data exceeds a preset threshold range, the alarm device is triggered to issue a real-time warning and a warning notification is sent to the user terminal. In response to the determination that there is a deviation between the fish farming data and the ideal data in the ideal database, an electronic medical record for the fish is generated using image-text description technology, and expert prescriptions corresponding to fish diseases are automatically retrieved using text keywords. Specifically, this includes: The similarity values ​​between fish body shape, size, color, texture, and gill data obtained by Pearson correlation coefficient calculation and the same fish body shape, size, color, texture, and gill data in an ideal database are used. The preset similarity threshold is 0.

5. If the similarity value is greater than or equal to 0.5, the fish meet the health requirements. If the similarity value is less than 0.5, the fish have a disease. When fish become ill, electronic medical records are generated using image-text description technology, which is achieved through image feature matching. By searching the expert knowledge base and diagnostic case database using text keywords in the fish electronic medical records, highly relevant expert prescriptions can be found. The electronic medical records and expert prescriptions for the fish are sent to the user's device.

2. The automatic detection method for fish diseases according to claim 1, characterized in that, In response to determining that the environmental data exceeds a preset threshold range, an alarm device is triggered to issue a real-time warning, specifically including: In response to the determination that one of the temperature, humidity, pressure, water temperature and pH value detected by the sensor exceeds the preset normal threshold range, a buzzer alarm is triggered and an alarm notification is sent to the user terminal. In response to the determination that the dissolved oxygen level detected by the sensor is less than the preset dissolved oxygen threshold range, a buzzer warning and an oxygen pump automatically supply oxygen are triggered, and a warning notification is sent to the user terminal. The buzzer warning and oxygen pump supply will stop once the real-time detected dissolved oxygen level returns to the preset dissolved oxygen threshold range.

3. The automatic detection method for fish diseases according to claim 1, characterized in that, Also includes: In response to the determination that the collected environmental data does not exceed the preset threshold range, it is then determined whether it is time to feed the fish. In response to the determination that the feeding time has arrived, the STM32 control system controls the feeding device drive system to open the feeding slot of the feeding device so that the fish bait is put into the smart net cage. After the feeding is finished, the feeding slot of the feeding device is closed.

4. The automatic detection method for fish diseases according to claim 3, characterized in that, Also includes: In response to determining that the feeding time has not yet arrived, it is determined whether there is a deviation between the fish farming data and the ideal data in the ideal database, specifically including: In response to the determination that the average body size of the collected fish is greater than a preset reference value, the STM32 control system controls the lifting device of the smart net cage to rise. Driven by the lifting device, the smart net cage rises by tightening the rope and pulling the ring at the bottom of the smart net cage, thereby realizing the retraction and folding of the smart net cage. In response to the determination that the average size value of the collected fish is equal to zero, the STM32 control system controls the lifting device of the smart net cage to descend, drives the lifting device to release the rope, and the ring at the bottom of the smart net cage descends until the fishing net is opened.

5. An automatic detection system for fish diseases, characterized in that, Includes the following modules: Cameras are configured to capture images of fish within the smart fish cages; The detection module is configured to input the fish school image into a YOLOv5 deep learning model to obtain fish farming data, the fish farming data including fish body shape, size, body color, texture and gill data; it also includes: detecting the fish farming data in the fish school image through a detection network constructed based on the YOLOv5 deep learning model to obtain detection results; The SAM network is used to perform semantic segmentation on the fish in the detection results to obtain the segmentation results of the fish in the image; Based on the segmentation results, the body shape, size, color, texture, and gills of the fish are determined to obtain the fish farming data, specifically including: The pixel space coordinates of the segmentation results are transformed to actual space coordinates through coordinate transformation in order to calculate the body shape and size of the fish. The body color of fish is determined by color recognition, the texture of fish is determined by texture recognition, and the gills of fish are determined by gill comparison. Sensors are configured to collect environmental data, including: temperature, humidity, pressure, water temperature, pH value, and dissolved oxygen level; The communication module is configured to transmit the fish farming data and the environmental data to the Tencent Cloud platform for real-time viewing by the user. The first judgment module is configured to trigger an alarm device to issue a real-time warning and send a warning notification to the user terminal when it is determined that the environmental data exceeds a preset threshold range. The second judgment module is configured to, in response to a deviation between the fish farming data and the ideal data in the ideal database, generate an electronic medical record for the fish using image-text description technology, and automatically retrieve expert prescriptions corresponding to fish diseases using text keywords. Specifically, this includes: The similarity values ​​between fish body shape, size, color, texture, and gill data obtained by Pearson correlation coefficient calculation and the same fish body shape, size, color, texture, and gill data in an ideal database are used. The preset similarity threshold is 0.

5. If the similarity value is greater than or equal to 0.5, the fish meet the health requirements. If the similarity value is less than 0.5, the fish have a disease. When fish become ill, electronic medical records are generated using image-text description technology, which is achieved through image feature matching. By searching the expert knowledge base and diagnostic case database using text keywords in the fish electronic medical records, highly relevant expert prescriptions can be found. The electronic medical records and expert prescriptions for the fish are sent to the user's device.

6. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the automatic fish disease detection method as described in any one of claims 1 to 4.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the automatic fish disease detection method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Net cage fishing device capable of freely lifting

    CN112293357A

  • Intelligent fishery monitoring system

    CN114240686A

  • Breeding fish school detection method and system fusing SKNet and YOLOv5 and medium

    CN114724022A

  • Remote management system of fishbowl

    KR1020130118000A

  • KR20210040817A