Juvenile fish mutual disability detection method, device and equipment

By improving the yolov5 network model, combined with the multi-head attention mechanism and feature pyramid network module, the accuracy and real-time problems in the detection of juvenile fish cannibalism were solved, and efficient and accurate detection results were achieved.

CN120612730APending Publication Date: 2025-09-09CHINA AGRI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510577457.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

In a high-density aquaculture environment, it is difficult to achieve efficient and accurate real-time detection of cannibalism among juvenile fish. In particular, due to the small size of the fish, their fast movements, severe occlusion, and large scale variations, existing technologies are unable to meet the requirements of detection accuracy and real-time performance.

Method used

An improved yolov5 network model is used, combined with a multi-head attention mechanism module, a weighted bidirectional feature pyramid network module BiFPN and a sampling module, to extract and fuse juvenile fish features, thereby improving the accuracy and efficiency of the detection model.

Benefits of technology

The system achieves efficient and accurate detection of cannibalism among juvenile fish, improves the accuracy and real-time performance of detection, and reduces the probability of false detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120612730A_ABST
    Figure CN120612730A_ABST
Patent Text Reader

Abstract

The invention provides a juvenile fish mutual disability detection method, device and equipment. The method comprises the following steps: acquiring a juvenile fish image; inputting the images of the juvenile fishes into a detection model to obtain a detection result of mutual disability of the juvenile fishes; the detection model is used for detecting mutual disability behaviors of juvenile fishes; the detection model is obtained by training based on the juvenile fish image sample and the position information of the juvenile fish mutual disability in the juvenile fish image sample. According to the method provided by the embodiment of the invention, the efficiency and accuracy of detecting the mutual disability behavior of the juvenile fish are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of target detection, and in particular to a method, device and equipment for detecting cannibalism among juvenile fish. Background Art

[0002] Field research at intensive aquaculture sites revealed that due to the high stocking density of juvenile fish, cannibalism often occurs. Therefore, how to promptly detect cannibalism in high-density, fast-moving juvenile fish environments is a pressing technical challenge facing those skilled in the art. Summary of the Invention

[0003] The present invention provides a method, device and equipment for detecting cannibalism among juvenile fish. A detection model is trained based on juvenile fish image samples and location information of cannibalism among juvenile fish in the juvenile fish image samples, so that the trained detection model can efficiently and accurately detect cannibalism among juvenile fish, thereby improving the efficiency and accuracy of detecting cannibalism among juvenile fish.

[0004] The present invention provides a method for detecting cannibalism among juvenile fish, comprising the following steps: Acquire images of juvenile fish; The juvenile fish image is input into the detection model to obtain the detection result of juvenile fish cannibalism; the detection model is used to detect the juvenile fish cannibalism behavior; the detection model is trained based on the juvenile fish image sample and the position information of the juvenile fish cannibalism in the juvenile fish image sample. According to a method for detecting cannibalism among juvenile fish provided by the present invention, the detection model is constructed based on an improved Yolov5 network model; the improved Yolov5 network model includes: Multi-head attention mechanism module; the multi-head attention mechanism module is used to extract features of juvenile fish.

[0005] According to a method for detecting cannibalism among juvenile fish provided by the present invention, the improved yolov5 network model further includes: A weighted bidirectional feature pyramid network module BiFPN; the weighted bidirectional feature pyramid network module BiFPN is used to generate a fusion result of juvenile fish features; the fusion result of juvenile fish features is used to detect juvenile fish cannibalism behavior.

[0006] According to a method for detecting mutual cannibalism among juvenile fish provided by the present invention, the weighted bidirectional feature pyramid network module BiFPN further includes: Sampling module; the sampling module is used for compressing and reorganizing the characteristics of juvenile fish.

[0007] According to a method for detecting cannibalism among juvenile fish provided by the present invention, the sampling module comprises: An upsampling kernel prediction module and a feature recombination module; the upsampling kernel prediction module is used to reduce the channels of the input feature map; the feature recombination module is used to determine the weights corresponding to the sampled pixels.

