Fish Abnormal Behavior Detection and Tracking Method, Device, Electronic Device, and Medium
Through the improved path aggregation network and fish tracking model, the accuracy of fish abnormal behavior detection in intensive breeding is solved, and high-precision detection and tracking of fish abnormal behavior is achieved, ensuring the health of circular aquaculture.
Patent Information
- Application Number
- CN202111187855.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-12
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2041-10-12
AI Technical Summary
In intensive farming, due to the high density of fish, existing computer vision technologies are difficult to accurately detect fish with abnormal behavior, mainly due to the fuzzy movement of fish and mutual occlusion.
A fish abnormal behavior detection and tracking method is adopted to obtain fish behavior videos and use the fish abnormal behavior detection model trained by the improved path aggregation network to obtain the fish fine-grained feature map, thereby detecting fish individuals with abnormal behavior. Then, based on the fish tracking model, the movement trajectories of these fish individuals were obtained.
It improves the accuracy of detection of abnormal behaviors of fish and the accuracy of movement trajectory, can promptly detect and deal with abnormal behaviors, and ensures the health of circulating water breeding scenarios.
Smart Images

Figure CN113989324B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of recirculating aquaculture, and particularly to a method, device, electronic device, medium, and computer program product for detecting and tracking abnormal behaviors of fish. Background Art
[0002] Fish is an important source of human protein. Fish and fishery products play a key role in the food security and nutrition strategies worldwide. According to the statistics of the Food and Agriculture Organization of the United Nations (FAO), the consumption of fishery products accounts for one-sixth of animal protein. However, fish are very sensitive to changes in the external environment, such as the salinity and dissolved oxygen of water. Compared with other forms of aquaculture production, the recirculating aquaculture system (RAS) in aquaculture can reduce eutrophication and water dependence, assist in waste management, promote nutrient recovery, improve resource utilization rate, and improve the yield and quality of aquaculture products. Due to the high-density farming in RAS, bacterial and parasitic diseases are easily and rapidly transmitted. All the above factors will lead to abnormal fish behaviors, such as hypoxia and turning over when swimming. Hypoxia is caused by low dissolved oxygen and usually occurs in groups, which is relatively easy to detect. The occurrence of turning over is mainly due to fish diseases, so this behavior often occurs alone from time to time and is difficult to detect. Once these abnormal reactions are not detected in time, it is very likely to cause a large number of fish deaths. Therefore, it is of great significance to quickly and accurately detect abnormal behaviors of fish.
[0003] However, the existing methods for detecting and tracking fish behaviors generally use computer vision technology to identify and track fish. However, most of them can only track certain fixed features of fish. When the features of fish individuals change, they cannot continue to track. And the abnormal behaviors of fish are generally sudden and of short duration. It is difficult to track fish with abnormal behaviors using general computer vision technology. At the same time, due to the large density of fish in intensive farming, general computer vision technology has problems such as fish motion blur and fish occlusion when identifying fish, resulting in difficulty in accurately detecting fish with abnormal behaviors. Summary of the Invention
[0004] The present invention provides a method for detecting and tracking abnormal behaviors of fish to solve the technical problem that due to the large density of fish in intensive farming, general computer vision technology has problems such as fish motion blur and fish occlusion when identifying fish, resulting in difficulty in accurately detecting fish with abnormal behaviors.
[0005] The present invention provides a method for detecting and tracking abnormal behaviors of fish, including:
[0006] Obtain a fish behavior video;
[0007] Based on the fish behavior video, a fish fine-grained feature map is obtained by using a fish abnormal behavior detection model to obtain the detection result of fish individuals with abnormal behaviors;
[0008] According to the detection result of fish individuals with abnormal behaviors, the movement trajectory of fish individuals with abnormal behaviors is obtained through a fish tracking model;
[0009] Among them, the fish abnormal behavior detection model is trained based on an improved path aggregation network, and the fish tracking module is trained based on fish test sample data and fish target sample data.
[0010] According to a fish abnormal behavior detection and tracking method provided by the present invention, the fish abnormal behavior detection model includes a behavior video input layer, a first processing layer, an additional detection layer, a second processing layer, and a detection result output layer. The step of obtaining a fish fine-grained feature map by using the fish abnormal behavior detection model based on the fish behavior video to obtain the detection result of fish individuals with abnormal behaviors includes:
[0011] Input the fish behavior video into the behavior video input layer of the fish abnormal behavior detection model;
[0012] Based on the fish behavior video, a first fish feature map is obtained through the first processing layer of the fish abnormal behavior detection model;
[0013] Based on the first fish feature map, a fish fine-grained feature map is obtained through the additional detection layer of the fish abnormal behavior detection model;
[0014] Based on the fish fine-grained feature map, the detection result of fish individuals with abnormal behaviors is obtained through the second processing layer of the fish abnormal behavior detection model;
[0015] Output the detection result of fish individuals with abnormal behaviors through the detection result output layer of the fish abnormal behavior detection model.
[0016] According to a fish abnormal behavior detection and tracking method provided by the present invention, the step of obtaining a fish fine-grained feature map through the additional detection layer of the fish abnormal behavior detection model based on the first fish feature map is specifically:
[0017] The first fish feature map is upsampled through the additional detection layer of the fish abnormal behavior detection model to obtain a second fish feature map. The first fish feature map and the second fish feature map are fused to obtain a third fish feature map, and the third fish feature map is downsampled to obtain a fish fine-grained feature map.
[0018] A method for detecting and tracking abnormal behaviors of fish provided by the present invention, based on the detection result of a fish individual with abnormal behavior, obtaining the movement trajectory of the fish individual with abnormal behavior through a fish tracking model, including:
[0019] Based on the detection result of a fish individual with abnormal behavior, determining the fish individual to be tracked;
[0020] Based on the fish behavior video, obtaining a number of sequence images of the fish individual to be tracked related to the fish individual to be tracked;
[0021] Inputting a number of the sequence images of the fish individual to be tracked into the fish tracking model to obtain the movement trajectory of the fish individual to be tracked.
[0022] A method for detecting and tracking abnormal behaviors of fish provided by the present invention,
[0023] The fish tracking model includes a sequence image input layer, a feature extraction layer, a feature processing layer, and a trajectory output layer. Inputting a number of the sequence images of the fish individual to be tracked into the fish tracking model to obtain the movement trajectory of the fish individual to be tracked includes:
[0024] Inputting a number of the sequence images of the fish individual to be tracked into the sequence image input layer of the fish tracking model;
[0025] Respectively extracting the features of the fish individual to be tracked related to the fish individual to be tracked from a number of the input sequence images of the fish individual to be tracked through the feature extraction layer of the fish tracking model;
[0026] Performing hierarchical aggregation processing on the features of the fish individual to be tracked through the feature processing layer of the fish tracking model to obtain the movement trajectory of the fish individual to be tracked;
[0027] Outputting the movement trajectory of the fish individual to be tracked through the trajectory output layer of the fish tracking model.
[0028] The present invention also provides a device for detecting and tracking abnormal behaviors of fish, including:
[0029] A fish behavior video acquisition module for acquiring a fish behavior video;
[0030] A fish individual detection result obtaining module for obtaining a fish fine-grained feature map based on the fish behavior video by using a fish abnormal behavior detection model to obtain the detection result of a fish individual with abnormal behavior;
[0031] A fish individual movement trajectory obtaining module for obtaining the movement trajectory of a fish individual with abnormal behavior through a fish tracking model according to the detection result of a fish individual with abnormal behavior;
[0032] Among them, the fish abnormal behavior detection model is trained based on an improved path aggregation network, and the fish tracking module is trained based on fish test sample data and fish target sample data.
[0033] According to a fish abnormal behavior detection and tracking device provided by the present invention, the fish abnormal behavior detection model in the fish individual detection result obtaining module includes a behavior video input layer, a first processing layer, an additional detection layer, a second processing layer, and a detection result output layer. The fish individual detection result obtaining module includes:
[0034] A data to be detected input module, configured to input the fish behavior video into the behavior video input layer of the fish abnormal behavior detection model;
[0035] A first fish feature map obtaining module, configured to obtain a first fish feature map based on the fish behavior video by using the first processing layer of the fish abnormal behavior detection model;
[0036] A fish fine-grained feature map obtaining module, configured to obtain a fish fine-grained feature map based on the first fish feature map through the additional detection layer of the fish abnormal behavior detection model;
[0037] A fish individual abnormal behavior detection module, configured to obtain a detection result of a fish individual with abnormal behavior based on the fish fine-grained feature map through the second processing layer of the fish abnormal behavior detection model;
[0038] A detection result output module, configured to output the detection result of the fish individual with abnormal behavior through the detection result output layer of the fish abnormal behavior detection model.
[0039] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the fish abnormal behavior detection and tracking method as described in any one of the above are implemented.
[0040] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the fish abnormal behavior detection and tracking method as described in any one of the above are implemented.
[0041] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the fish abnormal behavior detection and tracking method as described in any one of the above are implemented.
[0042] The fish abnormal behavior detection and tracking method provided by the present invention obtains a fish fine-grained feature map based on a fish behavior video through a fish abnormal behavior detection model, and obtains a detection result of a fish individual with abnormal behavior, which can ensure the accuracy of the detection result of the fish individual with abnormal behavior, provide reliable data for the subsequent fish tracking model to obtain the movement trajectory of the fish individual with abnormal behavior, improve the accuracy of the movement trajectory of the fish individual with abnormal behavior, so that fishery managers can timely handle the fish individuals with abnormal behavior and ensure the health of the recirculating aquaculture scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the implementation examples or the description of the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0044] Figure 1 is one of the schematic flowcharts of the fish abnormal behavior detection and tracking method provided by the present invention;
[0045] Figure 2 is the second schematic flowchart of the fish abnormal behavior detection and tracking method provided by the present invention;
[0046] Figure 3 is the module schematic diagram of the fish abnormal behavior detection and tracking device provided by the present invention;
[0047] Figure 4 is the schematic structural diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0048] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention in conjunction with the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0049] The following will be described in conjunction with Figure 1 and Figure 2 to describe the fish abnormal behavior detection and tracking method of the present invention.
[0050] A fish abnormal behavior detection and tracking method, as Figure 1-2 shown, the method includes the following steps:
[0051] S1. Obtain a fish behavior video.
[0052] Specifically, 150 farmed fish bodies were selected for breeding in this embodiment. Videos of fish behavior were captured and collected in real time. The resolution of the captured videos was 1920×1080, and the frame rate was 25 fps. Sequential fish images can be extracted frame by frame from the video data of the fish behavior videos for subsequent detection of abnormal fish behavior.
[0053] S2. Based on the fish behavior videos, use the abnormal fish behavior detection model to obtain fish fine-grained feature maps to obtain the detection results of fish individuals with abnormal behavior.
[0054] Specifically, the abnormal fish behavior detection model is a YOLOV5s model trained based on an improved Path Aggregation Network (PANet), and the abnormal fish behavior detection model includes a behavior video input layer, a first processing layer, an additional detection layer, a second processing layer, and a detection result output layer. Step S2 includes:
[0055] S21. Input the fish behavior videos into the behavior video input layer of the abnormal fish behavior detection model.
[0056] S22. Based on the fish behavior videos, use the first processing layer of the abnormal fish behavior detection model to obtain the first fish feature maps.
[0057] S23. Based on the first fish feature maps, obtain fish fine-grained feature maps through the additional detection layer of the abnormal fish behavior detection model.
[0058] Specifically, S23 is as follows: Upsample the first fish feature maps through the additional detection layer of the abnormal fish behavior detection model to obtain second fish feature maps, fuse the first fish feature maps and the second fish feature maps to obtain third fish feature maps, and downsample the third fish feature maps to obtain fish fine-grained feature maps.
[0059] S24. Based on the fish fine-grained feature maps, obtain the detection results of fish individuals with abnormal behavior through the second processing layer of the abnormal fish behavior detection model.
[0060] Specifically, the abnormal fish behavior detection model will obtain bounding boxes and confidence levels based on the fish fine-grained feature maps, and then use the non-maximum suppression method to filter out the final prediction boxes to obtain the detection results of fish individuals with abnormal behavior.
[0061] In addition, the detection results of fish individuals with abnormal behavior obtained can also be used for the abnormal fish behavior detection model to adjust the weights of the model itself in combination with the GIoU loss function to improve the generalization ability and detection accuracy of the abnormal fish behavior detection model.
[0062] S25. Output the detection results of fish individuals with abnormal behaviors through the detection result output layer of the fish abnormal behavior detection model.
[0063] In step S2, the fish fine-grained feature map is first obtained through the fish abnormal behavior detection model with an additional detection layer, and then the detection results of fish individuals with abnormal behaviors are obtained. The fish fine-grained feature map with finer granularity can strengthen the feature transfer and reuse of the improved path aggregation network in the fish abnormal behavior detection model, while retaining shallower features, effectively improving the accuracy of the obtained detection results of fish individuals with abnormal behaviors.
[0064] S3. According to the detection results of fish individuals with abnormal behaviors, obtain the movement trajectories of fish individuals with abnormal behaviors through the fish tracking model.
[0065] Specifically, the fish tracking module is trained based on fish test sample data, fish target sample data, and the SiamRPN++ network. Step S3 includes:
[0066] S31. Determine the fish individuals to be tracked according to the detection results of fish individuals with abnormal behaviors.
[0067] S32. Based on the fish behavior video, obtain a number of sequence images of fish individuals to be tracked related to the fish individuals to be tracked.
[0068] S33. Input a number of the sequence images of fish individuals to be tracked into the fish tracking model to obtain the movement trajectories of the fish individuals to be tracked.
[0069] Specifically, the fish tracking model includes a sequence image input layer, a feature extraction layer, a feature processing layer, and a trajectory output layer. S33 includes:
[0070] S331. Input a number of the sequence images of fish individuals to be tracked into the sequence image input layer of the fish tracking model.
[0071] S332. Respectively extract the features of fish individuals to be tracked related to the fish individuals to be tracked from the input a number of the sequence images of fish individuals to be tracked through the feature extraction layer of the fish tracking model.
[0072] S333. Perform hierarchical aggregation processing on the features of fish individuals to be tracked through the feature processing layer of the fish tracking model to obtain the movement trajectories of the fish individuals to be tracked;
[0073] S334. Output the movement trajectories of the fish individuals to be tracked through the trajectory output layer of the fish tracking model.
[0074] Step S3 converts the target tracking problem into a problem of hierarchical feature aggregation. By using ResNet-50 as the deep backbone network in the fish tracking model, the fish tracking model extracts more information about the fish to be tracked, such as color, shape, position, etc., at the low level, and extracts more abstract semantic information about the fish to be tracked at the high level. Finally, the movement trajectory of the fish to be tracked is obtained through the output, realizing the real-time tracking of the fish to be tracked and not being prone to misjudgment of the image background in complex scenarios.
[0075] The fish abnormal behavior detection and tracking method provided by the present invention obtains a fish fine-grained feature map through a fish abnormal behavior detection model based on a fish behavior video, and obtains the detection result of the fish individual with abnormal behavior, which can ensure the accuracy of the detection result of the fish individual with abnormal behavior, provide reliable data for the subsequent fish tracking model to obtain the movement trajectory of the fish individual with abnormal behavior, improve the accuracy of the movement trajectory of the fish individual with abnormal behavior, so that fishery managers can timely handle the fish individuals with abnormal behavior and ensure the health of the recirculating aquaculture scenario.
[0076] The following describes the fish abnormal behavior detection and tracking device, electronic device, non-transitory computer-readable storage medium, and computer program product provided by the present invention. The fish abnormal behavior detection and tracking device, electronic device, non-transitory computer-readable storage medium, and computer program product described below can be mutually corresponding and referred to the fish abnormal behavior detection and tracking method described above.
[0077] A fish abnormal behavior detection and tracking device, as Figure 3 shown, includes:
[0078] A fish behavior video acquisition module 310, configured to acquire a fish behavior video;
[0079] A fish individual detection result obtaining module 320, configured to obtain a fish fine-grained feature map by using a fish abnormal behavior detection model based on the fish behavior video, so as to obtain the detection result of the fish individual with abnormal behavior;
[0080] A fish individual movement trajectory obtaining module 330, configured to obtain the movement trajectory of the fish individual with abnormal behavior through a fish tracking model according to the detection result of the fish individual with abnormal behavior;
[0081] Wherein, the fish abnormal behavior detection model is trained based on an improved path aggregation network, and the fish tracking module is trained based on fish test sample data and fish target sample data.
[0082] Further, the fish abnormal behavior detection model in the fish individual detection result obtaining module includes a behavior video input layer, a first processing layer, an additional detection layer, a second processing layer, and a detection result output layer. The fish individual detection result obtaining module 320 includes:
[0083] A to-be-detected data input module, configured to input the fish behavior video into the behavior video input layer of the fish abnormal behavior detection model;
[0084] A first fish feature map obtaining module, configured to obtain a first fish feature map through the first processing layer of the fish abnormal behavior detection model based on the fish behavior video;
[0085] A fish fine-grained feature map obtaining module, configured to obtain a fish fine-grained feature map through the additional detection layer of the fish abnormal behavior detection model based on the first fish feature map;
[0086] A fish individual abnormal behavior detection module, configured to obtain a detection result of a fish individual with abnormal behavior through the second processing layer of the fish abnormal behavior detection model based on the fish fine-grained feature map;
[0087] A detection result output module, configured to output the detection result of the fish individual with abnormal behavior through the detection result output layer of the fish abnormal behavior detection model.
[0088] Further, obtaining the fish fine-grained feature map through the additional detection layer of the fish abnormal behavior detection model based on the first fish feature map in the fish fine-grained feature map obtaining module specifically includes:
[0089] Performing upsampling on the first fish feature map through the additional detection layer of the fish abnormal behavior detection model to obtain a second fish feature map, fusing the first fish feature map and the second fish feature map to obtain a third fish feature map, and performing downsampling on the third fish feature map to obtain a fish fine-grained feature map.
[0090] Further, the fish tracking model includes a sequence image input layer, a feature extraction layer, a feature processing layer, and a trajectory output layer. The fish individual movement trajectory obtaining module 330 includes:
[0091] A sequence image input module, configured to input a plurality of the to-be-tracked fish individual sequence images into the sequence image input layer of the fish tracking model;
[0092] A to-be-tracked fish individual feature extraction module, configured to respectively extract to-be-tracked fish individual features related to the to-be-tracked fish individuals in the input plurality of to-be-tracked fish individual sequence images through the feature extraction layer of the fish tracking model;
[0093] The fish individual feature processing module to be tracked is used to perform hierarchical aggregation processing on the fish individual feature to be tracked through the feature processing layer of the fish tracking model, and obtain the movement trajectory of the fish individual to be tracked;
[0094] The movement trajectory output module is used to output the movement trajectory of the fish individual to be tracked through the trajectory output layer of the fish tracking model.
[0095] Figure 4 An entity structure diagram of an electronic device is exemplified, as Figure 4 shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840. Among them, the processor 810, the communication interface 820, and the memory 830 complete mutual communication through the communication bus 840. The processor 810 can call the logical instructions in the memory 830 to execute the fish abnormal behavior detection and tracking method, and this method includes:
[0096] Obtain the fish behavior video;
[0097] Based on the fish behavior video, use the fish abnormal behavior detection model to obtain the fish fine-grained feature map to obtain the detection result of the fish individual with abnormal behavior;
[0098] According to the detection result of the fish individual with abnormal behavior, obtain the movement trajectory of the fish individual with abnormal behavior through the fish tracking model;
[0099] Among them, the fish abnormal behavior detection model is trained based on the improved path aggregation network, and the fish tracking module is trained based on the fish test sample data and the fish target sample data.
[0100] In addition, when the logical instructions in the above-mentioned memory 830 are implemented in the form of software functional units and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this 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 to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. And the foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0101] On the other hand, the present invention also provides a computer program product, which includes a computer program that 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 fish abnormal behavior detection and tracking method provided by the above-mentioned various methods. The method includes:
[0102] Obtain a fish behavior video;
[0103] Based on the fish behavior video, use the fish abnormal behavior detection model to obtain a fish fine-grained feature map to obtain the detection result of fish individuals with abnormal behaviors;
[0104] According to the detection result of fish individuals with abnormal behaviors, obtain the movement trajectory of fish individuals with abnormal behaviors through the fish tracking model;
[0105] Wherein, the fish abnormal behavior detection model is trained based on an improved path aggregation network, and the fish tracking module is trained based on fish test sample data and fish target sample data.
[0106] On the other hand, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the fish abnormal behavior detection and tracking method provided by the above-mentioned various methods. The method includes:
[0107] Obtain a fish behavior video;
[0108] Based on the fish behavior video, use the fish abnormal behavior detection model to obtain a fish fine-grained feature map to obtain the detection result of fish individuals with abnormal behaviors;
[0109] According to the detection result of fish individuals with abnormal behaviors, obtain the movement trajectory of fish individuals with abnormal behaviors through the fish tracking model;
[0110] Wherein, the fish abnormal behavior detection model is trained based on an improved path aggregation network, and the fish tracking module is trained based on fish test sample data and fish target sample data.
[0111] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative labor.
[0112] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part 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, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0113] 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 them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting and tracking abnormal behaviors of fish, characterized in that, it includes: Obtaining fish behavior videos; Based on the fish behavior videos, using a fish abnormal behavior detection model to obtain fish fine-grained feature maps, so as to obtain the detection results of fish individuals with abnormal behaviors; According to the detection results of fish individuals with abnormal behaviors, obtaining the movement trajectories of fish individuals with abnormal behaviors through a fish tracking model; Among them, the fish abnormal behavior detection model is trained based on an improved path aggregation network, and the fish tracking model is trained based on fish test sample data and fish target sample data; Among them, the step of obtaining the movement trajectories of fish individuals with abnormal behaviors through a fish tracking model according to the detection results of fish individuals with abnormal behaviors includes: According to the detection results of fish individuals with abnormal behaviors, determining the fish individuals to be tracked; Based on the fish behavior videos, obtaining a number of sequence images of fish individuals to be tracked related to the fish individuals to be tracked; Inputting the number of sequence images of fish individuals to be tracked into the fish tracking model to obtain the movement trajectories of the fish individuals to be tracked; The fish tracking model includes a sequence image input layer, a feature extraction layer, a feature processing layer, and a trajectory output layer. The step of inputting the number of sequence images of fish individuals to be tracked into the fish tracking model to obtain the movement trajectories of the fish individuals to be tracked includes: Inputting the number of sequence images of fish individuals to be tracked into the sequence image input layer of the fish tracking model; Through the feature extraction layer of the fish tracking model, respectively extracting the features of fish individuals to be tracked related to the fish individuals to be tracked from the input number of sequence images of fish individuals to be tracked; Through the feature processing layer of the fish tracking model, performing hierarchical aggregation processing on the features of fish individuals to be tracked to obtain the movement trajectories of the fish individuals to be tracked; Outputting the movement trajectories of the fish individuals to be tracked through the trajectory output layer of the fish tracking model.
2. The method for detecting and tracking abnormal behaviors of fish according to claim 1, characterized in that, the fish abnormal behavior detection model includes a behavior video input layer, a first processing layer, an additional detection layer, a second processing layer, and a detection result output layer. The step of obtaining fish fine-grained feature maps based on the fish behavior videos by using the fish abnormal behavior detection model to obtain the detection results of fish individuals with abnormal behaviors includes: Inputting the fish behavior videos into the behavior video input layer of the fish abnormal behavior detection model; Based on the fish behavior videos, obtaining a first fish feature map through the first processing layer of the fish abnormal behavior detection model; Based on the first fish feature map, obtaining fish fine-grained feature maps through the additional detection layer of the fish abnormal behavior detection model; Based on the fish fine-grained feature maps, obtaining the detection results of fish individuals with abnormal behaviors through the second processing layer of the fish abnormal behavior detection model; Outputting the detection results of fish individuals with abnormal behaviors through the detection result output layer of the fish abnormal behavior detection model.
3. The method for detecting and tracking abnormal behaviors of fish according to claim 2, characterized in that, Based on the first fish feature map, the fish fine-grained feature map is obtained through the additional detection layer of the fish abnormal behavior detection model, specifically as follows: The first fish feature map is upsampled through the additional detection layer of the fish abnormal behavior detection model to obtain a second fish feature map. The first fish feature map and the second fish feature map are fused to obtain a third fish feature map, and the third fish feature map is downsampled to obtain the fish fine-grained feature map.
4. A fish abnormal behavior detection and tracking device Characterized in that It includes: A fish behavior video acquisition module for acquiring fish behavior videos; A fish individual detection result obtaining module for obtaining a fish fine-grained feature map by using a fish abnormal behavior detection model based on the fish behavior video, so as to obtain the detection result of a fish individual with abnormal behavior; A fish individual movement trajectory obtaining module for obtaining the movement trajectory of a fish individual with abnormal behavior through a fish tracking model according to the detection result of the fish individual with abnormal behavior; Wherein, the fish abnormal behavior detection model is trained based on an improved path aggregation network, and the fish tracking model is trained based on fish test sample data and fish target sample data; Wherein, the movement trajectory of the fish individual with abnormal behavior is obtained through the fish tracking model according to the detection result of the fish individual with abnormal behavior, including: Determining the fish individual to be tracked according to the detection result of the fish individual with abnormal behavior; Based on the fish behavior video, obtaining a number of sequence images of the fish individual to be tracked related to the fish individual to be tracked; Inputting the number of sequence images of the fish individual to be tracked into the fish tracking model to obtain the movement trajectory of the fish individual to be tracked; The fish tracking model includes a sequence image input layer, a feature extraction layer, a feature processing layer, and a trajectory output layer. Inputting the number of sequence images of the fish individual to be tracked into the fish tracking model to obtain the movement trajectory of the fish individual to be tracked includes: Inputting the number of sequence images of the fish individual to be tracked into the sequence image input layer of the fish tracking model; Respectively extracting the features of the fish individual to be tracked related to the fish individual to be tracked from the input number of sequence images of the fish individual to be tracked through the feature extraction layer of the fish tracking model; Performing hierarchical aggregation processing on the features of the fish individual to be tracked through the feature processing layer of the fish tracking model to obtain the movement trajectory of the fish individual to be tracked; Outputting the movement trajectory of the fish individual to be tracked through the trajectory output layer of the fish tracking model.
5. The fish abnormal behavior detection and tracking device according to claim 4 Characterized in that The fish abnormal behavior detection model in the fish individual detection result obtaining module includes a behavior video input layer, a first processing layer, an additional detection layer, a second processing layer, and a detection result output layer. The fish individual detection result obtaining module includes: A data to be detected input module for inputting the fish behavior video into the input layer of the fish abnormal behavior detection model; A first fish feature map obtaining module, configured to obtain a first fish feature map based on the fish behavior video through a first processing layer of the fish abnormal behavior detection model; A fish fine-grained feature map obtaining module, configured to obtain a fish fine-grained feature map based on the first fish feature map through an additional detection layer of the fish abnormal behavior detection model; A fish individual abnormal behavior detection module, configured to obtain a detection result of a fish individual with abnormal behavior based on the fish fine-grained feature map through a second processing layer of the fish abnormal behavior detection model; A detection result output module, configured to output a detection result of a fish individual with abnormal behavior through a detection result output layer of the fish abnormal behavior detection model.
6. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, when the processor executes the program, the steps of the fish abnormal behavior detection and tracking method according to any one of claims 1 to 3 are implemented.
7. A non-transitory computer-readable storage medium, having a computer program stored thereon, wherein, when the computer program is executed by a processor, the steps of the fish abnormal behavior detection and tracking method according to any one of claims 1 to 3 are implemented.
8. A computer program product, comprising a computer program, wherein, when the computer program is executed by a processor, the steps of the fish abnormal behavior detection and tracking method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Group abnormal behavior real-time detection method
CN110245603A