Underwater fish target detection method and device based on preprocessing and lightweight YOLOv5
By adopting preprocessing technology and lightweight YOLOv5 neural network in underwater fish target detection, the problems of labeled data dependence and model complexity in existing methods are solved, and higher detection accuracy and lower detection accuracy are achieved computing resource requirements.
Patent Information
- Application Number
- CN202411531097.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing underwater fish object detection methods require a large amount of labeled data during the training process, which is costly to obtain. The deep learning algorithm has a complex network structure, which leads to more complex model training and optimization and requires a large number of parameter computing resources.
A two-stage underwater fish target detection method based on pretreatment and lightweight YOLOv5 is adopted. The first stage preprocesses underwater images through grayscale world assumptions, histogram equalization with limited contrast and Gaussian filtering to improve image quality. The second stage is to build a teacher-student knowledge distillation model, reduce dependence on labeled data, simplify the model structure, and obtain a lightweight YOLOv5 neural network.
It improves the accuracy of underwater fish target detection, reduces the demand for computing resources, simplifies the model training process, and reduces the cost of obtaining labeled data.
Smart Images

Figure CN119445352A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an underwater fish target detection method and device based on preprocessing and lightweight YOLOv5. Background Art
[0002] Traditional detection methods are easily affected by light intensity and water clarity when detecting targets underwater. At the same time, traditional methods usually require manual design of features and adjustment of parameters to adapt to different complex underwater scenes, which increases the complexity and inconvenience of algorithm operation. These limitations have prompted current research to turn to more efficient and automated deep learning methods. In response to the above problems, subsequent researchers have proposed a series of underwater target detection methods, including the study of the training and performance of YOLOv3, YOLOv4, YOLOv5, etc. on public data sets. Experiments have shown that YOLOv5 has good adaptability and performance in underwater environments due to its fast and accurate target detection capabilities.
[0003] However, the above methods require a large amount of labeled data during the training process, which is costly to obtain, and the sample quality of the original input data is poor. At the same time, existing deep learning algorithms usually have complex network structures, which makes model training and optimization more complicated, requires a large number of parameter computing resources, and also places high demands on hardware equipment. Therefore, designing a highly accurate and lightweight underwater fish target detection algorithm is one of the key issues that need to be solved urgently. Summary of the invention
[0004] In view of the above problems, the purpose of the present invention is to provide a method and device for underwater fish target detection based on preprocessing and lightweight YOLOv5. First, the grayscale world hypothesis is used to correct the color of the underwater image; then the contrast of the underwater image is enhanced by contrast-limited histogram equalization; secondly, Gaussian filtering is used to remove underwater image noise and artifacts to improve the quality of the initial underwater image; finally, a teacher-student knowledge distillation model is adopted to solve key problems such as dependence on labeled data, complex model structure and high computing resource requirements, so as to obtain higher underwater fish target detection accuracy.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0006] On the one hand, a method for underwater fish target detection based on preprocessing and lightweight YOLOv5 is provided, wherein the method comprises two stages, wherein the first stage preprocesses the input underwater degraded image, and the second stage constructs a lightweight YOLOv5 neural network for underwater fish target detection;
[0007] The first stage specifically includes:
[0008] S1, inputting underwater degraded images as initial input data;
[0009] S2. performing color correction on the underwater degraded image using a gray world hypothesis algorithm;
[0010] S3, using a contrast-limited adaptive histogram equalization algorithm to enhance the contrast of the color-corrected underwater image;
[0011] S4, using Gaussian filtering to remove noise and artifacts from the contrast-enhanced underwater image;
[0012] The second stage specifically includes:
[0013] S5. Build a teacher-student knowledge distillation model, use the preprocessed underwater images to train the teacher-side YOLOv5 neural network, transfer the extracted knowledge to the student-side YOLOv5 neural network, and obtain a lightweight YOLOv5 neural network.
[0014] S6. Use the lightweight YOLOv5 neural network to detect underwater fish targets.
[0015] Optionally, in step S2, the gray world hypothesis algorithm is used to perform color correction on the underwater degraded image, and the specific calculation is as follows:
[0016] (1)
[0017] (2)
[0018] (3)
[0019] Among them, K is the same gray value in the gray world hypothesis, G s is the gain coefficient of the red, green and blue channels; S={R, G, B} is the color channel, and the values are red channel R, green channel G and blue channel B respectively; is the average value of the red channel, is the average value of the green channel, is the average value of the blue channel, is the average value of the color channel, which is taken from , It is the color channel after color correction using the gray world hypothesis algorithm.
[0020] Optionally, in step S3, the contrast of the color-corrected underwater image is enhanced by using a contrast-limited adaptive histogram equalization algorithm, which specifically includes:
[0021] First, the color-corrected underwater image is divided into multiple regions, and histogram equalization is performed on each region. Secondly, the histogram of each region is calculated, and the number of pixels with different gray levels in each region is counted. Contrast limitation is used again to prevent excessive amplification of noise. Then the histogram of each region is equalized to make the pixel distribution more uniform to improve the contrast. Finally, the equalized regions are recombined into a complete underwater image. .
[0022] Optionally, in step S4, removing noise and artifacts from the contrast-enhanced underwater image by using Gaussian filtering specifically includes:
[0023] Perform weighted averaging on each pixel in the filter template, calculate the pixel mean, and use the mean to replace the initial value of the center pixel of the filter template. The Gaussian filter calculation is as follows:
[0024] (4)
[0025] (5)
[0026] Among them, G represents the function expression of Gaussian filtering in two-dimensional space, represents the underwater image after contrast enhancement, and I represents the underwater image after Gaussian filtering;
[0027] Normalize the underwater image after Gaussian filtering:
[0028] (6)
[0029] Where (x, y) represents the coordinate point in the underwater image, σ represents the standard deviation, Represents the normalized underwater image. The image is represented as a matrix of pixels, (i, j) is the image pixel coordinate, i is the row coordinate of the image pixel, and j is the column coordinate of the image pixel.
[0030] Optionally, the step S5 specifically includes:
[0031] A teacher-student YOLOv5 neural network framework was built, and the preprocessed underwater images were used to train the teacher-side YOLOv5 neural network. The accumulated knowledge was extracted using the knowledge distillation model, and the extracted knowledge was used as a guide in the training process of the student-side YOLOv5 neural network to obtain a lightweight YOLOv5 neural network.
[0032] Optionally, in step S5, the teacher-side YOLOv5 neural network generates a soft target through a softmax function, and then transmits it to the student-side YOLOv5 neural network, wherein the soft target includes the probability distribution of each category; and then two loss functions, distillation loss and student loss, are designed to ensure that the student-side YOLOv5 neural network can accurately predict.
[0033] Optionally, in step S6, the underwater image to be detected is input into the lightweight YOLOv5 neural network to obtain the detection result of the underwater fish target.
[0034] On the other hand, an underwater fish target detection device based on preprocessing and lightweight YOLOv5 is provided, for implementing any of the above methods, the device comprising:
[0035] A preprocessing module is used to input an underwater degraded image as initial input data; perform color correction on the underwater degraded image using a grayscale world hypothesis algorithm; enhance the contrast of the underwater image after color correction using a contrast-limited adaptive histogram equalization algorithm; and remove noise and artifacts from the underwater image after contrast enhancement using a Gaussian filter;
[0036] The neural network building module is used to build a teacher-student knowledge distillation model. The teacher-side YOLOv5 neural network is trained using preprocessed underwater images, and the extracted knowledge is transferred to the student-side YOLOv5 neural network to obtain a lightweight YOLOv5 neural network.
[0037] The detection module is used to detect underwater fish targets using the lightweight YOLOv5 neural network.
[0038] In another aspect, an electronic device is provided, the electronic device comprising:
[0039] processor;
[0040] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are loaded and executed by the processor, the steps of the underwater fish target detection method as described above are implemented.
[0041] On the other hand, a computer-readable storage medium is provided, in which program code is stored. The program code can be called by a processor to execute the steps of the underwater fish target detection method as described above.
[0042] The beneficial effects brought about by the technical solution provided by the present invention include at least:
[0043] The present invention provides a two-stage underwater fish target detection method and device based on preprocessing and lightweight YOLOv5. Compared with the existing underwater fish target detection method, the advantage of the method of the present invention is that it adopts a two-stage processing method. Through the preprocessing of the first stage, it is helpful for the deep neural network to learn, ensure the accuracy of the model network training, and effectively overcome the defects of feature fuzziness and low feature recognition accuracy in complex underwater environments; at the same time, the teacher-student knowledge distillation model of the second stage is adopted to design a lightweight YOLOv5 neural network to solve the problems of complex model structure and high demand for computing parameter resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0045] Figure 1 It is a flow chart of an underwater fish target detection method based on preprocessing and lightweight YOLOv5 provided by an embodiment of the present invention;
[0046] Figure 2 Schematic diagram of the network structure of the lightweight YOLOv5 provided by an embodiment of the present invention;
[0047] Figure 3 It is a structural schematic diagram of an underwater fish target detection device based on preprocessing and lightweight YOLOv5 provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment 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.
[0049] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.
[0050] The embodiment of the present invention provides an underwater fish target detection method based on preprocessing and lightweight YOLOv5, which can be implemented by an electronic device, which can be a terminal or a server. Figure 1 As shown in the figure, the method consists of two stages, in which the first stage preprocesses the input underwater degraded image, and the second stage constructs a lightweight YOLOv5 neural network for underwater fish target detection.
[0051] Furthermore, the first stage specifically includes:
[0052] S1. Input underwater degraded image as the initial input data.
[0053] The underwater degraded image refers to the collected original underwater image.
[0054] S2. Performing color correction on the underwater degraded image using a gray world hypothesis algorithm.
[0055] In this step, the gray world hypothesis algorithm is used to perform color correction on the underwater degraded image. The specific calculation is as follows:
[0056] (1)
[0057] (2)
[0058] (3)
[0059] Among them, K is the same gray value in the gray world hypothesis, G s is the gain coefficient of the red, green and blue channels; S={R, G, B} is the color channel, and its values are red channel R (Red), green channel G (Green) and blue channel B (Blue) respectively. is the average value of the red channel, is the average value of the green channel, is the average value of the blue channel, is the average value of the color channel, which is taken from , It is the color channel after color correction using the gray world hypothesis algorithm.
[0060] The color correction method mentioned above processes the red channel, green channel and blue channel of the underwater degraded image respectively, which can effectively overcome the color distortion problem of the underwater image.
[0061] S3. Use contrast-limited adaptive histogram equalization algorithm to enhance the contrast of the color-corrected underwater image.
[0062] In this step, the contrast of the color-corrected underwater image is enhanced using the contrast-limited adaptive histogram equalization algorithm (CLAHE), which includes:
[0063] First, the color-corrected underwater image is divided into multiple regions (such as 8x8 image blocks), and histogram equalization is performed on each region. Secondly, the histogram of each region is calculated, and the number of pixels with different gray levels in each region is counted. Contrast limitation is used again to prevent excessive amplification of noise. Then the histogram of each region is equalized to make the pixel distribution more uniform to improve the contrast. Finally, the equalized regions are recombined into a complete underwater image. .
[0064] S4. Use Gaussian filtering to remove noise and artifacts from the contrast-enhanced underwater image.
[0065] In this step, Gaussian filtering is used to remove noise and artifacts from the contrast-enhanced underwater image, specifically including:
[0066] Perform weighted averaging on each pixel in the filter template, calculate the pixel mean, and use the mean to replace the initial value of the center pixel of the filter template, thereby maintaining image clarity while achieving image smoothing. The Gaussian filter calculation is as follows:
[0067] (4)
[0068] (5)
[0069] Among them, G represents the function expression of Gaussian filtering in two-dimensional space, represents the underwater image after contrast enhancement, and I represents the underwater image after Gaussian filtering;
[0070] Normalize the underwater image after Gaussian filtering:
[0071] (6)
[0072] Where (x, y) represents the coordinate point in the underwater image, σ represents the standard deviation, Represents the normalized underwater image. The image can be represented as a matrix of pixels, (i, j) is the image pixel coordinate, i is the row coordinate of the image pixel, and j is the column coordinate of the image pixel. Among them, i is used to traverse the index of the row, and j is used to traverse the index of the column.
[0073] Compared with the degraded underwater images, the first stage of preprocessing can produce initialization input images with better quality.
[0074] Furthermore, the second stage specifically includes:
[0075] S5. Build a teacher-student knowledge distillation model, use the preprocessed underwater images to train the teacher-side YOLOv5 neural network, transfer the extracted knowledge to the student-side YOLOv5 neural network, and obtain a lightweight YOLOv5 neural network.
[0076] like Figure 2 As shown in the figure, we first build a teacher-student YOLOv5 neural network framework. The teacher model is usually a large and accurate pre-trained model with rich knowledge and feature representation; the student model is a small model with far fewer parameters than the teacher model. The goal is to learn the teacher model knowledge while maintaining a high accuracy rate.
[0077] Specifically, the preprocessed underwater images are used to train the teacher-side YOLOv5 neural network, and the knowledge distillation model is used to extract the accumulated knowledge. The extracted knowledge is used as a guide and applied to the training process of the student-side YOLOv5 neural network to obtain a lightweight YOLOv5 neural network.
[0078] The teacher-side YOLOv5 neural network generates soft targets through the softmax function and then transmits them to the student-side YOLOv5 neural network. The soft targets contain the probability distribution of each category, which helps the student model learn better. Then, two loss functions, distillation loss and student loss, are designed to ensure that the student-side YOLOv5 neural network can make accurate predictions.
[0079] S6. Use the lightweight YOLOv5 neural network to detect underwater fish targets.
[0080] The underwater image to be detected is input into the lightweight YOLOv5 neural network to obtain the detection result of the underwater fish target.
[0081] Compared with the general YOLOv5 neural network, the lightweight YOLOv5 neural network in the second stage has smaller parameters, higher training efficiency, and lower computing resource requirements. Combined with the preprocessing in the first stage, the neural network obtained in the second stage achieves a higher accuracy rate in underwater fish target detection.
[0082] Accordingly, an embodiment of the present invention also provides an underwater fish target detection device based on preprocessing and lightweight YOLOv5, such as Figure 3 As shown, the device comprises:
[0083] A preprocessing module is used to input an underwater degraded image as initial input data; perform color correction on the underwater degraded image using a grayscale world hypothesis algorithm; enhance the contrast of the underwater image after color correction using a contrast-limited adaptive histogram equalization algorithm; and remove noise and artifacts from the underwater image after contrast enhancement using a Gaussian filter;
[0084] The neural network building module is used to build a teacher-student knowledge distillation model. The teacher-side YOLOv5 neural network is trained using preprocessed underwater images, and the extracted knowledge is transferred to the student-side YOLOv5 neural network to obtain a lightweight YOLOv5 neural network.
[0085] The detection module is used to detect underwater fish targets using the lightweight YOLOv5 neural network.
[0086] For ease of explanation, Figure 3 Only the main components of the device are shown. The device of this embodiment can be used to perform Figure 1 The technical solution of the method embodiment shown has similar implementation principles and technical effects, which will not be repeated here.
[0087] In an exemplary embodiment, the present invention further provides an electronic device, the electronic device comprising:
[0088] processor;
[0089] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are loaded and executed by the processor, the steps of the underwater fish target detection method as described above are implemented.
[0090] In an exemplary embodiment, the present invention further provides a computer-readable storage medium, wherein at least one instruction is stored in the computer-readable storage medium, and the at least one instruction is loaded and executed by a processor to implement the steps of the underwater fish target detection method as described above. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0091] It should be noted that, in this article, the terms "include", "comprises" or any other variations 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 "comprises a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0092] References in the specification to "one embodiment", "an embodiment", "an exemplary embodiment", "some embodiments", etc. indicate that the described embodiments may include a particular feature, structure, or characteristic, but not every embodiment may include the particular feature, structure, or characteristic. In addition, when a particular feature, structure, or characteristic is described in conjunction with an embodiment, it should be within the knowledge of a person skilled in the relevant art to implement such feature, structure, or characteristic in conjunction with other embodiments (whether or not explicitly described).
[0093] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0094] In the present invention, "at least one" means one or more, and "plurality" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.
[0095] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0096] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0097] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0098] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0099] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0100] The present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention. In order to make the public have a thorough understanding of the present invention, specific details are described in detail in the following preferred embodiments of the present invention, but those skilled in the art can fully understand the present invention without the description of these details. In addition, in order to avoid unnecessary confusion about the essence of the present invention, well-known methods, processes, procedures, components and circuits are not described in detail.
[0101] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for underwater fish target detection based on preprocessing and lightweight YOLOv5, characterized in that: The method comprises two stages, wherein the first stage preprocesses the input underwater degraded image, and the second stage constructs a lightweight YOLOv5 neural network for underwater fish target detection; The first stage specifically includes: S1, inputting underwater degraded images as initial input data; S2. performing color correction on the underwater degraded image using a gray world hypothesis algorithm; S3, using a contrast-limited adaptive histogram equalization algorithm to enhance the contrast of the color-corrected underwater image; S4, using Gaussian filtering to remove noise and artifacts from the contrast-enhanced underwater image; The second stage specifically includes: S5. Build a teacher-student knowledge distillation model, use the preprocessed underwater images to train the teacher-side YOLOv5 neural network, transfer the extracted knowledge to the student-side YOLOv5 neural network, and obtain a lightweight YOLOv5 neural network. S6. Use the lightweight YOLOv5 neural network to detect underwater fish targets.
2. The underwater fish target detection method according to claim 1, characterized in that: In step S2, the grayscale world hypothesis algorithm is used to perform color correction on the underwater degraded image. The specific calculation is as follows: (1) (2) (3) Among them, K is the same gray value in the gray world hypothesis, G s is the gain coefficient of the red, green and blue channels; S= {R,G, B} is the color channel, and the values are red channel R, green channel G and blue channel B respectively; is the average value of the red channel, is the average value of the green channel, is the average value of the blue channel, is the average value of the color channel, which is taken from , It is the color channel after color correction using the gray world hypothesis algorithm.
3. The underwater fish target detection method according to claim 1, characterized in that: In step S3, the contrast of the color-corrected underwater image is enhanced by using a contrast-limited adaptive histogram equalization algorithm, which specifically includes: First, the color-corrected underwater image is divided into multiple regions, and histogram equalization is performed on each region. Secondly, the histogram of each region is calculated, and the number of pixels with different gray levels in each region is counted. Contrast limitation is used again to prevent excessive amplification of noise. Then the histogram of each region is equalized to make the pixel distribution more uniform to improve the contrast. Finally, the equalized regions are recombined into a complete underwater image. .
4. The underwater fish target detection method according to claim 1, characterized in that: In step S4, the noise and artifacts of the underwater image after contrast enhancement are removed by using Gaussian filtering, which specifically includes: Perform weighted averaging on each pixel in the filter template, calculate the pixel mean, and use the mean to replace the initial value of the center pixel of the filter template. The Gaussian filter calculation is as follows: (4) (5) Among them, G represents the function expression of Gaussian filtering in two-dimensional space, represents the underwater image after contrast enhancement, and I represents the underwater image after Gaussian filtering; Normalize the underwater image after Gaussian filtering: (6) Where (x, y) represents the coordinate point in the underwater image, σ represents the standard deviation, Represents the normalized underwater image; the image is represented as a matrix of pixels, (i, j) is the image pixel coordinate, i is the row coordinate of the image pixel, and j is the column coordinate of the image pixel.
5. The underwater fish target detection method according to claim 1, characterized in that: The step S5 specifically includes: A teacher-student YOLOv5 neural network framework was built, and the preprocessed underwater images were used to train the teacher-side YOLOv5 neural network. The accumulated knowledge was extracted using the knowledge distillation model, and the extracted knowledge was used as a guide in the training process of the student-side YOLOv5 neural network to obtain a lightweight YOLOv5 neural network.
6. The underwater fish target detection method according to claim 5, characterized in that: In step S5, the teacher-side YOLOv5 neural network generates a soft target through a softmax function, and then transmits it to the student-side YOLOv5 neural network, wherein the soft target includes the probability distribution of each category; and then two loss functions, distillation loss and student loss, are designed to ensure that the student-side YOLOv5 neural network can accurately predict.
7. The underwater fish target detection method according to claim 1, characterized in that: In step S6, the underwater image to be detected is input into the lightweight YOLOv5 neural network to obtain the detection result of the underwater fish target.
8. An underwater fish target detection device based on preprocessing and lightweight YOLOv5, the device is used to implement the method as described in any one of claims 1 to 7, characterized in that: The device comprises: A preprocessing module is used to input an underwater degraded image as initial input data; perform color correction on the underwater degraded image using a grayscale world hypothesis algorithm; enhance the contrast of the underwater image after color correction using a contrast-limited adaptive histogram equalization algorithm; and remove noise and artifacts from the underwater image after contrast enhancement using a Gaussian filter; The neural network building module is used to build a teacher-student knowledge distillation model. The teacher-side YOLOv5 neural network is trained using preprocessed underwater images, and the extracted knowledge is transferred to the student-side YOLOv5 neural network to obtain a lightweight YOLOv5 neural network. The detection module is used to detect underwater fish targets using the lightweight YOLOv5 neural network.
9. An electronic device, characterized in that: The electronic device comprises: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are loaded and executed by the processor, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Underwater target identification method based on knowledge distillation
CN114283325A
Underwater optical disaster-causing biological recognition method, device and equipment
CN115601632A
Underwater image enhancement method, storage medium and computer program product
CN118674642A