[0008] According to a method for detecting mutual cannibalism in juvenile fish provided by the present invention, the upsampling kernel prediction module includes: A channel compression submodule, a content encoding submodule and a kernel normalization submodule; the channel compression submodule is used to reduce the channels of the input feature map; the content encoding submodule is used to take the compressed feature map as input and encode it to generate a reconstructed kernel; the kernel normalization submodule is used to normalize the reconstructed kernel.

[0009] The present invention also provides a device for detecting mutual cannibalism among juvenile fish, comprising the following modules: An acquisition module is used to acquire images of juvenile fish; The detection module is used to input the juvenile fish image into a detection model to obtain a detection result of juvenile fish cannibalism; the detection model is used to detect juvenile fish cannibalism behavior; the detection model is trained based on juvenile fish image samples and position information of the juvenile fish cannibalism in the juvenile fish image samples.

[0010] The present invention also provides an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above methods for detecting mutual cannibalism among juvenile fish is implemented.

[0011] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for detecting mutual cannibalism among juvenile fish as described above is implemented.

[0012] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-mentioned methods for detecting mutual cannibalism among juvenile fish.

[0013] The method, device and equipment for detecting cannibalism among juvenile fish provided by the present invention train a detection model based on juvenile fish image samples and location information of cannibalism among juvenile fish in the juvenile fish image samples, so that the trained detection model can efficiently and accurately detect cannibalism among juvenile fish, thereby improving the efficiency and accuracy of detecting cannibalism among juvenile fish. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0015] Figure 1 This is one of the flow charts of the method for detecting cannibalism among juvenile fish provided by the present invention.

[0016] Figure 2 、 Figure 3 、 Figure 4 It is a schematic diagram of obtaining image samples of juvenile fish provided by the present invention.

[0017] Figure 5 It is a schematic diagram of the multi-head attention mechanism module provided by the present invention.

[0018] Figure 6 Schematic diagram of the weighted bidirectional feature pyramid network module provided by the present invention.

[0019] Figure 7 It is a schematic diagram of the sampling module provided by the present invention.

[0020] Figure 8 It is a schematic diagram of the detection model provided by the present invention.

[0021] Figure 9 It is a structural schematic diagram of the device for detecting mutual cannibalism of juvenile fish provided by the present invention.

[0022] Figure 10 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0023] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0024] The following combination Figures 1-10 The present invention describes a method, device and equipment for detecting cannibalism among juvenile fish.

[0025] In order to facilitate a clearer understanding of the technical solutions of the various embodiments of the present application, some technical contents related to the various embodiments of the present application are first introduced.

[0026] Field research at intensive aquaculture sites revealed that due to the high stocking density of juvenile fish, cannibalism often occurs. Promptly detecting cannibalism in this environment, characterized by high stocking density, rapid juvenile swimming speed, and uncertain timing, is an urgent challenge. This requires not only accurate but also real-time detection models.

[0027] To address this issue, this application conducted a systematic study using the juvenile stage of spotted seabream as an example. Through field research and data collection, the following challenges were faced in the detection of the cannibalism behavior of spotted seabream during the juvenile stage.

[0028] (1) Juvenile fish are small in size, and the pixel area occupied by a single fish body in the image is small. At the same time, the uncertainty of the underwater environment during the breeding process makes identification difficult.

[0029] (2) Juvenile fish are very active and swim very fast, so it is very difficult to obtain high-quality training data.

[0030] (3) Mutual harm occurs in a short time. Detecting mutual harm in a short time places high demands on the real-time performance of the model.

[0031] (4) Under high-density intensive farming conditions, the mutual occlusion of target parts is prominent, making feature extraction difficult.

[0032] (5) At the same time, due to the different distances between the juvenile fish and the camera, the size of the pixels occupied by the fish body in the image also varies greatly. The large changes in the target scale have brought great difficulties to this study.

