Method, device and equipment for identifying and tracking aquatic biocenosis by using bionic mechanical fish and storage medium

By integrating AN-S algorithm, Attention Net network model, SORT tracking algorithm and PID motion control algorithm on bionic mechanical fish, intelligent identification and tracking of aquatic biological communities is achieved, solving the problem of short battery life of underwater unmanned submarines, and improving the accuracy and battery life of identification and tracking.

CN120088632APending Publication Date: 2025-06-03HARBIN ENG UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510298708.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

The existing underwater unmanned submersibles have short battery life during long-term work, making it difficult to effectively identify and track aquatic biomes.

Method used

Bionic mechanical fish is used to combine AN-S algorithm, Attention Net network model, SORT tracking algorithm and PID motion control algorithm to achieve intelligent identification and tracking of aquatic biological communities.

Benefits of technology

Through precise target recognition and tracking, the energy consumption of bionic fish is reduced, its battery life is extended, and understanding of aquatic biomes is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120088632A_ABST
    Figure CN120088632A_ABST
Patent Text Reader

Abstract

The invention discloses a method, device and equipment for identifying and tracking aquatic biocenosis by using bionic mechanical fish and a storage medium, and belongs to the technical field of bionic technology coupling target identification and tracking. The device comprises a bionic fugu-fish mechanical structure and overall equipment carried by the bionic fugu-fish mechanical structure. The identification and tracking method of the bionic mechanical fish is realized by means of a processor carrying an AN-S algorithm and PID (Proportion Integration Differentiation) control. The method comprises the following steps: shooting aquatic organism communities by adopting a camera located at a fish head position; the controller is used for receiving an instruction of the processor and enabling the fish body to move towards a set direction; the processor and the controller are arranged in the fish body; the side fins, the tail fin and the envelope are located on the side faces, the tail and the fins of the fish body, and motion instructions sent by the processor are achieved. The AN-S algorithm comprises an AttentionNet algorithm for target recognition, target fish in the image is detected and recognized, and recording and storage are started only when a target is detected; the AN-S algorithm comprises a Sort method for continuously tracking a moving target in a recognition sequence and outputting a movement track.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of bionic technology coupled target recognition and tracking, and specifically relates to a method, device, equipment and storage medium for identifying and tracking aquatic biological communities using bionic mechanical fish. Background Art

[0002] Nowadays, the protection of the marine environment and the development and utilization of marine resources are increasingly valued. As an important part of the marine industry, underwater unmanned vehicles (UUVs) can complete multiple tasks including surveying and detection, and are irreplaceable. Therefore, more and more scientific research institutions and scholars are turning their attention to underwater robots. Therefore, in order to improve the ability to explore the ocean and to better conduct scientific research on marine life, this patent proposes a method for using bionic pufferfish to identify and track aquatic biological communities.

[0003] Aquatic organisms have their own unique biological characteristics. The reproduction process of some aquatic organisms has very strict requirements on water temperature. For example, the most suitable temperature for guppies during their breeding period is generally 26 degrees Celsius. At this temperature, the survival rate of the fry will be improved. Another example is the migratory nature of many fish. Salmon is one of the most famous migratory fish. They hatch in freshwater rivers, then swim to the ocean to grow, and return to their birthplace to lay eggs when they grow up. There are many fish with high scientific research value and high economic value among these fish, so we need to better understand their biological habits and processes to deepen our understanding of them in order to carry out the next work. On the other hand, for underwater unmanned submersibles, endurance has always been a pain point that has plagued their long-term work. The mode proposed in this patent that the camera is turned on only after target recognition can greatly save energy consumption, thereby improving the endurance of bionic fish. Summary of the invention

[0004] The purpose of this invention is to explore a method of using bionic mechanical fish to identify and track aquatic biological communities, and to achieve intelligent identification and tracking of aquatic biological communities. At the same time, the endurance problem of underwater unmanned submersibles is optimized, and an identification and tracking method of the AN-S algorithm is proposed to provide support for tracking targets.

[0005] The present invention provides a method for identifying and tracking aquatic biological communities using a bionic mechanical fish, comprising the following steps:

