Fish disease detection method, device and equipment and storage medium

Through video data, identifying the behavior type of ornamental fish, judging whether it carries a disease, solving the problem of inefficient traditional manual detection, and achieving efficient and accurate disease detection and timely processing.

CN119251660APending Publication Date: 2025-01-03GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411168226.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

Traditional ornamental fish disease detection relies on manual observation, which is inefficient and prone to missed early symptoms, resulting in delays in treatment.

Method used

By obtaining the video data of the fish, determine its dynamic characteristic data such as motion trajectory, velocity and acceleration, input a pre-trained behavior classifier to identify the behavior type of the fish and determine whether it is carrying a disease. If it is carrying a disease, determine the type of the disease and output it.

Benefits of technology

It improves the efficiency and accuracy of disease detection, reduces the cost and subjective errors of manual monitoring, promptly detects and deals with fish diseases, and ensures that farmers can take timely measures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251660A_ABST
    Figure CN119251660A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a fish disease detection method and device, equipment and a storage medium. The method comprises the following steps: acquiring video data of fish; according to the video data, dynamic feature data of the fish are determined, and the dynamic feature data comprise the motion trail, the speed and the acceleration; inputting the dynamic feature data into a pre-trained behavior classifier to obtain a behavior type of the fish, determining whether the fish carries a disease according to the behavior type of the fish, and if the fish carries the disease, determining a disease type corresponding to the dynamic feature data and outputting the disease type; whether the fish carries the disease or not is determined according to the behavior type of the fish identified from the video data, the disease detection efficiency and accuracy are improved, the manual monitoring cost and subjective errors are reduced, fish diseases can be found and treated in time, and a farmer can take measures in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fish breeding, and in particular to a method, device, equipment and storage medium for detecting fish diseases. Background Art

[0002] With the improvement of people's living standards, ornamental fish farming has gradually become a popular leisure activity and has been favored by more and more people in recent years. However, the prevention and control of ornamental fish diseases has always been an important factor restricting its healthy development. Traditional ornamental fish disease detection mainly relies on manual observation, which is not only inefficient, but also easy to miss the early symptoms of the disease, leading to delayed treatment. Summary of the invention

[0003] In view of the above problems, embodiments of the present invention are proposed to provide a fish disease detection method, device, equipment and storage medium that overcome the above problems or at least partially solve the above problems.

[0004] In order to solve the above problems, an embodiment of the present invention discloses a disease detection method for fish, the method comprising:

[0005] Acquire video data of the fish;

[0006] Determine dynamic feature data of the fish according to the video data, wherein the dynamic feature data includes motion trajectory, speed and acceleration;

[0007] The dynamic feature data is input into a pre-trained behavior classifier to obtain the behavior type of the fish, and whether the fish carries a disease is determined based on the behavior type of the fish. If the fish carries a disease, the disease type corresponding to the behavior type is determined and output.

[0008] Optionally, the behavior classifier is trained in the following manner:

[0009] Collecting multiple groups of state feature data of the fish and behavior types corresponding to the multiple groups of dynamic feature data;

[0010] Using the multiple groups of state feature data as first input data, and using the behavior types corresponding to the multiple groups of dynamic feature data as first output data;

[0011] The behavior classifier is trained according to the first input data and the first output data to obtain a pre-trained behavior classifier.

[0012] Optionally, determining whether the fish carries a disease according to the behavior type of the fish includes:

[0013] Inputting the behavior type of the fish into a pre-trained disease recognition model to obtain an output result, wherein the output result includes the probability that the fish carries the disease;

[0014] If the probability that the fish carries the disease is greater than a preset probability, it is determined that the fish carries the disease.

[0015] Optionally, the disease recognition model is trained in the following manner:

[0016] Collecting multiple groups of behavior type data of the fish and the probability of the fish corresponding to the multiple groups of behavior type data carrying a disease;

[0017] Using the multiple groups of behavior type data as second input data, and using the probability of fish carrying diseases corresponding to the multiple groups of behavior type data as second output data;

[0018] The disease recognition model is trained according to the second input data and the second output data to obtain a pre-trained disease recognition model.

[0019] Optionally, the output result further includes a disease type; and the method further includes:

[0020] Obtaining the weight of the fish;

[0021] Determine the type of medicine that needs to be administered based on the type of disease;

[0022] Determining the dosage of the drug to be administered according to the severity of the disease and the weight of the fish;

[0023] The medicine is administered to the fish according to the type of the medicine and the dosage.

[0024] Optionally, determining the dynamic characteristic data of the fish according to the video data includes:

[0025] extracting a plurality of video frames from the video data;

[0026] Preprocessing the plurality of video frame data to obtain a plurality of preprocessed video frame data;

[0027] The dynamic feature data of the fish is determined based on the processed multiple video frame data.

[0028] Optionally, determining the dynamic feature data of the fish according to the processed multiple video frame data includes:

[0029] Extracting multiple feature maps from the multiple video frame data;

[0030] The dynamic characteristic data of the fish is determined according to the multiple characteristic graphs.

[0031] Optionally, determining the dynamic characteristic data of the fish according to the multiple characteristic graphs includes:

[0032] Inputting the plurality of feature maps into a pre-trained posture recognition model to obtain body posture data of the fish, wherein the body posture data includes coordinates of key points of body parts of the fish;

[0033] The state characteristic data of the fish is determined according to the body posture data of the fish.

[0034] Optionally, the pre-trained gesture recognition model is trained in the following manner:

[0035] Collecting multiple groups of feature maps of the fish and key point coordinates of body parts corresponding to the multiple groups of feature maps;

[0036] Using the multiple groups of feature maps of the fish as third input data of the posture recognition model, and using the key point coordinates of the body parts corresponding to the multiple groups of feature maps as third output data of the posture recognition model;

[0037] The gesture recognition model is trained according to the third input data and the third output data to obtain the pre-trained gesture recognition model.

[0038] Optionally, the body posture data further includes timestamps of each feature graph; and determining the state feature data of the fish according to the body posture data of the fish includes:

[0039] Determining the movement trajectory of the fish according to the key point coordinates corresponding to the multiple feature maps;

[0040] The acceleration and speed of the fish are calculated according to the key point coordinates and timestamps corresponding to the multiple feature maps.

[0041] The present invention also discloses a fish disease detection device, which comprises:

[0042] A first acquisition module, used for acquiring video data of the fish;

[0043] A first determination module, used to determine the dynamic feature data of the fish according to the video data, wherein the dynamic feature data includes a motion trajectory, a speed and an acceleration;

[0044] The output module is used to input the dynamic feature data into a pre-trained behavior classifier to obtain the behavior type of the fish, determine whether the fish carries a disease based on the behavior type of the fish, and if the fish carries a disease, determine the disease type corresponding to the behavior type and output it.

[0045] Optionally, the behavior classifier is trained in the following manner:

[0046] Collecting multiple groups of state feature data of the fish and behavior types corresponding to the multiple groups of dynamic feature data;

[0047] Using the multiple groups of state feature data as first input data, and using the behavior types corresponding to the multiple groups of dynamic feature data as first output data;

[0048] The behavior classifier is trained according to the first input data and the first output data to obtain a pre-trained behavior classifier.

[0049] Optionally, the output module includes:

[0050] A first input submodule is used to input the behavior type of the fish into a pre-trained disease recognition model to obtain an output result, wherein the output result includes the probability that the fish carries a disease;

[0051] The first determination submodule is used to determine that the fish carries a disease if the probability that the fish carries a disease is greater than a preset probability.

[0052] Optionally, the disease recognition model is trained in the following manner:

[0053] Collecting multiple groups of behavior type data of the fish and the probability of the fish corresponding to the multiple groups of behavior type data carrying a disease;

[0054] Using the multiple groups of behavior type data as second input data, and using the probability of fish carrying diseases corresponding to the multiple groups of behavior type data as second output data;

[0055] The disease recognition model is trained according to the second input data and the second output data to obtain a pre-trained disease recognition model.

[0056] Optionally, the output result further includes the disease type; and the device further includes:

[0057] A second acquisition module is used to obtain the weight of the fish;

[0058] A second determination module is used to determine the type of medicine that needs to be administered according to the disease type;

[0059] A third determination module is used to determine the dosage of the drug to be administered according to the disease severity and the weight of the fish;

[0060] The delivery module is used to deliver the medicine to the fish according to the type of the medicine and the delivery dosage.

[0061] Optionally, the first determining module includes:

[0062] An extraction submodule, used for extracting a plurality of video frames from the video data;

[0063] A preprocessing submodule, used for preprocessing the plurality of video frame data to obtain a plurality of preprocessed video frame data;

[0064] The second determination submodule is used to determine the dynamic feature data of the fish according to the processed multiple video frame data.

[0065] Optionally, the second determining submodule includes:

[0066] An extraction unit, used for extracting a plurality of feature maps from the plurality of video frame data;

[0067] A determination unit is used to determine the dynamic characteristic data of the fish according to the multiple characteristic graphs.

[0068] Optionally, the determining unit includes:

[0069] An input subunit, used for inputting the plurality of feature maps into a pre-trained posture recognition model to obtain body posture data of the fish, wherein the body posture data includes coordinates of key points of the body parts of the fish;

[0070] The determination subunit is used to determine the dynamic characteristic data of the fish according to the body posture data of the fish.

[0071] Optionally, the pre-trained gesture recognition model is trained in the following manner:

[0072] Collecting multiple groups of feature maps of the fish and key point coordinates of body parts corresponding to the multiple groups of feature maps;

[0073] Using the multiple groups of feature maps of the fish as third input data of the posture recognition model, and using the key point coordinates of the body parts corresponding to the multiple groups of feature maps as third output data of the posture recognition model;

[0074] The gesture recognition model is trained according to the third input data and the third output data to obtain the pre-trained gesture recognition model.

[0075] Optionally, the body posture data further includes timestamps of each feature graph; and the determination subunit includes:

[0076] A motion trajectory determining unit, used to determine the motion trajectory of the fish according to the key point coordinates corresponding to the multiple feature maps;

