Intelligent shrimp pond water quality monitoring method and system
The intelligent shrimp pond water quality monitoring method based on deep learning and decision trees solves the problems of traditional water quality testing being time-consuming and high threshold, achieving fast and accurate water quality judgment, reducing the burden of pond patrolling on farmers, and adapting to different environmental conditions. Support the development of aquaculture and water quality monitoring.
Patent Information
- Application Number
- CN202311406123.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2043-10-26
AI Technical Summary
Traditional water quality testing methods in the field of aquaculture have problems such as long time consumption, high cost and high technical application threshold. They cannot meet the needs of small and medium-sized aquaculture farmers, and farmers need to patrol ponds from time to time for on-site surveys, which increases labor intensity and time cost.
An intelligent shrimp pond water quality monitoring method based on deep learning and decision trees is used to construct a shrimp pond water quality model to detect water color and floating objects, and use image preprocessing and feature extraction technology to achieve fast and accurate water quality judgment, replacing farmers daily tasks of patrolling ponds and measuring water.
It achieves fast and accurate water quality monitoring, lowers the entry barrier for the aquaculture industry, reduces the time and frequency of pond patrols for farmers, improves the accuracy and robustness of water quality detection, adapts to different environments and lighting conditions, and supports aquaculture Development of aquaculture and water quality environmental monitoring.
Smart Images