[0006] Step 1: Image acquisition: The bionic mechanical fish obtains image data with fish targets from the camera, pre-processes the image data, and constructs a data set;

[0007] Step 2: Object Detection: Input the processed image data obtained from image acquisition in Step 1 into the trained Attention Net network model for object detection; the Attention Net network model includes a convolutional neural network, a horizontal fish recognition model with an attention mechanism, and a classification head, quickly recognize the image data, and the output image includes the bounding boxes of all detected objects; if there are no detected objects, repeat Step 1 for image acquisition;

[0008] Step 3: Object Tracking: Input the bounding boxes of the detected objects into the SORT algorithm for multi-object tracking; the SORT algorithm predicts the positions of the objects through Kalman filtering, and associates the positions of the predicted objects with the bounding boxes of the detected objects through the Hungarian algorithm, and outputs the bounding boxes of the next positions of the detected objects;

[0009] Step 4: Obtain the movement speed v and movement angle θ of the target fish, input the movement speed v and movement angle θ into the PID motion control algorithm, adjust the movement direction and speed of the bionic mechanical fish according to the change of the target fish's position, and output the movement direction and speed of the bionic mechanical fish;

[0010] Step 5: End the tracking of the current frame, perform the tracking of the next frame, and repeat Steps 1 to 4, and the bionic mechanical fish performs real-time tracking of the target.

[0011] Further, in Step 2, the feature extraction layer of the convolutional neural network gradually extracts the low-level to high-level features of the image using three convolutional blocks; each convolutional block includes a 3×3 convolutional layer, a ReLU activation function, and a 2×2 max pooling layer;

[0012] F l+1 = ReLU(W l * F l + b l )

[0013] where F l is the input feature map of the l-th layer; W l and b l are the convolutional kernel weights and biases respectively.

[0014] Further, the attention module includes channel attention and spatial attention; the channel attention first uses global average pooling to compress the spatial dimension to generate a channel descriptor z c :

[0015]

[0016] where z c ∈ R ∧ C; H is the height of the feature map; W is the width of the feature map; F c(i, j) is the eigenvalue of the c-th channel at position (i, j);

[0017] Then, the channel weights are learned through a fully connected layer to generate a channel weight map σ Channel :

[0018] σ Channel = σ(W 1 (δ(W 0 z c )))

[0019] where W 0 and W 1 are both fully connected layer weights; δ is the ReLU activation function; σ is the Sigmoid activation function;

[0020] The spatial attention compresses the channel dimension through a 1×1 convolution to generate a spatial weight map σ Spatial ;

