A fish disease early warning method and system
Through YOLOv8+ByteTrack multi-target tracking, LSTM time series prediction and FUZZY fuzzy inference technology, fish behavior and water quality information are integrated to solve the problem of low accuracy and timeliness of existing fish disease early warning methods, and achieve multi-dimensional Fish disease prediction and early warning reduce the impact of fish diseases.
Patent Information
- Application Number
- CN202410095671.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-24
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-01-24
AI Technical Summary
Existing fish disease early warning methods rely on experience, easily ignore early symptoms and latent symptoms, have low accuracy and timeliness, and are difficult to accurately identify pathogens and multi-pathogen infections.
YOLOv8+ByteTrack multi-target tracking, LSTM time series prediction and FUZZY fuzzy inference technology are used to integrate fish behavior, water quality and body surface characteristics to build a fish disease early warning method, and conduct multi-dimensional early warning through feature training and fuzzy inference models.
It improves the accuracy of fish disease early warning, achieves multi-dimensional prediction, and reduces the impact and losses of fish diseases.
Smart Images

Figure CN117611380B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of fish disease early warning, and in particular relates to a fish disease early warning method and system. Background Art
[0002] At present, the traditional method of early warning of fish diseases mainly relies on experience to inspect fish, such as observing the behavior and appearance of fish, such as swimming, feeding, breathing, scales, fins, gills, etc. for abnormalities or damage. Observe water quality and water temperature, such as color, transparency, odor, pH, dissolved oxygen, ammonia nitrogen, nitrite, etc., for any abnormalities or mutations beyond the normal range. Collect sick fish and pond water samples for naked eye inspection, microscopic inspection, anatomical inspection, etc., to check for pathogenic microorganisms, parasites, pathological changes, etc. According to on-site investigation and pathogen identification, analyze the cause of the disease and the characteristics of the symptoms, refer to relevant literature or expert opinions, and make a preliminary diagnosis. The traditional method relies on experience for diagnosis, which has high requirements for farmers. It relies on the naked eye and experience to observe fish, and it is easy to ignore early symptoms and latent symptoms, leading to misdiagnosis and missed diagnosis, and it cannot accurately identify pathogens and multi-pathogen complex infections. At the same time, its accuracy and timeliness are low, and it often occurs that the diagnosis is not timely, resulting in huge losses for farmers.
[0003] In recent years, with the development of artificial intelligence technology, some fish disease prediction methods based on machine learning and deep learning have been proposed, such as using gradient boosting technology to detect fish diseases early by analyzing water quality. This model can predict diseases caused by water quality and specific water quality characteristics. In terms of behavior, there are studies that use YOLOv5 as a monitoring model to deepen the network structure of the ReID model. In view of the large deformation caused by the distortion of the fish body, the network structure of the ReID model is deepened, and the feature extraction ability of the model is enhanced. It is proposed to identify and track fish that cross the line by setting a virtual baseline, so as to realize the dynamic identification of fish that cross the line and the automatic upper and lower numbers. However, there is still a big gap in the multi-dimensional comprehensive identification of fish diseases.
[0004] Therefore, it is urgent to propose a fish disease early warning method based on the combination of YOLOv8+ByteTrack multi-target tracking, LSTM time series prediction and FUZZY fuzzy reasoning technology to accurately analyze the disease characteristics of fish and improve breeding efficiency. Summary of the invention
[0005] In view of the shortcomings of the existing technology, the present invention proposes a fish disease early warning method and system, which is divided into a feature extraction part and a disease early warning analysis part. The system can integrate the swimming behavior of fish, water quality, and body surface characteristics to accurately evaluate the health status of fish, thus avoiding the disadvantages of using a single feature alone.
[0006] To achieve the above object, the present invention provides the following solutions:
[0007] A fish disease early warning method comprises the following steps:
[0008] Obtaining fish behavior information, fish body surface information and water quality information, and performing feature training on the fish behavior information, the fish body surface information and the water quality information to obtain a fish disease data set; wherein the fish disease data set includes: a fish health and diseased body surface data set, a fish bird's-eye view behavior annotation data set and a water quality data set;
[0009] YOLOv8 is used to train the healthy and diseased body surface datasets of the fish and the top-down behavior annotation dataset of the fish to obtain the weights of the fish body surface and head;
[0010] Using ByteTrack to track and train the weight of the fish head, and obtain the spatial position, speed and steering angle information of each fish individual in continuous frames;
[0011] Based on the water quality data, the spatial position, speed and steering angle information of each individual fish in continuous frames, the LSTM time series prediction technology is used to predict the classification status of water quality and fish, and obtain the water quality classification level and the fish behavior classification level;
[0012] The FUZZY fuzzy reasoning technology is used to set fuzzy sets and fuzzy rules to construct a fuzzy reasoning model; based on the fuzzy reasoning model, fuzzy reasoning is performed on the water quality and fish behavior classification to obtain the fish disease warning level.
[0013] Preferably, the method for obtaining the weight of the fish body surface and head comprises:
[0014] Use labelImg to label the fish healthy and diseased body surface datasets and the fish side view full body data and fish top view head data in the fish top view behavior labeling dataset;
[0015] The labeled data set is input into the YOLOv8 network for training to obtain the weights of the fish body surface and head.
[0016] Preferably, the method for obtaining the spatial position, speed and steering angle information of each fish individual in continuous frames comprises:
[0017] The video of the swimming behavior of the fish school to be detected and the head weights obtained by YOLOv8 training are input into the ByteTrack network, and the head of each individual fish in the school is tracked before, during and after the disease. The spatial position, speed and turning angle information of each individual in the fish school corresponding to the time series are obtained.
[0018] Preferably, the fuzzy reasoning model consists of five functional modules, namely: FUZZY editor, membership function editor, fuzzy rule editor, fuzzy rule observer and surface observer;
[0019] The fuzzy reasoning model includes a rule base of several fuzzy if-then rules; a database defining the membership functions of fuzzy sets using fuzzy if-then rules; a decision unit that performs reasoning operations on the rules; a fuzzy interface that converts explicit input into a degree of matching with language values; a defuzzification interface that converts the fuzzy results obtained by reasoning into explicit outputs; the Mamadni algorithm and the Gaussmf function are used to design fuzzy rules, and 59 rules are used to design the fuzzy reasoning model based on water quality data, body surface data, and behavioral data.
[0020] The present invention also provides a fish disease early warning system, comprising the following steps: a data set acquisition module, a weight acquisition module, a feature information acquisition module, a classification module and an early warning module;
[0021] The data set acquisition module is used to obtain fish behavior information, fish body surface information and water quality information, and perform feature training on the fish behavior information, the fish body surface information and the water quality information to obtain a fish disease data set; wherein the fish disease data set includes: fish health, diseased body surface data sets, fish bird's-eye view behavior annotation data sets and water quality data sets;
[0022] The weight acquisition module is used to train the healthy and diseased fish body surface datasets and the fish top-view behavior annotation dataset using YOLOv8 to obtain the weights of the fish body surface and head;
[0023] The feature information acquisition module is used to track and train the weights of the fish body surface and head using ByteTrack to obtain the spatial position, speed and steering angle information of each fish individual in continuous frames;
[0024] The classification module is used to predict the classification status of water quality and fish based on the water quality data, the spatial position, speed and steering angle information of each fish individual in continuous frames, and obtain the water quality classification level and the fish behavior classification level by using LSTM time series prediction technology;
[0025] The early warning module is used to use FUZZY fuzzy reasoning technology to set fuzzy sets and fuzzy rules to build a fuzzy reasoning model; based on the fuzzy reasoning model, fuzzy reasoning is performed on the water quality and fish behavior classification to obtain the fish disease early warning level.
[0026] Preferably, the process of obtaining the weight of the fish body surface and head includes:
[0027] Use labelImg to label the fish healthy and diseased body surface datasets and the fish side view full body data and fish top view head data in the fish top view behavior labeling dataset;
[0028] The labeled data set is input into the YOLOv8 network for training to obtain the weights of the fish body surface and head.
[0029] Preferably, the process of obtaining the spatial position, speed and steering angle information of each fish individual in continuous frames includes:
[0030] The video of the swimming behavior of the fish school to be detected and the head weights obtained by YOLOv8 training are input into the ByteTrack network, and the head of each individual fish in the school is tracked before, during and after the disease. The spatial position, speed and turning angle information of each individual in the fish school corresponding to the time series are obtained.
[0031] Preferably, the fuzzy reasoning model consists of five functional modules, namely: FUZZY editor, membership function editor, fuzzy rule editor, fuzzy rule observer and surface observer;
[0032] The fuzzy reasoning model includes a rule base of several fuzzy if-then rules; a database defining the membership functions of fuzzy sets using fuzzy if-then rules; a decision unit that performs reasoning operations on the rules; a fuzzy interface that converts explicit input into a degree of matching with language values; a defuzzification interface that converts the fuzzy results obtained by reasoning into explicit outputs; the Mamadni algorithm and the Gaussmf function are used to design fuzzy rules, and 59 rules are used to design the fuzzy reasoning model based on water quality data, body surface data, and behavioral data.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] The fish disease early warning prediction method of the present invention improves the accuracy of disease early warning on data sets of health, sub-health and disease levels, can realize multi-dimensional and multi-method prediction of the occurrence of fish diseases, and reduce the impact and losses caused by fish diseases. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0036] Figure 1 This is a flow chart of a fish disease early warning method based on a combination of YOLOv8+ByteTrack multi-target tracking, LSTM time series prediction, and FUZZY fuzzy reasoning technology in an embodiment of the present invention;
[0037] Figure 2 Schematic diagram of the model structure of YOLOv8 in an embodiment of the present invention;
[0038] Figure 3 Schematic diagram of the model structure of the ByteTrack algorithm in an embodiment of the present invention;
[0039] Figure 4 Schematic diagram of the model structure of the LSTM time series prediction algorithm in an embodiment of the present invention;
[0040] Figure 5 is a schematic diagram of the model structure of the fuzzy inference system in an embodiment of the present invention;
[0041] Figure 6 Schematic diagram of the fish disease early warning process in an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0044] Embodiment 1
[0045] like Figure 1-Figure 6 As shown, this embodiment provides a fish disease early warning system based on the combination of YOLOv8+ByteTrack multi-target tracking, LSTM time series prediction and FUZZY fuzzy reasoning technology. It includes the following steps:
[0046] Obtaining fish behavior, fish body surface information and water quality information, and performing feature training on the fish behavior, the fish body surface information and the water quality information to obtain a fish disease data set; wherein the fish disease data set includes: fish health, diseased body surface data sets, fish bird's-eye view behavior annotation data sets and water quality data;
[0047] YOLOv8 is used to train the healthy and diseased body surface datasets of the fish and the top-down behavior annotation dataset of the fish to obtain the weights of the fish body surface and head;
[0048] ByteTrack is used to track and train the weights of the fish body surface and head. The detection frame classifies the target detection results. The detection frame with an IOU greater than or equal to 0.001 is a high-score detection frame, and the first IOU matching is performed. The trajectory with an IOU greater than or equal to 0.9 is matched with the detection frame. The unmatched detection frame enters the trajectory tracking when the confidence is greater than or equal to 0.001, and is ignored when it is less than 0.001. The unmatched trajectory and the low-score detection frame are matched for the second IOU matching. The above steps are repeated until the matching is completed to obtain the spatial position, speed and steering angle information of each fish individual in the continuous frames;
[0049] Based on the water quality data, the spatial position, speed and steering angle information of each individual fish in continuous frames, the LSTM time series prediction technology is used to predict the future state of water quality and fish, and obtain the water quality and fish behavior classification;
[0050] The FUZZY fuzzy reasoning technology is used to set fuzzy sets and fuzzy rules to construct a fuzzy reasoning model; based on the fuzzy reasoning model, fuzzy reasoning is performed on the water quality and fish behavior classification to obtain the fish disease warning level.
[0051] The experimental system of this embodiment is a 1.2m*0.8m PP circular pool. The filtration equipment uses a turnover box to simulate a circulating water system. The water quality collection equipment uses sensors and water quality monitoring instruments. The image acquisition system consists of a camera and a data storage device. The light source uses an LED lamp mounted on the water surface. The camera is placed directly above the system and underwater. The above-water collection resolution is 2560*1920 pixels, the rate is 25fps, and the underwater collection resolution is 1920*1080 pixels, the rate is 25fps. A total of 20 fish were cultured in the system, and largemouth bass were fed with floating feed, with a daily feeding of 1% of body weight. The water temperature was maintained between 24-26℃. Before the experiment, the fish had been cultured in the system for 8 weeks.
[0052] Firstly, the swimming behavior of fish before, during and after becoming ill was filmed through the video acquisition system, and a total of 200 hours of video images were collected. According to the input method of the algorithm, the side view and top view videos were divided into 300 images respectively using codetools, and the video clips before, during and after becoming ill were selected and imported into the server to create a fish disease behavior dataset.
[0053] In this embodiment, the workflow of feature extraction using YOLOv8+ByteTrack is as follows: use labelImg to label the fish heads in the image, input the labeled data set into the YOLOv8 network for training, and its network structure obtains weights for identifying the fish heads; the fish head image is intercepted and input into the ByteTrack network, the fish heads in the videos before, during, and after the disease are tracked, and the spatial position, speed, steering angle and other information of each fish individual in continuous frames are output.
[0054] The fish disease early warning system based on the combination of YOLOv8+ByteTrack multi-target tracking, LSTM time series prediction and FUZZY fuzzy reasoning technology consists of three algorithms: YOLOv8, ByteTrack and LSTM.
[0055] The network structure of the YOLOv8 algorithm consists of three parts: backbone, neck and head. The backbone network is used to extract image features, the neck is used to fuse features of different scales, and the head is used to predict the category and position of the target. The principle is as follows: (1) The backbone adopts the structure of CSPDarkNet. The biggest difference from YOLOv5 is that YOLOv8 uses the C2f module instead of the C3 module to achieve further lightweight, while adding more skip-layer connections to improve the gradient flow and convergence effect. (2) The neck adopts the structure of PANet. Through the top-down and bottom-up bidirectional paths, it makes it easier for the bottom-level information to be transmitted to the top layer, enhancing the feature expression ability. (3) The head adopts the structure of the decoupled head, separates the classification and regression branches, and changes from Anchor-Based to Anchor-Free, simplifying the label assignment and loss calculation process. (4) The loss function of the YOLOv8 algorithm consists of two parts: classification loss and regression loss. The classification loss uses VFLLoss, which is a classification loss based on probability distribution and can effectively deal with the problem of category imbalance. The regression loss uses DFL Loss and CIOU Loss, which are distribution-based regression losses that can more accurately predict the location and size of the target. (5) The label assignment of the YOLOv8 algorithm uses Task-Aligned Assigner, which is a dynamic positive and negative sample assignment strategy that can be adaptively adjusted according to the difficulty of the task and the performance of the model, thereby improving the efficiency and stability of training.
[0056] In this example, for the purpose of fish disease identification and fish head identification for tracking, the parameters of YOLOv8 are set as shown in Table 1:
[0057] Table 1
[0058]
[0059] ByteTrack is divided into four parts: detector, Kalman filter, Hungarian algorithm and confidence threshold. The principles of each part are as follows: (1) Detector: ByteTrack uses YOLOX as the detector, which can achieve efficient target detection. YOLOX is an anchor-free detector that uses Focal Loss and NMS to optimize the detection results. YOLOX also uses multi-scale feature fusion and data enhancement techniques to improve detection performance. (2) Kalman filter: ByteTrack uses the Kalman filter to predict the motion state of the target, including position, velocity and acceleration. The Kalman filter is a recursive Bayesian filter that can use observation data and prior knowledge to estimate the state of the system. The Kalman filter can effectively handle the uncertainty and noise of the motion model. (3) Hungarian algorithm: ByteTrack uses the Hungarian algorithm to match the target and the trajectory, that is, data association. The Hungarian algorithm is an algorithm for solving the maximum matching of the bipartite graph and can find the optimal solution in polynomial time. ByteTrack uses cosine similarity and Mahalanobis distance as the matching cost function, which respectively measures the similarity of the appearance and motion of the target. (4) Confidence threshold: ByteTrack used in the present invention uses a confidence threshold of 0.001 to filter out background detection frames and false targets. Detection frames with a confidence threshold greater than or equal to 0.001 are tracked, and detection frames with a confidence threshold less than 0.001 are ignored. ByteTrack detection tracking is determined based on the score distribution of the detection frames of the current frame and can be adjusted adaptively. At the same time, ByteTrack will also retain some detection frames with low scores so that the real target can be restored by using the similarity of the trajectory.
[0060] In this example, for the purpose of head recognition tracking, the ByteTrack parameters are set as shown in Table 2 below:
[0061] Table 2
[0062]
[0063] The main feature of LSTM is the introduction of a cell state to store and transmit long-term information, while controlling the flow of information through three gate structures (input gate, forget gate, and output gate). LSTM can effectively solve the problem of gradient disappearance or explosion in general RNN, and improve the stability and generalization ability of the model. Its principle is as follows: (1) The input gate controls the flow of new input information, and a candidate state is calculated through a sigmoid layer and a tanh layer to represent the new information. (2) The forget gate controls the forgetting of the old cell state, and a forgetting factor is calculated through a sigmoid layer to indicate which elements need to be forgotten and which elements need to be retained. (3) According to the control of the input gate and the forget gate, the cell state forgets the old state and merges the new state in a certain proportion to obtain a new state. (4) The output gate controls the output of the cell state, and an output factor is calculated through a sigmoid layer and a tanh layer to indicate which part of the cell state needs to be output.
[0064] In this example, for the prediction of fish disease classification and fish water disease classification, the main parameters of LSTM are introduced and set as shown in Table 3 below:
[0065] Table 3
[0066]
[0067] The fuzzy reasoning system consists of five functional modules: FUZZY editor, membership function editor, fuzzy rule editor, fuzzy rule observer, and surface observer. It consists of (1) a rule base containing several fuzzy if-then rules; (2) a database that defines the membership functions of fuzzy sets using fuzzy if-then rules; (3) a decision-making unit that performs reasoning operations on the rules; (4) a fuzzification interface that converts explicit inputs into the degree of matching with language values; (5) a defuzzification interface that converts the fuzzy results obtained by reasoning into explicit outputs. (6) The mamadni algorithm and gaussmf function are used to design fuzzy rules. According to water quality data, body surface data, and behavioral data, 59 rules are used to design the fuzzy system.
[0068] This embodiment proposes a fish disease early warning method based on the combination of YOLOv8+ByteTrack multi-target tracking, LSTM time series prediction and FUZZY fuzzy reasoning technology, which is divided into a feature extraction part and a disease early warning analysis part. It can integrate the swimming behavior of fish schools, water quality conditions, and body surface characteristics to accurately evaluate the health status of fish schools, avoiding the disadvantages of using a single feature.
[0069] The prediction method of this embodiment improves the accuracy of disease warning in the data set of health, sub-health and diseased levels of the fish disease warning prediction method of the present invention. After verification, the accuracy of identifying the surface characteristics of infected body reaches 87.54%, the accuracy of predicting the water quality of infected water reaches 78.73%, the accuracy of predicting the behavior of infected fish reaches 81.08%, and the comprehensive recognition accuracy of the fish disease warning system reaches 94.17%, indicating that the multi-modal fuzzy reasoning warning system can better warn fish diseases and has high practical value. It can realize multi-dimensional and multi-method prediction of the occurrence of fish diseases and reduce the impact and losses caused by fish diseases.
[0070] Embodiment 2
[0071] The present invention also provides a fish disease early warning system, comprising the following steps: a data set acquisition module, a weight acquisition module, a feature information acquisition module, a classification module and an early warning module;
[0072] The data set acquisition module is used to obtain fish behavior, fish body surface information and water quality information, and perform feature training on the fish behavior, the fish body surface information and the water quality information to obtain a fish disease data set; wherein the fish disease data set includes: fish health, diseased body surface data sets, fish bird's-eye view behavior annotation data sets and water quality data;
[0073] The weight acquisition module is used to train the healthy and diseased body surface datasets of the fish and the top-view behavior annotation dataset of the fish using YOLOv8 to obtain the weights of the fish body surface and head;
[0074] The feature information acquisition module is used to track and train the weights of the fish body surface and head using ByteTrack to obtain the spatial position, speed and steering angle information of each fish individual in continuous frames;
[0075] The classification module is used to predict the future state of water quality and fish based on the water quality data, the spatial position, speed and steering angle information of each fish individual in continuous frames, and obtain the water quality and fish behavior classification by using LSTM time series prediction technology;
[0076] The early warning module is used to use FUZZY fuzzy reasoning technology to set fuzzy sets and fuzzy rules to build a fuzzy reasoning model; based on the fuzzy reasoning model, fuzzy reasoning is performed on the water quality and fish behavior classification to obtain the fish disease early warning level.
[0077] In this embodiment, before extracting the features of the diseased characteristic images of fish, the process also includes: clipping the video resolution size, dividing the video images into segments that meet the multi-objective training, and obtaining a data set of fish disease information. For obtaining water quality information, it is necessary to divide a variety of water quality information into segments of the same length to obtain a data set of fish disease information.
[0078] The process of training the feature extraction model includes: marking the head of each individual fish in the data set, obtaining the marked data set, and inputting the marked data set into the feature extraction model for training.
[0079] Specifically, there are 300 fish health and disease body surface data sets, 300 fish bird's-eye view behavior annotation data sets, and 5028 water quality data sets.
[0080] In this embodiment, the process of obtaining the weights of the fish body surface and head includes:
[0081] Use labelImg to label the fish healthy and diseased body surface datasets and the fish side view full body data and fish top view head data in the fish top view behavior labeling dataset;
[0082] The labeled data set is input into the YOLOv8 network for training to obtain the weights of the fish body surface and head.
[0083] In this embodiment, the process of obtaining the spatial position, speed and steering angle information of each fish individual in continuous frames includes:
[0084] The video of the swimming behavior of the fish school to be detected, the weight of the fish body surface and the head are input into the ByteTrack network, and the head of each individual fish in the school is tracked before, during and after the disease. The spatial position, speed and turning angle information of each individual in the fish school corresponding to the time series are obtained.
[0085] Specifically, the process of spatiotemporal feature extraction includes: intercepting the head image of each individual in the fish school and inputting it into the trained feature extraction model to obtain the head weight of each individual in the fish school; based on the head weight, tracking the head of each individual in the fish school in the data set to obtain the spatial position information of each individual in the fish school corresponding to the time series.
[0086] The specific process of ByteTrack tracking training is as follows: put the video to be detected into the videos folder, and put the trained head weights into weights; modify the parameters, modify the number of fish, and click track.py to run; save the running results in track, and output the speed and steering angle data.
[0087] The YOLOv8+ByteTrack algorithm is used to identify the output data of the fish head, and the swimming data of the fish in healthy, sub-healthy, and diseased states are obtained, that is, the turning angle data obtained by tracking the fish head, and the water quality data of the diseased fish are collected. The water quality of the fish during the illness is marked, and the water quality sequence and behavior sequence are respectively marked as "healthy", "sub-healthy", and "disease" to facilitate input into the LSTM system for sequence classification.
[0088] In this embodiment, the specific process of LSTM time series prediction is: the tracking data and water quality data are graded and labeled according to the fish status; training is performed through test.py, and then prediction is performed through tetect.py; and water quality and behavior classification are obtained.
[0089] In this embodiment, the fuzzy reasoning model consists of five functional modules, namely: FUZZY editor, membership function editor, fuzzy rule editor, fuzzy rule observer and surface observer;
[0090] The fuzzy reasoning model includes a rule base of several fuzzy if-then rules; a database defining the membership functions of fuzzy sets using fuzzy if-then rules; a decision unit that performs reasoning operations on the rules; a fuzzy interface that converts explicit input into a degree of matching with language values; a defuzzification interface that converts the fuzzy results obtained by reasoning into explicit outputs; the Mamadni algorithm and the Gaussmf function are used to design fuzzy rules, and 59 rules are used to design the fuzzy reasoning model based on water quality data, body surface data, and behavioral data.
[0091] Specifically, the specific working process of the fuzzy reasoning model is: setting fuzzy reasoning input rules and functions, inputting the obtained behavior, body surface texture, and water quality level into the fuzzy reasoning model, and obtaining the fish disease warning level.
[0092] The present invention performs feature training by acquiring information on fish behavior, body surface and water quality, extracts fish feature vectors from water quality data and behavior data, and reflects the health status of fish and the impact of diseases. Multi-target tracking technology is used to accurately detect and track fish targets to avoid target loss and misidentification problems. LSTM time series prediction technology is used to predict the classification status of fish and capture behavioral changes and abnormal conditions of fish. Fuzzy reasoning technology is used to reasonably set fuzzy sets and fuzzy rules, effectively perform fuzzy reasoning, and output the warning level of fish Nocardia.
[0093] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A fish disease early warning method, characterized in that: The following steps are involved: Obtaining fish behavior information, fish body surface information and water quality information, and performing feature training on the fish behavior information, the fish body surface information and the water quality information to obtain a fish disease data set; wherein the fish disease data set includes: a fish health and diseased body surface data set, a fish bird's-eye view behavior annotation data set and a water quality data set; YOLOv8 is used to train the healthy and diseased body surface datasets of the fish and the top-down behavior annotation dataset of the fish to obtain the weights of the fish body surface and head; ByteTrack is used to track and train the weights of fish heads to obtain the spatial position, speed, and steering angle information of each fish individual in consecutive frames; Based on the water quality data, the spatial position, speed and steering angle information of each individual fish in continuous frames, the LSTM time series prediction technology is used to predict the classification status of water quality and fish, and obtain the water quality classification level and the fish behavior classification level; Using FUZZY fuzzy reasoning technology, setting fuzzy sets and fuzzy rules, and building a fuzzy reasoning model; based on the fuzzy reasoning model, performing fuzzy reasoning on the water quality and fish behavior classification to obtain the fish disease warning level; The experimental system is a 1.2m*0.8m PP circular pool. The filtration equipment uses a turnover box to simulate the circulating water system. The water quality collection equipment uses sensors and water quality monitoring instruments. The image acquisition system consists of a camera and a data storage device. The light source uses an LED lamp mounted on the water surface. The camera is placed directly above the system and underwater. The above-water collection resolution is 2560*1920 pixels and the rate is 25fps. The underwater collection resolution is 1920*1080 pixels and the rate is 25fps. There are 20 fish cultured in the system, which are fed with largemouth bass floating feed and 1% of body weight per day. The water temperature is maintained between 24-26℃. Before the experiment, the fish had been cultured in the system for 8 weeks. The video acquisition system was used to film the swimming behavior of fish before, during, and after they became ill, and a total of 200 hours of video images were collected. The side view and top view videos were divided into 300 images respectively using codetools, and the video clips before, during, and after they became ill were selected and imported into the server to create a fish disease behavior dataset. The method for obtaining the spatial position, speed and steering angle information of each fish individual in continuous frames includes: Use labelImg to label the fish heads in the image, input the labeled data set into the YOLOv8 network for training, and its network structure obtains weights for identifying fish heads; capture the fish head images and input them into the ByteTrack network, track the fish heads in the videos before, during, and after the disease, and output the spatial position, speed, and steering angle information of each fish individual in consecutive frames; For the purpose of fish disease identification and fish head identification for tracking, the parameters of YOLOv8 are set as follows: model is YOLOv8s.pt, data is bigmouth.yaml, epochs is 100, patience is 50, batch is 16, imgsz is 640, box is 7.5, cls is 0.5, dfl is 1.5, pose is 12.0, kobj is 1.0, IOU is 0.7; For head recognition tracking, set the ByteTrack parameters to: model is Bigmouth-20.yaml, track_thresh is 0.001, track_buffer is 120, match_thresh is 0.9, frame_rate is 60, and conf_thres is 0.001; ByteTrack is used to track and train the weights of the fish body surface and head. The detection frame classifies the target detection results. The detection frame with a score greater than or equal to 0.001 is a high-score detection frame. The first IOU matching is performed. The trajectory with an IOU greater than or equal to 0.9 is matched with the detection frame. The unmatched detection frame enters the trajectory tracking when the confidence is greater than or equal to 0.001, and is ignored when it is less than 0.
001. The unmatched trajectory and the low-score detection frame are matched for the second IOU matching. The above steps are repeated until the matching is completed to obtain the spatial position, speed and steering angle information of each fish individual in the continuous frames; Methods for obtaining the weight of the fish body and head include: Use labelImg to label the fish healthy and diseased body surface datasets and the fish side view full body data and fish top view head data in the fish top view behavior labeling dataset; Input the labeled data set into the YOLOv8 network for training to obtain the weights of the fish body surface and head; The fuzzy reasoning model consists of five functional modules, namely: FUZZY editor, membership function editor, fuzzy rule editor, fuzzy rule observer and surface observer; The fuzzy reasoning model includes a rule base of several fuzzy if-then rules; a database defining membership functions of fuzzy sets using fuzzy if-then rules; a decision unit for performing reasoning operations on the rules; a fuzzy interface for converting explicit inputs into degrees of matching with language values; and a defuzzification interface for converting fuzzy results obtained by reasoning into explicit outputs. The mamadni algorithm and gaussmf function are used to design fuzzy rules, and the fuzzy reasoning model is designed according to water quality data, body surface data, and behavioral data; The network structure of the YOLOv8 algorithm consists of three parts: backbone, neck and head. The backbone network is used to extract image features, the neck is used to fuse features of different scales, and the head is used to predict the category and position of the target. The principle is as follows: The backbone adopts the structure of CSPDarkNet. YOLOv8 uses C2f module instead of C3 module to achieve further lightweight. At the same time, it adds skip-layer connection to improve gradient flow and convergence effect. Neck adopts the PANet structure, which makes it easier to transmit the bottom-level information to the top-level through top-down and bottom-up bidirectional pathways, thus enhancing the expressiveness of features. The head adopts a decoupled head structure to separate the classification and regression branches, and changes from the anchor-based method to the anchor-free method to simplify the label assignment and loss calculation process; The loss function of the YOLOv8 algorithm consists of two parts: classification loss and regression loss. The classification loss uses VFLLoss, which is a classification loss based on probability distribution and effectively handles the problem of class imbalance. The regression loss uses DFL Loss and CIOU Loss, which are distribution-based regression losses that more accurately predict the location and size of the target. The label assignment of the YOLOv8 algorithm uses Task-Aligned Assigner, which is a dynamic positive and negative sample assignment strategy that makes adaptive adjustments based on the difficulty of the task and the performance of the model to improve the efficiency and stability of training; ByteTrack is divided into four parts: detector, Kalman filter, Hungarian algorithm and confidence threshold. The principles of each part are as follows: Detector: ByteTrack uses YOLOX as a detector to achieve efficient target detection. YOLOX is an anchor-free detector that uses Focal Loss and NMS to optimize detection results. YOLOX also uses multi-scale feature fusion and data enhancement technology to improve detection performance. Kalman filter: ByteTrack uses Kalman filter to predict the motion state of the target, including position, velocity and acceleration. Kalman filter is a recursive Bayesian filter that uses observed data and prior knowledge to estimate the state of the system. Kalman filter handles the uncertainty and noise of the motion model. Hungarian algorithm: ByteTrack uses the Hungarian algorithm to match targets and trajectories, i.e., data association. The Hungarian algorithm is an algorithm for solving the maximum matching of bipartite graphs and finding the optimal solution in polynomial time. ByteTrack uses cosine similarity and Mahalanobis distance as matching cost functions to measure the similarity of target appearance and motion, respectively. Confidence threshold: ByteTrack uses a dynamic confidence threshold to filter out background detection boxes and false targets. The confidence threshold is determined based on the score distribution of the detection boxes in the current frame and is adjusted adaptively. ByteTrack also uses a minimum confidence threshold to retain some low-score detection boxes in order to use the similarity of the trajectory to recover the real target. LSTM introduces a cell state to store and transmit long-term information, and controls the flow of information through three gating structures. LSTM effectively solves the problem of gradient disappearance or explosion in general RNN, and improves the stability and generalization ability of the model. The principle is as follows: The input gate controls the flow of new input information, and a candidate state is calculated through a sigmoid layer and a tanh layer to represent the new information; The forget gate controls the forgetting of old cell states, and a forgetting factor is calculated through a sigmoid layer to indicate which elements need to be forgotten and which elements need to be retained; The cell state is controlled by the input gate and the forget gate, forgetting the old state and integrating the new state to obtain a new state; The output gate controls the output of the cell state, and uses a sigmoid layer and a tanh layer to calculate an output factor, indicating which part of the cell state needs to be output; The fish disease early warning prediction method improves the accuracy of disease early warning on data sets of health, sub-health, and disease levels. After verification, the accuracy of identifying infected body surface features reached 87.54%, the accuracy of predicting infected water quality reached 78.73%, and the accuracy of predicting infected behavior reached 81.08%. The comprehensive recognition accuracy of the fish disease early warning system reached 94.17%.
2. A fish disease early warning system, implementing a fish disease early warning method as claimed in claim 1, characterized in that: The following steps are involved: Data set acquisition module, weight acquisition module, feature information acquisition module, classification module and early warning module; The data set acquisition module is used to obtain fish behavior information, fish body surface information and water quality information, and perform feature training on the fish behavior information, the fish body surface information and the water quality information to obtain a fish disease data set; wherein the fish disease data set includes: fish health, diseased body surface data sets, fish bird's-eye view behavior annotation data sets and water quality data sets; The weight acquisition module is used to train the healthy and diseased fish body surface datasets and the fish top-view behavior annotation dataset using YOLOv8 to obtain the weights of the fish body surface and head; The feature information acquisition module is used to track and train the weights of the fish body surface and head using ByteTrack to obtain the spatial position, speed and steering angle information of each fish individual in continuous frames; The classification module is used to predict the classification status of water quality and fish based on the water quality data, the spatial position, speed and steering angle information of each fish individual in continuous frames, and obtain the water quality classification level and the fish behavior classification level by using LSTM time series prediction technology; The early warning module is used to use FUZZY fuzzy reasoning technology to set fuzzy sets and fuzzy rules to build a fuzzy reasoning model; based on the fuzzy reasoning model, fuzzy reasoning is performed on the water quality and fish behavior classification to obtain the fish disease early warning level.
Citation Information
Cited By
Intelligent monitoring method and system for grouper viral nervous necrosis phenotype
CN122367859A
Intelligent monitoring method and system for grouper viral nervous necrosis phenotype
CN122367859B