Figure CN117576550B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer vision technology, and in particular provides an intelligent shrimp pond water quality monitoring method and system based on deep learning and decision tree. Background Art
[0002] In the field of aquaculture and aquatic research, real-time water quality monitoring of shrimp ponds is crucial for management and research. Traditional water quality testing methods are usually divided into two types: one relies on high-precision detection instruments, and the main method is to take samples on site and then hand them over to relevant departments for testing; the other relies on the breeding experience of farmers, and the main method is for farmers to personally inspect the water body on site in the shrimp pond and judge the quality of the water body based on their breeding experience.
[0003] However, the inventors of this application found in research and practice that the first method has guaranteed accuracy, but it has disadvantages such as being time-consuming, costly, and unable to meet the needs of small and medium-sized aquaculture farmers; although the second method reduces costs and can meet the needs of small and medium-sized aquaculture farmers, its disadvantages are also obvious, including a high threshold for technical application and the need for farmers to patrol the ponds from time to time. Summary of the invention
[0004] In order to solve the above technical problems, the purpose of the present invention is to provide an intelligent shrimp pond water quality monitoring system based on deep learning and decision trees, which can quickly and accurately judge the quality of the target shrimp pond water by detecting water color, floating objects on the water surface and training the decision tree algorithm model.
[0005] On the one hand, one embodiment of the present invention provides an intelligent shrimp pond water quality monitoring method based on deep learning and decision tree, comprising: constructing a shrimp pond water quality model for detecting the shrimp pond water quality;
[0006] Taking a shrimp pond water quality image, and importing the shrimp pond water quality image into the shrimp pond water quality model;
[0007] The shrimp pond water quality model pre-processes the shrimp pond water quality image to obtain a water body state characteristic image;
[0008] Annotating the water body state characteristic image according to the characteristic data set in the shrimp pond water quality model to obtain an annotated image;
[0009] The annotated image is compared with the standard image in the shrimp pond water quality model, and the detection result is output.
[0010] In one embodiment, the shrimp pond water quality model pre-processes the shrimp pond water quality image to obtain a water state characteristic image, including the steps of:
[0011] Smoothly adjusting the brightness of the shrimp pond water quality image to obtain a brightness calibrated image;
[0012] De-noising the brightness calibration image using a median filter to obtain a de-noised image;
[0013] The denoised image is subjected to local contrast enhancement to obtain a water body state characteristic image; wherein the local contrast enhancement is performed by dividing the denoised image into a number of regions, calculating the histograms of the noise images in the several regions, and performing a histogram equalization process on the histogram, and the obtained equalized image is the water body state characteristic image.
[0014] In one embodiment, the shrimp pond water quality model pre-processes the shrimp pond water quality image to obtain a water state characteristic image, and further comprises the steps of:
[0015] Performing edge detection processing on the denoised image to extract line contours of the denoised image;
[0016] When one of the line contours of the denoised image extends from one edge line of the denoised image to another edge line, it is considered that one side separated by the line is the background area, and the other side is the water area.
[0017] In one embodiment, the water state characteristic image is annotated according to the characteristic data set in the shrimp pond water quality model to obtain an annotated image, including the steps of:
[0018] The water body area is annotated according to the set feature data to obtain an annotated image.
[0019] In one embodiment,
[0020] The shrimp pond water quality model pre-processes the shrimp pond water quality image to obtain a water state characteristic image, and further comprises the steps of:
[0021] Feature extraction is performed on the detection pixels of the water body area, and a water body color state image is obtained by identifying the color as the detection pixel.
[0022] In one embodiment, it includes:
[0023] The water body color state image is annotated according to the color card in the shrimp pond water quality model, and a water body color annotated image is output.
[0024] In one embodiment, the shrimp pond water quality model pre-processes the shrimp pond water quality image to obtain a water state characteristic image, and further comprises the steps of:
[0025] Feature extraction is performed on the detection pixels of the water body area, and a water body surface state image is obtained by identifying the texture as the detection pixel.
[0026] In one embodiment, it includes:
[0027] Matching the texture data stored in the shrimp pond water quality model with the texture of the water area one by one;
[0028] When the texture of the water body area is paired with the texture data, capturing the texture edge of the water body area;
[0029] Locating the texture of the water body area to obtain a texture position;
[0030] A labeling frame is added to the texture position, and a surface floating object labeling image is output.
[0031] On the other hand, an embodiment of the present invention also provides an intelligent shrimp pond water quality monitoring system based on deep learning and decision tree, comprising:
[0032] The above embodiments of the present invention provide the following beneficial effects: the present invention can quickly and accurately detect the water quality of shrimp ponds by utilizing deep learning technology and decision tree models, and perform denoising, enhancement and other operations on images in the data preprocessing stage to improve image quality and reduce image noise interference, and then use the deep learning model to detect floating objects on the water surface and water color of the preprocessed images, and input the water color and floating object characteristics into the decision tree model. Through training and optimization, the model can accurately judge the characteristics and changes of the water quality of shrimp ponds, thereby simulating the water quality self-test process of aquaculture farmers, realizing accurate real-time water quality detection, replacing aquaculture farmers to complete daily pond patrol and water testing tasks, lowering the entry threshold of the aquaculture industry, and promoting the development of the aquaculture industry.
[0033] And it has high accuracy: simulating the water quality judgment method of experienced aquaculture farmers, the water quality detection model based on the decision tree can accurately identify and judge the water body and floating objects in the target image. Through training and optimization, the model can learn the characteristics and laws of different water bodies, thereby achieving high-accuracy judgment results;
[0034] High substitutability: Using the decision tree model for water quality testing can significantly reduce the time and frequency of daily pond inspections by aquaculture farmers, achieving automated pond guarding while also lowering the entry threshold for the aquaculture industry;
[0035] Robustness: The water quality detection model based on deep learning and decision trees has strong robustness and can adapt to water quality detection tasks in different environments and locations. It can effectively handle factors such as different lighting and noisy background interference and maintain stable prediction performance;
[0036] Wide application: The intelligent shrimp pond water quality monitoring system based on deep learning and decision tree can be widely used in aquaculture, water quality environment testing and other fields. It can be applied to pond water quality prediction, pond water body change cycle research and the impact of water quality changes on the growth of aquatic organisms, etc., providing strong support for the development of related fields;
[0037] Based on the above advantages and effects, the intelligent shrimp pond water quality monitoring system based on deep learning and decision tree can achieve accurate and robust water quality monitoring, bringing many benefits to fields such as aquaculture and water quality environment monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 the structures shown in these drawings without paying creative work.
[0039] Figure 1 A flowchart of the steps of an intelligent shrimp pond water quality monitoring method based on deep learning and decision tree provided in an embodiment of the present invention;
[0040] Figure 2 Flow chart of the steps for preprocessing shrimp pond water quality images;
[0041] Figure 3 This is a schematic diagram of the water quality image of the shrimp pond;
[0042] Figure 4 for Figure 3 Schematic diagram of regional division;
[0043] Figure 5 for Figure 3 Schematic diagram of line profiles for feature extraction;
[0044] Figure 6 Schematic diagram of annotating images of surface floating objects;
[0045] Figure 7 This is a schematic diagram of the structure of the intelligent shrimp pond water quality monitoring system based on deep learning and decision tree;
[0046] Figure 8 A schematic diagram of the structure of the deep learning module. DETAILED DESCRIPTION
[0047] 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.
[0048] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components in a certain specific posture. If the specific posture changes, the directional indication will also change accordingly.
[0049] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features limited to "first" and "second" may explicitly or implicitly include at least one of the features. In addition, if "and / or" or "and / or" appears in the full text, its meaning includes three parallel solutions. Taking "A and / or B" as an example, it includes solution A, solution B, or solutions that satisfy both A and B. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0050] Traditional water quality testing methods have some limitations in the field of aquaculture. For example, the method of using professional instruments to test the water quality of shrimp ponds takes a long time and is not very effective for shrimp ponds with fast water quality changes. In addition, the method of farmers surveying water quality on the spot not only takes a lot of time for farmers themselves, but also requires a high level of knowledge from farmers themselves. Novice farmers who have no one to teach them cannot judge the water quality of shrimp ponds in real time through their own experience.
[0051] Based on this, the present invention introduces a deep learning algorithm as a detection method for a water quality monitoring system, and introduces a decision tree algorithm as a core discrimination method for a water quality monitoring system. It can detect the water quality of each module by constructing a deep learning model, and then analyze the water quality detection results by constructing a decision tree model, thereby realizing accurate detection of the target water body. The decision tree algorithm has high classification accuracy, robustness and computational efficiency, and can effectively process the input results. The deep learning algorithm has high stability, robustness and accuracy, and can effectively cope with complex situations in water state changes, and provide more accurate input data for the decision tree model. At the same time, the original image is preprocessed by image brightness smoothing, which can effectively reduce the accuracy loss problem caused by water surface reflection on model prediction, thereby improving the accuracy of model discrimination. The feature input model of the image preprocessed by this smoothing operation, supported by the computing power of deep learning and decision tree algorithms, can enable the model detection to achieve the discrimination effect of the human eye, thereby replacing aquaculture farmers in daily water quality monitoring work.
[0052] The technical solution of the present invention replaces the work of daily water quality monitoring by aquaculture farmers. By utilizing deep learning models and decision tree models, water quality detection can be performed quickly and accurately. In the data preprocessing stage, the method performs operations such as denoising, enhancement, and brightness smoothing on the image to improve image quality and reduce interference. Then, the preprocessed image is subjected to feature extraction and water quality detection through the deep learning model and the decision tree model, thereby realizing an automated intelligent water quality monitoring process.
[0053] See also Figure 1 , an intelligent shrimp pond water quality monitoring method based on deep learning and decision tree, comprising:
[0054] Construct a shrimp pond water quality model to detect the shrimp pond water quality;
[0055] Taking a shrimp pond water quality image, and importing the shrimp pond water quality image into the shrimp pond water quality model;
[0056] The shrimp pond water quality model pre-processes the shrimp pond water quality image to obtain a water body state characteristic image;
[0057] Annotating the water body state characteristic image according to the characteristic data set in the shrimp pond water quality model to obtain an annotated image;
[0058] The annotated image is compared with the standard image in the shrimp pond water quality model, and the detection result is output.
[0059] Specifically, a camera is installed in the shrimp pond to obtain a water image of the shrimp pond. The camera may include a camera and a color sensor, which can accurately capture the color changes of the water in the shrimp pond at every moment, and then receive and process the captured water image of the shrimp pond through the data processing program of the shrimp pond water quality model. The image can be pre-processed, including brightness smoothing, denoising, enhancement, etc., to improve the accuracy of the color of the real scene image and the reliability of the data.
[0060] The shrimp pond water body image is used as input, and the water quality is tested using the shrimp pond water quality model to obtain the shrimp pond water quality test result. The shrimp pond water quality test result is set as the image title for display, and a schematic diagram of the water quality test results under different water body conditions is obtained, which can quickly and accurately judge the water quality of the target shrimp pond.
[0061] See also Figure 2-4 In one embodiment, the shrimp pond water quality model pre-processes the shrimp pond water quality image to obtain a water state characteristic image, including the steps of:
[0062] Smoothly adjusting the brightness of the shrimp pond water quality image to obtain a brightness calibrated image;
[0063] De-noising the brightness calibration image using a median filter to obtain a de-noised image;
[0064] The denoised image is subjected to local contrast enhancement to obtain a water body state characteristic image; wherein the local contrast enhancement is performed by dividing the denoised image into a number of regions, calculating the histograms of the noise images in the several regions, and performing a histogram equalization process on the histogram, and the obtained equalized image is the water body state characteristic image.
[0065] In this embodiment, the brightness of the shrimp pond water image is smoothed to obtain a brightness calibrated image. The specific method is: by merging the colors of different water areas recognized by the color sensor, the low-light areas in the image water area are brightened to a pixel value close to the pixel value of the surrounding medium-light area, and the high-light areas in the image water area are dimmed to a pixel value close to the pixel value of the surrounding medium-light area, thereby achieving brightness smoothing, reducing the impact of the image reflective area on model detection, improving data reliability, and obtaining a brightness calibrated image.
[0066] In this embodiment, the brightness calibration image is denoised. Since the images taken on site are usually greatly affected by salt and pepper noise, the median filter is used to perform well in removing the salt and pepper noise, while retaining the image detail features. The working principle of the median filter is to replace the value of each pixel with the median value of the surrounding pixels, which enables it to effectively remove the salt and pepper noise and obtain a denoised image. This is very useful for removing noise points that may exist in the shrimp pond water state image without having much impact on the edges and details of the image.
[0067] In this embodiment, the denoised image is enhanced by using a local contrast enhancement method. This method is an image processing technology for enhancing the contrast of a local area of an image. It can make the details of the water surface area in the obtained shrimp pond water state image clearer and more prominent; based on this, the denoised image is divided into several areas, and the histogram of each local area of the image is calculated and equalized to enhance the image features, and then the contrast enhancement is limited to avoid the generation of new noise. It can better highlight the details of the surface color of the water body and the floating objects, thereby providing a more accurate image, so that the detection result is more accurate.
[0068] See also Figure 3 , Figure 5 ,in Figure 4 A represents the background area, and B represents the water area.
[0069] In one embodiment, the shrimp pond water quality model pre-processes the shrimp pond water quality image to obtain a water state characteristic image, and further comprises the steps of:
[0070] Performing edge detection processing on the denoised image to extract line contours of the denoised image;
[0071] When one of the line contours of the denoised image extends from one edge line of the denoised image to another edge line, it is considered that one side separated by the line is the background area, and the other side is the water area.
[0072] In this embodiment, edge detection processing is performed on the denoised image using the Canny-Deriche edge detection algorithm. Canny edge detection is a classic edge detection algorithm with good edge positioning and noise suppression capabilities, and Canny-Deriche edge detection is an advanced method of Canny edge detection. It improves the performance of the Canny algorithm by using the Deriche filter, and can effectively filter out the influence of more residual noise points in the original image than the Canny algorithm, accurately detect finer edges, and have a more accurate response to edges.
[0073] The edge detection denoising image is processed to retain the main edge. By dividing the background area and the water area, the edge information of the main target is compared with the edge information of the background, the shrimp pond water part is retained as the main edge, and the edges of other areas in the image are suppressed as the background. Then the retained main edge information is merged with the pre-processed shrimp pond water state image to generate an edge detection shrimp pond water state image. Specifically, when the extracted line contour line extends from one edge line of the image to the other edge line of the image, and then distinguished into two areas, the background area and the water area, only the water area needs to be detected to exclude the influence of the background area on the detection result.
[0074] In one embodiment, the water state characteristic image is annotated according to the characteristic data set in the shrimp pond water quality model to obtain an annotated image, including the steps of:
[0075] The water body area is annotated according to the set feature data to obtain an annotated image.
[0076] In one embodiment, the shrimp pond water quality model pre-processes the shrimp pond water quality image to obtain a water state characteristic image, and further comprises the steps of:
[0077] Feature extraction is performed on the detection pixels of the water body area, and a water body color state image is obtained by identifying the color as the detection pixel.
[0078] In this embodiment, color feature extraction is performed on the edge detected shrimp pond water body main state image to obtain the shrimp pond water body color state feature image, which specifically includes:
[0079] (1) Extracting the main body of the shrimp pond: Use the image segmentation method to segment the main body of the water body in the edge detection shrimp pond water body state image, reduce the influence of the image background on the model, and obtain the main body image of the shrimp pond;
[0080] (2) Calculate the color histogram of each region of the main shrimp pond image: For each segmented region in the main shrimp pond image, calculate the color histogram in the selected color space. This can be done by projecting the pixels in the region onto a certain dimension of the color space and calculating the histogram;
[0081] (3) Similarity measurement: use histogram cross-correlation to measure the color distribution differences between different regions;
[0082] (4) Region merging: Merge regions with similar color distributions together based on similarity metrics. This step is accomplished by iteratively merging the most similar regions.
[0083] Through the above steps, the color features of the water body in the edge detected shrimp pond water body state image are extracted to obtain the shrimp pond water body color state feature image.
[0084] In one embodiment, it includes:
[0085] The water body color state image is annotated according to the color card in the shrimp pond water quality model, and a water body color annotated image is output.
[0086] In this embodiment, since there are various algae and bacteria in the shrimp pond, the color of the shrimp pond water surface is formed by these algae and bacteria. It can be divided into the following common colors: yellow-brown (tea color), light green, dark blue, orange-yellow (rust color), brick red and dark brown (a little black).
[0087] Yellowish brown (tea color), due to the growth of diatoms (Bacillariophyta), the water is yellowish brown. When shrimp are in this water color, whether in a slightly brackish or seawater environment, they can grow. This is the most suitable color for farming fish and shrimp.
[0088] Light green is due to the growth of green algae (Chlorophyta), which usually thrives in fresh water or slightly brackish water (less than 10ppm). This is also considered the most suitable color for shrimp farming. In addition to playing an important role in the food chain, green algae also has the function of absorbing organic matter and reducing the production of toxic gases in the pond. Farmers should try to maintain a light green water color to enable aquatic animals to grow better.
[0089] Dark blue is caused by blue algae (Cyanobacteria) that grow and reproduce in both freshwater and saltwater environments. If your pond water is this color, take steps to reduce the amount of algae, as this is a type of algae that is not good for aquatic animals. In addition, if blue algae grow excessively, they can secrete toxins that can kill fish and shrimp. In addition, the hyperrespiration of blue algae can also cause hypoxia at night.
[0090] Orange (Rust) This color often appears in newly dug ponds on alkaline soils. The orange color is due to the oxidation of the underlying acidic soil (FeS2) to form iron slag. For orange ponds, iron slag removal measures should be carried out before stocking shrimp fry. Agricultural lime or multiple pumping and draining of the water should be used to reduce the iron slag in the pond. For breeding ponds, more lime powder needs to be spread on the banks to avoid a sudden drop in pH when it rains.
[0091] Brick red, due to the erosion of sandy soil in the upstream area, the water contains a large amount of alluvial layer, and as the water flows downstream, this phenomenon usually occurs when a flood is about to come. Farmers should be careful not to change or add water to the pond at this time, because a large amount of silt will make it difficult for shrimp to breathe and reduce their ability to catch feed. It is best to introduce the water source into the sedimentation tank for sedimentation treatment before supplying water to the breeding pond.
[0092] The water is dark brown because it contains a lot of organic matter. This color is more common in ponds with poor drainage. If the environment is not properly managed and overfeeding is done during the breeding process, it is easy to turn the pond water into dark brown. In this case, the dissolved oxygen concentration is low, so it needs to be treated immediately, which is not conducive to shrimp and fish farming.
[0093] Based on this, when the water color is light green, it is considered to be in good water quality, and a water color annotated image with good water quality is output. Specifically, the water area is annotated with color using image annotation software to obtain a shrimp pond water color annotated image and output the water color detection result.
[0094] In one embodiment, the shrimp pond water quality model pre-processes the shrimp pond water quality image to obtain a water state characteristic image, and further comprises the steps of:
[0095] Feature extraction is performed on the detection pixels of the water body area, and a water body surface state image is obtained by identifying the texture as the detection pixel.
[0096] See also Figure 6 , in one embodiment, comprising:
[0097] Matching the texture data stored in the shrimp pond water quality model with the texture of the water area one by one;
[0098] When the texture of the water body area is paired with the texture data, capturing the texture edge of the water body area;
[0099] Locating the texture of the water body area to obtain a texture position;
[0100] A labeling frame is added to the texture position, and a surface floating object labeling image is output.
[0101] In this embodiment, texture analysis is performed on denoising in order to enhance the features of the image so as to improve the performance and robustness of the target detection system. The specific steps include:
[0102] (1) Texture segmentation: Segment the edge detection shrimp pond water surface state feature image into different regions or objects so that each region can be analyzed separately. The region growing algorithm is used here to achieve this;
[0103] (2) Texture feature extraction: Use the LBP feature extraction method to extract texture features for each segmented area. LBP maps each pixel to a binary pattern based on the comparison between the pixel and its neighboring pixels. By statistically analyzing the distribution of different LBP patterns, the texture information of the image can be described.
[0104] (3) Texture description: By creating a texture feature vector, the extracted texture features are used to describe the texture properties of each segmented area;
[0105] (4) Texture analysis and classification: Use cluster analysis methods to analyze and classify texture features, and obtain the texture analysis results of the shrimp pond water surface state image, which is used to identify different texture categories in the edge detection shrimp pond water surface state feature image;
[0106] In this embodiment, the shrimp pond water body surface state image is subjected to feature extraction processing based on the shrimp pond water body surface state image texture analysis result, retaining the water surface floating object part feature edge obtained in the shrimp pond water body surface state image texture analysis result, filtering other feature edges, thereby obtaining the shrimp pond water body surface state feature image. The shrimp pond water body surface state feature image is annotated using an image annotation tool to obtain a shrimp pond water body surface floating object annotated image, and the water body surface floating object detection result is output.
[0107] Finally, the shrimp pond water quality test results are obtained by combining the water color test results and the water surface floating object test results.
[0108] Another embodiment provides an intelligent shrimp pond water quality monitoring system based on deep learning and decision tree, comprising: a shooting module 1 for shooting shrimp pond water quality images for deep learning data;
[0109] Image processing module 2, used for preprocessing the shrimp pond water quality image to obtain the water state characteristic image;
[0110] Deep learning module 3, based on deep learning of water body characteristic images and training optimization;
[0111] The judgment module 4 is used to judge the characteristic image of the water state and obtain the preliminary water quality detection result;
[0112] Decision tree module 5 performs accurate water quality testing based on the preliminary water quality testing results to obtain the shrimp pond water quality testing results.
[0113] In one embodiment, the deep learning includes a module water body color unit 31 and a water body surface floating object unit 32;
[0114] Furthermore, the water body state characteristic image includes a water body color annotated image and a water body surface floating object annotated image;
[0115] The water body color unit 31 performs deep learning and training optimization on color extraction based on water body color annotated images;
[0116] The water body surface floating object unit 32 performs deep learning and training optimization on floating object annotation based on the water body surface floating object annotation image.
[0117] Specifically, according to the shooting module, a sufficient number of shrimp pond water quality images are provided, and the image processing module performs preprocessing to obtain the water body state characteristic image; a convolutional neural network is constructed in the deep learning module 3 and the deep learning module 3 is trained and optimized based on the water body state characteristic image; at the same time, the color attention mechanism is introduced in the neural network training process, focusing on detecting the characteristic information of the color of the water body part in the image to improve the accuracy of the water body color unit 31, and the spatial attention mechanism is introduced to focus on detecting the characteristic information of the floating objects on the surface of the water body in the image to improve the accuracy of the floating objects on the surface of the water body unit 32. It can be confirmed that the preliminary water quality detection result obtained by the judgment module is actually the detection result of the floating objects on the surface of the shrimp pond water body and the detection result of the color of the shrimp pond water body.
[0118] As we know, the decision tree algorithm is a supervised learning method for classification and regression analysis. It simulates the decision-making process by establishing a tree structure model and can accurately make decisions on known conditions.
[0119] In this embodiment, the training parameters of the decision tree module 5 are as follows:
[0120] (1) Criterion: The decision criterion of the decision tree is set to 'Gini';
[0121] Use Gini to control the evaluation criteria used when splitting nodes, which is used to measure the quality of each node split in the decision tree;
[0122] (2) max_depth: The maximum depth of the decision tree is set to 5;
[0123] Limiting the depth of the decision tree can prevent overfitting, but setting the value too small may lead to underfitting. The appropriate maximum depth can be selected through methods such as cross-validation;
[0124] (3) min_samples_split: The minimum number of samples required for re-dividing the internal nodes of the decision tree is set to 2;
[0125] Control the growth process of the decision tree to avoid overfitting. A larger value can prevent the model from being too complex, but may lead to underfitting.
[0126] (4) min_samples_leaf: The minimum number of samples required for a leaf node is set to 2;
[0127] Similar to min_samples_split, it is used to control the growth process of the decision tree. A smaller value can increase the sensitivity of the model, but too small a value may lead to overfitting.
[0128] (5) max_features: The features considered by the decision tree when splitting nodes are set to 'auto', indicating that all features need to be considered;
[0129] Smaller values can reduce the variance of the model, but too small a value may also increase the bias of the model.
[0130] The shrimp pond water state image is detected and processed by the trained decision tree module 5 to obtain the shrimp pond water quality detection result; that is, the decision is made based on the shrimp pond water surface floating object detection result and the shrimp pond water color detection result fed back by the judgment module.
[0131] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. An intelligent shrimp pond water quality monitoring method, characterized in that: include: Construct a shrimp pond water quality model to detect the shrimp pond water quality; Taking a shrimp pond water quality image, and importing the shrimp pond water quality image into the shrimp pond water quality model; The shrimp pond water quality model pre-processes the shrimp pond water quality image to obtain a water body state characteristic image, including: smoothly adjusting the brightness of the shrimp pond water quality image to obtain a brightness calibration image; using median filtering to denoise the brightness calibration image to obtain a denoised image; performing local contrast enhancement on the denoised image to obtain a water body state characteristic image; wherein the local contrast enhancement is performed by dividing the denoised image into several regions, calculating the histogram of the noise image in several regions, and performing histogram equalization processing, and the obtained equalized image is the water body state characteristic image; performing edge detection processing on the denoised image to extract the line contour of the denoised image; when one of the lines of the line contour of the denoised image extends from one edge line of the denoised image to another edge line, it is considered that one side of the line separation is the background area and the other side is the water body area; performing feature extraction on the detection pixels of the water body area, and obtaining the water body color state image by confirming the color as the detection pixel; performing feature extraction on the detection pixels of the water body area, and obtaining the water body surface state image by confirming the texture as the detection pixel; Among them, color feature extraction is performed on the edge detected shrimp pond water body main state image to obtain the shrimp pond water body color state feature image, specifically including: (1) Extracting the main body of the shrimp pond: Use the image segmentation method to segment the main body of the water body in the edge detection shrimp pond water body state image, reduce the influence of the image background on the model, and obtain the main body image of the shrimp pond; (2) Calculate the color histogram of each region of the main shrimp pond image: For each segmented region in the main shrimp pond image, calculate the color histogram in the selected color space; this is done by projecting the pixels in the region onto a certain dimension of the color space and calculating the histogram; (3) Similarity measurement: use histogram cross-correlation to measure the color distribution differences between different regions; (4) Region merging: Merge regions with similar color distributions together based on a similarity metric; this is accomplished by iteratively merging the most similar regions. The water body state characteristic image is annotated according to the characteristic data set in the shrimp pond water quality model to obtain an annotated image, including: annotating the water body area according to the set characteristic data to obtain an annotated image, including: annotating the water body color state image according to the color card in the shrimp pond water quality model, and outputting the water body color annotated image; The annotated image is compared with the standard image in the shrimp pond water quality model, and the detection result is output.
2. The intelligent shrimp pond water quality monitoring method according to claim 1, characterized in that: include: Matching the texture data stored in the shrimp pond water quality model with the texture of the water area one by one; When the texture of the water body area is paired with the texture data, capturing the texture edge of the water body area; Locating the texture of the water body area to obtain a texture position; A labeling frame is added to the texture position, and a surface floating object labeling image is output.