[0077] A speed determination unit is used to calculate the acceleration and speed of the fish according to the key point coordinates and time stamps corresponding to the multiple feature maps.

[0078] The present invention also discloses an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor is used to execute the steps of the above-mentioned fish disease detection method.

[0079] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned fish disease detection method are implemented.

[0080] The invention discloses a disease detection method for fish, which obtains video data of fish; determines dynamic feature data of fish according to the video data, wherein the dynamic feature data includes motion trajectory, speed and acceleration; inputs the dynamic feature data into a pre-trained behavior classifier to obtain the behavior type of the fish, determines whether the fish carries a disease according to the behavior type of the fish, and if the fish carries the disease, determines the disease type corresponding to the dynamic feature data and outputs it; the invention determines whether the fish carries the disease by identifying the behavior type of the fish from the video data, thereby improving the efficiency and accuracy of disease detection, reducing the cost and subjective errors of manual monitoring, and facilitating timely discovery and treatment of fish diseases, so that breeders can take measures in time, providing the possibility for early treatment of fish diseases. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] Figure 1 is a flow chart of the steps of a fish disease detection method provided by an embodiment of the present invention;

[0082] Figure 2 is a flow chart of a fish disease detection method provided by an embodiment of the present invention;

[0083] Figure 3 It is a structural block diagram of a fish disease detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0084] 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.

[0085] One of the core concepts of an embodiment of the present invention is to obtain video data of fish; determine dynamic feature data of the fish based on the video data, the dynamic feature data including motion trajectory, speed and acceleration; input the dynamic feature data into a pre-trained behavior classifier to obtain the behavior type of the fish, determine whether the fish is carrying a disease based on the behavior type of the fish, and if the fish is carrying a disease, determine the disease type corresponding to the dynamic feature data and output it; the present invention determines whether the fish is carrying a disease by identifying the behavior type of the fish from the video data, thereby improving the efficiency and accuracy of disease detection, reducing the cost and subjective errors of manual monitoring, and facilitating timely detection and treatment of fish diseases, so that breeders can take timely measures.

[0086] Reference Figure 1 , showing the steps of a fish disease detection method provided by an embodiment of the present invention, the method may include the following steps:

[0087] Step 101, obtaining video data of fish.

[0088] In the embodiment of the present invention, video data of fish can be captured by an underwater camera or a surveillance camera built into an aquarium. A suitable location can be selected in the fish pond or aquarium to install the camera, ensuring that the shooting area is well lit and that the camera can cover the main activity area of ​​the fish.

[0089] Step 102, determining the dynamic characteristic data of the fish according to the video data, the dynamic characteristic data including the motion trajectory, speed and acceleration.

[0090] In the embodiment of the present invention, after the video data of the fish is acquired, the video data may be processed to obtain dynamic feature data of the fish.

[0091] Step 103, input the dynamic feature data into a pre-trained behavior classifier to obtain the behavior type of the fish, determine whether the fish is carrying a disease based on the behavior type of the fish, and if the fish is carrying a disease, determine the disease type corresponding to the dynamic feature data and output it.

[0092] In an embodiment of the present invention, after obtaining the dynamic feature data of the fish, the dynamic feature data of the fish can be input into a pre-trained behavior classifier to obtain the behavior type of the fish. The pre-trained behavior classifier is trained based on multiple labeled behavior data of the fish. After obtaining the behavior type of the fish, it can be determined whether the fish carries a disease based on the behavior type. If the fish does not carry the disease, the fish will not be processed. If it is determined that the fish carries the disease, the disease type corresponding to the behavior type of the fish can be output, thereby reminding the user to process it.

[0093] The invention discloses a disease detection method for fish, which comprises the following steps: obtaining video data of fish; determining dynamic feature data of fish according to the video data, wherein the dynamic feature data includes motion trajectory, speed and acceleration; inputting the dynamic feature data into a pre-trained behavior classifier to obtain the behavior type of fish, determining whether the fish carries a disease according to the behavior type of fish, and if the fish carries a disease, determining the disease type corresponding to the dynamic feature data and outputting the data; the invention determines whether the fish carries a disease by identifying the behavior type of fish from video data, thereby improving the efficiency and accuracy of disease detection, reducing the cost and subjective error of manual monitoring, and facilitating timely discovery and treatment of fish diseases, so that breeders can take timely measures.

[0094] In one embodiment of the present invention, the behavior classifier is trained in the following manner:

[0095] Collect multiple groups of dynamic feature data of fish and behavior types corresponding to the multiple groups of dynamic feature data; use the multiple groups of dynamic feature data as first input data, and use the behavior types corresponding to the multiple groups of dynamic feature data as first output data; train a behavior classifier according to the first input data and the first output data to obtain a pre-trained behavior classifier.

[0096] In the embodiment of the present invention, the function or model can map the data records in the database to one of the given categories, so that it can be applied to data prediction. In short, classifier is a general term for methods of classifying samples in data mining, including decision trees, logistic regression, naive Bayes, neural networks and other algorithms.