[0033] Figure 1 Schematic diagram of the process of detecting cannibalism among juvenile fish provided by the present invention, as shown in FIG. Figure 1 As shown, the method includes the following: Step 101: Acquire images of juvenile fish.

[0034] Specifically, in order to detect the cannibalism of juvenile fish, in the embodiment of the present application, firstly, images of juvenile fish taken in real time are obtained. Alternatively, an RGB camera can be used to take real-time images of the juvenile fish in the aquaculture pond.

[0035] Step 102: Input the juvenile fish image into a detection model to obtain a detection result of juvenile fish cannibalism; the detection model is used to detect juvenile fish cannibalism; the detection model is trained based on juvenile fish image samples and location information of the juvenile fish cannibalism in the juvenile fish image samples.

[0036] Specifically, after acquiring images of juvenile fish, in embodiments of the present application, the images are input into a detection model to obtain detection results of juvenile fish cannibalism. Optionally, the detection model is trained based on the juvenile fish image samples and the location information of the cannibalism within the juvenile fish image samples. The trained detection model can then be used to efficiently and accurately detect cannibalism in juvenile fish.

[0037] For example, the cannibalism of juvenile fish can be promoted by reasonably reducing the feeding frequency and increasing the stocking density. Figure 2 、 Figure 3 and Figure 4 As shown, the transparent aquaculture tank measures 30cm x 40cm x 50cm and is approximately 45cm deep. The culture system uses recirculating seawater, with a water temperature range of 25-27°C and a constant dissolved oxygen level of 4.69mg / L. The tank contains approximately 1,000 fish, each approximately 3-5cm in length. An RGB camera is installed in the center, directly in front of the tank, 10cm from the outer wall. An underwater camera is installed diagonally at the bottom, capturing the entire tank. The video captured by the two cameras has a resolution of 1920x1080 and a frame rate of 25fps. Sequence images are extracted frame by frame from the video data. Analysis of the captured cannibalism video data reveals both head swallowing and body biting. The dataset is annotated using Labelmg, generating an XML file containing coordinate information. This information, representing the locations of cannibalism in the juvenile fish image samples, is used for training on the dataset. Optionally, a total of 1,075 images depicting mutual cannibalism are used to train the detection model. Optionally, after supervised training of the detection model using images depicting mutual cannibalism, that is, training the detection model based on juvenile fish image samples and location information of the mutual cannibalism in the juvenile fish image samples, the trained detection model can be used to efficiently and accurately detect mutual cannibalism in juvenile fish, thereby improving the efficiency and accuracy of detecting mutual cannibalism in juvenile fish.

[0038] The method of the above embodiment trains a detection model based on juvenile fish image samples and the location information of juvenile fish cannibalism in the juvenile fish image samples, so that the trained detection model can efficiently and accurately detect juvenile fish cannibalism behavior, thereby improving the efficiency and accuracy of juvenile fish cannibalism behavior detection.

[0039] In one embodiment, the detection model is constructed based on an improved Yolov5 network model; the improved Yolov5 network model includes: Multi-head attention mechanism module; the multi-head attention mechanism module is used to extract the features of juvenile fish.

[0040] Specifically, when using the original YOLOV5s algorithm to detect fish cannibalism, problems such as detection errors and inaccurate boundary regression occur. The root cause of these errors is phenomena such as occlusion and motion blur, which reduce the CNN's ability to extract semantic information and comprehensive features.

[0041] In order to solve the above problems, in the embodiment of the present application, by adding a multi-head self-attention mechanism module to the YOLOV5s model, it is possible to effectively improve the expressiveness of the model, reduce the fuzzy targets that are missed due to insufficient feature extraction, and effectively improve the prediction accuracy of the bounding box and reduce false detection. Optionally, the standard self-attention mechanism (SA) calculates the weighted sum of all values ​​in the sequence for each element of the input sequence. The attention weight is based on the pairwise similarity between two elements of the sequence and their respective query and key representations. Exemplarily, the multi-head attention mechanism module structure is as follows Figure 5 shown.

