An aquatic seedling counting and growth parameter measuring system
By employing a collaborative system of adaptive density map generation, multi-scale feature extraction, overlap evaluation, and closed-loop optimization, the problems of inaccurate counting and low measurement precision in aquatic seedling counting and growth parameter measurement are solved, achieving high accuracy and robustness of the system in complex environments.
Patent Information
- Application Number
- CN202511735213.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-11-25
AI Technical Summary
Existing aquatic seedling counting and growth parameter measurement systems suffer from inaccurate counting, low measurement accuracy, and poor system robustness when faced with dynamic changes in density, severe individual overlap, and a lack of adaptive mechanisms in the processing flow.
A deeply coupled collaborative system is adopted, which integrates adaptive density map generation, multi-scale feature extraction, overlap evaluation, feature fusion weight calculation, and closed-loop optimization. Through image acquisition module, adaptive density map generation module, multi-scale feature extraction module, overlap evaluation module, feature fusion weight calculation module, and closed-loop optimization module, dynamic adjustment and feedback mechanisms are realized to improve the system's adaptability and accuracy.
The system significantly improves counting accuracy, overlap separation capability, and growth parameter measurement accuracy in high-density, high-overlap, and multi-dynamic interference scenarios, and enhances its robustness across species and environments.
Smart Images