[0097] The dynamic feature data of fish in different behavior types can be obtained in advance, and then the corresponding behavior types are labeled for each group of dynamic feature data, such as normal swimming, rapid swimming, sluggishness, tail-chasing, stillness, etc. The dynamic feature data is then used as input, and the behavior type corresponding to the dynamic feature data is used as output. During the training process, loss functions (such as cross entropy loss) and optimization algorithms (such as SGD and Adam) are used to adjust the model parameters.

[0098] For example, the motion trajectory can be represented by a series of coordinate points, each of which corresponds to the position of the fish in a certain frame. When the behavior type of the fish is rapid swimming, the corresponding motion trajectory is the first coordinate sequence, the corresponding speed is v1, and the acceleration is a1; when the behavior type of the fish is sluggish, the corresponding motion trajectory is the second coordinate sequence, the corresponding speed is v2, and the acceleration is a2; the first coordinate sequence, v1, and a1 can be used as the first input data, and rapid swimming can be used as the first output data for training in the behavior classifier, and the second coordinate sequence, v2, and a2 can be used as the first input data, and sluggishness can be used as the first output data for training in the behavior classifier. Furthermore, dynamic feature data under multiple behavior types can be used for training, so that after obtaining the dynamic feature data of the fish, the corresponding behavior type can be identified, providing convenience for users.

[0099] During the training process, loss functions (such as cross entropy loss) and optimization algorithms (such as SGD, Adam) can be used to adjust model parameters.

[0100] In one embodiment of the present invention, determining whether a fish carries a disease based on the behavior type of the fish includes:

[0101] The behavior type of the fish is input into a pre-trained disease recognition model to obtain an output result, which includes the probability of the fish carrying the disease; if the probability of the fish carrying the disease is greater than the preset probability, it is determined that the fish carries the disease.

[0102] In an embodiment of the present invention, after the behavior type of the fish is identified, the behavior type of the fish can be input into a pre-trained disease recognition model. Since the pre-trained disease recognition model can output the corresponding probability of carrying the disease according to the input behavior type, if the output probability of the fish carrying the disease is greater than the preset probability, it can be determined that the fish carries the disease. At this time, a reminder message can be issued to remind the fish that it is sick. If the output probability of the fish carrying the disease is less than the preset probability, it can be determined that the fish does not carry the disease, and the fish does not need to be processed at this time.

[0103] For example, the preset probability is 0.5. After the fish behavior type is input into the trained disease recognition model, the output probability that the fish carries the disease is 0.7. If it is greater than the preset probability, it can be determined that the fish carries the disease.

[0104] In one embodiment of the present invention, the disease recognition model is trained in the following manner:

[0105] Collect multiple groups of behavior type data of fish and the probability of fish carrying diseases corresponding to the multiple groups of behavior type data; use the multiple groups of behavior type data as second input data, and use the probability of fish carrying diseases corresponding to the multiple groups of behavior type data as second output data; train the disease recognition model according to the second input data and the second output data to obtain a pre-trained disease recognition model.

[0106] In an embodiment of the present invention, a suitable machine learning model may be selected first, such as logistic regression, random forest, support vector machine (SVM) or neural network, and behavior type data may include "normal swimming", "slow swimming", "rapid swimming", "aggressive behavior" and the like.

[0107] Disease probability data: The probability of fish carrying diseases corresponding to each behavior type, for example, the disease probability corresponding to "normal swimming" is 5%, the disease probability corresponding to "slow swimming" is 60%, the disease probability corresponding to "fast swimming" is 50%, and the disease probability corresponding to "aggressive behavior" is 10%. Use the training set to train the selected model, with the behavior type data as input and the disease probability as output. During the training process, use appropriate loss functions (such as mean square error MSE or cross entropy loss) and optimization algorithms (such as SGD, Adam) to adjust the model parameters.

[0108] Suppose there is an ornamental fish in the aquarium, and its behavior type is classified as "slow swimming". This behavior type is input into the pre-trained disease recognition model, and the model outputs a probability of 70% that the fish carries the disease. Since this probability is greater than the preset probability, it can be judged that the fish may have health problems and appropriate measures can be taken, such as further inspection or treatment.

[0109] In one embodiment of the present invention, the output result also includes the disease type; the method further includes:

[0110] Obtain the weight of the fish; determine the type of medicine to be administered based on the type of disease; determine the dosage of the medicine to be administered based on the severity of the disease and the weight of the fish; administer the medicine to the fish based on the type and dosage of the medicine.

[0111] In an embodiment of the present invention, the output result may also include the disease type of the fish. After the behavior type of the fish is input into a pre-trained disease recognition model, the output may obtain the probability of the fish carrying the disease and the disease type of the fish. After determining the disease type of the fish, the type of medicine that needs to be administered may be determined. Medicines corresponding to different disease types may be established in advance, for example, disease type 1 corresponds to medicine a, disease type 2 corresponds to medicine b, and disease type 3 corresponds to medicine c. The weight of the fish may then be detected. The volume of the fish may be estimated by taking photos or videos of the fish and using image analysis software. The weight may then be estimated based on the type and size of the fish in combination with known density data.

[0112] Choose the right medicine according to the type of disease. For example, bacterial infections may require antibiotics, parasitic infections may require anthelmintics, and fungal infections may require antifungal drugs. When choosing a medicine, you should consider its safety, effectiveness, and impact on ornamental fish and aquatic ecology.