[0042] The method of the above embodiment effectively improves the expressiveness of the model by adding a multi-head self-attention mechanism module to the YOLOV5s model, reduces the omission of fuzzy targets due to insufficient feature extraction, and effectively improves the prediction accuracy of the bounding box, reduces false detections, and improves the efficiency and accuracy of detecting cannibalism in juvenile fish.

[0043] In one embodiment, the improved yolov5 network model further includes: Weighted bidirectional feature pyramid network module BiFPN; weighted bidirectional feature pyramid network module BiFPN is used to generate juvenile fish feature fusion results; juvenile fish feature fusion results are used to detect juvenile fish cannibalism behavior.

[0044] Specifically, the original YOLOV5 simply concatenates feature maps without distinguishing them during the feature fusion stage. When considering model scaling, it primarily relies on larger networks or larger input image sizes to achieve high accuracy. However, different input features have different resolutions and contribute differently to the fused output features. Larger networks often place a computational burden on the model.

[0045] In order to solve the above problems, in the embodiment of the present application, the weighted bidirectional feature pyramid network module BiFPN is used to increase the learnable weights to learn the importance of different input features, and at the same time, the connection method of the features is modified to improve the accuracy of the model without causing additional computational pressure. Optionally, the main function of the weighted bidirectional feature pyramid network is cross-scale connection and weighted feature fusion, where cross-scale connection is used to obtain more information from different scales; weighted feature fusion is to meet the different contributions of different input features to the final output result. The calculation method of weighted feature fusion is as follows: Among them, by using the relu function to ensure ≥0, 𝜀=0.0001, used to avoid numerical uncertainty, is the eigenvalue of the i-th input. For example, the weighted bidirectional feature pyramid network module structure is as follows Figure 6 shown.

[0046] The method of the above embodiment increases the learnable weights through the weighted bidirectional feature pyramid network module BiFPN to learn the importance of different input features, and at the same time modifies the connection method of the features. Under the premise of ensuring that no additional computational pressure is caused, the accuracy of the model is improved, and the efficiency and accuracy of the detection of cannibalism behavior of juvenile fish are improved.

[0047] In some embodiments, the weighted bidirectional feature pyramid network module BiFPN further includes: Sampling module: The sampling module is used to compress and reorganize the characteristics of juvenile fish.

[0048] Specifically, the present application also embeds a sampling module within the weighted bidirectional feature pyramid network (BiFPN) module to compress and reorganize juvenile fish features. In other words, during the feature fusion process, the present application also uses the sampling module to compress and reorganize juvenile fish features, effectively reducing computational complexity and cost, and improving detection efficiency.

[0049] In some embodiments, the sampling module includes: Upsampling kernel prediction module and feature reconstruction module; the upsampling kernel prediction module is used to reduce the channels of the input feature map; the feature reconstruction module is used to determine the weights corresponding to the sampled pixels.

[0050] Specifically, the sampling module in the embodiments of the present application is built based on the CaraFE upsampling operator. Compared to traditional upsampling methods, it can aggregate information within a larger receptive field, dynamically adapt to the content of a specific instance, while maintaining a certain level of computational efficiency and more effectively extracting target feature information. Optionally, CARAFE is a lightweight, general-purpose upsampling operator consisting of two main modules: the Kernel Prediction Module and the Content-aware Reassembly Module. The Kernel Prediction Module reduces the number of channels in the input feature map, thereby reducing the number of parameters and computational cost in subsequent steps, thereby improving the efficiency of CaraFE. Optionally, the Content-aware Reassembly Module maps each position in the output feature map back to the input feature map, extracts the region centered on the region, and performs a dot product with the predicted upsampling kernel at that point to obtain the output value. In the Feature Reassembly Module, each pixel in the region N(x_l, k_up) contributes differently to the upsampled pixel r based on the content of the feature rather than the distance between the positions. The reconstructed feature map has stronger semantics than the original one because information from relevant points in a local area receives more attention. By organically combining these modules, we can quickly detect small targets and identify cannibalistic behaviors among juvenile fish.