[0021] σ Spatial = σ(f 1×1 ([F avg ; F max ))

[0022] where F avg and F max are the average and maximum values of the feature map in the channel dimension respectively; f 1×1 is a 1×1 convolution operation;

[0023] The outputs of the channel attention and spatial attention are multiplied by the output feature map of the feature extraction layer to obtain an enhanced feature map F out :

[0024] F out = F l+1 × σ Channel × σ Spatial

[0025] Furthermore, the classification head flattens the feature map F out output by the attention module and then inputs it into a fully connected layer; the calculation of the fully connected layer is as follows:

[0026] y i = W fc · Flatten(F out ) + b fc

[0027] where W fc and b fc are the weight and bias of the fully connected layer respectively; y i is the unnormalized predicted value of the model for the input sample belonging to the i-th class of fish.

[0028] Output the probability distribution of fish categories through the Softmax function:

[0029]

[0030] where N is the number of fish categories; is the score of the i-th category; is the sum of the exponential scores of all categories.

[0031] Furthermore, in step 3, obtain the bounding box of the target fish in each frame, select the intersection point of the diagonal of the bounding box as the tracking point, and record the position of the target fish in each frame; the coordinates (X, Y) of the tracking point are:

[0032]

[0033] where (x 1 , y 1 ) and (x 2 , y 2 ) are the upper-left coordinates and the lower-right coordinates of the bounding box respectively;

[0034] Use the Kalman filter to predict the motion position of the target fish in the next frame, and the state update formula is as follows:

[0035]

[0036] where is the predicted value of the state vector, is the current state vector; F k is the state transition matrix, B k is the control matrix, u k is the control input.

[0037] Furthermore, in step 4, the motion speed v and motion angle θ of the fish body are calculated through the position change of the tracking point;

[0038]

[0039] where (X 1 , Y 1 ) and (X 2 , Y 2 ) are the position information of two consecutive frames during the movement of the bionic robotic fish; Δt is the time interval between two frames.

[0040] Furthermore, the PID motion control algorithm controls the bionic robotic fish to move along the motion trajectory of the target fish; the formula of the PID motion control algorithm is:

[0041]

[0042]

[0043] Among them, e(t) is the error of the position state information between two frames; K p , Ki and K d are the proportional gain, integral gain, and derivative gain respectively; is the integral of the error; is the rate of change of the error.

[0044] The present invention also provides a bionic mechanical fish, which has the structure of a puffer fish family and includes a fish head, a fish body, side fins, a caudal fin envelope, a caudal fin, and an identification and control system; the side fins are located on both sides of the fish body; the caudal fin envelope is located between the fish body and the caudal fin, and the caudal fin of the bionic mechanical fish drives the bionic mechanical fish to move; a camera is arranged at the fish head; a laser rangefinder is arranged on the top of the camera, and a headlight is arranged at the bottom of the camera;

[0045] The identification and control system includes a positioning and identification module and a control module, which are installed inside the fish body; the processor of the positioning and identification module uses a pre-trained Attention Net network model to identify the target image and uses the SORT algorithm for tracking to realize the identification and tracking of the target; the controller of the control module uses a PID motion control algorithm to receive instructions from the positioning and identification module and control the movement direction and movement angle of the bionic mechanical fish; sensors are installed on the surface of the fish body, and when the detection signal of the sensors reaches the threshold, the bionic mechanical fish enters the identification and tracking state.

[0046] The present invention also provides a computer device / system, including a memory, a processor, and a computer program stored on the memory. When the processor executes the computer program, the method for identifying and tracking an aquatic biological community using the bionic mechanical fish described in any one of the above is realized.

[0047] The present invention also provides a computer-readable storage medium, on which a computer program / instructions are stored. When the computer program / instructions are executed by a processor, the method for identifying and tracking an aquatic biological community using the bionic mechanical fish described in any one of the above is realized.

[0048] The present invention also provides a computer program product, including a computer program / instructions. When the computer program / instructions are executed by a processor, the method for identifying and tracking an aquatic biological community using the bionic mechanical fish described in any one of the above is realized.

[0049] The beneficial effects of the present invention are as follows:

[0050] The method of using bionic mechanical fish to identify and track aquatic biological communities in the present invention combines sensors and algorithms, intervenes in the start and recording stages of the task, accurately controls the start of identifying and tracking the target, and saves electricity for the bionic fish body; the use of the bionic mechanical fish carrier can not only better integrate into the aquatic biological community, but also perform tasks in a more complex underwater environment with its unique mechanical structure and high-degree-of-freedom movement mode; the AttentionNet algorithm used has the advantage of solving the problem of high hardware requirements when identifying pictures taken by high-definition cameras, and multiple identifications in overlapping parts help to ensure the accuracy of identification, and the target frames divided during the identification process also provide assistance for subsequent tracking; the SORT tracking algorithm used, compared with other point tracking algorithms, uses the target frame as the basis for tracking, so that the target is not easily lost, which is helpful for coordinate calculation when performing motion analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 The present invention is a workflow diagram for identifying and tracking aquatic biological communities using bionic mechanical fish;

[0052] Figure 2 It is a schematic diagram of the structure of the bionic mechanical fish of the present invention.

[0053] The reference numerals in the drawings are: camera 1 , fish head 2 , headlight 3 , laser rangefinder 4 , side fin 5 , fish body 6 , temperature sensor 7 , tail fin envelope 8 , tail fin 9 . DETAILED DESCRIPTION

[0054] The present invention is further described below in conjunction with the accompanying drawings.

[0055] The present invention provides a bionic pufferfish, such as Figure 2 As shown, it includes the mechanical structure of the bionic pufferfish and its overall equipment. The mechanical structure specifically includes the fish body cabin, side fins, tail fin, and capsule. The overall equipment includes a camera, a storage device, a headlight, a laser rangefinder, a processor, a controller, a power supply, and a temperature sensor. The identification and tracking method is achieved by relying on the AN-S algorithm.

[0056] The camera is located at the fish head and is used to photograph aquatic biological communities; the headlight is located at the lower side of the camera and is used to provide supplementary light for shooting; the laser rangefinder is located at the upper side of the camera and is used to measure the distance in the forward direction.

[0057] The processor is equipped with an AN-S algorithm and PID or other control methods to realize target recognition and tracking. The AN-S algorithm includes an AttentionNet algorithm for target recognition, which detects and recognizes target fish in an image, and starts recording and storing only when the target is detected; the AN-S algorithm includes a Sort method to continuously track a moving target in an identification sequence and output a motion trajectory; the controller is used to receive instructions from the processor to make the fish move in a predetermined direction; the processor, controller and power supply are all built into the fish compartment.

[0058] The side fins, tail fin and capsule are located on the side, tail and fins of the fish body respectively, and have realized the motion instructions issued by the processor; the sensor can select different types for different scenarios, and when it detects a signal and reaches a threshold, the entire fish body enters the recognition working state.

[0059] The present invention also provides a method for identifying and tracking aquatic biological communities using bionic mechanical fish, and the example provided is the tracking and shooting of zebrafish in shallow waters using a temperature sensor and a PID control method. Figure 1 shown.

[0060] When the temperature sensor TE Connectivity PT1000 RTD detects that the temperature of the water where the robot fish is located reaches 25°C, that is, when the zebrafish is more active in the water, the camera shooting function is turned on. The camera model used is DJI OsmoAction 4 camera as an example. The maximum resolution of the photos it takes is 3648×2736. To facilitate algorithm processing, it is cropped to a size of 3600×2700.

[0061] Step 1: Use Non-Local Means Denoising to denoise the image and enhance the contrast:

[0062]

[0063] Where Ω is the search window of 21×21 pixels;

[0064] w(i,j) is the weight function used to calculate similarity;

[0065]

[0066] Among them, N i is a 7×7 neighborhood centered on i; a is the Gaussian weighted standard deviation; and h is the filter strength parameter.

[0067] Use histogram equalization to enhance the image contrast. For gray level r k The number of pixels is n k, an image with a total number of pixels of n, the gray value s after equalization k :

[0068]

[0069] where L is the number of gray levels, and the value here is 256.

[0070] Step 2: Segment the picture to ensure that the input size is not too large.

[0071] Since the size of the cropped picture is 3600×2700 and the picture size is large, it is therefore segmented into small pieces for separate recognition. The specific implementation method is: crop a picture with a size of 540×540 pixels, and the step size is 432 pixels. Therefore, in the case of a 20% overlap rate, horizontally, the image width is 3600 pixels. Using a block size of 540 pixels and a step size of 432 pixels, you will obtain (3600 - 540) / 432 + 1 = 8 blocks. Vertically, the image height is 2700 pixels, and the calculation result under the same conditions is (2700 - 540) / 432 + 1 = 6 blocks.

[0072] Step 3: Use the trained Attention Net network to recognize each area and judge the recognition result: If the fish to be tracked exists, continue to the next step. Otherwise, reshoot the surrounding waters.

[0073] The Attention Net network used is a horizontal fish recognition model based on a convolutional neural network (CNN) and an attention mechanism, aiming to extract fish target features from a complex underwater environment and achieve accurate classification. The network mainly consists of three parts: a feature extraction layer, an attention module, and a classification head.

[0074] The feature extraction layer uses three convolutional blocks (Conv Block) to gradually extract low-level to high-level features of the image. Each convolutional block contains a 3×3 convolutional layer, a ReLU activation function, and a 2×2 max pooling layer. The convolutional operation can be expressed as:

[0075] F l+1 = ReLU(W l *F l + b l )

[0076] where F l is the input feature map of the l-th layer, W l and b l are the convolutional kernel weights and biases respectively, representing the convolutional operation. After three convolutional blocks, the input image is gradually sampled from 540×540×3 to 68×68×256, while increasing the number of channels to capture richer features.

[0077] The attention module contains a dual attention mechanism (channel attention and spatial attention) to enhance the feature representation of fish targets and suppress background noise.

[0078] Among them, channel attention compresses the spatial dimension through global average pooling (GAP) to generate a channel descriptor where C is the number of channels. The specific calculation is:

[0079]

[0080] F c (i, j) is the feature value of the c-th channel at position (i, j). Then, the channel weights are learned through a fully connected layer:

[0081] σ Channel = σ(W 1 (δ(W 0 z c )))

[0082] W 0 and W 1 are the weights of the fully connected layer, δ is the ReLU activation function, and σ is the Sigmoid activation function.

[0083] Spatial attention compresses the channel dimension through a 1×1 convolution to generate a spatial weight map. The specific calculation is:

[0084] σ Spatial = σ(f 1×1 ([F avg ; F max ))

[0085] F avg and F max are respectively the average and maximum values of the feature map in the channel dimension, f 1×1 is a 1×1 convolution operation, and σ is the Sigmoid activation function.

[0086] The outputs of the two attention mechanisms are multiplied by the input feature map to obtain an enhanced feature map:

[0087] F out = F l+1 × σ Channel × σ Spatial

[0088] This process significantly improves the model's ability to focus on fish targets.

[0089] The classification head is implemented through a fully connected layer. After the feature map output by the attention module is flattened, it is input into the fully connected layer. The calculation of the fully connected layer can be expressed as

[0090] y = W fc ·Flatten(F out ) + b fc

[0091] where W fc and b fc are the weights and biases of the fully connected layer respectively. Finally, the probability distribution of fish categories is output through the Softmax function:

[0092]

[0093] where N is the number of fish categories,; is the score of the i-th category; is the sum of the exponential scores of all categories.

[0094] After identifying the 540×540 pixel area, the same operation is performed on other areas. Finally, all the recognition frames are superimposed on the input 3600×2700 image. If the recognition frames overlap, they are divided according to the category with the highest probability.

[0095] Step 4: Use the SORT tracking algorithm to track the fish body. Specifically, use the point of the intersection of the diagonals of the recognition frame on the fish body as the tracking point, record the position (X, Y) of each frame, and at the same time use a laser rangefinder to calculate the Z coordinate in the forward direction.

[0096] The SORT algorithm is a multi-object tracking algorithm. Its core idea is to predict the position of the target through Kalman filtering and perform data association through the Hungarian algorithm.

[0097] First, obtain the bounding box of the fish body in each frame. Select the intersection of the diagonals of the bounding box as the tracking point. Assume that the upper left corner coordinates of the bounding box are (x 1 , y 1 ), and the lower right corner coordinates are (x 2 , y 2 ), then the coordinates of the intersection of the diagonals are:

[0098]

[0099] This point will be used as the tracking point of the fish body to record the position in each frame.

[0100] Use Kalman filtering to predict the position of the fish body. The state vector of Kalman filtering usually includes position, velocity, and acceleration, and its prediction formula is:

[0101]

[0102] Among them, is the predicted value of the next-frame state vector, and is the current state vector; F k is the state transition matrix, and B k is the control matrix, and u k is the control input. The Hungarian algorithm is used to associate the detected bounding boxes with the tracked targets.

[0103] Step 5: By calculating the movement speed and movement angle, use a laser rangefinder to obtain the depth information Z of the fish body in the forward direction, and use the PID algorithm to control the robotic fish to ensure an ideal tracking effect.

[0104] Calculate the movement speed v and movement angle θ of the fish body through the position change of the tracking points. Assume that in two consecutive frames, the positions of the tracking points are (X 1 , Y 1 ) and (X 2 , Y 2 ), then the speed v and angle θ can be calculated by the following formulas:

[0105]

[0106] where Δt is the time interval between two frames.

[0107]

[0108] where e(t) is the error signal, usually the difference between the expected value and the actual value, K p , K i and K d are the proportional, integral, and derivative gains respectively; is the integral of the error; is the rate of change of the error.

[0109] Take the output u(t) of the PID controller as the control input of the robotic fish, and adjust its movement direction and speed to maintain the tracking of the fish body.

[0110] The present invention explores a method for identifying and tracking aquatic biological communities, realizes the intelligent identification and tracking of aquatic biological communities, and at the same time mounts this method on a bionic pufferfish device. Its concealed appearance and flexible swimming method provide suitable research instruments and methods for exploring aquatic organisms and conducting more comprehensive scientific research on them.

[0111] In particular, in some preferred embodiments of the present invention, a computer device is further provided, including a memory, a processor, and a computer program stored on the memory. When the processor executes the computer program, the method for identifying and tracking aquatic biological communities using a bionic mechanical fish in any of the above embodiments is implemented.

[0112] In some other preferred embodiments of the present invention, a computer-readable storage medium is further provided, on which a computer program / instruction is stored. When the computer program is executed by a processor, the method for identifying and tracking aquatic biological communities using a bionic mechanical fish in any of the above embodiments is implemented.

[0113] Those of ordinary skill in the art can understand that all or part of the processes in the above-described embodiment methods can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the method for identifying and tracking aquatic biological communities using a bionic mechanical fish as described above.

[0114] In the description of this specification, the descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection 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 can be combined in a suitable manner in any one or N embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0115] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "N" is at least two, such as two, three, etc., unless otherwise specifically defined.

[0116] Any process or method description shown in the flowchart or described in other ways herein can be understood as representing a module, segment, or part of code including one or more executable instructions for implementing a customized logical function or process. The scope of the preferred embodiments of the present invention includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in a reverse order according to the involved functions, rather than in the order shown or discussed, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0117] The logic and / or steps represented in the flowchart or otherwise described herein can, for example, be considered as a definitional sequence list of executable instructions for implementing logical functions, and can be embodied specifically in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection part (electronic device) having one or N wirings, a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, as the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or otherwise processing as appropriate, and then storing it in a computer memory.