[0113] After estimating the weight of the fish, the dosage of the drug to be administered can be determined. After determining the dosage and type of drug, the drug can be administered to the fish according to the type of drug and the dosage.

[0114] Suppose there is an ornamental fish in an aquarium. After determining its behavior type, this behavior type can be input into a pre-trained disease recognition model. The model outputs the probability of the fish carrying a disease and the possible disease type. Suppose the behavior type of the ornamental fish is classified as abnormal swaying. The "abnormal swaying" is input into the pre-trained disease recognition model. The model output shows that the probability of the fish carrying a disease is 50%, which is greater than the preset probability, and the possible disease type is "bacterial infection". The weight of the ornamental fish is measured. Suppose its weight is 100 grams. According to the disease type "bacterial infection", the type of medicine to be administered is determined. For example, antibiotics may be selected. According to the severity of the disease (represented by a disease probability of 50%) and the weight of the fish (100 grams), the dosage of the medicine to be administered is determined. Suppose 1 mg of medicine is required for every 100 grams of body weight. Therefore, the ornamental fish can be administered medicine at a dosage of 1 mg. The present invention can predict the probability of ornamental fish carrying diseases and possible disease types based on their behavior types, and can also determine the dosage of drugs according to the weight of the fish and the severity of the disease, so as to carry out accurate drug treatment. This method can improve the efficiency and accuracy of disease treatment, and help to ensure the health of ornamental fish and the operating quality of aquariums.

[0115] In one embodiment of the present invention, dynamic feature data of fish are determined based on video data, including: extracting multiple video frames from the video data; preprocessing the multiple video frame data to obtain multiple preprocessed video frame data; and determining the dynamic feature data of fish based on the processed multiple video frame data.

[0116] In an embodiment of the present invention, after acquiring the video data, multiple video frames can be first extracted from the video data, and then the multiple video frame data can be preprocessed. Specifically, a filter can be used to perform noise reduction processing on the video frame to eliminate noise interference in the video signal, thereby effectively reducing the noise level and improving the signal-to-noise ratio and image quality of the video. After preprocessing the multiple video frame data, multiple preprocessed video frame data can be obtained, and then the dynamic feature data of the fish can be determined based on the processed multiple video frame data.

[0117] In one embodiment of the present invention, dynamic feature data of fish are determined based on multiple processed video frame data, including: extracting multiple feature maps from multiple video frame data; and determining the dynamic feature data of fish based on the multiple feature maps.

[0118] In the embodiment of the present invention, computer vision technology can be used, such as CNN (Convolutional Neural Networks), which is a type of feedforward neural network that includes convolution calculation and has a deep structure. It is one of the representative algorithms of deep learning. Convolutional neural network has representation learning ability and can perform shift-invariant classification on input information according to its hierarchical structure. CNN is usually composed of the following main components: Input layer: receiving raw data, such as pixel values ​​of an image; Convolutional layer: using a set of learnable filters (or convolution kernels) to perform convolution operations on input data to extract local features. Each filter slides on the input data, calculates the dot product of the local area, and generates a feature map; Activation function: a nonlinear activation function, such as ReLU (Rectified Linear Unit), is usually applied after the convolution layer to increase the nonlinear expression ability of the model; Pooling layer: downsamples the feature map to reduce the number of parameters and the amount of calculation while retaining important features. Common pooling operations include max pooling and average pooling; Fully Connected Layer: At the end of the network, there is usually one or more fully connected layers that integrate the features extracted by the convolutional layer and the pooling layer and output the final classification result or regression value; Output Layer: Depending on the task, the output layer may be a softmax layer (for multi-classification tasks) or a linear layer (for regression tasks).

[0119] Edge detection algorithms (such as Canny, Sobel), optical flow estimation, etc., extract feature maps from video frames. Feature maps may include edge maps, corner maps, texture maps, motion vector maps, etc.

[0120] After obtaining multiple feature maps, the dynamic feature data of the fish can be obtained by processing the multiple feature maps.

[0121] In one embodiment of the present invention, dynamic feature data of a fish is determined based on multiple feature maps, including: inputting the multiple feature maps into a pre-trained posture recognition model to obtain body posture data of the fish, the body posture data including the coordinates of key points of body parts of the fish; and determining state feature data of the fish based on the body posture data of the fish.

[0122] In an embodiment of the present invention, after a plurality of feature maps are input into a pre-trained posture recognition model, the posture recognition model outputs body posture data of the fish, including the coordinates of key points of parts of the fish's body. For example, the model may output the coordinates of parts such as the head, tail, and fins of the fish. The output body posture data is post-processed, such as coordinate correction, smoothing, and filtering, to improve the quality and reliability of the data. Then, the state feature data of the fish can be determined based on the body posture data of the fish.

[0123] For example, there is a video recorded of an ornamental fish swimming in an aquarium. By preprocessing the video frames, multiple feature maps are extracted, including edge maps and texture maps. These feature maps are input into a pre-trained posture recognition model. The model outputs a series of key point coordinates, including the coordinates of the fish's head, tail, fins and other parts. By drawing these key point coordinates on the video frames, the fish's body posture can be clearly seen, such as the position of the head and tail, and the spread of the fins.