[0051] In some embodiments, the upsampling kernel prediction module includes: Channel compression submodule, content encoding submodule and kernel normalization submodule; the channel compression submodule is used to reduce the channels of the input feature map; the content encoding submodule is used to take the compressed feature map as input and encode it to generate a reconstructed kernel; the kernel normalization submodule is used to normalize the reconstructed kernel.

[0052] Specifically, in the embodiment of the present application, the upsampling kernel prediction module is composed of three submodules, namely, a channel compression submodule, a content encoding submodule, and a kernel normalization submodule. The channel compression submodule reduces the channels of the input feature map, and the content encoding submodule takes the compressed feature map as input and encodes the content to generate a reassembled kernel. Finally, the kernel normalization submodule applies a softmax function to each reassembled kernel, and then inputs the above results into the detection head to obtain the detection results of the juvenile fish cannibalism behavior. Exemplarily, the sampling module structure is as follows Figure 7 The overall structure of the detection model is shown in Figure 8 shown.

[0053] The method of the above embodiment can aggregate information within a larger receptive field through the sampling module, can dynamically adapt to the content of a specific instance, and at the same time maintain a certain computational efficiency. It can more effectively extract target feature information, thereby improving the efficiency and accuracy of detecting cannibalism behavior in juvenile fish.

[0054] The following describes the device for detecting cannibalism of juvenile fish provided by the present invention. The device for detecting cannibalism of juvenile fish described below and the method for detecting cannibalism of juvenile fish described above can be used for reference. Figure 9 Shown, including: An acquisition module 910 is used to acquire images of juvenile fish; Detection module 920 is used to input the juvenile fish images into the detection model to obtain the detection results of juvenile fish cannibalism; the detection model is used to detect juvenile fish cannibalism behavior; the detection model is trained based on juvenile fish image samples and the location information of the juvenile fish cannibalism in the juvenile fish image samples.

[0055] Optionally, the detection model is constructed based on an improved yolov5 network model; the improved yolov5 network model includes: Multi-head attention mechanism module; the multi-head attention mechanism module is used to extract the features of juvenile fish.

[0056] Optionally, the improved yolov5 network model also includes: Weighted bidirectional feature pyramid network module BiFPN; weighted bidirectional feature pyramid network module BiFPN is used to generate juvenile fish feature fusion results; juvenile fish feature fusion results are used to detect juvenile fish cannibalism behavior.

[0057] Optionally, the weighted bidirectional feature pyramid network module BiFPN further includes: Sampling module: The sampling module is used to compress and reorganize the characteristics of juvenile fish.

[0058] Optionally, the sampling module includes: Upsampling kernel prediction module and feature reconstruction module; the upsampling kernel prediction module is used to reduce the channels of the input feature map; the feature reconstruction module is used to determine the weights corresponding to the sampled pixels.

[0059] Optionally, the upsampling kernel prediction module includes: Channel compression submodule, content encoding submodule and kernel normalization submodule; the channel compression submodule is used to reduce the channels of the input feature map; the content encoding submodule is used to take the compressed feature map as input and encode it to generate a reconstructed kernel; the kernel normalization submodule is used to normalize the reconstructed kernel.

[0060] Figure 10A schematic diagram of the physical structure of an electronic device is provided. The electronic device may include a processor 1010, a communications interface 1020, a memory 1030, and a communications bus 1040. The processor 1010, the communications interface 1020, and the memory 1030 communicate with each other via the communications bus 1040. The processor 1010 may invoke logic instructions stored in the memory 1030 to execute a method for detecting cannibalism among juvenile fish. The method includes: acquiring images of juvenile fish; inputting the images of juvenile fish into a detection model to obtain a detection result of cannibalism among juvenile fish; the detection model is used to detect cannibalism among juvenile fish; and the detection model is trained based on juvenile fish image samples and location information of cannibalism among the juvenile fish in the images.