[0118] 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-described embodiments, the N 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 in hardware, as in another embodiment, any one or a combination of the following techniques well-known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application-specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), and the like.

[0119] Those of ordinary skill in the art of this technology can understand that all or part of the steps carried by the method of implementing the above embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0120] In addition, each functional unit in various embodiments of the present invention may be integrated into one processing module, may exist physically alone for each unit, 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. When 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.

[0121] The above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disc, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for identifying and tracking aquatic biological communities using a bionic mechanical fish, characterized in that: The following steps are involved: Step 1: Image acquisition: The bionic mechanical fish obtains image data with fish targets from the camera, pre-processes the image data, and constructs a data set; Step 2: Target detection: Input the processed image data obtained by image acquisition in step 1 into the trained Attention Net network model for target detection; the Attention Net network model includes a convolutional neural network, a horizontal fish recognition model of the attention mechanism, and a classification head, which quickly recognizes the image data, and the output image includes the bounding boxes of all detected targets; if there is no detected target, repeat step 1 for image acquisition; Step 3: Target tracking: Input the bounding box of the detected target into the SORT algorithm for multi-target tracking; the SORT algorithm predicts the position of the target through Kalman filtering, and associates the predicted target position with the bounding box of the detected target through the Hungarian algorithm, and outputs the bounding box of the next position of the detected target; Step 4: Obtain the movement speed v and movement angle θ of the target fish, input the movement speed v and movement angle θ into the PID motion control algorithm, adjust the movement direction and speed of the bionic mechanical fish according to the change of the target fish position, and output the movement direction and speed of the bionic mechanical fish; Step 5: End the tracking of the current frame and proceed to the next frame tracking. Repeat steps 1 to 4. The bionic mechanical fish tracks the target in real time.