[0124] In one embodiment of the present invention, a pre-trained posture recognition model is trained in the following manner: multiple groups of feature maps of fish and key point coordinates of body parts corresponding to the multiple groups of feature maps are collected; the multiple groups of feature maps of fish are used as the third input data of the posture recognition model, and the key point coordinates of body parts corresponding to the multiple groups of feature maps are used as the third output data of the posture recognition model; the posture recognition model is trained according to the third input data and the third output data to obtain a pre-trained posture recognition model.

[0125] In an embodiment of the present invention, multiple groups of feature maps of fish can be collected. These feature maps may include edge maps, texture maps, motion vector maps, etc., and the key point coordinates of the corresponding body parts are marked for each group of feature maps. For example, for each feature map, the coordinates of the head, tail, fins and other parts of the fish are marked. The collected feature maps and key point coordinates are preprocessed, including data cleaning, standardization, normalization, etc. to ensure data quality. The data set is divided into a training set, a validation set and a test set for model training, verification and testing, and then a suitable machine learning model or deep learning model is selected as the basic architecture of the posture recognition model. The models that can be used include convolutional neural networks (CNN), recurrent neural networks (RNN), etc. The selected model is trained using the training set, with the feature map as input and the key point coordinates as output. During the training process, appropriate loss functions (such as mean square error MSE or cross entropy loss) and optimization algorithms (such as SGD, Adam) are used to adjust the model parameters. Through training, verification and testing, a pre-trained posture recognition model can be obtained. In practical applications, the new feature map is input into this model, and the model outputs the key point coordinates of the corresponding body parts, thereby realizing the recognition of the fish body posture.

[0126] In one embodiment of the present invention, the body posture data also includes the timestamps of each feature map; based on the body posture data of the fish, the state feature data of the fish is determined, including: determining the movement trajectory of the fish based on the key point coordinates corresponding to multiple feature maps; and calculating the acceleration and speed of the fish based on the key point coordinates and timestamps corresponding to multiple feature maps.

[0127] In an embodiment of the present invention, the body posture data also includes the timestamp of each feature map, and the movement trajectory of the fish can be determined based on the key point coordinates corresponding to multiple feature maps. For example, the key point coordinates of the head or tail can be selected to represent the position of the fish, and these key point coordinates are connected in chronological order to form the movement trajectory of the fish; further, the speed of the fish can be calculated based on the key point coordinates and timestamps corresponding to the multiple feature maps. The speed can be obtained by calculating the displacement between adjacent key points and dividing it by the time interval. The acceleration of the fish can be calculated based on the calculated speed and timestamp. The acceleration can be obtained by calculating the rate of change between adjacent speeds and dividing it by the time interval.

[0128] For example, the coordinate sequence of the key points of the fish's head is obtained through the posture recognition model, as shown below:

[0129] Timestamp t key point coordinates (x, y): t1 (100, 200), t2 (105, 202), t3

[0130] (110,205), t4(115,207), the fish's trajectory can be further determined based on the coordinates of these key points, these points are connected in chronological order to form a trajectory line, and then the speed and acceleration are calculated based on the timestamps and coordinate points.

[0131] like Figure 2 , showing a flow chart of a fish disease detection method provided by an embodiment of the present invention, video data collection can be performed first, the collected video data can be preprocessed, the preprocessed video data can be subjected to posture estimation to obtain dynamic feature data of the fish, and then the dynamic feature data of the fish can be input into a classifier for behavior recognition to obtain the behavior type of the fish, and then the behavior type of the fish can be input into a disease detection model to obtain the probability of the fish carrying the disease and the disease type of the fish, and then intelligent medication can be performed according to the disease type of the fish and the weight of the fish, and the changes in the health status of the ornamental fish after medication are monitored in real time, and feedback data is collected. According to the feedback results, if the fish is re-detected to be free of disease, the medication strategy is automatically adjusted to suspend medication to achieve the best treatment effect.

[0132] The invention discloses a disease detection method for fish, which comprises the following steps: obtaining video data of fish; determining dynamic feature data of fish according to the video data, wherein the dynamic feature data includes motion trajectory, speed and acceleration; inputting the dynamic feature data into a pre-trained behavior classifier to obtain the behavior type of fish, determining whether the fish carries a disease according to the behavior type of fish, and if the fish carries a disease, determining the disease type corresponding to the dynamic feature data and outputting the data; the invention determines whether the fish carries a disease by identifying the behavior type of fish from video data, thereby improving the efficiency and accuracy of disease detection, reducing the cost and subjective error of manual monitoring, and facilitating timely discovery and treatment of fish diseases, so that breeders can take timely measures.

[0133] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0134] Reference Figure 3 , shows a structural block diagram of a fish disease detection device provided by the present invention, the device comprising:

[0135] A first acquisition module 201 is used to acquire video data of fish;

[0136] A first determination module 202 is used to determine the dynamic feature data of the fish according to the video data, where the dynamic feature data includes motion trajectory, speed and acceleration;