[0061] Furthermore, the logic instructions in the aforementioned memory 1030 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0062] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the method for detecting mutual cannibalism among juvenile fish provided by the above-mentioned methods. The method includes: obtaining images of juvenile fish; inputting the images of juvenile fish into a detection model to obtain detection results of mutual cannibalism among juvenile fish; the detection model is used to detect mutual cannibalism among juvenile fish; the detection model is trained based on juvenile fish image samples and location information of mutual cannibalism among juvenile fish in the juvenile fish image samples.

[0063] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the method for detecting mutual cannibalism of juvenile fish provided by the above-mentioned methods. The method includes: obtaining images of juvenile fish; inputting the images of juvenile fish into a detection model to obtain detection results of mutual cannibalism of juvenile fish; the detection model is used to detect mutual cannibalism behavior of juvenile fish; the detection model is trained based on juvenile fish image samples and location information of mutual cannibalism of juvenile fish in the juvenile fish image samples.

[0064] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0065] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.

[0066] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for detecting cannibalism among juvenile fish, characterized in that: include: Acquire images of juvenile fish; Inputting the juvenile fish image into a detection model to obtain a detection result of juvenile fish cannibalism; The detection model is used for detecting cannibalism among juvenile fish; the detection model is obtained by training based on juvenile fish image samples and position information of cannibalism among juvenile fish in the juvenile fish image samples.

2. The method for detecting mutual cannibalism among juvenile fish according to claim 1, wherein: The detection model is constructed based on the improved yolov5 network model; the improved yolov5 network model includes: Multi-head attention mechanism module; the multi-head attention mechanism module is used to extract features of juvenile fish.

3. The method for detecting mutual cannibalism among juvenile fish according to claim 2, wherein: The improved yolov5 network model also includes: A weighted bidirectional feature pyramid network module BiFPN; the weighted bidirectional feature pyramid network module BiFPN is used to generate a fusion result of juvenile fish features; the fusion result of juvenile fish features is used to detect juvenile fish cannibalism behavior.

4. The method for detecting mutual cannibalism among juvenile fish according to claim 3, wherein: The weighted bidirectional feature pyramid network module BiFPN also includes: Upsampling module; the upsampling module is used for compressing and reorganizing the features of juvenile fish.

5. The method for detecting mutual cannibalism among juvenile fish according to claim 4, wherein: The sampling module includes: An upsampling kernel prediction module and a feature recombination module; the upsampling kernel prediction module is used to reduce the channels of the input feature map; the feature recombination module is used to determine the weights corresponding to the sampled pixels.

6. The method for detecting mutual cannibalism among juvenile fish according to claim 5, wherein: The upsampling kernel prediction module includes: A channel compression submodule, a content encoding submodule and a kernel normalization submodule; the channel compression submodule is used to reduce the channels of the input feature map; the content encoding submodule is used to take the compressed feature map as input and encode it to generate a reconstructed kernel; the kernel normalization submodule is used to normalize the reconstructed kernel.

7. A device for detecting cannibalism among juvenile fish, characterized in that: include: An acquisition module is used to acquire images of juvenile fish; The detection module is used to input the juvenile fish image into a detection model to obtain a detection result of juvenile fish cannibalism; the detection model is used to detect juvenile fish cannibalism behavior; the detection model is trained based on juvenile fish image samples and position information of the juvenile fish cannibalism in the juvenile fish image samples.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for detecting mutual cannibalism of juvenile fishes as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for detecting mutual cannibalism of juvenile fishes as claimed in any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for detecting mutual cannibalism of juvenile fishes as claimed in any one of claims 1 to 6 is implemented.