2. The method for identifying and tracking aquatic biological communities using bionic pufferfish according to claim 1, characterized in that: In step 2, the feature extraction layer of the convolutional neural network uses three layers of convolution blocks to gradually extract low-level to high-level features of the image; each convolution block includes a 3×3 convolution layer, a ReLU activation function and a 2×2 maximum pooling layer; F l+1 =ReLU(W l *F l +b l ) Among them, F l is the input feature map of the lth layer; W l and b l are the convolution kernel weight and bias respectively.

3. The method for identifying and tracking aquatic biological communities using bionic pufferfish according to claim 2, characterized in that: The attention module includes channel attention and spatial attention; the channel attention first uses global average pooling to compress the spatial dimension and generate a channel descriptor z c : Among them, z c ∈R ∧ C; H is the feature map height; W is the feature map width; F c (i, j) is the eigenvalue of the cth channel at position (i, j); Then, the channel weights are learned through the fully connected layer to generate the channel weight map σ Channel : s Channel =σ(W1(δ(W0z c ))) Among them, W0 and W1 are the weights of the fully connected layer; δ is the ReLU activation function; σ is the Sigmoid activation function; The spatial attention compresses the channel dimension through 1×1 convolution to generate a spatial weight map σ Spatial ; s Spatial =σ(f 1×1 ([F avg ;F max ])) Among them, F avg and F max are the average and maximum values ​​of the feature map in the channel dimension respectively; f 1×1 It is a 1×1 convolution operation; The output of the channel attention and spatial attention is multiplied by the feature map output by the feature extraction layer to obtain the enhanced feature map F out : F out =F l+1 ×σ Channel ×σ Spatial。 4. The method for identifying and tracking aquatic biological communities using bionic pufferfish according to claim 3, characterized in that: The classification head takes the feature map F output by the attention module out After the flattening operation, it is input into the fully connected layer; the fully connected layer is calculated as follows: y i =W fc ·Flatten(F out )+b fc Among them, W fc and b fc are the weight and bias of the fully connected layer respectively; y i is the unnormalized prediction value of the model that the input sample belongs to the i-th type of fish. Output the probability distribution of fish categories through the Softmax function: Where N is the number of fish species; is the score of the i-th category; is the sum of all category index scores.