[0137] The output module 203 is used to input the dynamic feature data into a pre-trained behavior classifier to obtain the behavior type of the fish, determine whether the fish carries a disease based on the behavior type of the fish, and if the fish carries a disease, determine the disease type corresponding to the dynamic feature data and output it.

[0138] The invention discloses a disease detection device for fish, which obtains video data of fish; determines dynamic feature data of fish according to the video data, wherein the dynamic feature data includes motion trajectory, speed and acceleration; inputs the dynamic feature data into a pre-trained behavior classifier to obtain the behavior type of fish, and determines whether the fish carries a disease according to the behavior type of fish; if the fish carries a disease, determines the disease type corresponding to the dynamic feature data and outputs it; the invention determines whether the fish carries a disease by identifying the behavior type of fish from video data, thereby improving the efficiency and accuracy of disease detection, reducing the cost and subjective errors of manual monitoring, and facilitating timely discovery and treatment of fish diseases, so that breeders can take timely measures.

[0139] In one embodiment of the present invention, the behavior classifier is trained in the following manner:

[0140] Collecting behavior types corresponding to multiple groups of state feature data and multiple groups of dynamic feature data of fish;

[0141] Using multiple sets of state feature data as first input data and using behavior types corresponding to multiple sets of dynamic feature data as first output data;

[0142] The behavior classifier is trained according to the first input data and the first output data to obtain a pre-trained behavior classifier.

[0143] In one embodiment of the present invention, the output module includes:

[0144] The first input submodule is used to input the behavior type of the fish into the pre-trained disease recognition model to obtain an output result, and the output result includes the probability of the fish carrying the disease;

[0145] The first determination submodule is used to determine that the fish carries the disease if the probability that the fish carries the disease is greater than a preset probability.

[0146] In one embodiment of the present invention, the disease recognition model is trained in the following manner:

[0147] Collect multiple groups of behavior type data of fish and the probability of fish carrying diseases corresponding to the multiple groups of behavior type data;

[0148] Using multiple sets of behavior type data as second input data, and using the probability of fish carrying diseases corresponding to the multiple sets of behavior type data as second output data;

[0149] The disease recognition model is trained according to the second input data and the second output data to obtain a pre-trained disease recognition model.

[0150] In one embodiment of the present invention, the output result also includes the disease type; the device also includes:

[0151] The second acquisition module is used to obtain the weight of the fish;

[0152] The second determination module is used to determine the type of medicine that needs to be administered according to the type of disease;

[0153] The third determination module is used to determine the dosage of the drug to be administered according to the severity of the disease and the weight of the fish;

[0154] The delivery module is used to deliver medicine to fish according to the type and dosage of the medicine.

[0155] In one embodiment of the present invention, the first determining module includes:

[0156] An extraction submodule, for extracting a plurality of video frames from the video data;

[0157] A preprocessing submodule, used to preprocess the multiple video frame data to obtain the preprocessed multiple video frame data;

[0158] The second determination submodule is used to determine the dynamic feature data of the fish according to the processed multiple video frame data.

[0159] In one embodiment of the present invention, the second determining submodule includes:

[0160] An extraction unit, used for extracting multiple feature maps from multiple video frame data;

[0161] The determination unit is used to determine the dynamic characteristic data of the fish according to a plurality of characteristic graphs.

[0162] In one embodiment of the present invention, the determining unit includes:

[0163] An input subunit, used for inputting a plurality of feature maps into a pre-trained posture recognition model to obtain body posture data of the fish, wherein the body posture data includes coordinates of key points of parts of the fish body;

[0164] The determination subunit is used to determine the dynamic characteristic data of the fish according to the body posture data of the fish.

[0165] In one embodiment of the present invention, the pre-trained gesture recognition model is trained in the following manner:

[0166] Collect multiple groups of feature maps of the fish and key point coordinates of body parts corresponding to the multiple groups of feature maps;

[0167] Using the multiple groups of feature maps of the fish as third input data of the posture recognition model, and using the key point coordinates of the body parts corresponding to the multiple groups of feature maps as third output data of the posture recognition model;

[0168] The gesture recognition model is trained according to the third input data and the third output data to obtain a pre-trained gesture recognition model.

[0169] In one embodiment of the present invention, the body posture data also includes the timestamp of each feature graph; the determination subunit includes:

[0170] A motion trajectory determination unit, used to determine the motion trajectory of the fish according to the key point coordinates corresponding to the plurality of feature maps;

[0171] The speed determination unit is used to calculate the acceleration and speed of the fish according to the key point coordinates and time stamps corresponding to the multiple feature maps.

[0172] The invention discloses a disease detection device for fish, which obtains video data of fish; determines dynamic feature data of fish according to the video data, wherein the dynamic feature data includes motion trajectory, speed and acceleration; inputs the dynamic feature data into a pre-trained behavior classifier to obtain the behavior type of fish, and determines whether the fish carries a disease according to the behavior type of fish; if the fish carries a disease, determines the disease type corresponding to the dynamic feature data and outputs it; the invention determines whether the fish carries a disease by identifying the behavior type of fish from video data, thereby improving the efficiency and accuracy of disease detection, reducing the cost and subjective errors of manual monitoring, and facilitating timely discovery and treatment of fish diseases, so that breeders can take timely measures.

