A method for evaluating fish yield in marine ranches based on target detection
By performing point mold processing on underwater fish images and filtering and modifying non-fish pixel areas, the problem of reduced detection accuracy caused by the complexity of the underwater environment in the existing technology is solved, and the accuracy and accuracy of fish yield assessment are improved. reliability.
Patent Information
- Application Number
- CN202411000647.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-10-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing fish target detection methods based on feature learning are prone to false detections and missed detections when faced with complex underwater environments, and are difficult to effectively handle dynamically changing aquatic plants, corals and other moving marine organisms, resulting in a decrease in detection accuracy.
Point model processing technology is used to preprocess underwater fish images. By screening and modifying non-fish pixel areas, the impact of irrelevant pixels is reduced, the accuracy and efficiency of the detection model are improved, and noise resource consumption is reduced.
It improves the accuracy and reliability of fish production assessment in marine pastures, can more effectively identify and count fish numbers in complex underwater environments, and reduces false detections and missed detections.
Smart Images

Figure CN118552836B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart farming, and in particular to a method for evaluating fish yield in marine ranches based on target detection. Background Art
[0002] Fish production assessment (quantity statistics) based on target detection has broad application prospects in fishery resource research, aquaculture, fish species protection, etc. The task of fish target detection is to identify all fish targets in the image, determine their size and position, and further identify their categories.
[0003] At present, the mainstream fish target detection methods are mainly divided into traditional methods and methods based on deep learning. Chinese invention patent CN114170497B discloses a multi-scale underwater fish detection method based on an attention module, which records a method for underwater fish detection based on an optimized YOLOV4 detection framework. By adding the ECA attention mechanism, the network focuses on learning fish body features, overcomes background interference, improves PANet connections to increase multi-scale information, and strengthens feature extraction, thereby improving detection accuracy.
[0004] Affected by the complexity of the underwater environment, in the face of changing lighting conditions and complex backgrounds, such as reefs, corals, suspended matter such as water plants and seaweed, and turbid water bodies, the performance of the detection method based on feature learning is greatly reduced in terms of target detection accuracy. To address this problem, the above invention discloses a data enhancement step (using the MSRCR algorithm for enhancement processing) to solve the problem of insufficient light in underwater fish images. However, simply processing the clarity of the image as a whole cannot overcome the influence of the complex underwater environment. For example, when facing dynamically changing water plants, corals and other moving marine organisms, the detection model will still have the phenomenon of false detection and missed detection. Therefore, targeted processing of the initial input image of the model is the key to improving the quality of fish yield assessment based on target detection. Summary of the invention
[0005] The purpose of the present invention is to propose a method for evaluating fish production in marine ranches based on target detection, so as to solve one or more technical problems existing in the prior art and at least provide a beneficial option or create conditions.
[0006] The present invention provides a method for evaluating fish production in marine ranches based on target detection, wherein multiple underwater fish school images in a marine ranch are obtained, recorded as multiple first images, and multiple first images are subjected to point model processing respectively to obtain multiple second images, and a target detection model is initialized, and multiple second images are used as inputs of the model, and statistical results of fish production in the marine ranch are output through the target detection model. The method can fully improve the accuracy and reliability of fish production evaluation in marine ranches, and by preprocessing the images, the influence of some irrelevant pixels is reduced, so that the detection model is more efficient when processing images, and the resource consumption of the noise in the image during the detection process is further reduced, so that the fish production can be better evaluated and counted in a complex underwater environment.
[0007] In order to achieve the above object, according to one aspect of the present invention, a method for evaluating fish yield in marine ranches based on target detection is provided, the method comprising the following steps:
[0008] Acquire multiple underwater fish school images in the ocean ranch, recorded as multiple first images;
[0009] Performing dot-mode processing on the plurality of first images respectively to obtain a plurality of second images;
[0010] Initialize an object detection model and use the multiple second images as input to the model;
[0011] Through the target detection model, the statistical results of fish production in the marine ranch are output.
[0012] Further, a method for obtaining multiple underwater fish school images in the marine ranch and recording them as multiple first images is specifically as follows: deploying multiple underwater cameras at different locations in the marine ranch, respectively, using the multiple underwater cameras to take pictures at their respective locations to obtain multiple underwater fish school images, recording the multiple underwater fish school images as multiple first images, and transmitting all the first images to the relay end;
[0013] Among them, the underwater camera is a high-resolution underwater camera, and the relay end is a data relay node deployed near the ocean ranch. The data relay node is used to collect and temporarily store image data and transmit the image data to the data processing center via wireless or wired means. All underwater cameras realize data (image) transmission with the relay end through underwater optical communication.
[0014] Furthermore, the method of performing dot-mode processing on the plurality of first images respectively to obtain the plurality of second images is specifically as follows:
[0015] In the data processing center, dot-mode processing is performed on the received multiple first images respectively, and the first images after the dot-mode processing are recorded as second images.
[0016] Furthermore, the method of performing dot mode processing on the first image to obtain the second image is specifically as follows:
[0017] The first image contains P pixels (the specific value of P changes with the size of the first image), Pw(i) represents the i-th pixel in the P pixels, and each pixel has a corresponding pixel value;
[0018] Perform foreground extraction on the first image to obtain the foreground part. The foreground part contains Q pixels, and the sum of the pixel values corresponding to these Q pixels is S. Q , filter out dot-mode pixels from P pixels of the first image;
[0019] In the first image, dot modeling is performed on the dot model area corresponding to each dot model pixel in turn, and the first image after the dot modeling is completed is recorded as the second image.
[0020] The beneficial effect of this step is: in the process of detecting the number of fish, because the target detection is based on two-dimensional images, the non-fish pixel parts contained in the image will affect the accuracy of detection. For example, some objects in the underwater environment are mistakenly identified as fish. Therefore, these non-fish pixel parts need to be processed to improve the accuracy of detection and evaluation. The method of this step performs point modeling on the point model area corresponding to each point model pixel. The point model pixel is the pixel center of these non-fish pixel parts, and the corresponding point model area is these non-fish pixel parts and the surrounding pixels. The surrounding pixels are introduced as point model areas for point modeling in order to reduce the weight of the non-fish pixel parts in the regression problem solving link of the target detection task, thereby avoiding identifying the non-fish pixel parts as fish and improving the recognition accuracy of the detection model for fish statistics.
[0021] Furthermore, the method of selecting the dot mode pixels from the P pixels of the first image is as follows: Pw(x) represents any one of the P pixels, a circle Cw(x) is drawn with the midpoint of Pw(x) as the center and H0 as the radius, and the array VPW is used as X Store the pixel values of all pixels that fall within the circle Cw(x), record the array VPW X The average value of all values in W is M , record the array VPW X There are B0 values in memory that are greater than W M And there are B1 values less than W M , if the ratio of the larger value of B0 and B1 to the smaller value of B0 and B1 is greater than D, then Pw(x) is recorded as a point mode pixel;
[0022] Where H0 is equal to twice S Q Subtract S p The absolute value of the obtained value is divided by SQ and S p -S Q The larger value of D is P divided by Q, S p represents the sum of the pixel values of P pixels in the first image;
[0023] Furthermore, the dot mode area corresponding to the dot mode pixel is defined as follows: a circle is drawn with any dot mode pixel as the center and H0 as the radius, and all pixels falling within the circle form a connected area, and the connected area is recorded as the dot mode area corresponding to the dot mode pixel;
[0024] Furthermore, the method of performing dot mode conversion on the dot mode area corresponding to the dot mode pixel is as follows: the dot mode area corresponding to the dot mode pixel contains R pixels, Rw(x) represents any one of the R pixels, VRw(x) represents the pixel value corresponding to Rw(x), and the value of VRw(x) is modified to DRw(x);
[0025] The calculation method of DRw(x) is as follows: VRw(x) multiplied by R is used as the first sub-item, the sum of the pixel values of R-1 pixels remaining after removing Rw(x) from the R pixels (in the dot mode area corresponding to the dot mode pixel) is recorded as the second sub-item, and the value obtained by dividing the sum of the first sub-item and the second sub-item by the pixel value with the highest frequency in the first image is recorded as DRw(x);
[0026] Preferably, the method for calculating DRw(x) can also be: dividing the sum of the first sub-item and the second sub-item by HFP s The obtained value is recorded as DRw(x), HFP s is the average value of the S most frequent pixel values in the first image, where S is an integer in the interval [3,8];
[0027] Traverse x from x=1 to x=R, thereby completing the modification of the pixel values of R pixels in the dot mode area corresponding to the dot mode pixel (completing the dot mode).
[0028] Furthermore, a target detection model is initialized, wherein the target detection model is one of a YOLOV4 detection model, a FasterRCNN detection model, and an SSD detection model.
[0029] Furthermore, the method of outputting the statistical results of fish production in the marine ranch through the target detection model is specifically as follows: through the target detection model, the number of fish contained in each second image is detected in turn and recorded as the detection result of the second image, and the detection results of all the second images are accumulated as the statistical results of fish production in the marine ranch.
[0030] The beneficial effects of the present invention are as follows: the method can fully improve the accuracy and reliability of marine ranch fish production assessment, reduce the influence of some irrelevant pixels by preprocessing the image, make the detection model more efficient when processing the image, and further reduce the resource consumption of the image noise during the detection process, so that the fish production can be better evaluated and counted in a complex underwater environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The above and other features of the present invention will become more obvious by describing in detail the embodiments shown in the accompanying drawings. The same reference numerals in the accompanying drawings of the present invention represent the same or similar elements. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work. In the accompanying drawings:
[0032] Figure 1 Shown is a flow chart of a target detection-based method for assessing fish yield in marine ranching. DETAILED DESCRIPTION
[0033] The following will be combined with the embodiments and drawings to clearly and completely describe the concept, specific structure and technical effects of the present invention, so as to fully understand the purpose, scheme and effect of the present invention. It should be noted that the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0034] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0035] like Figure 1 The flowchart of the method for evaluating the fish yield of marine ranches based on target detection according to the present invention is shown below. Figure 1 To illustrate a method for evaluating fish production in marine ranches based on target detection according to an embodiment of the present invention.
[0036] The present invention proposes a method for evaluating fish yield in marine ranches based on target detection, the method comprising the following steps:
[0037] Acquire multiple underwater fish school images in the ocean ranch, recorded as multiple first images;
[0038] Performing dot-mode processing on the plurality of first images respectively to obtain a plurality of second images;
[0039] Initialize an object detection model and use the multiple second images as input to the model;
[0040] Through the target detection model, the statistical results of fish production in the marine ranch are output.
[0041] Further, a method for obtaining multiple underwater fish school images in the marine ranch and recording them as multiple first images is specifically as follows: deploying multiple underwater cameras at different locations in the marine ranch, respectively, using the multiple underwater cameras to take pictures at their respective locations to obtain multiple underwater fish school images, recording the multiple underwater fish school images as multiple first images, and transmitting all the first images to the relay end;
[0042] Among them, the underwater camera is a high-resolution underwater camera, and the relay end is a data relay node deployed near the ocean ranch. The data relay node is used to collect and temporarily store image data and transmit the image data to the data processing center via wireless or wired means. All underwater cameras realize data (image) transmission with the relay end through underwater optical communication.
[0043] Furthermore, the method of performing dot-mode processing on the plurality of first images respectively to obtain the plurality of second images is specifically as follows:
[0044] In the data processing center, dot-mode processing is performed on the received multiple first images respectively, and the first images after the dot-mode processing are recorded as second images.
[0045] Furthermore, the method of performing dot mode processing on the first image to obtain the second image is specifically as follows:
[0046] The first image contains P pixels (the specific value of P changes with the size of the first image), and Pw(i) represents the i-th pixel in the P pixels. Each pixel has a corresponding pixel value, i is the serial number, i=1,2,…,P;
[0047] Perform foreground extraction on the first image to obtain the foreground part. The foreground part contains Q pixels, and the sum of the pixel values corresponding to these Q pixels is S. Q , filter out dot-mode pixels from P pixels of the first image;
[0048] In the first image, dot modeling is performed on the dot model area corresponding to each dot model pixel in turn, and the first image after the dot modeling is completed is recorded as the second image.
[0049] Furthermore, the method of selecting the dot mode pixels from the P pixels of the first image is as follows: Pw(x) represents any one of the P pixels, a circle Cw(x) is drawn with the midpoint of Pw(x) as the center and H0 as the radius, and the array VPW is used asX Store the pixel values of all pixels that fall within the circle Cw(x), record the array VPW X The average value of all values in W is M , record the array VPW X There are B0 values in memory that are greater than W M And there are B1 values less than W M , if the ratio of the larger value of B0 and B1 to the smaller value of B0 and B1 is greater than D, that is, MAX{B0,B1}÷MIN{B0,B1}>D, MAX{} and MIN{} respectively represent the maximum and minimum values in {}, then Pw(x) is recorded as a point mode pixel;
[0050] Where H0 is equal to twice S Q Subtract S p The absolute value of the obtained value is divided by S Q and S p -S Q The larger value of D is P divided by Q, S p represents the sum of the pixel values of P pixels in the first image;
[0051] The definition of pixels falling within the circle Cw(x) is: if the center point of a pixel falls inside the closed area (circular area) defined by the circle Cw(x), then the pixel is called a pixel falling within the circle Cw(x);
[0052] The specific expression is:
[0053]
[0054] Furthermore, the point mode area corresponding to the point mode pixel is defined as: a circle is made with any point mode pixel as the center and H0 as the radius, and all pixels falling within the circle form a connected area, and the connected area is recorded as the point mode area corresponding to the point mode pixel.
[0055] Furthermore, the method of performing dot mode conversion on the dot mode area corresponding to the dot mode pixel is as follows: the dot mode area corresponding to the dot mode pixel contains R pixels, Rw(x) represents any one of the R pixels, VRw(x) represents the pixel value corresponding to Rw(x), and the value of VRw(x) is modified to DRw(x);
[0056] The calculation method of DRw(x) is as follows: VRw(x) multiplied by R is used as the first sub-item, the sum of the pixel values of R-1 pixels remaining after removing Rw(x) from the R pixels (in the dot mode area corresponding to the dot mode pixel) is recorded as the second sub-item, and the value obtained by dividing the sum of the first sub-item and the second sub-item by the pixel value with the highest frequency in the first image is recorded as DRw(x);
[0057] The specific mathematical expression is:
[0058]
[0059] In the formula, represents the sum of the pixel values of R-1 pixels remaining after removing Rw(x) from the R pixels, and HFP represents the pixel value with the highest frequency in the first image;
[0060] The pixel value with the highest frequency in the first image refers to the (pixel) value that appears the most times among the P (pixel) values in the first image;
[0061] Traverse x from x=1 to x=R, thereby completing the modification of the pixel values of R pixels in the dot mode area corresponding to the dot mode pixel (completing the dot mode).
[0062] Furthermore, a target detection model is initialized, wherein the target detection model is one of a YOLOV4 detection model, a FasterRCNN detection model, and an SSD detection model.
[0063] Furthermore, the method of outputting the statistical results of fish production in the marine ranch through the target detection model is specifically as follows: through the target detection model, the number of fish contained in each second image is detected in turn and recorded as the detection result of the second image, and the detection results of all the second images are accumulated as the statistical results of fish production in the marine ranch.
[0064] The present invention provides a method for evaluating the fish yield in a marine ranch based on target detection, wherein a plurality of underwater fish school images in a marine ranch are obtained, recorded as a plurality of first images, and a plurality of first images are subjected to point model processing respectively to obtain a plurality of second images, and a target detection model is initialized, and a plurality of second images are used as inputs of the model, and the statistical results of the fish yield in the marine ranch are output through the target detection model. The method can fully improve the accuracy and reliability of the evaluation of the fish yield in the marine ranch, and by preprocessing the image, the influence of some irrelevant pixels is reduced, so that the detection model is more efficient when processing the image, and the resource consumption of the noise in the image during the detection process is further reduced, so that the fish yield can also be better evaluated and counted in a complex underwater environment. Although the description of the present invention has been quite detailed and several embodiments are described in particular, it is not intended to be limited to any of these details or embodiments or any special embodiments, so as to effectively cover the predetermined scope of the present invention. In addition, the above describes the present invention with the foreseeable embodiments of the inventor, and its purpose is to provide a useful description, and those non-substantial changes to the present invention that have not yet been foreseen can still represent equivalent changes of the present invention.
Claims
1. A method for evaluating fish yield in marine ranches based on target detection, characterized in that: The method comprises the following steps: Acquire multiple underwater fish school images in the ocean ranch, recorded as multiple first images; Performing dot-mode processing on the plurality of first images respectively to obtain a plurality of second images; Initialize an object detection model and use the multiple second images as input to the model; Through the target detection model, the statistical results of fish production in the marine ranch are output; The method of performing dot-mode processing on the first image to obtain the second image is specifically as follows: The first image contains P pixels, and Pw(i) represents the i-th pixel in the P pixels, and each pixel has a corresponding pixel value; Perform foreground extraction on the first image to obtain the foreground part. The foreground part contains Q pixels, and the sum of the pixel values corresponding to these Q pixels is S. Q , filter out dot-mode pixels from P pixels of the first image; In the first image, dot-mode-ing the dot-mode area corresponding to each dot-mode pixel is performed in sequence, and the first image after the dot-mode-ing is completed is recorded as the second image; The method for selecting point mode pixels from P pixels of the first image is as follows: Pw(x) represents any one of the P pixels, a circle Cw(x) is constructed with the midpoint of Pw(x) as the center and H0 as the radius, and the array VPW is used to represent the point mode pixels. X Store the pixel values of all pixels that fall within the circle Cw(x), record the array VPW X The average value of all values in W is M , record the array VPW X There are B0 values in memory that are greater than W M And there are B1 values less than W M , if the ratio of the larger value of B0 and B1 to the smaller value of B0 and B1 is greater than D, then Pw(x) is recorded as a point mode pixel; Where H0 is equal to twice S Q Subtract S p The absolute value of the obtained value is divided by S Q and S p -S Q The larger value of D is P divided by Q, S p represents the sum of the pixel values of P pixels in the first image; The definition of the dot mode area corresponding to the dot mode pixel is: a circle is made with any dot mode pixel as the center and H0 as the radius, and all pixels falling within the circle form a connected area, and the connected area is recorded as the dot mode area corresponding to the dot mode pixel; The method of performing dot mode conversion on the dot mode area corresponding to the dot mode pixel is as follows: the dot mode area corresponding to the dot mode pixel contains R pixels, Rw(x) represents any one of the R pixels, VRw(x) represents the pixel value corresponding to Rw(x), and the value of VRw(x) is modified to DRw(x); The calculation method of DRw(x) is as follows: VRw(x) multiplied by R is used as the first sub-item, the sum of the pixel values of R-1 pixels remaining after removing Rw(x) from the R pixels is recorded as the second sub-item, and the value obtained by dividing the sum of the first sub-item and the second sub-item by the pixel value with the highest frequency in the first image is recorded as DRw(x); Traverse x from x=1 to x=R, thereby completing the modification of the pixel values of R pixels in the dot mode area corresponding to the dot mode pixel.
2. A method for evaluating fish yield in marine ranching based on target detection according to claim 1, characterized in that: Deploy multiple underwater cameras at different locations in the ocean ranch, respectively, and use the multiple underwater cameras to take pictures at their respective locations to obtain multiple underwater fish school images, record the multiple underwater fish school images as multiple first images, and transmit all the first images to the relay end; Among them, the underwater camera is a high-resolution underwater camera, and the relay end is a data relay node deployed near the ocean ranch. The data relay node is used to collect and temporarily store image data and transmit the image data to the data processing center via wireless or wired means. All underwater cameras realize data transmission with the relay end through underwater optical communication.
3. The method for evaluating fish yield in marine ranching based on target detection according to claim 1, characterized in that: The method of performing dot-mode processing on multiple first images respectively to obtain multiple second images is specifically as follows: in a data processing center, dot-mode processing is performed on multiple first images received respectively, and the first images after the dot-mode processing are recorded as second images.
4. The method for evaluating fish yield in marine ranching based on target detection according to claim 1, characterized in that: Initialize a target detection model, where the target detection model is one of the YOLOV4 detection model, FasterRCNN detection model, and SSD detection model.
5. The method for evaluating fish yield in marine ranching based on target detection according to claim 1, characterized in that: The method of outputting the statistical results of fish production in the marine ranch through the target detection model is specifically as follows: through the target detection model, the number of fish contained in each second image is detected in turn and recorded as the detection result of the second image, and the detection results of all the second images are accumulated as the statistical results of fish production in the marine ranch.
Citation Information
Patent Citations
A multi-scale underwater fish detection method based on attention module
CN114170497B
Method of checking the moving target on the basis of ViBe under a stationary camera
CN106683062A
Method for counting number of fish schools
CN107730526A
Improved moving object detection VIBE algorithm
CN108805897A
Marine ship target detection method based on improved background difference method
CN111259866A