5. The method for identifying and tracking aquatic biological communities using bionic pufferfish according to claim 4, characterized in that: In step 3, the bounding box of the target fish in each frame is obtained, the intersection of the diagonals of the bounding box is selected as the tracking point, and the position of the target fish in each frame is recorded; the tracking point coordinates (X, Y) are: Among them, (x1, y1) and (x2, y2) are the coordinates of the upper left corner and the lower right corner of the bounding box respectively; Kalman filtering is used to predict the next frame movement position of the target fish. The state update formula is as follows: in, is the predicted value of the state vector, is the current state vector; F k is the state transfer matrix, B k is the control matrix, u k is the control input.

6. The method for identifying and tracking aquatic biological communities using bionic pufferfish according to claim 5, characterized in that: In step 4, the movement speed v and the movement angle θ of the fish body are calculated by the position change of the tracking point; Among them, (X1, Y1) and (X2, Y2) are the position information of two consecutive frames during the movement of the bionic mechanical fish; Δt is the time interval between the two frames.

7. The method for identifying and tracking aquatic biological communities using bionic pufferfish according to claim 6, characterized in that: The PID motion control algorithm controls the bionic mechanical fish to follow the motion trajectory of the target fish; the PID motion control algorithm formula is: Among them, e(T) is the error of the position state information between two frames; K p , K i and K d They are proportional gain, integral gain and differential gain respectively; is the integral of the error; is the rate of change of error.

8. A device for identifying and tracking aquatic biological communities using bionic pufferfish, characterized in that: The bionic mechanical fish is a pufferfish structure, including a fish head, a fish body, side fins, a tail fin capsule, a tail fin, and an identification control system; the side fins are located on both sides of the fish body; the tail fin capsule is located between the fish body and the tail fin, and the tail fin of the bionic mechanical fish drives the bionic mechanical fish to move; a camera is arranged at the fish head; a laser rangefinder is arranged on the top of the camera, and a headlight is arranged at the bottom of the camera; The identification control system includes a positioning identification module and a control module, which are installed inside the fish body; the processor of the positioning identification module identifies the target image through a pre-trained Attention Net network model and tracks it using a SORT algorithm to achieve target identification and tracking; the controller of the control module uses a PID motion control algorithm to receive instructions from the positioning identification module and control the movement direction and angle of the bionic mechanical fish; a sensor is installed on the surface of the fish body, and when the sensor detection signal reaches a threshold, the bionic mechanical fish enters an identification and tracking state.

9. A computer device / equipment / system comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Control method of fish monitoring bionic fish equipment and fish detection bionic fish equipment

    CN120722361A