A method and system for detecting the pose of a dense anchovy
Patent Information
- Application Number
- CN202611078169.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-10-27
AI Technical Summary
[0002]现有鱼类图像检测与分割方法主要存在以下不足:第一,针对密集鱼群场景,传统实例分割方法难以有效处理个体间的重度遮挡问题,尤其当多个鳀鱼个体相互重叠式,分割掩码往往出现粘连或缺失;第二,现有方法缺乏针对鳀鱼特殊形态特征的适应性分割策略,掩码生成与补全过程未充分利用目标对象的先验形态信息;第三,对于鱼头部的精准定位,现有技术多依赖粗略的轮廓方向判断,缺乏对头部关键点的精细化检测,难以实现对圆头鳀鱼与尖头鳀鱼的准确区分与分类
1.通过多尺度特征融合,构建包含清晰鳀鱼形态特征的融合特征图,便于鳀鱼的形态特征提取,提高了像素级分割掩码的精准性;
Smart Images

Figure CN122990753A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of food processing technology, and more specifically, to a method and system for detecting the pose of dense anchovies. Background Technology
[0002] Existing fish image detection and segmentation methods have the following main shortcomings: First, for dense fish school scenes, traditional instance segmentation methods are difficult to effectively handle the problem of severe occlusion between individuals, especially when multiple anchovy individuals overlap, the segmentation mask often becomes stuck or missing; Second, existing methods lack adaptive segmentation strategies for the special morphological features of anchovies, and the mask generation and completion process does not make full use of the prior morphological information of the target object; Third, for the accurate localization of the fish head, existing technologies mostly rely on rough contour direction judgment, lacking fine detection of key points on the head, making it difficult to accurately distinguish and classify round-headed and pointed-headed anchovies.
[0003] Therefore, existing technologies have shortcomings and urgently need improvement. Summary of the Invention
[0004] To address at least one of the aforementioned technical problems, the present invention aims to provide a dense anchovy pose detection method and system that can use the unique morphological characteristics of anchovies to fill in occluded parts, thereby accurately locating the anchovy pose.
[0005] The first aspect of this invention provides a method for detecting the pose of dense anchovies, comprising: The image to be detected containing a dense school of anchovies is acquired, multi-scale features of the image are extracted and fused to obtain a fused feature map; Extract the morphological features of anchovies from the fused feature map, and generate an adaptive pixel-level segmentation mask based on the morphological features of anchovies. Based on pixel-level segmentation masks, dense anchovy groups are segmented to obtain individual anchovy masks. Based on the individual masks of the segmented anchovies, the overall contour features of the anchovies are extracted, the torso contour is obtained by ellipse fitting, and the core key points of the head are located based on the preset key point detection algorithm. Based on the coordinates of the core key points of the head, the bounding box of the head region is determined to achieve precise head positioning.
[0006] This plan also includes the following for anchovies that are obscured: If the head is not obscured, segmentation and localization are achieved through head features to obtain a complete anchovy segmentation mask; If completely obscured, its existence is determined and preliminarily located based on the distribution patterns and morphological characteristics of adjacent anchovies, thus obtaining the complete anchovy individual segmentation mask.
[0007] In this scheme, the step of segmenting and locating the anchovy individual by using head features to obtain a complete anchovy segmentation mask if the head is not obscured specifically includes: Extract the morphological features of the head contour; The morphological features of the head contour are compared and analyzed with preset morphological features to determine the morphological feature similarity value. If the similarity value of the morphological feature is greater than the preset similarity threshold, then the orientation direction vector corresponding to the preset morphological feature is set as the orientation direction vector of the head contour. Using the opposite direction of the orientation vector of the head contour as the expansion direction, constrained by the body proportion of the anchovy's body length to body width ratio, and using the anchovy's torso corresponding to the preset morphological features as the expansion of this anchovy, a complete anchovy individual segmentation mask is obtained.
[0008] In this scheme, the step of determining the existence and preliminary location of anchovies based on their distribution patterns and morphological characteristics, and obtaining a complete anchovy segmentation mask if the anchovy is completely obscured, specifically includes: Extract all visible anchovy individuals from the same frame image, and calculate their average body length, average body width, and average distance between individuals; Determine the anchovy's body proportions based on the average length and width of the anchovies; Extract the occluded area and search for potential target areas within the occluded area that match the anchovy's body size proportions and inter-individual spacing; Extract features from potential target regions and construct confidence scores based on the features of the potential target regions; If the confidence level is greater than the preset confidence level threshold, the geometric center of the potential target area is used as the initial positioning position, and the streamline curve of the anchovy corresponding to the average body length and average body width is used to construct the segmentation mask of the complete anchovy individual.
[0009] In this solution, the step of obtaining the torso contour through ellipse fitting specifically includes: Contour tracing is performed on the individual anchovy masks after segmentation to obtain an ordered set of contour points; Based on the preset least squares method, the points of the ordered contour are fitted to an ellipse, and the ellipse parameters are solved. The ellipse parameters include at least the length of the major axis, the length of the minor axis, the direction angle of the major axis, and the coordinates of the center point; the direction angle of the major axis represents the direction of the central axis of the anchovy's body. If the ratio of the major axis length to the minor axis length is within the preset range, the corresponding ellipse is fitted normally, and the fitted ellipse is set as the anchovy body outline. If the ratio of the major axis length to the minor axis length is not within the preset range, the mask for the anchovy individual will be corrected.
[0010] In this solution, the step of correcting the anchovy individual mask specifically includes: If the ratio of the major axis length to the minor axis length is greater than a preset range, the current mask is determined to be too thin and elongated. The correction steps are as follows: apply an outward expansion offset to the mask contour points along the minor axis of the ellipse, with the expansion amount... Simultaneously, an inward contraction offset is applied to the contour points at both ends of the major axis, with an offset magnitude of [missing value]. Where L represents the length of the major axis, W represents the length of the minor axis, k is the preset ratio of the major and minor axes, and a is the floating coefficient; If the ratio of the major axis length to the minor axis length is less than a preset range, the current mask is determined to be too short and wide. The correction steps are as follows: apply an outward stretching offset to the mask contour points along the major axis of the ellipse, with the stretching amount being... Simultaneously, an inward compression offset is applied to the contour points at both ends of the minor axis, with a compression magnitude of [value missing]. .
[0011] In this solution, the step of locating the core key points of the head based on a preset key point detection algorithm specifically includes: Based on the torso contour obtained by ellipse fitting, the region where one endpoint of the major axis of the ellipse is located is determined as the candidate head region. Within the candidate head region, the coordinate positions of the snout endpoint, key eye points, and head apex are predicted respectively. Using the key eye point E as the reference origin, a local coordinate system for the head is constructed, and the muzzle endpoint is calculated. The coordinate position relative to the actual offset vector of E And calculate the actual offset vector. Mahalanobis distance of the confidence ellipse deviating from the standard position ; Determine the Mahalanobis distance If the value is less than or equal to a preset confidence threshold, then the position of the core key point of the anchovy's head is normal; otherwise, the position of the snout tip is corrected.
[0012] In this solution, the step of correcting the position of the snout endpoint specifically includes: Connect the key point E of the eye with the tip of the nose. The direction of the line connecting the snouts is set to the direction the snout points. Starting from E, along the stated direction with a standard offset distance Projection yields correction candidate points ; Correct candidate points and the tip of the snout Weighted fusion is performed to obtain the final snout endpoint. .
[0013] A second aspect of the present invention provides a dense anchovy pose detection system, comprising a memory and a processor, wherein the memory stores a program for a dense anchovy pose detection method, and the processor executes the program to implement the dense anchovy pose detection method as described in any one of the preceding claims.
[0014] One or more technical solutions proposed in this application have at least the following technical effects: 1. By fusing multi-scale features, a fused feature map containing clear anchovy morphological features is constructed, which facilitates the extraction of anchovy morphological features and improves the accuracy of pixel-level segmentation masks; 2. For the obscured anchovies, based on the anchovy's morphological characteristics and the body length-to-width ratio as a constraint, the obscured part is supplemented, which improves the accuracy of the anchovy's pose. In summary, this invention improves the accuracy of anchovy pose detection by using the unique morphological characteristics of anchovies to complete the pose of occluded anchovies in a dense anchovy population. Attached Figure Description
[0015] Figure 1 A flowchart of a dense anchovy pose detection method according to the present invention is shown. Detailed Implementation
[0016] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0017] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0018] Figure 1 A flowchart of a dense anchovy pose detection method according to the present invention is shown.
[0019] like Figure 1 As shown, this invention discloses a method for detecting the pose of dense anchovies, comprising: S101, acquire the image to be detected containing a dense school of anchovies, extract multi-scale features from the image and fuse them to obtain a fused feature map; S102, Extract the morphological features of the anchovy from the fused feature map, and generate an adaptive pixel-level segmentation mask based on the morphological features of the anchovy. S103, Based on pixel-level segmentation masks, the dense anchovy group is segmented to obtain individual anchovy masks; S104. Based on the individual mask of the segmented anchovies, extract the overall contour features of the anchovies, obtain the torso contour through ellipse fitting, and locate the core key points of the head based on the preset key point detection algorithm. S105, Based on the coordinates of the core key points of the head, determine the bounding box of the head region to achieve precise head positioning.
[0020] According to an embodiment of the present invention, the step of generating an adaptive pixel-level segmentation mask based on the morphological features of an anchovy is aimed at having a complete anchovy outline in the fused feature map. When the anchovy is occluded in the fused feature map, it is necessary to determine the outline and individual segmentation mask of the occluded anchovy by completion, and then perform subsequent steps such as extracting the overall outline features of the anchovy.
[0021] It should be noted that, when fusing multi-scale features of an anchovies, this invention is based on YOLOv13. A lightweight channel attention mechanism (SE-Net) is embedded in the original YOLOv13 backbone network to enhance the extraction of subtle features such as the anchovy's head contour and snout. A multi-scale feature fusion module (PANet+) is introduced to fuse multi-scale feature maps from P3 (shallow layer, capturing subtle contours) to P7 (deep layer, capturing overall shape) to solve the problem of insufficient feature extraction for small targets (anchovies).
[0022] Furthermore, considering the small and slender body characteristics of anchovies, the K-means++ clustering algorithm is used to cluster the bounding boxes of anchovies to generate anchor boxes adapted to anchovies, replacing the default anchor boxes of YOLOv13; a dynamic anchor box adjustment mechanism is introduced to adjust the scale (±5 pixels) and aspect ratio of the anchor boxes in real time according to the actual average size and density of anchovies in the image, thereby improving the matching degree of overlapping targets.
[0023] According to an embodiment of the present invention, for anchovies that are obscured, the method further includes: If the head is not obscured, segmentation and localization are achieved through head features to obtain a complete anchovy segmentation mask; If completely obscured, its existence is determined and preliminarily located based on the distribution patterns and morphological characteristics of adjacent anchovies, thus obtaining the complete anchovy individual segmentation mask.
[0024] It should be noted that if the anchovy is partially or completely obscured, the obscured part of the anchovy should be supplemented and the complete anchovy individual segmentation mask should be determined before proceeding to steps S104-S105 to achieve anchovy pose detection.
[0025] According to an embodiment of the present invention, the step of obtaining a complete anchovy segmentation mask by segmenting and locating the anchovy individual through head features if the head is not obscured specifically includes: Extract the morphological features of the head contour; The morphological features of the head contour are compared and analyzed with preset morphological features to determine the morphological feature similarity value. If the similarity value of the morphological feature is greater than the preset similarity threshold, then the orientation direction vector corresponding to the preset morphological feature is set as the orientation direction vector of the head contour. Using the opposite direction of the orientation vector of the head contour as the expansion direction, constrained by the body proportion of the anchovy's body length to body width ratio, and using the anchovy's torso corresponding to the preset morphological features as the expansion of this anchovy, a complete anchovy individual segmentation mask is obtained.
[0026] It should be noted that the preset morphological features are the head outline morphological features of the visible anchovy individuals included in the current fused feature map. For example, if the preset similarity threshold is 90%, and the morphological feature similarity between the head outline morphological features and the head outline morphological features of anchovy a1 is 95%, then the torso of anchovy a1 is used as the torso of the currently occluded anchovy as an extension, and the preset body length to body width ratio of the anchovy is a body size constraint, which is 3:1.
[0027] According to an embodiment of the present invention, the step of determining the existence and preliminary location of anchovies based on the distribution patterns and morphological characteristics of adjacent anchovies, and obtaining a complete anchovy individual segmentation mask if the anchovy is completely obscured, specifically includes: Extract all visible anchovy individuals from the same frame image, and calculate their average body length, average body width, and average distance between individuals; Determine the anchovy's body proportions based on the average length and width of the anchovies; Extract the occluded area and search for potential target areas within the occluded area that match the anchovy's body size proportions and inter-individual spacing; Extract features from potential target regions and construct confidence scores based on the features of the potential target regions; If the confidence level is greater than the preset confidence level threshold, the geometric center of the potential target area is used as the initial positioning position, and the streamline curve of the anchovy corresponding to the average body length and average body width is used to construct the segmentation mask of the complete anchovy individual.
[0028] It should be noted that the feature factors extracted for potential target regions include at least spatial consistency factors, directional consistency factors, and scale adaptation factors. The spatial consistency factor represents the proximity of the distance from the corresponding potential target region location to the nearest visible anchovy to the average spacing between individuals; the closer the proximity, the higher the score. The directional consistency factor represents whether the average orientation of the corresponding potential target region location to adjacent anchovies is consistent; the more consistent the orientations, the higher the directional consistency score. The scale adaptation factor represents whether the potential target region location can accommodate an elliptical template with an aspect ratio equal to the anchovy's body size without excessive overlap with existing anchovy masks; the larger the overlap area, the lower the score. The confidence level of the corresponding target region is obtained by weighted summation of the feature factor scores. The confidence level ranges from 0 to 1, for example, a preset confidence threshold of 0.9 can be set.
[0029] According to an embodiment of the present invention, the step of obtaining the torso contour through ellipse fitting specifically includes: Contour tracing is performed on the individual anchovy masks after segmentation to obtain an ordered set of contour points; Based on the preset least squares method, the points of the ordered contour are fitted to an ellipse, and the ellipse parameters are solved. The ellipse parameters include at least the length of the major axis, the length of the minor axis, the direction angle of the major axis, and the coordinates of the center point; the direction angle of the major axis represents the direction of the central axis of the anchovy's body. If the ratio of the major axis length to the minor axis length is within the preset range, the corresponding ellipse is fitted normally, and the fitted ellipse is set as the anchovy body outline. If the ratio of the major axis length to the minor axis length is not within the preset range, the mask for the anchovy individual will be corrected.
[0030] According to an embodiment of the present invention, the step of correcting the anchovy individual mask specifically includes: S201, If the ratio of the major axis length to the minor axis length is greater than a preset range, the current mask is determined to be too thin and long. The correction steps are as follows: apply an outward expansion offset to the mask contour points along the minor axis of the ellipse, with the expansion range being... Simultaneously, an inward contraction offset is applied to the contour points at both ends of the major axis, with an offset magnitude of [missing value]. Where L represents the length of the major axis, W represents the length of the minor axis, k is the preset ratio of the major and minor axes, and a is the floating coefficient; S202, If the ratio of the major axis length to the minor axis length is less than a preset range, the current mask is determined to be too short and wide. The correction steps are as follows: apply an outward stretching offset to the mask contour points along the major axis of the ellipse, with the stretching amplitude... Simultaneously, an inward compression offset is applied to the contour points at both ends of the minor axis, with a compression magnitude of [value missing]. .
[0031] It should be noted that, for example, if the fluctuation coefficient is set to 0.3, the corresponding preset range is... After the correction is completed, ellipse fitting is performed again based on the corrected mask contour point set, and the corrected major axis length is recalculated. and minor axis length The process re-verifies whether the ratio of the major axis length to the minor axis length falls within the preset range. If it does, the corrected mask and the refitted ellipse parameters are output. If it does not, the correction strategy of S201-S202 is re-executed until the ratio of the major axis length to the minor axis length falls within the preset range again, or if it still fails to meet the requirements after a set number of consecutive corrections, it is marked as abnormal and the segmentation result of the instance is abandoned.
[0032] According to an embodiment of the present invention, the step of locating the core key points of the head based on a preset key point detection algorithm specifically includes: Based on the torso contour obtained by ellipse fitting, the region where one endpoint of the major axis of the ellipse is located is determined as the candidate head region. Within the candidate head region, the coordinate positions of the snout endpoint, key eye points, and head apex are predicted respectively. Using the key eye point E as the reference origin, a local coordinate system for the head is constructed, and the muzzle endpoint is calculated. The coordinate position relative to the actual offset vector of E And calculate the actual offset vector. Mahalanobis distance of the confidence ellipse deviating from the standard position ; Determine the Mahalanobis distance If the value is less than or equal to a preset confidence threshold, then the position of the core key point of the anchovy's head is normal; otherwise, the position of the snout tip is corrected.
[0033] It should be noted that, based on key points of the eye Using the origin as a reference, a local coordinate system for the head was constructed. The standard offset of the snout endpoint relative to key eye points was statistically analyzed in a large number of anchovy samples, including the standard horizontal offset. Standard vertical offset and its standard deviation , Construct a standard position confidence ellipse for the snout endpoints, the equation of which is: ,in This represents the upper quantile of a chi-square distribution with 2 degrees of freedom, for example, a value corresponding to the 99.7% confidence interval. ; the tip of the snout The coordinates are set to Then the actual offset vector For example, if the preset confidence threshold is 3, then when the Mahalanobis distance... When the value is less than or equal to 3, retain the current snout endpoint. .
[0034] It should be noted that the step of predicting the coordinate positions of the snout endpoint, eye key points, and head apex within the head candidate region specifically includes: sequentially matching the head contours of all visible anchovy individuals contained in the current fused feature map with the head candidate region to determine the matching degree; if the matching degree is greater than a preset matching degree threshold, then saving the head contour of the corresponding anchovy individual; after traversing all visible anchovy individual head contours, a set of saved anchovy individual head contours is obtained; and mapping the saved anchovy individual head contours to the head candidate region. The domain is defined, and the coordinates of the corresponding snout endpoint, eye key points, and head vertex are extracted. The coordinate sets of the snout endpoint, eye key points, and head vertex are constructed respectively. Cluster analysis is performed on the coordinates of the snout endpoint, eye key points, and head vertex sets respectively, and the coordinates of the sets are deleted from each set to obtain the corrected coordinate sets. The mean of the coordinates in the corrected coordinate sets is calculated to obtain the coordinates of the snout endpoint, eye key points, and head vertex.
[0035] According to an embodiment of the present invention, the step of correcting the position of the snout endpoint specifically includes: Connect the key point E of the eye with the tip of the nose. The direction of the line connecting the snouts is set to the direction the snout points. Starting from E, along the stated direction with a standard offset distance Projection yields correction candidate points ; Correct candidate points and the tip of the snout Weighted fusion is performed to obtain the final snout endpoint. .
[0036] It should be noted that the standard offset distance... The actual offset direction is set to Its formula is The correction candidate points ,in" " indicates multiplication.
[0037] A second aspect of the present invention provides a dense anchovy pose detection system, comprising a memory and a processor, wherein the memory stores a program for a dense anchovy pose detection method, and the processor executes the program to implement the dense anchovy pose detection method as described in any one of the preceding claims.
[0038] This invention discloses a method and system for detecting the pose of dense anchovies. The method includes: acquiring an image to be detected containing a dense anchovy group; extracting and fusing multi-scale features of the image to obtain a fused feature map; extracting the morphological features of the anchovies in the fused feature map and generating an adaptive pixel-level segmentation mask based on the morphological features of the anchovies; segmenting the dense anchovy group based on the pixel-level segmentation mask to obtain individual anchovy masks; extracting the overall contour features of the anchovies based on the individual anchovy masks, obtaining the torso contour through ellipse fitting, and locating the core key points of the head based on a preset key point detection algorithm; determining the bounding box of the head region based on the coordinates of the core key points of the head to achieve accurate head positioning. This invention provides accurate positioning for subsequent anchovy dissection by accurately identifying dense anchovy groups.
[0039] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0040] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0041] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0042] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0043] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, 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 cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
Claims
1. A method for detecting the pose of dense anchovies, characterized in that, include: The image to be detected containing a dense school of anchovies is acquired, multi-scale features of the image are extracted and fused to obtain a fused feature map; Extract the morphological features of anchovies from the fused feature map, and generate an adaptive pixel-level segmentation mask based on the morphological features of anchovies. Based on pixel-level segmentation masks, dense anchovy groups are segmented to obtain individual anchovy masks. Based on the individual masks of the segmented anchovies, the overall contour features of the anchovies are extracted, the torso contour is obtained by ellipse fitting, and the core key points of the head are located based on the preset key point detection algorithm. Based on the coordinates of the core key points of the head, the bounding box of the head region is determined to achieve precise head positioning.
2. The method for detecting the pose of dense anchovies according to claim 1, characterized in that, For anchovies that are obscured, this also includes: If the head is not obscured, segmentation and localization are achieved through head features to obtain a complete anchovy segmentation mask; If completely obscured, its existence is determined and preliminarily located based on the distribution patterns and morphological characteristics of adjacent anchovies, thus obtaining the complete anchovy individual segmentation mask.
3. The method for detecting the pose of dense anchovies according to claim 2, characterized in that, The step of segmenting and locating the anchovy individual by using its head features if the head is not obscured, and obtaining the complete anchovy segmentation mask, specifically includes: Extract the morphological features of the head contour; The morphological features of the head contour are compared and analyzed with preset morphological features to determine the morphological feature similarity value. If the similarity value of the morphological feature is greater than the preset similarity threshold, then the orientation direction vector corresponding to the preset morphological feature is set as the orientation direction vector of the head contour. Using the opposite direction of the orientation vector of the head contour as the expansion direction, constrained by the body proportion of the anchovy's body length to body width ratio, and using the anchovy's torso corresponding to the preset morphological features as the expansion of this anchovy, a complete anchovy individual segmentation mask is obtained.
4. The method for detecting the pose of dense anchovies according to claim 2, characterized in that, If completely obscured, the step of determining the existence and preliminary location of anchovies based on the distribution patterns and morphological characteristics of adjacent anchovies to obtain a complete anchovy individual segmentation mask specifically includes: Extract all visible anchovy individuals from the same frame image, and calculate their average body length, average body width, and average distance between individuals; Determine the anchovy's body proportions based on the average length and width of the anchovies; Extract the occluded area and search for potential target areas within the occluded area that match the anchovy's body size proportions and inter-individual spacing; Extract features from potential target regions and construct confidence scores based on the features of the potential target regions; If the confidence level is greater than the preset confidence level threshold, the geometric center of the potential target area is used as the initial positioning position, and the streamline curve of the anchovy corresponding to the average body length and average body width is used to construct the segmentation mask of the complete anchovy individual.
5. The method for detecting the pose of dense anchovies according to claim 1, characterized in that, The step of obtaining the torso contour through ellipse fitting specifically includes: Contour tracing is performed on the individual anchovy masks after segmentation to obtain an ordered set of contour points; Based on the preset least squares method, the points of the ordered contour are fitted to an ellipse, and the ellipse parameters are solved. The ellipse parameters include at least the length of the major axis, the length of the minor axis, the direction angle of the major axis, and the coordinates of the center point; the direction angle of the major axis represents the direction of the central axis of the anchovy's body. If the ratio of the major axis length to the minor axis length is within the preset range, the corresponding ellipse is fitted normally, and the fitted ellipse is set as the anchovy body outline. If the ratio of the major axis length to the minor axis length is not within the preset range, the mask for the anchovy individual will be corrected.
6. The method for detecting the pose of dense anchovies according to claim 5, characterized in that, The step of correcting the individual anchovy mask specifically includes: If the ratio of the major axis length to the minor axis length is greater than a preset range, the current mask is determined to be too thin and elongated. The correction steps are as follows: apply an outward expansion offset to the mask contour points along the minor axis of the ellipse, with the expansion amount... Simultaneously, an inward contraction offset is applied to the contour points at both ends of the major axis, with an offset magnitude of [missing value]. Where L represents the length of the major axis, W represents the length of the minor axis, k is the preset ratio of the major axis to the minor axis, and a is the floating coefficient; If the ratio of the major axis length to the minor axis length is less than a preset range, the current mask is determined to be too short and wide. The correction steps are as follows: apply an outward stretching offset to the mask contour points along the major axis of the ellipse, with the stretching amount being... Simultaneously, an inward compression offset is applied to the contour points at both ends of the minor axis, with a compression magnitude of [value missing]. .
7. The method for detecting the pose of dense anchovies according to claim 1, characterized in that, The steps for locating the core key points of the head based on the preset key point detection algorithm specifically include: Based on the torso contour obtained by ellipse fitting, the region where one endpoint of the major axis of the ellipse is located is determined as the candidate head region. Within the candidate head region, the coordinate positions of the snout endpoint, key eye points, and head apex are predicted respectively. Using the key eye point E as the reference origin, a local coordinate system for the head is constructed, and the muzzle endpoint is calculated. The coordinate position relative to the actual offset vector of E And calculate the actual offset vector. Mahalanobis distance of the confidence ellipse deviating from the standard position ; Determine the Mahalanobis distance If the value is less than or equal to a preset confidence threshold, then the position of the core key point of the anchovy's head is normal; otherwise, the position of the snout tip is corrected.
8. The method for detecting the pose of dense anchovies according to claim 7, characterized in that, The step of correcting the position of the snout endpoint specifically includes: Connect the key point E of the eye with the tip of the nose. The direction of the line connecting the snouts is set to the direction the snout points. Starting from E, along the stated direction with a standard offset distance Projection yields correction candidate points ; Correct candidate points and the tip of the snout Weighted fusion is performed to obtain the final snout endpoint. .
9. A dense anchovy pose detection system, characterized in that, The device includes a memory and a processor, wherein the memory stores a program for a dense anchovy pose detection method, and the processor executes the program to implement the dense anchovy pose detection method as described in any one of claims 1 to 8.