Figure CN121190891B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent monitoring of aquaculture, and particularly relates to a system for counting and measuring growth parameters of aquatic seedlings. BACKGROUND
[0002] The counting and growth parameter measurement of aquatic seedlings is a basic link in the production of aquatic seedling culture, and is directly related to key processes such as feeding management, breeding density regulation, survival rate evaluation and quality grading. The current manual sampling counting method has problems such as low efficiency, large error and poor repeatability, and manual intervention can easily cause stress to the larvae, affecting the survival rate. Therefore, the automatic counting method based on image processing has gradually become an important direction for intelligent management of aquatic seedling culture.
[0003] With the development of deep learning and computer vision technology, some researches have begun to apply convolutional neural networks to detect and segment fry or shrimp larvae. For example, CN114612397A provides a method for sorting fry by using zoom imaging, image preprocessing, threshold segmentation and target detection model, and then classifying and sorting based on feature information. Although this type of scheme has certain effect on static or medium density scenes, it still has the following technical deficiencies:
[0004] 1. Linear process limits system adaptability. The existing methods generally adopt a linear process of image acquisition, preprocessing, feature extraction and analysis decision, and lack parameter-level and state-level linkage between modules. The processing strategy of the front-end module cannot be dynamically adjusted according to the subsequent results, resulting in performance degradation under complex conditions such as changes in light, fluctuations in density, motion blur or turbidity of water.
[0005] 2. Processing modules are independent and lack a collaborative mechanism. Traditional image preprocessing, local feature extraction and target detection modules are run in an independent manner, and only the results are transmitted between modules, lacking a parameter adjustment mechanism based on feedback. When the density distribution of the seedlings changes greatly, the fixed strategy of preprocessing and feature extraction cannot achieve cross-scene stability.
[0006] 3. Lack of density adaptive processing mechanism. The density of actual seedlings changes significantly in the flow channel, with high overlap of individuals in high-density areas and dispersion of individuals in low-density areas. Existing methods usually use fixed kernel functions or fixed scale models to generate density maps, which are not sensitive enough to density dynamics, and are prone to adhesion errors in high-density areas and missed detection in low-density areas.
[0007] 4. Single feature extraction scale, difficult to balance global and details. The body length of seedlings differs significantly at different growth stages, and the sizes of individuals are uneven. In fixed scale networks, the global contour of large individuals is easily truncated, and the detailed texture features of small individuals are easily lost; the blurred boundaries of overlapping individuals also lead to segmentation errors.
[0008] 5、Overlap region separation capability is insufficient, in high-density scenes, seedling boundaries often appear to be stuck, semantic segmentation networks are difficult to correctly distinguish overlap regions, existing methods generally do not introduce a special overlap evaluation mechanism, resulting in low individual separation accuracy.
[0009] 6、Lack of closed-loop optimization mechanism, the system cannot be updated adaptively, existing systems are mostly open-loop structures, module parameters are fixed, and automatic learning cannot be performed according to real running effects. When facing different varieties, different densities, different light and water conditions, manual recalibration is required, and the actual deployment cost is high and the robustness is insufficient.
[0010] In view of this, the present application provides a kind of aquatic seedling counting and growth parameter measurement system. SUMMARY
[0011] The purpose of the present application is to provide an aquatic seedling counting and growth parameter measurement system, to solve the problems of inaccurate counting, low measurement accuracy and poor system robustness caused by dynamic density changes, serious individual overlap and lack of adaptive mechanism in the existing aquatic seedling counting and growth parameter measurement.
[0012] In the first aspect, the present application provides an aquatic seedling counting and growth parameter measurement system, comprising:
[0013] An image acquisition module for acquiring a sequence of seedling flow images and generating an image confidence score based on image sharpness, contrast and noise level;
[0014] An adaptive density map generation module coupled with the image acquisition module for dynamically selecting kernel function width to generate a density map based on the image confidence score and extracting a density distribution feature vector;
[0015] A multi-scale feature extraction module coupled with the adaptive density map generation module for dynamically determining the receptive field range of different scales based on the density distribution feature vector, extracting global morphology, local edge and detail texture features at multiple scales to generate a multi-scale feature pyramid;
[0016] An overlap evaluation module coupled with the multi-scale feature extraction module for identifying seedling boundary contact regions and calculating spatial overlap indicators based on the multi-scale feature pyramid;
[0017] A feature fusion weight calculation module deeply coupled with the overlap evaluation module and the multi-scale feature extraction module for adaptively assigning multi-scale feature fusion weights based on the spatial overlap indicators;
[0018] A counting and measurement module for performing seedling counting and growth parameter measurement based on fused features;
[0019] The closed loop optimization module is coupled with the adaptive density map generation module, the feature fusion weight calculation module and the counting and measuring module, and is used for respectively adjusting the kernel function width and the fusion weight in reverse according to the performance deviation index, so as to form a closed loop feedback path of parameter update.
[0020] As a preferred technical solution of the present application, the adaptive density map generation module further comprises:
[0021] According to the image confidence score, the image is classified into a high confidence, a medium confidence or a low confidence category; and a step of performing local modulation on the kernel function width based on the local density peak value of the density map is included, and the step comprises:
[0022] Calculating the local density peak value of the neighborhood of each pixel of the density map;
[0023] Comparing the local density peak value with a preset peak value interval;
[0024] Performing shrinkage processing on the kernel function width when the local density peak value is in a first interval;
[0025] Performing expansion processing on the kernel function width when the local density peak value is in a second interval;
[0026] Outputting the locally modulated kernel function width, so that the kernel function width is consistent with the local density structure.
[0027] As a preferred technical solution of the present application, the multi-scale feature extraction module comprises calculating the receptive field range of different scales based on the density distribution feature vector; the generation step of the receptive field range comprises:
[0028] Calculating the density gradient change amount in the density distribution feature vector;
[0029] Determining the receptive field range of a first scale based on the density gradient change amount;
[0030] Determining the receptive field range of a second scale according to the local density dispersion degree;
[0031] Determining the receptive field range of a third scale according to the density peak value interval;
[0032] Performing consistency check on the three-scale receptive field range, so that the generated three-scale receptive field range can be used for constructing the multi-scale feature pyramid.
[0033] As a preferred technical solution of the present application, the overlap degree evaluation module comprises a step of performing multi-channel boundary structure analysis on the local edge features in the multi-scale feature pyramid, comprising:
[0034] Extracting the boundary extension length of the edge features in the horizontal channel;
[0035] extracting edge features in the vertical channel to form a boundary connected pattern;
[0036] constructing a boundary contact area based on the intersection nodes of the horizontal and vertical channels;
[0037] calculating the ratio of the boundary contact area to the average area of the seed region;
[0038] outputting the ratio as a spatial overlap index for use by the feature fusion weight calculation module.
[0039] As a preferred technical solution of the present application, the overlap evaluation module further comprises a step of constructing a three-dimensional boundary voxelized structure based on the multi-scale feature pyramid to resolve local overlap relationships, which comprises:
[0040] mapping local edge features to a two-dimensional coordinate grid to form initial boundary segments;
[0041] constructing a voxelized unit by stacking boundary segments in the vertical direction based on the density distribution feature vector;
[0042] calculating the common projection area between adjacent voxelized units to form a voxel overlap segment;
[0043] performing a ratio structured operation on the voxel overlap segment and the average area of the seed region;
[0044] outputting the ratio as a supplementary spatial overlap index for use by the feature fusion weight calculation module.
[0045] As a preferred technical solution of the present application, the feature fusion weight calculation module comprises a step of constructing a three-stage scale weight sequence based on the spatial overlap index, which comprises:
[0046] performing interval classification on the spatial overlap index to obtain a first interval, a second interval and a third interval;
[0047] constructing a weight sequence mainly based on the third scale feature in the first interval;
[0048] constructing a weight sequence mainly based on the second scale feature in the second interval;
[0049] constructing a weight sequence mainly based on the first scale feature in the third interval;
[0050] outputting the complete scale weight sequence for subsequent fusion.
[0051] As a preferred technical solution of the present application, the feature fusion weight calculation module further comprises a weight regression sequence construction step based on region similarity, which comprises:
[0052] Map each scale feature in the multi-scale feature pyramid to a unified feature space;
[0053] Calculate the region similarity between different scale features and construct a similarity matrix;
[0054] Perform row normalization processing on the similarity matrix to form a regression input sequence;
[0055] Calculate the regression weight corresponding to each scale feature based on the regression input sequence;
[0056] Output the regression weight as the supplementary fusion weight of the feature fusion weight calculation module.
[0057] As a preferred technical solution of the present application, the counting and measuring module includes the step of generating a parameter extraction sequence based on the fusion feature, which includes:
[0058] Generate an initial mask based on the segmentation of the seedling area based on the fusion feature;
[0059] Perform contour structure extraction on the initial mask to determine the body length measurement line;
[0060] Construct a body height measurement area based on the body length measurement line;
[0061] Perform area calculation on the internal region of the mask to obtain the local area area;
[0062] Output the parameter sequence containing the body length, body height and area as the growth parameters.
[0063] As a preferred technical solution of the present application, the counting and measuring module further includes the step of performing measurement based on the hierarchical mask topology, which includes:
[0064] Perform a topological layering operation on the initial mask to obtain a main body layer and a local layer;
[0065] Extract the main axis direction in the main body layer as the body length measurement baseline;
[0066] Extract the local structure contour in the local layer to form a body height measurement area;
[0067] Construct a morphological parameter combination based on the topological relationship of the main body layer and the local layer;
[0068] Output the combined parameter sequence containing the body length and the body height as the growth parameter structure item.
[0069] As a preferred technical solution of the present application, the closed-loop optimization module further includes the step of constructing an error sample multi-mode joint update path, which includes:
[0070] Perform density map mode analysis on the error sample to obtain a density error segment;
[0071] performing overlap degree mode analysis on the error samples to obtain overlapping error segments;
[0072] constructing a kernel function width update sequence based on the density error segments;
[0073] constructing a fusion weight update sequence based on the overlapping error segments;
[0074] outputting the update sequence for simultaneously updating parameters of the adaptive density map generation module and the feature fusion weight calculation module
[0075] In the above technical solution, the present application provides technical effects and advantages:
[0076] The present application forms a deep coupling and collaborative system of adaptive density map generation, multi-scale feature extraction, overlap evaluation, feature fusion weight calculation and closed-loop optimization, so that the output of the upstream module can directly control the parameters and processing strategies of the downstream module, and the downstream results can correct the upstream parameters in reverse, thereby forming a dynamic processing mechanism of density-driven, overlap-aware, feature-collaborative and error feedback interaction. Under this mechanism, the adaptive generation of the density map improves the stability of the density estimation under light changes and noise environments, the multi-scale feature realizes targeted fusion under the driving of the overlap index to improve the separation ability of the overlapping targets, and the closed-loop feedback optimization further makes the parameters of each module automatically converge to the optimal value with the running results, thereby significantly improving the counting accuracy, overlap separation ability, growth parameter measurement precision and cross-species, cross-environment robustness of the system in high-density, strong overlap and multi-dynamic interference scenes, and achieving the overall performance improvement that the existing linear process and module independent architecture cannot achieve. BRIEF DESCRIPTION OF DRAWINGS
[0077] To more clearly illustrate the technical solutions in the embodiments or the prior art, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings described below are only some embodiments described in the present application, and other drawings can also be obtained by those skilled in the art based on these drawings.
[0078] Figure 1 FIG. 1 is a schematic diagram of the overall architecture of the aquatic fry counting and growth parameter measurement system of the present application;
[0079] Figure 2 FIG. 3 is a schematic diagram of the workflow of the adaptive density map generation module of the present application;
[0080] Figure 3 FIG. 5 is a schematic diagram of the collaborative mechanism of multi-scale feature extraction and fusion of the present application;
[0081] Figure 4 FIG. 7 is a schematic diagram of the coupling relationship between overlap evaluation and feature fusion weight calculation of the present application;
[0082] Figure 5 The feedback adjustment flowchart of the closed-loop optimization module of the present application. DETAILED DESCRIPTION
[0083] For the purpose, technical solutions and advantages of the present application, the technical solutions in the embodiments of the present application will be described in more detail below in combination with the drawings in the embodiments of the present application.
[0084] In the drawings, the same or similar reference numbers represent the same or similar elements or elements having the same or similar functions throughout. The described embodiments are part of the embodiments of the present application, rather than all the embodiments. The embodiments described below by referring to the drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application. The embodiments of the present application will be described in detail below in combination with the drawings.
[0085] Embodiment 1
[0086] Please refer to Figure 1 As shown in the figure, the present embodiment provides an aquatic seedling counting and growth parameter measuring system, which comprises an image acquisition module 1, an adaptive density map generation module 2, a multi-scale feature extraction module 3, an overlap evaluation module 4, a feature fusion weight calculation module 5, a counting and measuring module 6 and a closed-loop optimization module 7.
[0087] The image acquisition module 1 is used to acquire a sequence of seedling flow images and generate an image confidence score based on an image quality evaluation index. Specifically, the image acquisition module 1 uses a high-speed CMOS camera with a resolution of 2048x2048 pixels, a frame rate of 60fps to 120fps adjustable, and is equipped with an LED ring light source to provide uniform illumination, with a color temperature of 5500K to 6500K and an illuminance of 1000lux to 2000lux. The width of the seedling flow channel is 200mm to 300mm, and the water depth is controlled at 20mm to 50mm, ensuring that the seedlings flow through the imaging area in a single layer distribution state.
[0088] The image quality evaluation adopts a multi-index fusion strategy. First, the image sharpness index is calculated, which uses the Tenengrad gradient function to evaluate the image sharpness:
[0089] ,
[0090] Wherein: is the sharpness index, and are the number of rows and columns of the image, respectively, and are the horizontal and vertical gradients at pixel point , respectively, which are calculated by Sobel operator.
[0091] Secondly, the image contrast index is calculated, using the Michelson contrast formula:
[0092] ,
[0093] wherein: is the contrast index, and are the maximum and minimum gray values of the image, respectively.
[0094] Thirdly, the image noise level index is calculated, using the local standard deviation statistical method:
[0095] ,
[0096] wherein: is the noise level index, is the number of image blocks (usually 64 to 256), is the standard deviation of the pixel gray values in the th image block.
[0097] Finally, the image confidence score is calculated based on the above three indexes:
[0098] ,
[0099] wherein: is the image confidence score, , , are the weight coefficients, taking 0.5, 0.3, and 0.2, respectively, , , are the reference values, which are obtained according to the standard sample statistics. The image confidence score ranges from 0 to 1, and the higher the score, the better the image quality.
[0100] According to the image confidence score, the images are divided into three levels: high-confidence images , medium-confidence images , and low-confidence images .
[0101] The adaptive density map generation module 2 is coupled with the image acquisition module 1, and is used to dynamically adjust the density map generation strategy based on the image confidence score. Different kernel function widths are used to generate density maps for images with different confidence levels, and the density distribution feature vector is output. See Figure 2The core function of the adaptive density map generation module 2 is to convert the input image into a density map, and the value of each pixel point in the density map represents the seedling density at the position.
[0102] The adaptive density map generation uses a Gaussian kernel function to calculate the density value. For the seedling center point detected in the image , the density contribution of the surrounding pixel points to the seedling center point is:
[0103] ,
[0104] wherein: is the density value of the pixel point , is the standard deviation of the Gaussian kernel function (i.e. the kernel function width parameter), which controls the diffusion range of the density distribution.
[0105] The key innovation of the present application lies in adaptively adjusting the kernel function width according to the image confidence score. For high-confidence images , a smaller kernel function width to pixels is used to preserve fine density distribution information; for medium-confidence images , a medium kernel function width to pixels is used to balance accuracy and robustness; for low-confidence images , a larger kernel function width to pixels is used to enhance the robustness to noise and blur.
[0106] The adaptive mapping relationship between the kernel function width and the image confidence score is:
[0107] ,
[0108] The complete density map of the image is obtained by superimposing the density contributions of all seedling center points:
[0109] ,
[0110] wherein: is the total density value of the pixel point , is the number of seedling individuals in the image, is the density contribution of the th seedling to the pixel point.
[0111] After generating the density map, the adaptive density map generation module 2 further extracts the density distribution feature vector. The density distribution feature vector includes five key features: density peak location, density distribution standard deviation, density distribution skewness, density distribution kurtosis, and the location of the maximum density gradient.
[0112] Density peak location Defined as the coordinates of the pixel with the highest density value in the density map:
[0113] ,
[0114] Density distribution standard deviation Reflects the degree of dispersion of the density distribution:
[0115] ,
[0116] in: This represents the average density value of the density map. .
[0117] density distribution skewness Reflecting the asymmetry of density distribution:
[0118] ,
[0119] Density distribution kurtosis Reflecting the sharpness of the density distribution:
[0120] ,
[0121] Location of maximum density gradient Defined as the coordinates of the pixel with the largest gradient magnitude in the density map, this location typically corresponds to the boundary region of an individual seedling:
[0122] ,
[0123] in: and Density map at pixel points The horizontal and vertical gradients at the location.
[0124] The above five features are combined into a density distribution feature vector:
[0125] ,
[0126] The density distribution characteristic vector As the core output of the adaptive density map generation module 2, it is passed to the downstream multi-scale feature extraction module 3 to establish a parameter-level coupling relationship between the two modules.
[0127] The multi-scale feature extraction module 3 is coupled with the adaptive density map generation module 2, and is used to determine the receptive field range of feature extraction based on the density distribution feature vector, extract seedling morphological features at at least three different scales, and generate a multi-scale feature pyramid. Referring to Figure 3 The multi-scale feature extraction module 3 adopts an encoder-decoder architecture, and the encoder part extracts features at three different scales, and the decoder part performs feature upsampling and fusion.
[0128] The key innovation of the present application is to dynamically determine the receptive field range of each scale based on the density distribution feature vector. The standard deviation of the density distribution reflects the dispersion degree of the seedling distribution, and this parameter is directly used to adjust the receptive field range:
[0129] The receptive field range of the first scale (global scale) is :
[0130] ,
[0131] wherein: is the basic receptive field radius, taking 64 to 128 pixels, is the adjustment coefficient, taking 0.3 to 0.5. When the dispersion degree of the density distribution is large, is increased, and the receptive field range of the global scale is correspondingly expanded to capture the seedling distribution information in a wider spatial range.
[0132] The receptive field range of the second scale (local scale) is :
[0133] ,
[0134] wherein: is the adjustment coefficient, taking 0.2 to 0.3. The receptive field range of the local scale is about 50% to 70% of the global scale.
[0135] The receptive field range of the third scale (detail scale) is :
[0136] ,
[0137] wherein: is the adjustment coefficient, taking 0.1 to 0.2. The receptive field range of the detail scale is about 25% to 40% of the global scale.
[0138] After determining the receptive field range of each scale, the multi-scale feature extraction module 3 extracts seedling morphological features at three scales respectively. A depth separable convolutional network is adopted as the feature extraction backbone network, and the network depth is 16 to 24 layers, containing 5 down-sampling stages, and the feature map resolution is halved and the channel number is doubled after each stage.
[0139] First scale feature extraction: feature maps are extracted after the third downsampling stage , with a resolution of and 256-512 channels. This scale feature mainly captures the global morphological information of seedlings, including overall contour, posture direction, and group distribution pattern.
[0140] Second scale feature extraction: feature maps are extracted after the second downsampling stage , with a resolution of and 128-256 channels. This scale feature mainly captures the local edge information of seedlings, including head boundary, tail boundary, and body surface contour.
[0141] Third scale feature extraction: feature maps are extracted after the first downsampling stage , with a resolution of and 64-128 channels. This scale feature mainly captures the detailed texture information of seedlings, including body surface texture, fin detail, and eye point feature.
[0142] Three scale feature maps , , constitute a multi-scale feature pyramid:
[0143] ,
[0144] This multi-scale feature pyramid serves as the output of the multi-scale feature extraction module 3, and is transmitted to the overlap evaluation module 4 and the feature fusion weight calculation module 5, establishing a coupling relationship between modules.
[0145] The overlap evaluation module 4 is coupled with the multi-scale feature extraction module 3, and is used to calculate the spatial overlap index between seedling individuals based on the multi-scale feature pyramid, and identify the distribution proportion of dense and sparse areas. Referring to Figure 4 The core function of the overlap evaluation module 4 is to analyze the spatial position relationship between seedling individuals and quantify the degree of overlap between individuals.
[0146] Overlap evaluation is mainly based on the second scale feature map , because this scale achieves a good balance between spatial resolution and semantic information, making it most suitable for boundary analysis. First, the feature map is subjected to channel attention weighting to enhance edge response:
[0147] ,
[0148] wherein: is the edge-enhanced feature map, This represents element-wise multiplication. The channel attention weights are calculated using global average pooling and 1×1 convolution.
[0149] Then, the edge enhancement feature map is binarized to obtain the foreground mask of the individual seedling:
[0150] ,
[0151] in: Foreground mask, For indicator functions, The threshold value is determined using the Otsu adaptive thresholding method for binarization.
[0152] Connectivity analysis is performed on the foreground mask to extract each connected region as a candidate seedling individual:
[0153] ,
[0154] in: for A connected region, Indicates the first A set of pixels in a connected region.
[0155] For any two adjacent connected regions and Calculate their spatial overlap:
[0156] ;
[0157] in: For the region and Spatial overlap The area of the intersection of the two regions. and These represent the areas of the two regions. The overlap value ranges from 0 to 1, where 0 indicates that the two regions do not overlap at all, and 1 indicates that the two regions completely overlap.
[0158] Calculate the average spatial overlap index of the entire map:
[0159] ;
[0160] in: This is an index of average spatial overlap. The set of all adjacent pairs of regions. This represents the number of adjacent region pairs.
[0161] Based on spatial overlap index, image regions are divided into three categories: high overlap regions ( ), overlapping regions ( ) and low overlap region ( ). The area proportion of each type of region is counted:
[0162] ,
[0163] wherein: , , are the area proportions of high overlap region, medium overlap region and low overlap region respectively, , , are the total areas of each type of region, is the total area of the image.
[0164] The spatial overlap index and the region distribution proportion are output by the overlap evaluation module 4 and are transmitted to the feature fusion weight calculation module 5, thereby establishing a deep coupling relationship between the two modules.
[0165] The feature fusion weight calculation module 5 is deeply coupled with the overlap evaluation module 4 and the multi-scale feature extraction module 3, and is used to determine the fusion weights of the features at each scale based on the spatial overlap index. The core innovation of the present application is to design an adaptive weight distribution strategy based on overlap, thereby realizing an intelligent mechanism for dynamically adjusting the feature fusion weights according to the overlap.
[0166] For the three scale features in the multi-scale feature pyramid , , , the fusion weights , , are dynamically calculated according to the spatial overlap index:
[0167] ,
[0168] wherein: , , are the fusion weights of the features at the first scale (global scale), the second scale (local scale) and the third scale (detail scale) respectively, is the average spatial overlap index, is the overlap threshold value, which is taken as 0.35 to 0.45, is the slope coefficient, which controls the degree of weight change, and is taken as 8 to 12.
[0169] The design idea of the above weight calculation formula is as follows:
[0170] When , i.e. the image is in a high overlap state, the weight of the detail feature needs to be enhanced to improve the individual separation ability. At this time Significantly greater than 1 Approaching 1, When the value approaches 0, the system automatically increases the weight of fine-grained features (third scale) and decreases the weight of coarse-grained features (first scale).
[0171] when When the images are in a low-overlap state, it is necessary to enhance the weights of global features to improve overall recognition stability. Significantly less than 1, Approaching 1, When the value approaches 0, the system automatically increases the weight of coarse-grained features (first scale) and decreases the weight of fine-grained features (third scale).
[0172] when At this point, when the images are in a state of moderate overlap, the weights of the three scale features are nearly evenly distributed. to , to , to .
[0173] Based on the calculated fusion weights, a weighted fusion is performed on the multi-scale feature pyramid. First, the feature maps from the three scales are upsampled to a uniform resolution (usually a fraction of the original image resolution). Then, a weighted summation is performed:
[0174] ,
[0175] in: The fused feature map Indicates an upsampling operation. This indicates a downsampling operation, implemented using bilinear interpolation.
[0176] Fusion Feature Map It incorporates complementary information from multiple scales, preserving rich detailed texture features in highly overlapping regions and stable global morphological features in low-overlapping regions, achieving a synergistic effect of 1+1>2.
[0177] The counting and measurement module 6 performs seedling counting and growth parameter measurement based on fused features. First, the fused feature map... Semantic segmentation is performed to generate segmentation masks for individual seedlings. A fully convolutional network is used as the segmentation network, and the network output is a binary mask with foreground pixels having a value of 1 and background pixels having a value of 0.
[0178] Connectivity analysis is performed on the segmentation mask to extract individual seedlings:
[0179] ,
[0180] in: for Segmentation mask for each individual seedling Indicates the first A collection of pixels for each individual seedling.
[0181] Seedling count results Equal to the number of segmentation masks:
[0182] ,
[0183] For each individual seedling Growth parameters were extracted. These parameters included body length. , body height Head area Tail area and body surface projection area .
[0184] Body surface projection area Equal to the number of pixels in the seedling mask:
[0185] ,
[0186] Body length of individual seedlings Defined as the length of the longest side of the largest bounding rectangle of the individual mask:
[0187] ,
[0188] in: and The first The width and height of the minimum bounding rectangle for each individual seedling.
[0189] Individual height of seedlings Defined as the length of the shorter side of the largest bounding rectangle of this individual mask:
[0190] ,
[0191] The head and tail regions were segmented using a morphological analysis-based method. First, the skeleton lines of the seedling individual mask were calculated, with the two endpoints corresponding to the center of the head and the center of the tail, respectively. Then, a circular region centered at the head center and with a radius of 25% of the body length was designated as the head region, and a circular region centered at the tail center and with a radius of 20% of the body length was designated as the tail region. The head region area... and tail area These represent the number of pixels within the corresponding area.
[0192] Based on the growth parameters of various individual seedlings, the growth evenness index of the population was calculated. Growth evenness was expressed using the coefficient of variation (CV).
[0193] ,
[0194] in: As an indicator of growth uniformity, The standard deviation of body length, This represents the average body length. A smaller coefficient of variation indicates a more uniform population growth; a larger coefficient of variation indicates greater variation in individual size within the population.
[0195] Simultaneously, the skewness and kurtosis of the body length distribution are calculated to reflect the asymmetry and concentration of population growth distribution:
[0196] ,
[0197] Module 6 of the counting and measurement module outputs the seedling count results. Set of growth parameters for each individual organism and population statistics (mean body length) Standard deviation of body length Coefficient of variation skewness kurtosis ).
[0198] The closed-loop optimization module 7 is coupled with the counting and measurement module 6, the feature fusion weight calculation module 5, and the adaptive density map generation module 2. This coupling is used to calculate performance deviation indicators based on counting accuracy and measurement precision, and to adjust the parameters of the preceding modules in reverse according to the characteristics of the error samples, forming a closed-loop feedback path for parameter optimization. (See also...) Figure 5 The closed-loop optimization module 7 enables the system to adapt to learning.
[0199] The core idea of closed-loop optimization is to identify performance bottlenecks based on the accuracy of counting and measurement results, adjust the key parameters of the front-end modules in a targeted manner, and bring the system to the optimal working state through multiple rounds of closed-loop iteration.
[0200] First, the closed-loop optimization module 7 evaluates the counting accuracy. The system counting results are then analyzed. Compared with the actual count marked by humans Compare the results and calculate the counting error rate:
[0201] ,
[0202] in: This is the counting error rate. When... Time (error threshold) Generally, the system counting accuracy is considered to be substandard and needs to be optimized when the counting error rate is greater than 2% to 5%.
[0203] Secondly, the closed-loop optimization module 7 evaluates the measurement accuracy. The seedling body length measured by the system is compared with the true body length measured manually . The measurement error is calculated:
[0204] ,
[0205] Wherein: is the average measurement error rate. When the measurement error threshold is generally 3% to 6%, the system measurement accuracy is considered to be substandard and needs to be optimized.
[0206] When the counting error rate or the measurement error rate exceeds the threshold, the closed-loop optimization module 7 starts the error sample analysis process. The error sample is defined as the image or individual with a large deviation between the counting result or the measurement result and the true value.
[0207] For the counting error sample, the density distribution characteristics are analyzed. The difference between the density map of the error sample and the true density map is calculated:
[0208] ,
[0209] Wherein: is the density map difference, and are the density values of the predicted density map and the true density map at the pixel point , respectively.
[0210] When the density map difference is large, it indicates that the kernel function width parameter of the adaptive density map generation module 2 is not properly set and needs to be adjusted. The closed-loop optimization module 7 adjusts the kernel function width of the corresponding confidence level according to the image confidence score of the error sample:
[0211] ,
[0212] Wherein: is the adjusted kernel function width, is the kernel function width before adjustment, is the adjustment step, generally 1 to 3 pixels, is the sign function. When , it indicates that the predicted density is too high and the kernel function width needs to be reduced; when , it indicates that the predicted density is too low and the kernel function width needs to be increased.
[0213] For the measurement error samples, analyze their overlap characteristics. Calculate the spatial overlap index of the area where the error samples are located, and identify whether it is in a high overlap area. If the error samples are mainly concentrated in the high overlap area, it means that the feature fusion weight calculation module 5 is insufficient in the detail feature weight in the high overlap scene, and the weight coefficient of the third scale feature needs to be increased.
[0214] The closed-loop optimization module 7 adjusts the overlap threshold in the feature fusion weight calculation formula and the slope coefficient :
[0215] ,
[0216] wherein: is the threshold adjustment amount, taking -0.02 to 0.02, is the slope adjustment amount, taking -1 to 1. The adjustment direction is determined according to the overlap distribution characteristics of the error samples.
[0217] After parameter adjustment, the closed-loop optimization module 7 returns the system to process the image again, calculates the new count and measurement result, and evaluates whether the performance is improved. This process forms a complete closed-loop iteration:
[0218] Initial state: the adaptive density map generation module 2 adopts the initial kernel function width parameter , and the feature fusion weight calculation module 5 adopts the initial weight parameter ;
[0219] First iteration: image acquisition → density map generation → feature extraction → overlap evaluation → feature fusion → count measurement → performance evaluation → error sample identification → analysis of density characteristics and overlap characteristics → adjustment of kernel function parameters and weight parameters;
[0220] Second iteration: reprocessing based on adjusted parameters → generating new count measurement results → evaluating performance improvement → if the performance meets the standard, stop iteration, otherwise continue to adjust the parameters;
[0221] Nth iteration: repeat the above process until the termination condition is met (the performance meets the standard or the number of iterations reaches the upper limit, usually 3 to 5 rounds).
[0222] Experimental verification shows that after 3 to 5 rounds of closed-loop iteration, the system count accuracy rate is improved from the initial 85% to 88% to more than 98%, and the measurement error is reduced from the initial 7% to 9% to less than 3%, and the performance is significantly improved.
[0223] Embodiment 2:
[0224] To verify the technical effect of the present application, a counting and measuring experiment based on Cyprinidae fry was conducted in a certain aquaculture farm. The experimental objects were koi and crucian carp fry, and the growth stage was 7 to 15 days after hatching, with a body length range of 8 mm to 25 mm.
[0225] Experimental equipment: high-speed CMOS camera (2048x2048 pixels, frame rate 120 fps), LED ring light source (illumination 1500 lux, color temperature 6000 K), fry flow channel (width 250 mm, water depth 30 mm, flow rate 20 mm / s to 50 mm / s).
[0226] Experimental method: 100 groups of fry flow images were collected, each group containing 50 to 200 fry individuals, and the number and body length of the fry were accurately labeled by hand as the true value. The system of the present application was used for automatic counting and measurement, and the system results were compared with the manually labeled values to calculate the counting accuracy and measurement error.
[0227] Experimental results:
[0228] Initial state (without closed-loop optimization): counting accuracy 87.3%, measurement error 7.8%.
[0229] After the first closed-loop iteration: counting accuracy 91.5%, measurement error 5.6%, significant performance improvement.
[0230] After the second closed-loop iteration: counting accuracy 95.2%, measurement error 4.1%, continuous optimization.
[0231] After the third closed-loop iteration: counting accuracy 98.1%, measurement error 2.9%, reaching a high-precision level.
[0232] Comparison experiment: using the existing technical solution (the method in CN114612397A) to process the same data set, the counting accuracy is 84.6%, and the measurement error is 9.3%. Compared with the existing technology, the counting accuracy of the present application is improved by 13.5 percentage points, and the measurement error is reduced by 6.4 percentage points, with obvious technical advantages.
[0233] To verify the robustness of the present application in different density scenarios, three groups of density gradient experiments were designed:
[0234] Low-density scenario: each frame of image contains 20 to 50 fry, and the distance between fry is greater than 50 mm, with no overlap.
[0235] Medium-density scenario: each frame of image contains 60 to 120 fry, and the distance between fry is 20 mm to 50 mm, with some individuals lightly overlapping (overlap rate 10% to 30%).
[0236] High-density scenario: Each frame contains 150-250 seedlings with a distance less than 20 mm, and most individuals have moderate to severe overlap (30%-70% overlap rate).
[0237] Experimental results:
[0238] Low-density scenario: The counting accuracy is 99.2%, and the measurement error is 2.1%. The adaptive density map generation module uses a narrow kernel function (σ=10 pixels), and the feature fusion weight is biased towards global features (w1=0.5, w2=0.3, w3=0.2).
[0239] Medium-density scenario: The counting accuracy is 97.8%, and the measurement error is 3.2%. The adaptive density map generation module uses a medium kernel function (σ=18 pixels), and the feature fusion weight is evenly distributed (w1=0.35, w2=0.35, w3=0.3).
[0240] High-density scenario: The counting accuracy is 96.4%, and the measurement error is 4.5%. The adaptive density map generation module uses a wide kernel function (σ=28 pixels), and the feature fusion weight is biased towards detailed features (w1=0.2, w2=0.3, w3=0.5).
[0241] Comparative experiment: The existing technical solution has an accuracy of 88.5% in a low-density scenario, 82.3% in a medium-density scenario, and only 71.8% in a high-density scenario, with a sharp decline in performance as the density increases. The present invention maintains an accuracy of more than 96% in all three density scenarios, with significantly better robustness than existing technology.
[0242] Experimental analysis shows that the adaptive density map generation and feature fusion weight dynamic adjustment mechanism of the present invention can automatically optimize the processing strategy according to the actual density distribution and overlap degree, maintaining stable high-precision performance in low-density, medium-density, and high-density scenarios, verifying the effectiveness of the module coupling and collaborative system.
[0243] To verify the cross-species adaptability of the present invention, five different aquaculture seedlings were tested:
[0244] Cyprinidae (koi, crucian carp): body length 10-25 mm, slender, oval in lateral view.
[0245] Percidae (California bass, sea bass): body length 12-28 mm, fusiform, large head.
[0246] Epinephelus (green grouper, tiger barb): body length 8-20 mm, short and thick, with stripes on the body surface.
[0247] Prawn (South American white prawn, Macrobrachium rosenbergii): body length 5-15 mm, curved, with a distinct tail fan.
[0248] Mollusks (scallops, abalone larvae): 2mm to 8mm in length, irregular shape, high transparency.
[0249] Experimental results:
[0250] Cyprinidae: 98.1% accuracy in counting, 2.9% measurement error, optimal performance achieved after 3 rounds of closed-loop iteration.
[0251] Percidae: 97.6% accuracy in counting, 3.4% measurement error, optimal performance achieved after 4 rounds of closed-loop iteration.
[0252] Epinephelidae: 96.8% accuracy in counting, 4.1% measurement error, optimal performance achieved after 4 rounds of closed-loop iteration.
[0253] Peneidae: 97.2% accuracy in counting, 3.7% measurement error, optimal performance achieved after 5 rounds of closed-loop iteration.
[0254] Mollusks: 95.3% accuracy in counting, 5.6% measurement error, optimal performance achieved after 5 rounds of closed-loop iteration (Mollusks are the most difficult due to high transparency and irregular shape).
[0255] Comparative experiment: The existing technical solution has an average accuracy of 78.5% on the five types of fry, with large performance fluctuations between different types (standard deviation 11.2%), requiring manual recalibration of parameters for each type of fry. The present invention has an average accuracy of 97.0% on the five types of fry, with small performance fluctuations (standard deviation 1.1%), automatically adapting to different types through a closed-loop optimization mechanism without the need for manual recalibration of parameters.
[0256] Experimental analysis shows that the closed-loop optimization mechanism of the present invention enables the system to have self-adaptive learning ability, automatically identify the feature differences of different types of fry, and adjust the module parameters to the optimal working state through 3 to 5 rounds of closed-loop iteration, achieving high adaptability and robustness across species.
[0257] In summary, the present invention realizes high-precision counting and accurate measurement of aquatic fry by constructing a deep-coupling collaborative system of five core modules: adaptive density map generation, multi-scale feature extraction, overlap evaluation, feature fusion weight calculation, and closed-loop optimization. The parameter-level coupling, state-level linkage, and logic-level collaboration between modules form a complete closed-loop feedback optimization path, enabling the system to have self-adaptive learning ability. Experimental verification shows that the present invention significantly improves counting accuracy, measurement precision, robustness, and adaptability compared to existing technologies, providing an efficient, accurate, and intelligent automated measurement tool for modern aquatic fry production.
[0258] Example 3
[0259] To verify the actual effect of the application in high-density and complex scenes, three different environmental conditions (light fluctuation ±30%, water turbidity increased by 40%, and seedling density increased to 150% of the control group) are selected as test scenes, and the existing fixed parameter open-loop method and the depth-coupled closed-loop system of the application are compared.
[0260] Under natural light changes and motion blur scenes, the application adopts an adaptive density map generation strategy of narrow, medium, and wide kernels. Test results show that, compared with the fixed kernel function method, the average error of the density estimation implemented by the application is reduced by 25%-35%, and the matching degree of the density distribution standard deviation with the real distribution is improved by 22%.
[0261] In scenes with an overlap rate of 30%-70%, the individual boundary separation ability is significantly improved through three-scale weight dynamic adjustment driven by overlap degree:
[0262] Moderate overlap (about 40%-60%): the separation accuracy is improved from 75% of the control method to 92%;
[0263] High overlap (about 60%-80%): the separation accuracy is improved from 60% to 85%.
[0264] In mixed seedling scenes with significant size difference, the detection accuracy of large and small individuals of the application is maintained above 95%.
[0265] The application constructs a closed-loop structure of density map generation → feature extraction → overlap evaluation → feature fusion → count measurement → performance bias calculation → parameter feedback, and achieves stable convergence through 3-5 iterations, which is specifically manifested in:
[0266] The count accuracy is improved from 85% initially to more than 98%;
[0267] The growth parameter measurement error is reduced from 8% to less than 3%;
[0268] The performance fluctuation under different light, density, and variety conditions does not exceed 3%.
[0269] The comparative experiment shows:
[0270] The accuracy of the adaptive density map generation module alone is 88%;
[0271] The accuracy of the multi-scale feature extraction alone is 90%;
[0272] After coupling, the accuracy is improved to 96%;
[0273] After adding overlap degree evaluation and feature fusion, the overall accuracy is more than 98%, and the processing efficiency and robustness are improved by more than 50%.
[0274] In the continuous flow type aquaculture pipeline, the average time for processing a single frame image by the system is 50-80 ms, real-time monitoring of 12-20 fps can be realized, and the requirements of online counting and real-time grading processing are met.
[0275] The above merely describes a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which shall be encompassed within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. An aquatic seed stock counting and growth parameter measuring system, comprising: Comprise: An image acquisition module (1) for acquiring a sequence of seedling flow images and generating an image confidence score based on image sharpness, contrast, and noise level; An adaptive density map generation module (2) coupled with the image acquisition module (1) for dynamically selecting kernel function width to generate a density map according to the image confidence score, and extracting a density distribution feature vector; A multi-scale feature extraction module (3) coupled with the adaptive density map generation module (2) for dynamically determining the receptive field range of different scales according to the density distribution feature vector, extracting global morphology, local edge and detail texture features at multiple scales to generate a multi-scale feature pyramid; An overlap evaluation module (4) coupled with the multi-scale feature extraction module (3) for identifying seedling boundary contact area and calculating spatial overlap index according to the multi-scale feature pyramid; A feature fusion weight calculation module (5) deeply coupled with the overlap evaluation module (4) and the multi-scale feature extraction module (3) for adaptively assigning multi-scale feature fusion weights according to the spatial overlap index; A counting and measuring module (6) for performing seedling counting and growth parameter measurement based on the fused features; A closed-loop optimization module (7) coupled with the adaptive density map generation module (2), the feature fusion weight calculation module (5), and the counting and measuring module (6) for respectively adjusting the kernel function width and the fusion weight in the reverse direction according to the performance bias index to form a closed-loop feedback path of parameter update.
2. The aquatic seed stock counting and growth parameter measurement system of claim 1, wherein, The adaptive density map generation module (2) further comprises: Classifying according to the image confidence score, so that the image belongs to the high confidence, medium confidence or low confidence category; and including the step of performing local modulation of the kernel function width based on the local density peak value of the density map, the step comprising: Calculating the local density peak value of each pixel neighborhood of the density map; Comparing the local density peak value with the preset peak value interval; Performing shrinkage processing on the kernel function width when the local density peak value is in the first interval; Performing expansion processing on the kernel function width when the local density peak value is in the second interval; Output the locally modulated kernel function width, so that the kernel function width is consistent with the local density structure.
3. The system for counting and measuring growth parameters of aquatic fry of claim 2, wherein, The multi-scale feature extraction module (3) comprises calculating the receptive field range of different scales based on the density distribution feature vector; the steps of generating the receptive field range: Calculate the density gradient change in the density distribution feature vector; Determine the receptive field range of the first scale based on the density gradient change; Determine the receptive field range of the second scale according to the local density dispersion; Determine the third scale receptive field range according to the density peak value interval; Perform consistency check on the three-scale receptive field range, so that the generated three-scale receptive field range can be used for the multi-scale feature pyramid construction.
4. The system for counting and measuring growth parameters of aquatic fry of claim 3, wherein, The overlap evaluation module (4) comprises the step of performing multi-channel boundary structure analysis on the local edge features in the multi-scale feature pyramid, comprising: Extracting the boundary extension length of the edge features in the horizontal channel; Extracting the boundary connectivity mode of the edge features in the vertical channel; Constructing the boundary contact area based on the intersection nodes of the horizontal channel and the vertical channel; calculating the proportion of the average area of the boundary contact region and the seedling region; outputting the proportion as a spatial overlap index for the feature fusion weight calculation module.
5. The system for counting and measuring growth parameters of aquatic fry of claim 1, wherein, The overlap evaluation module (4) further comprises a step of constructing a three-dimensional boundary voxelized structure based on the multi-scale feature pyramid to analyze the local overlap relationship, which comprises: mapping the local edge feature to a two-dimensional coordinate grid to form an initial boundary segment; stacking the boundary segment construct in the vertical direction based on the density distribution feature vector to construct a voxelized unit; calculating the common projection area between adjacent voxelized units to form a voxel overlap segment; performing a ratio structure operation on the voxel overlap segment and the average area of the seedling region; outputting the ratio as a supplementary spatial overlap index for the feature fusion weight calculation module.
6. The system for counting and measuring growth parameters of aquatic fry of claim 5, wherein, The feature fusion weight calculation module (5) comprises a step of constructing a three-stage scale weight sequence based on the spatial overlap index, which comprises: performing interval classification on the spatial overlap index to obtain a first interval, a second interval and a third interval; constructing a weight sequence mainly based on the third scale feature in the first interval; constructing a weight sequence mainly based on the second scale feature in the second interval; constructing a weight sequence mainly based on the first scale feature in the third interval; outputting the complete scale weight sequence for subsequent fusion.
7. The system for counting and measuring growth parameters of aquatic fry of claim 6, wherein, The feature fusion weight calculation module (5) further comprises a weight regression sequence construction step based on region similarity, which comprises: mapping each scale feature in the multi-scale feature pyramid to a unified feature space; calculating the region similarity between different scale features and constructing a similarity matrix; performing row normalization processing on the similarity matrix to form a regression input sequence; calculating the regression weight corresponding to each scale feature based on the regression input sequence; outputting the regression weight as a supplementary fusion weight of the feature fusion weight calculation module.
8. The system for counting and measuring growth parameters of aquatic fry of claim 1, wherein, The counting and measuring module (6) comprises a step of generating a parameter extraction sequence based on the fusion feature, which comprises: segmenting the seedling region based on the fusion feature to generate an initial mask; performing contour structure extraction on the initial mask to determine a body length measurement line; constructing a body height measurement area based on the body length measurement line; performing area calculation on the internal region of the mask to obtain the local region area; outputting the parameter sequence containing the body length, body height and region area as the growth parameters.
9. The system for counting and measuring growth parameters of aquatic fry of claim 8, wherein, The counting and measuring module (6) further comprises a step of performing measurement based on a hierarchical mask topology, which comprises: performing a topological hierarchical operation on the initial mask to obtain a main body layer and a local layer; extracting the main axis direction in the main body layer as the body length measurement baseline; extracting the local structure contour in the local layer to form a body height measurement area; constructing a morphological parameter combination based on the topological relationship between the main body layer and the local layer; outputting the combined parameter sequence containing the body length and the body height as the growth parameter structure item.
10. The system for counting and measuring growth parameters of aquatic fry of claim 9, wherein, The closed-loop optimization module (7) comprises a step of constructing a multi-mode joint update path of error samples, which comprises: performing density map mode analysis on the error samples to obtain a density error segment; performing overlap mode analysis on the error samples to obtain an overlap error segment; constructing a kernel function width update sequence based on the density error segment; constructing a fusion weight update sequence based on the overlapping error segments; outputting the update sequence for simultaneously updating parameters of the adaptive density map generation module and the feature fusion weight calculation module.
Citation Information
Patent Citations
Fry sorting method and system, electronic equipment and storage medium
CN114612397A
Glass lens surface scratch detection method and system
CN120446165A
Geosynchronization of an aerial image using localizing multiple features
WO2024042508A1