Fishpond water quality detection method and system based on deep learning
Through deep learning-based fish pond water quality detection methods and systems, farmers' rapid and accurate problems in fish pond water quality detection are solved, and rapid and accurate water quality detection and economic costs are achieved.
Patent Information
- Application Number
- CN202411938595.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Farmers lack fast and accurate detection methods in the detection of fish pond water quality, which leads to the influence of human factors on breeding productivity and is prone to the phenomenon of "pan-pool".
The deep learning-based fish pond water quality detection method and system are used to quickly and accurately identify the fish pond water quality type by obtaining sample fish pond water quality images, constructing and training water quality detection models, pretreatment and detection.
It has achieved rapid and accurate detection of the water quality type of fish ponds, reducing economic costs and reducing the impact of human factors on aquaculture productivity.
Smart Images

Figure CN119863658A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water quality detection, and in particular to a fish pond water quality detection method based on deep learning and a fish pond water quality detection system based on deep learning. Background Art
[0002] In order to control environmental pollution and maintain ecological balance, my country has formulated a series of aquaculture water quality testing standards related to fisheries. The quality of water will directly affect the health of fish, and then affect the economic income of farmers. As the saying goes, raising fish starts with raising water, which shows the importance of water quality to aquaculture. However, farmers often do not pay attention to water quality testing. Some farmers rely solely on their own breeding experience. Therefore, aquaculture productivity is greatly affected by human factors, and the phenomenon of "flooding the pond" is prone to occur. Therefore, it is particularly important to be able to regularly and quickly detect the water quality type of fish ponds. Summary of the invention
[0003] In order to solve the above-mentioned technical problems, the present invention provides a fish pond water quality detection method and system based on deep learning, which can quickly and accurately detect the type of fish pond water quality with low economic cost.
[0004] The technical solution adopted by the present invention is as follows: A fish pond water quality detection method based on deep learning includes the following steps: obtaining a sample fish pond water quality image; constructing a first water quality detection model, and training the first water quality detection model through the sample fish pond water quality image to obtain a second water quality detection model; obtaining a fish pond water quality image to be detected; preprocessing the fish pond water quality image to be detected; detecting the preprocessed fish pond water quality image to be detected through the second water quality detection model to obtain the water quality type of the fish pond water quality image to be detected.
[0005] In one embodiment of the present invention, the training of the first detection model using the sample fish pond water quality images comprises the following steps: preprocessing the sample fish pond water quality images; classifying and labeling the water quality types of the preprocessed sample fish pond water quality images to obtain a fish pond water quality image dataset; performing data enhancement processing on the fish pond water quality image dataset; and training the first water quality detection model using the fish pond water quality image dataset after data enhancement processing.
[0006] In one embodiment of the present invention, the water quality types of the fish pond water quality image include rich water quality, thin water quality, old water quality and changing water quality.
[0007] In one embodiment of the present invention, the preprocessing of the fish pond water quality image to be detected includes the following steps: graying the fish pond water quality image to be detected to obtain a grayscale image of the fish pond water quality to be detected; presetting a grayscale threshold, and setting the pixel points in the fish pond water quality grayscale image whose grayscale values are greater than the grayscale threshold as the boundary; covering the closed area formed by the boundary and recording it as the bottom plate area; establishing a deep learning model, and performing image enhancement processing on the bottom plate area through the deep learning model to obtain a bottom plate image; splicing the bottom plate image and the image formed by the area whose grayscale value is less than the grayscale threshold to generate an advanced image.
[0008] In one embodiment of the present invention, a convolutional neural network is used to calculate the pixel points in the grayscale image of the fish pond water quality whose grayscale values are greater than the grayscale threshold and determine the bottom plate area, wherein the bottom plate area is the reflective area of the fish pond water quality image to be detected.
[0009] A fish pond water quality detection system based on deep learning, comprising: a first acquisition device, the first acquisition device is used to acquire a sample fish pond water quality image; a training device, the training device is used to construct a first water quality detection model, and train the first water quality detection model through the sample fish pond water quality image to obtain a second water quality detection model; a second acquisition device, the second acquisition device is used to acquire a fish pond water quality image to be detected; an image preprocessing device, the image preprocessing device is used to preprocess the fish pond water quality image to be detected; a detection device, the detection device is used to detect the preprocessed fish pond water quality image to be detected through the second water quality detection model to obtain the water quality type of the fish pond water quality image to be detected.
[0010] In one embodiment of the present invention, the training device is specifically used to: preprocess the sample fish pond water quality images; classify and label the water quality types of the preprocessed sample fish pond water quality images to obtain a fish pond water quality image dataset; perform data enhancement processing on the fish pond water quality image dataset; and train the first water quality detection model using the fish pond water quality image dataset after data enhancement processing.
[0011] In one embodiment of the present invention, the water quality types of the fish pond water quality image include rich water quality, thin water quality, old water quality and changing water quality.
[0012] In one embodiment of the present invention, the image preprocessing device is specifically used to: grayscale the fish pond water quality image to be tested to obtain a grayscale image of the fish pond water quality to be tested; preset a grayscale threshold, and set the pixel points in the fish pond water quality grayscale image whose grayscale values are greater than the grayscale threshold as the boundary; cover the closed area formed by the boundary and record it as the bottom plate area; establish a deep learning model, and perform image enhancement processing on the bottom plate area through the deep learning model to obtain a bottom plate image; splice the bottom plate image and the image formed by the area whose grayscale value is less than the grayscale threshold to generate an advanced image.
[0013] In one embodiment of the present invention, the image processing device calculates the pixel points in the grayscale image of the fish pond water quality whose grayscale values are greater than the grayscale threshold through a convolutional neural network and determines the bottom plate area, wherein the bottom plate area is the reflective area of the fish pond water quality image to be detected.
[0014] Beneficial effects of the present invention: The present invention obtains a sample fish pond water quality image and constructs a first water quality detection model, trains the first water quality detection model through the sample fish pond water quality image to obtain a second water quality detection model, then obtains a fish pond water quality image to be detected and preprocesses the fish pond water quality image to be detected, and finally detects the preprocessed fish pond water quality image to be detected through the second water quality detection model to obtain the water quality type of the fish pond water quality image to be detected, thereby being able to quickly and accurately detect the type of fish pond water quality with low economic cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a flow chart of a method for detecting fish pond water quality based on deep learning according to an embodiment of the present invention; Figure 2 Schematic diagram of a fish pond water quality detection system based on deep learning according to an embodiment of the present invention. DETAILED DESCRIPTION
[0016] 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.
[0017] Figure 1 This is a flow chart of a fish pond water quality detection method based on deep learning according to an embodiment of the present invention.
[0018] like Figure 1As shown, the fish pond water quality detection method based on deep learning in an embodiment of the present invention includes the following steps S1-S5: S1, obtain the sample fish pond water quality image.
[0019] In one embodiment of the present invention, the quality of water is particularly important for the aquaculture industry. Therefore, it is critical to detect the type of fish pond water quality. Generally, some fish pond water quality images can be selected from the Internet or some fish pond water quality images can be taken in reality. Among them, the water quality types of fish pond water quality images generally include rich water quality, thin water quality, old water quality and transferred water quality.
[0020] Specifically, the water color of rich water quality is darker, the water color can generally appear as oily green or brown, and the water transparency is moderate, about 20-30 cm; the water color of thin water quality is lighter, the water color can generally appear as green or light yellow, and the water transparency is larger, generally speaking, the transparency of thin water quality is about greater than 30 cm; the water color of old water quality is very dark, the water color can generally appear as dark green or dark brown, and the water transparency is lower, generally less than 20 cm; the water color of changing water quality can generally appear as blue-green or maroon, and the transparency is lower.
[0021] S2, constructing a first water quality detection model, and training the first water quality detection model through sample fish pond water quality images to obtain a second water quality detection model.
[0022] In one embodiment of the present invention, the first water quality detection model can be constructed by using CNN (Convolutional Neural Network).
[0023] In one embodiment of the present invention, training the first detection model using sample fish pond water quality images may specifically include: First, the sample fish pond water quality image is preprocessed, which may specifically include binarization and background noise removal. Secondly, the water quality type of the preprocessed sample fish pond water quality image can be classified and labeled, and the acquired sample fish pond water quality image is classified and labeled according to the water quality type to form a fish pond water quality image dataset. Then, the fish pond water quality image dataset can be data enhanced, which may specifically include horizontal flipping, vertical flipping, translation, scaling, and adjusting the brightness and contrast of the fish pond water quality image. Finally, the first water quality detection model can be trained using the fish pond water quality image dataset after data enhancement.
[0024] S3, obtaining the water quality image of the fish pond to be tested.
[0025] In one embodiment of the present invention, a plurality of images of water quality of the fish pond to be tested can be acquired through a camera, wherein the plurality of images of water quality of the fish pond to be tested can be acquired by shooting from different angles or different positions of the fish pond and different reflection angles, and the images of water quality of the fish pond to be tested in different weather conditions can also be acquired.
[0026] S4, preprocessing the fish pond water quality image to be detected.
[0027] In one embodiment of the present invention, preprocessing the fish pond water quality image to be detected may specifically include the following steps S401-S405: S401, graying the image of the water quality of the fish pond to be detected to obtain a grayscale image of the water quality of the fish pond to be detected.
[0028] S402, preset a grayscale threshold, and set the pixel points with grayscale values greater than the grayscale threshold in the fish pond water quality grayscale image as boundaries.
[0029] S403, covering the closed area formed by the boundary and recording it as the bottom plate area.
[0030] S404, establishing a deep learning model, and performing image enhancement processing on the bottom plate area through the deep learning model to obtain a bottom plate image.
[0031] S405 , stitching the base plate image and the image formed by the area whose grayscale value is less than the grayscale threshold to generate an advanced image.
[0032] Specifically, first, the fish pond water quality image to be detected can be converted into a grayscale image, and the boundary with a large grayscale value difference of the grayscale image of the fish pond water quality image to be detected can be detected by a convolutional neural network, and the bottom plate area can be determined according to the boundary, wherein the bottom plate area can be the reflective area of the fish pond water quality image to be detected, and secondly, the grayscale threshold can be preset according to the grayscale value of the conventional image, and the bottom plate area can be determined by judging that the grayscale value of the grayscale image of the fish pond water quality image to be detected is greater than the preset threshold. Alternatively, the pixel points with a large difference in the grayscale value of two adjacent pixels can be marked, and the closed area formed by these pixels can be covered to form the bottom plate area. Among them, the fish pond water quality image to be detected can be grayed by OpenCV to generate a grayscale image of the fish pond water quality image to be detected, and the area of interest of the fish pond water quality image to be detected can be exposed. In the grayscale image of the fish pond water quality image to be detected, the 0 value area can represent the covered image, and the 255 value area can represent the area of interest, that is, the exposed part.
[0033] Furthermore, the bottom plate image can be generated by the optimized CycleGAN, wherein the input end of the optimized CycleGAN may include images of multiple water areas in the fish pond water quality image, and the optimized CycleGAN has dual discriminators and dual generators, and through the collaboration of the two discriminators and the two generators, different levels of image processing can be performed on the multiple water areas in the fish pond water quality image to be detected, thereby improving the clarity of the fish pond water quality image to be detected.
[0034] Specifically, if traditional GAN wants to discriminate images, it needs to be trained with two images in pairs. The optimized CycleGAN has two generation networks and a two-way learning mapper, namely generator P: X→Y, generator Q: Y←X, and a discriminator corresponding to the generator, where X is the source domain, that is, the image of the water quality of the fish pond with reflective areas, and Y is the target domain, that is, the image of the water quality of the fish pond without reflective areas.
[0035] In one embodiment of the present invention, the bottom plate image of the fish pond water quality image to be tested can be changed into a single color as the first monochrome image, and the image processed by CycleGAN can be used as the second monochrome image, and then the first monochrome image and the second monochrome image can be merged to form an advanced image.
[0036] Specifically, the fish pond water quality image to be tested can be discriminated based on the PatchGAN algorithm. Since CycleGAN has dual discriminators, both discriminators can use the PatchGAN algorithm to discriminate the target image. Therefore, discriminator A can be used for overall discrimination, and discriminator B can be used for partial discrimination. Discriminator B can obtain partial images from the original image or the generated image of the generator, and train to distinguish the source of the partial image, wherein the original image is an image without reflective areas in the image input to the discriminator. Since GAN can only be used to construct high-frequency data, discriminator A can extract image features from the overall image at the input end of the discriminator, and discriminate each N*N patch of the fish pond water quality image to be tested. Among them, since the discriminator output of the PatchGAN algorithm is a 30*30 feature map, the feature map can be reduced in dimension and averaged when calculating the adversarial loss.
[0037] S5, detecting the preprocessed fish pond water quality image to be detected by using a second water quality detection model to obtain the water quality type of the fish pond water quality image to be detected.
[0038] According to the fish pond water quality detection method based on deep learning of an embodiment of the present invention, a sample fish pond water quality image is obtained and a first water quality detection model is constructed. The first water quality detection model is trained through the sample fish pond water quality image to obtain a second water quality detection model. Then, the water quality image of the fish pond to be detected is obtained and preprocessed. Finally, the preprocessed water quality image of the fish pond to be detected is detected through the second water quality detection model to obtain the water quality type of the water quality image of the fish pond to be detected. Thus, the type of fish pond water quality can be detected quickly and accurately with low economic cost.
[0039] In order to implement the fish pond water quality detection method based on deep learning of the above embodiment, the present invention also proposes a fish pond water quality detection system based on deep learning.
[0040] like Figure 2 As shown, the fish pond water quality detection system based on deep learning of an embodiment of the present invention includes: a first acquisition device 100, a training device 200, a second acquisition device 300, an image preprocessing device 400 and a detection device 500, wherein the first acquisition device 100 is used to acquire a sample fish pond water quality image; the training device 200 is used to construct a first water quality detection model, and train the first water quality detection model through the sample fish pond water quality image to obtain a second water quality detection model; the second acquisition device 300 is used to acquire the water quality image of the fish pond to be detected; the image preprocessing device 400 preprocesses the fish pond water quality image to be detected; the detection device 500 is used to detect the preprocessed fish pond water quality image to be detected through the second water quality detection model to obtain the water quality type of the fish pond water quality image to be detected.
[0041] In one embodiment of the present invention, the quality of water is particularly important for the aquaculture industry. Therefore, it is critical to detect the type of fish pond water quality. Generally, the first acquisition device 100 can select some fish pond water quality images from the Internet or take some fish pond water quality images from reality. Among them, the water quality types of fish pond water quality images generally include rich water quality, thin water quality, old water quality and transferred water quality.
[0042] Specifically, the water color of rich water quality is darker, the water color can generally appear as oily green or brown, and the water transparency is moderate, about 20-30 cm; the water color of thin water quality is lighter, the water color can generally appear as green or light yellow, and the water transparency is larger, generally speaking, the transparency of thin water quality is about greater than 30 cm; the water color of old water quality is very dark, the water color can generally appear as dark green or dark brown, and the water transparency is lower, generally less than 20 cm; the water color of changing water quality can generally appear as blue-green or maroon, and the transparency is lower.
[0043] In one embodiment of the present invention, the first water quality detection model can be constructed by using CNN (Convolutional Neural Network).
[0044] In one embodiment of the present invention, the training device 200 can be specifically used for: first, preprocessing the sample fish pond water quality image, which can specifically include binarizing the sample fish pond water quality image and removing background noise. Secondly, the water quality type of the preprocessed sample fish pond water quality image can be classified and labeled, and the acquired sample fish pond water quality image can be classified and labeled according to the water quality type to form a fish pond water quality image dataset. Then, the fish pond water quality image dataset can be data enhanced, which can specifically include horizontally flipping, vertically flipping, translating, scaling, and adjusting the brightness and contrast of the fish pond water quality image. Finally, the first water quality detection model can be trained using the fish pond water quality image dataset after data enhancement.
[0045] In one embodiment of the present invention, the second acquisition module 300 can acquire multiple images of water quality of the fish pond to be tested through a camera, wherein the multiple images of water quality of the fish pond to be tested can be acquired by shooting from different angles or different positions of the fish pond and different reflection angles, and the water quality images of the fish pond to be tested in different weather conditions can also be acquired.
[0046] In one embodiment of the present invention, the image preprocessing module 400 preprocesses the fish pond water quality image to be detected, which may specifically include: S401, graying the image of the water quality of the fish pond to be detected to obtain a grayscale image of the water quality of the fish pond to be detected.
[0047] S402, preset a grayscale threshold, and set the pixel points with grayscale values greater than the grayscale threshold in the fish pond water quality grayscale image as boundaries.
[0048] S403, covering the closed area formed by the boundary and recording it as the bottom plate area.
[0049] S404, establishing a deep learning model, and performing image enhancement processing on the bottom plate area through the deep learning model to obtain a bottom plate image.
[0050] S405 , stitching the base plate image and the image formed by the area whose grayscale value is less than the grayscale threshold to generate an advanced image.
[0051] Specifically, first, the fish pond water quality image to be detected can be converted into a grayscale image, and the boundary with a large grayscale value difference of the grayscale image of the fish pond water quality image to be detected can be detected by a convolutional neural network, and the bottom plate area can be determined according to the boundary, wherein the bottom plate area can be the reflective area of the fish pond water quality image to be detected, and secondly, the grayscale threshold can be preset according to the grayscale value of the conventional image, and the bottom plate area can be determined by judging that the grayscale value of the grayscale image of the fish pond water quality image to be detected is greater than the preset threshold. Alternatively, the pixel points with a large difference in the grayscale value of two adjacent pixels can be marked, and the closed area formed by these pixels can be covered to form the bottom plate area. Among them, the fish pond water quality image to be detected can be grayed by OpenCV to generate a grayscale image of the fish pond water quality image to be detected, and the area of interest of the fish pond water quality image to be detected can be exposed. In the grayscale image of the fish pond water quality image to be detected, the 0 value area can represent the covered image, and the 255 value area can represent the area of interest, that is, the exposed part.
[0052] Furthermore, the bottom plate image can be generated by the optimized CycleGAN, wherein the input end of the optimized CycleGAN may include images of multiple water areas in the fish pond water quality image, and the optimized CycleGAN has dual discriminators and dual generators, and through the collaboration of the two discriminators and the two generators, different levels of image processing can be performed on the multiple water areas in the fish pond water quality image to be detected, thereby improving the clarity of the fish pond water quality image to be detected.
[0053] Specifically, if traditional GAN wants to discriminate images, it needs to be trained with two images in pairs. The optimized CycleGAN has two generation networks and a two-way learning mapper, namely generator P: X→Y, generator Q: Y←X, and a discriminator corresponding to the generator, where X is the source domain, that is, the image of the water quality of the fish pond with reflective areas, and Y is the target domain, that is, the image of the water quality of the fish pond without reflective areas.
[0054] In one embodiment of the present invention, the bottom plate image of the fish pond water quality image to be tested can be changed into a single color as the first monochrome image, and the image processed by CycleGAN can be used as the second monochrome image, and then the first monochrome image and the second monochrome image can be merged to form an advanced image.
[0055] Specifically, the fish pond water quality image to be tested can be discriminated based on the PatchGAN algorithm. Since CycleGAN has dual discriminators, both discriminators can use the PatchGAN algorithm to discriminate the target image. Therefore, discriminator A can be used for overall discrimination, and discriminator B can be used for partial discrimination. Discriminator B can obtain partial images from the original image or the generated image of the generator, and train to distinguish the source of the partial image, wherein the original image is an image without reflective areas in the image input to the discriminator. Since GAN can only be used to construct high-frequency data, discriminator A can extract image features from the overall image at the input end of the discriminator, and discriminate each N*N patch of the fish pond water quality image to be tested. Among them, since the discriminator output of the PatchGAN algorithm is a 30*30 feature map, the feature map can be reduced in dimension and averaged when calculating the adversarial loss.
[0056] According to the deep learning-based fish pond water quality detection system of an embodiment of the present invention, a sample fish pond water quality image is obtained and a first water quality detection model is constructed. The first water quality detection model is trained through the sample fish pond water quality image to obtain a second water quality detection model. Then, the water quality image of the fish pond to be detected is obtained and preprocessed. Finally, the preprocessed water quality image of the fish pond to be detected is detected through the second water quality detection model to obtain the water quality type of the water quality image of the fish pond to be detected. Thus, the type of fish pond water quality can be detected quickly and accurately with low economic cost.
[0057] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. "Multiple" means two or more, unless otherwise clearly and specifically defined.
[0058] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0059] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0060] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0061] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0062] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0063] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0064] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0065] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0066] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A fish pond water quality detection method based on deep learning, characterized in that: The following steps are involved: Obtain water quality images of sample fish ponds; Constructing a first water quality detection model, and training the first water quality detection model through the sample fish pond water quality image to obtain a second water quality detection model; Obtain water quality images of fish ponds to be tested; Preprocessing the fish pond water quality image to be detected; The preprocessed fish pond water quality image to be detected is detected by using the second water quality detection model to obtain the water quality type of the fish pond water quality image to be detected.
2. The method for detecting fish pond water quality based on deep learning according to claim 1, characterized in that: The training of the first detection model by using the sample fish pond water quality image comprises the following steps: Preprocessing the sample fish pond water quality image; Classify and label the water quality types of the preprocessed sample fish pond water quality images to obtain a fish pond water quality image dataset; Performing data enhancement processing on the fish pond water quality image dataset; The first water quality detection model is trained using the fish pond water quality image dataset after data enhancement processing.
3. The fish pond water quality detection method based on deep learning according to claim 2 is characterized in that: The water quality types of the fish pond water quality image include rich water quality, thin water quality, old water quality and changing water quality.
4. The fish pond water quality detection method based on deep learning according to claim 3 is characterized in that: The preprocessing of the fish pond water quality image to be detected comprises the following steps: Grayscale processing is performed on the fish pond water quality image to be detected to obtain a grayscale image of the fish pond water quality to be detected; A grayscale threshold is preset, and pixels whose grayscale values in the fish pond water quality grayscale image are greater than the grayscale threshold are set as boundaries; Cover the closed area formed by the boundary and record it as the bottom plate area; Establishing a deep learning model, and performing image enhancement processing on the bottom plate area through the deep learning model to obtain a bottom plate image; The base plate image and an image formed by an area whose grayscale value is less than the grayscale threshold are spliced to generate an advanced image.
5. The fish pond water quality detection method based on deep learning according to claim 4 is characterized in that: The pixel points whose grayscale values in the grayscale image of the fish pond water quality are greater than the grayscale threshold are calculated through a convolutional neural network to determine the bottom plate area, wherein the bottom plate area is the reflective area of the fish pond water quality image to be detected.
6. A fish pond water quality detection system based on deep learning, characterized in that: include: A first acquisition device, the first acquisition device is used to acquire a sample fish pond water quality image; A training device, the training device is used to construct a first water quality detection model, and train the first water quality detection model through the sample fish pond water quality image to obtain a second water quality detection model; A second acquisition device, the second acquisition device is used to acquire a water quality image of a fish pond to be detected; An image preprocessing device, the image preprocessing device is used to preprocess the fish pond water quality image to be detected; A detection device is used to detect the pre-processed fish pond water quality image to be detected through the second water quality detection model to obtain the water quality type of the fish pond water quality image to be detected.
7. The fish pond water quality detection system based on deep learning according to claim 6 is characterized in that: The training device is specifically used for: Preprocessing the sample fish pond water quality image; Classify and label the water quality types of the preprocessed sample fish pond water quality images to obtain a fish pond water quality image dataset; Performing data enhancement processing on the fish pond water quality image dataset; The first water quality detection model is trained using the fish pond water quality image dataset after data enhancement processing.
8. The fish pond water quality detection system based on deep learning according to claim 7 is characterized in that: The water quality types of the fish pond water quality image include rich water quality, thin water quality, old water quality and changing water quality.
9. The fish pond water quality detection system based on deep learning according to claim 8, characterized in that: The image preprocessing device is specifically used for: Grayscale processing is performed on the fish pond water quality image to be detected to obtain a grayscale image of the fish pond water quality to be detected; A grayscale threshold is preset, and pixels whose grayscale values in the fish pond water quality grayscale image are greater than the grayscale threshold are set as boundaries; Cover the closed area formed by the boundary and record it as the bottom plate area; Establishing a deep learning model, and performing image enhancement processing on the bottom plate area through the deep learning model to obtain a bottom plate image; The base plate image and an image formed by an area whose grayscale value is less than the grayscale threshold are spliced to generate an advanced image.
10. The fish pond water quality detection system based on deep learning according to claim 9, characterized in that: The image processing device calculates the pixel points whose grayscale values in the fish pond water quality grayscale image are greater than the grayscale threshold through a convolutional neural network and determines the bottom plate area, wherein the bottom plate area is the reflective area of the fish pond water quality image to be detected.
Citation Information
Patent Citations
Method and device for optimizing eye medical image and storage medium
CN117314911A
Intelligent shrimp pond water quality monitoring method and system based on deep learning and decision tree
CN117576550A
Water quality category detection method, system and equipment based on hybrid neural network
CN118365974A
Underground water pollution accurate description method and detection system
CN119000561A