[0173] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0174] An embodiment of the present invention further provides an electronic device, including:

[0175] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, each process of the above-mentioned fish disease detection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0176] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned fish disease detection method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0177] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0178] It should be understood by those skilled in the art that the embodiments of the present invention can be provided as methods, devices or computer program products. Therefore, the embodiments of the present invention can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0179] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems) and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0180] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0181] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0182] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0183] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0184] The above is a detailed introduction to the fish disease detection method, device, equipment and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in the field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for detecting fish diseases, characterized in that: The method comprises: Acquire video data of the fish; Determine dynamic feature data of the fish according to the video data, wherein the dynamic feature data includes motion trajectory, speed and acceleration; The dynamic feature data is input into a pre-trained behavior classifier to obtain the behavior type of the fish, and whether the fish carries a disease is determined based on the behavior type of the fish. If the fish carries a disease, the disease type corresponding to the behavior type is determined and output.

2. The method according to claim 1, characterized in that The behavior classifier is trained in the following way: Collecting multiple groups of dynamic feature data of the fish and behavior types corresponding to the multiple groups of dynamic feature data; Using the multiple sets of dynamic feature data as first input data, and using the behavior types corresponding to the multiple sets of dynamic feature data as first output data; The behavior classifier is trained according to the first input data and the first output data to obtain a pre-trained behavior classifier.

3. The method according to claim 1, characterized in that The step of determining whether the fish carries a disease according to the behavior type of the fish comprises: Inputting the behavior type of the fish into a pre-trained disease recognition model to obtain an output result, wherein the output result includes the probability that the fish carries the disease; If the probability that the fish carries the disease is greater than a preset probability, it is determined that the fish carries the disease.

4. The method according to claim 3, characterized in that The disease recognition model is trained in the following way: Collecting multiple groups of behavior type data of the fish and the probability of the fish corresponding to the multiple groups of behavior type data carrying a disease; Using the multiple groups of behavior type data as second input data, and using the probability of fish carrying diseases corresponding to the multiple groups of behavior type data as second output data; The disease recognition model is trained according to the second input data and the second output data to obtain a pre-trained disease recognition model.

5. The method according to claim 3, characterized in that: The output result also includes the disease type; the method further includes: Obtaining the weight of the fish; Determine the type of medicine that needs to be administered based on the type of disease; Determining the dosage of the drug to be administered according to the severity of the disease and the weight of the fish; The medicine is administered to the fish according to the type of the medicine and the dosage.

6. The method according to claim 1, characterized in that Determining the dynamic characteristic data of the fish according to the video data comprises: extracting a plurality of video frames from the video data; Preprocessing the plurality of video frame data to obtain a plurality of preprocessed video frame data; The dynamic feature data of the fish is determined based on the processed multiple video frame data.

7. The method according to claim 6, characterized in that Determining the dynamic feature data of the fish according to the processed multiple video frame data includes: Extracting multiple feature maps from the multiple video frame data; The dynamic characteristic data of the fish is determined according to the multiple characteristic graphs.

8. The method according to claim 7, characterized in that Determining the dynamic characteristic data of the fish according to the plurality of characteristic graphs comprises: Inputting the plurality of feature maps into a pre-trained posture recognition model to obtain body posture data of the fish, wherein the body posture data includes coordinates of key points of the fish body parts; The dynamic characteristic data of the fish is determined according to the body posture data of the fish.

9. The method according to claim 8, characterized in that The pre-trained gesture recognition model is trained in the following manner: Collecting multiple groups of feature maps of the fish and key point coordinates of body parts corresponding to the multiple groups of feature maps; Using the multiple groups of feature maps of the fish as third input data of the posture recognition model, and using the key point coordinates of the body parts corresponding to the multiple groups of feature maps as third output data of the posture recognition model; The gesture recognition model is trained according to the third input data and the third output data to obtain the pre-trained gesture recognition model.

10. The method according to claim 8, characterized in that The body posture data also includes the timestamp of each feature graph; and determining the dynamic feature data of the fish according to the body posture data of the fish includes: Determining the movement trajectory of the fish according to the key point coordinates corresponding to the multiple feature maps; The acceleration and speed of the fish are calculated according to the key point coordinates and timestamps corresponding to the multiple feature maps.

11. A fish disease detection device, characterized in that: The device comprises: A first acquisition module, used for acquiring video data of the fish; A first determination module, used to determine the dynamic feature data of the fish according to the video data, wherein the dynamic feature data includes a motion trajectory, a speed and an acceleration; The output module is used to input the dynamic feature data into a pre-trained behavior classifier to obtain the behavior type of the fish, determine whether the fish carries a disease based on the behavior type of the fish, and if the fish carries a disease, determine the disease type corresponding to the behavior type and output it.

12. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor is used to execute the steps of the fish disease detection method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the fish disease detection method according to any one of claims 1 to 10 are implemented.

Citation Information

Cited By

  • Fish monitoring management system and method based on multi-source data analysis

    CN120765992A