Crayfish real-time counting method and system based on dynamic visual sensor
Through the real-time crayfish counting method with dynamic vision sensors, the problems of low crayfish counting efficiency and poor accuracy are solved, real-time, accurate counting and system stability are achieved in complex environments, and the needs of different breeding environments are adapted to the needs of different breeding environments.
Patent Information
- Application Number
- CN202510454687.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-08-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing crayfish counting methods rely on low manual counting efficiency and are susceptible to subjective factors. The existing equipment has low recognition accuracy in complex environments, lacks adaptability, cannot track sports crayfish in real time, and cannot recover in time when it fails.
The crayfish real-time counting method based on dynamic vision sensors is adopted. By installing sensors and adjusting parameters, the image sequence is collected in real time, and adaptive threshold image segmentation, multi-feature fusion convolutional neural network and Kalman filtering tracking model are used, combining partition counting and fault detection and self-recovery mechanisms to realize crayfish individual identification and real-time counting.
It improves the accuracy and real-time nature of crayfish counting, can adapt to complex environment changes, has adaptive optimization capabilities, ensures system stability and reliability, and supports accurate counting in different breeding environments.
Smart Images

Figure CN120412010A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of crayfish farming counting, and particularly to a real-time counting method and system for crayfish based on a dynamic vision sensor. Background Art
[0002] In the crayfish farming industry, accurately knowing the number of crayfish is crucial for farming management. Traditional crayfish counting methods mostly rely on manual labor. Farmers need to observe and count in the farming area in person, which not only consumes a large amount of manpower but is also extremely susceptible to subjective factors, resulting in inaccurate counting results. With the continuous expansion of the farming scale, the problem of low efficiency of manual counting has become increasingly prominent, making it difficult to meet the requirements of large-scale farming for real-time and accurate counting. In addition, during the manual counting process, frequent contact with water may startle the crayfish, affecting their normal growth environment and thus having a negative impact on farming benefits.
[0003] Currently, some farmers try to assist counting with some simple image acquisition devices. However, these devices often have limited resolution and are difficult to clearly capture the individual characteristics of crayfish. In a complex farming environment, such as when the water body is turbid or blocked by aquatic plants, the image quality deteriorates severely, making it difficult to distinguish crayfish from the background and resulting in extremely low recognition accuracy. Moreover, most of the existing counting methods lack an effective tracking mechanism. For moving crayfish, it is impossible to accurately identify and record individual information in consecutive image frames, making it difficult to achieve real-time counting.
[0004] The existing counting systems lack adaptability. The lighting conditions in the farming environment change with time and weather, and the activity speed and range of crayfish also vary depending on their growth stage. However, the existing systems cannot adjust parameters according to these dynamic factors to obtain the best image acquisition and counting effects. When encountering equipment failures or abnormal data transmission, the existing systems lack effective fault detection and self-recovery mechanisms, easily leading to counting interruptions and affecting the timeliness and accuracy of farming management decisions. Therefore, it is urgent to develop an efficient, accurate, and adaptive real-time counting method and system for crayfish based on a dynamic vision sensor. Summary of the Invention
[0005] In order to overcome the disadvantages and deficiencies of the existing technology, the present invention provides a real-time counting method and system for crayfish based on a dynamic vision sensor.
[0006] A real-time counting method for crayfish based on a dynamic vision sensor, the method includes:
[0007] Step S1: Select a suitable position above the breeding area to install a dynamic vision sensor. Then adjust the sensor angle and configure the sensor parameters so that the sensor's field of view covers the entire crayfish breeding area to be counted, and the image resolution is sufficient to identify the individual characteristics of crayfish, for capturing the activity images of crayfish in the breeding area;
[0008] Step S2: Use the dynamic vision sensor to continuously and uninterruptedly collect the image sequence of the crayfish activities in the breeding area at set time intervals, so that the collected images are coherent and completely show the movement trajectory and state changes of the crayfish;
[0009] Step S3: Conduct preprocessing on the collected image sequence. Through a preset image enhancement algorithm, remove the image noise interference, improve the contrast between the crayfish and the background in the image, and make the outline of the crayfish clearly distinguishable;
[0010] Step S4: From the preprocessed images, by analyzing the morphology, color, and movement characteristics of the crayfish, distinguish the crayfish from other objects in the breeding environment, determine the position and range of each crayfish in the image, and complete the individual recognition of the crayfish;
[0011] Step S5: For the identified individual crayfish, in consecutive image frames, construct an individual crayfish tracking model based on the movement trajectory, speed, and position change information of the crayfish, and continuously and accurately identify and record its individual information during the movement of the crayfish;
[0012] Step S6: According to the tracking results, count the number of crayfish passing through a specific area or in the entire breeding area within a set time period. Through the analysis and processing of the tracking data, obtain the real-time number of crayfish.
[0013] Further, in step S3, an image segmentation model based on an adaptive threshold is adopted. The model formula is: T = α×μ + β×σ, where T is the adaptive threshold, μ is the average image gray value, σ is the standard deviation of the image gray value, the value range of α is 0.5 - 0.8, and the value range of β is 0.2 - 0.4. This model dynamically adjusts the segmentation threshold according to the gray characteristics of the image itself. When removing noise, an improved non-local means denoising model is used, and the formula is: P(x) = ∑ y∈Ω w(x, y)I(y), where P(x) is the value of pixel x after denoising, I(y) is the value of pixel y in the original image, Ω is the neighborhood window centered on x, w(x, y) is the weight between pixel x and y, the weight calculation uses a Gaussian kernel function, and the window size is dynamically adjusted according to the local texture complexity of the image, with a value range of 3×3 to 11×11.
[0014] Further, in step S4, a convolutional neural network recognition model based on multi-feature fusion is constructed. The network structure includes an input layer, multiple convolutional layers, a pooling layer, and a fully connected layer. The input of the model is the preprocessed image. The sizes of the convolutional kernels used in the convolutional layers are 3×3 and 5×5 respectively. The number of convolutional kernels gradually increases from 32 to 128, and the stride is 1 or 2. The pooling layer uses max pooling, and the size of the pooling kernel is 2×2. The number of nodes in the fully connected layers are 256 and 64 respectively. In the feature fusion stage, the color feature, shape feature, and texture feature of the crayfish are fused. Through the weighted fusion formula: F = w1C + w2S + w3T, where F is the fused feature vector, C is the color feature vector, S is the shape feature vector, T is the texture feature vector, the value range of w1 is 0.3 - 0.5, the value range of w2 is 0.2 - 0.4, the value range of w3 is 0.2 - 0.4. Using the pose compensation module, according to the angle θ between the long axis of the crayfish body and the horizontal direction, the input image of the recognition model is rotationally compensated. The rotation angle calculation formula is: where k ranges from 0.8 to 1.2, and crayfish in different poses are recognized.
[0015] Further, in step S5, a tracking model combining Kalman filtering and the Hungarian algorithm is adopted. The state transition equation of the Kalman filter model is: X k = AX k-1 + BU k-1 + W k-1 , where X k is the state vector at time k, covering the position and speed information of the crayfish, A is the state transition matrix, B is the control matrix, U k-1 is the control vector at time k - 1, W k-1 is the process noise, and the observation equation is: Z k = HX k + V k , where Z k is the observation vector at time k, H is the observation matrix, V k is the observation noise. The parameters of matrices A, B, and H are set according to the motion characteristics of the crayfish. The value range of the position-related elements in A is 0.9 - 1.1, and the value range of the speed-related elements is 0.95 - 1.05; the value of B is adjusted according to the external interference situation, and the range is 0 - 0.1; the value of the position observation-related elements in H is 1, and the value of the speed observation-related elements is 0. The Hungarian algorithm is used for data association. According to the Mahalanobis distance between the Kalman filter prediction result and the current observation, a cost matrix D is constructed. The Mahalanobis distance calculation formula is: Among them, x and y are the predicted state and the observed state respectively, and S is the covariance matrix. When the crayfish is occluded, the occlusion detection and recovery mechanism is used. When the observed value of an individual is missing for multiple consecutive frames, set to 3 - 5 frames, it is determined as occlusion. The state during occlusion is estimated according to the previous movement trajectory. The estimation model adopts a combination of linear extrapolation and historical trajectory weighting, and the weight is dynamically adjusted according to the length of the occlusion time, with the range being 0.3 - 0.7.
[0016] Furthermore, in step S6, for the uneven distribution of crayfish in the breeding area, a partition counting model is adopted. The breeding area is divided into multiple sub - areas, and the number of sub - areas is determined according to the size of the breeding area and the density of crayfish distribution, with the range being 4 - 16. Each sub - area is set with an independent counting threshold N i , and the threshold calculation formula is: Among them, is the estimated average crayfish density value of the entire breeding area, γx is the density correction coefficient of each sub - area, and its value range is adjusted between 0.8 - 1.2 according to the actual distribution of crayfish in the sub - area. For counting the crayfish in each sub - area, a calibration model based on the relationship between area and quantity is adopted. According to the identified area A j of the crayfish individual and the area A sub of the sub - area, combined with the sub - area counting threshold, the number n of crayfish in the sub - area is calculated i , and the formula is: Among them, m is the number of identified crayfish individuals in the sub - area, δ is the calibration coefficient, and its value range is 0.9 - 1.1. For the possible aggregation behavior of crayfish, the aggregation area is separately identified and processed. When the average distance between crayfish individuals in a sub - area is less than the set threshold, set to 1.5 - 2 times the average body length of crayfish, it is determined as an aggregation area. A counting optimization method based on cluster analysis is adopted to divide the aggregated crayfish into different clusters, and the quantity statistics is carried out according to the characteristics of the clusters and the relationship between area and quantity.
[0017] Furthermore, in step S1, according to the lighting conditions in the breeding area and the activity characteristics of crayfish, a sensor parameter adaptive adjustment model is constructed. For the change in light intensity, the adjustment formula for the sensor exposure time t is: Among them, L is the current light intensity, k1 ranges from 100 - 200, k2 ranges from 1 - 3. For the change in the activity speed of crayfish, the adjustment formula for the sensor frame rate f is: f = k3×v + k4, where v is the estimated average activity speed of crayfish, k3 ranges from 5 - 10, k4 ranges from 10 - 20. At the same time, to optimize the sensor's field of view, according to the boundary of the breeding area and the distribution range of crayfish, the rotation angle α and pitch angle β of the sensor are adjusted, and the angle adjustment model is: where Δx and Δy are the distances by which the boundary of the aquaculture area extends beyond the current field of view in the horizontal and vertical directions, and x max , y max are the maximum horizontal and vertical distances covered by the sensor, and α max , β max are the maximum rotation and pitch angles of the sensor, with the value ranges being -45° to 45° and -30° to 30° respectively.
[0018] Furthermore, in step S2, an image acquisition optimization method based on the region of interest is adopted. By analyzing the prior knowledge of the aquaculture area and the statistical analysis of the previously acquired images, the main area where crayfish often move is determined as the region of interest. When the dynamic vision sensor acquires images, only the region of interest is acquired at high resolution, while other regions are acquired at low resolution. The size and position of the region of interest are dynamically adjusted according to the real-time movement of crayfish. The adjustment model builds a model for the position distribution of crayfish based on the Gaussian mixture model. The formula of the Gaussian mixture model is: where P(x) is the probability density of pixel point x, K is the number of Gaussian distributions, with the value range being 3 - 5, and π i is the weight of the i-th Gaussian distribution, with the value range being 0.1 - 0.5, N(x∣μ i , Σ i ) is a Gaussian distribution with μ i as the mean and Σ i as the covariance matrix. μ i is determined based on the statistical history of crayfish positions, and Σ i is adjusted according to the degree of dispersion of the position distribution, and the value range is determined according to the actual situation. At different aquaculture stages, the determination parameters of the region of interest are dynamically updated according to the growth characteristics and activity range changes of crayfish.
[0019] Furthermore, this method utilizes a fault detection and self - recovery mechanism to construct a fault detection model based on multi - parameter monitoring. The monitored parameters include the operating temperature T of the dynamic vision sensor, the data transmission rate R, the image acquisition frame rate f, and the fluctuation of the counting results. The fault detection model uses a support vector machine classifier. The data in the normal operating state and the fault state are used as training samples to train the support vector machine model. The kernel function of the support vector machine model adopts a radial basis function. The value range of the kernel function parameter γ is 0.1 - 1, and the value range of the penalty factor C is 1 - 10. When the monitored parameters exceed the normal range, the support vector machine model determines that the system has a fault. For different types of faults, corresponding self - recovery strategies are adopted. When it is detected that the operating temperature of the sensor is too high, exceeding the set threshold of 50°C, the heat dissipation device is started, and the operating mode of the sensor is adjusted to reduce the acquisition frame rate and resolution, thereby reducing power consumption. The recovery formula is: where f old , r old is the original acquisition frame rate and resolution, f new , r new is the adjusted acquisition frame rate and resolution. The value range of k5 is 1.5 - 2, and the value range of k6 is 1.2 - 1.5. When it is detected that the data transmission rate is abnormal, the network connection is checked, and the network parameters are automatically re - configured or the backup network channel is switched.
[0020] Furthermore, this method adapts to the counting requirements of crayfish in different breeding environments and breeding modes, constructs an extensible counting model framework. This framework supports the access of multiple types of dynamic vision sensors. According to the characteristic parameters of the sensors, including resolution, frame rate, and field of view, the parameters and models in the counting process are automatically adjusted. The mapping relationship between the sensor characteristic parameters and the counting model parameters is realized by establishing a parameter mapping table. The mapping table stores the image pre - processing parameters, recognition model parameters, tracking model parameters, and counting model parameters corresponding to different types of sensors. For high - resolution sensors, in the image pre - processing step, the value of α in the adaptive threshold model increases, and the range is adjusted to 0.6 - 0.8, and the value of β decreases accordingly, and the range is adjusted to 0.2 - 0.3; in the recognition model, the number of convolutional kernels increases, from 32 - 128 to 64 - 256. At the same time, this framework supports optimizing the counting model according to the complexity of the breeding environment. In step S5, the covariance matrix parameters of the process noise W k-1 and the observation noise V k of the Kalman filter model are dynamically adjusted according to the degree of environmental interference.
[0021] A real - time crayfish counting system based on a dynamic vision sensor, comprising:
[0022] The sensor installation and adjustment unit is used to install the dynamic vision sensor at a suitable position above the aquaculture area and adjust the angle and parameters of the sensor according to the aquaculture environment and counting requirements. This unit is connected to the image acquisition unit to provide a suitable working state of the sensor for image acquisition;
[0023] The image acquisition unit uses the dynamic vision sensor to collect the image sequence of the activities of crayfish in the aquaculture area in real time, and the collected image data is transmitted to the image preprocessing unit;
[0024] The image preprocessing unit performs preprocessing operations such as noise removal and contrast enhancement on the collected image sequence, and the processed image data is transmitted to the crayfish individual recognition unit;
[0025] The crayfish individual recognition unit identifies crayfish individuals from the preprocessed images by analyzing various features of the crayfish, and the recognition results are transmitted to the crayfish individual tracking unit;
[0026] The crayfish individual tracking unit tracks the identified individuals according to the movement information of the crayfish individuals, and the tracking data is transmitted to the counting unit;
[0027] The counting unit counts the number of crayfish according to the tracking results, and improves the counting accuracy by adopting a zoning counting method according to the situation of the aquaculture area. The final counting result is output for aquaculture management purposes.
[0028] Beneficial effects:
[0029] The present invention proposes a real-time counting method and system for crayfish based on a dynamic vision sensor. At the method level, this technology utilizes a dynamic vision sensor. After installation and precise parameter calibration, it can stably collect the image sequence of crayfish activities. The preprocessing step uses advanced algorithms to greatly improve the image quality, laying a solid foundation for subsequent operations. The innovative recognition model combines multi-feature fusion with pose compensation to significantly improve the accuracy of individual crayfish recognition and effectively handle complex and variable poses. The tracking model combines the Kalman filter and the Hungarian algorithm and also has an occlusion detection and recovery mechanism to ensure that crayfish can be accurately tracked during movement and occlusion. Strategies such as partition counting and separate processing of aggregation areas fully consider the uneven distribution of crayfish in the breeding area and greatly improve the counting accuracy. From the perspective of the system, each unit has a clear division of labor and close cooperation. The sensor installation and adjustment unit ensures that the sensor is in the best working state; the image acquisition unit efficiently obtains image data; the preprocessing, recognition, tracking, and counting units sequentially perform in-depth processing on the data to obtain accurate counting results. The system also has an adaptive optimization ability. For example, the sensor parameter adaptive adjustment model can dynamically adjust the sensor parameters according to the light, the activity speed of crayfish, and the regional scope to improve the image acquisition quality. The ROI-based image acquisition optimization method reduces the data pressure while ensuring the counting accuracy. The fault detection and self-recovery mechanism enhances the stability and reliability of the system, and the scalable counting model framework improves the adaptability and versatility of the system in different breeding environments and modes, comprehensively assisting the intelligentization and high efficiency of crayfish breeding management. Description of the Drawings
[0030] Figure 1 is the flowchart of the method steps of the present invention;
[0031] Figure 2 is the composition diagram of the system units of the present invention. Detailed Embodiment
[0032] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following further describes this application in detail with reference to the drawings and specific embodiments.
[0033] As Figure 1 shown, a real-time counting method for crayfish based on a dynamic vision sensor includes the following steps:
[0034] Step S1: Select a suitable position above the breeding area to install a dynamic vision sensor. Then adjust the sensor angle and configure the sensor parameters so that the sensor's field of view covers the entire crayfish breeding range to be counted, and the image resolution is sufficient to identify the individual characteristics of crayfish, for capturing the activity pictures of crayfish in the breeding area;
[0035] Specifically, when installing a dynamic vision sensor, the selection of the location is particularly important. Since the shapes of aquaculture areas vary, for a square aquaculture pond, installing the sensor at a position slightly off the corner above the center can take into account the activities of crayfish in the corner and avoid visual dead spots. Taking a square aquaculture pond with a side length of 20 meters as an example, it is more appropriate to install the sensor 3 meters away from the pond edge and 3.5 meters directly above the pond center. Regarding the adjustment of the sensor angle, the horizontal rotation angle is generally adjusted between -45° and 45°, and the vertical pitch angle varies within the range of -30° to 30°. Such an angle range can ensure that the sensor comprehensively covers the aquaculture area from different directions and captures the activities of crayfish in all directions. For example, when crayfish are mostly concentrated at the pond edge in the early morning, through appropriate angle adjustment, the sensor can clearly capture the behaviors of crayfish crawling and foraging at the edge. The configuration of the resolution parameter is also very crucial and is usually set to 1920×1080 pixels. High resolution can clearly present the subtle features of crayfish, such as the spots on the shell and the details of the antennae, laying a foundation for the subsequent accurate identification of individual crayfish, just like a high-definition camera can clearly display the details of an object, which helps to distinguish different individuals.
[0036] Step S2: Use the dynamic vision sensor to continuously and uninterruptedly collect the image sequence of the activities of crayfish in the aquaculture area at set time intervals, so that the collected images are coherent and fully display the movement trajectory and state changes of crayfish;
[0037] Specifically, in the image acquisition process, the setting of the time interval is closely related to the activity state of crayfish. When crayfish are in the active period, such as in the evening when the water temperature is suitable, they swim around and look for food. At this time, setting the time interval to 0.1 second can coherently record the trajectories of crayfish swimming fast and chasing each other. During the relatively quiet midnight period of crayfish, the activity speed slows down, and the time interval can be extended to 0.5 second, which can not only meet the recording requirements but also avoid generating too much redundant data. The sensor frame rate is usually set between 15 - 30 frames per second. If the frame rate is too low, such as set to 10 frames per second, the fast-moving images of crayfish will be stuck and cannot fully present their movement states, looking like jumping and incoherent images; if the frame rate is too high, such as set to 60 frames per second, although it can capture more subtle movements, it will generate a large amount of data, increasing the burden of data transmission and processing. In the daily slow crawling scenario of crayfish, setting the time interval to 0.3 second and the frame rate to 20 frames per second, the collected image sequence is clear and coherent, and can fully display the posture changes of crayfish when crawling, such as the swing of the body and the movement of the pincers, just like watching a smooth video, accurately recording every move of crayfish.
[0038] Step S3: Preprocess the collected image sequence. By using a preset image enhancement algorithm, remove the interference of image noise, enhance the contrast between the crayfish and the background in the image, make the outline of the crayfish clearly distinguishable, and lay a solid foundation for subsequent recognition and counting operations;
[0039] Specifically, image preprocessing is a key step in improving image quality. The preset image enhancement algorithm adopted will be adjusted according to the overall brightness of the image and the distribution of pixel gray values. For example, in a breeding environment with low water transparency and dim light, the algorithm will automatically increase the overall brightness of the image and enhance the contrast between the crayfish and the relatively dark background. In terms of removing noise interference, corresponding strategies will be adopted for different types of noise. For the bright spot noise generated by light reflection, the algorithm will remove it through a specific filtering method; for the blurred noise caused by water body fluctuations, methods such as sharpening will be used to make the image clearer. When processing breeding images containing waterweeds, the texture of the waterweeds may interfere with the recognition of the crayfish outline. The algorithm will adjust the neighborhood range according to the local texture complexity of the image, appropriately increase the neighborhood range in the area of waterweeds with complex texture, and reduce the neighborhood range in the relatively smooth area of the crayfish body, so as to accurately remove noise, highlight the crayfish outline, make the outline lines of the crayfish clearer, and provide high-quality images for subsequent individual recognition, just like finely repairing a blurred photo to make the main body crayfish more prominent.
[0040] Step S4: From the preprocessed images, distinguish the crayfish from other objects in the breeding environment by analyzing the morphological, color, and motion characteristics of the crayfish, accurately determine the position and range of each crayfish in the image, and complete the individual recognition of the crayfish;
[0041] Specifically, during the individual recognition of crayfish, when analyzing its morphological characteristics, the length-width ratio of the crayfish body, the shape and size of the pincers, etc. will be considered. Normally growing crayfish have a relatively slender body and coordinated pincer proportions, while some abnormally developed or different varieties of crayfish will have differences in these aspects. In terms of color characteristics, crayfish come in various colors, such as bluish-gray, dark red, etc., and the algorithm will identify them by analyzing the color channels. The motion characteristics focus on the moving speed, direction change, etc. of the crayfish. For example, among a group of crayfish, there is an injured crayfish whose moving speed is significantly slower than that of other crayfish. By analyzing the motion characteristics, it can be distinguished from normal crayfish. During the recognition process, these morphological, color, and motion characteristics will be comprehensively used to construct a feature library. When encountering a new image, the characteristics of the crayfish in the image will be compared with the feature library to determine the position and range of each crayfish in the image. For example, in an image containing multiple crayfish and some stones and waterweeds, through feature analysis, the position of each crayfish can be accurately located, and it can be distinguished from other objects, realizing the accurate recognition of individual crayfish.
[0042] Step S5: For the identified crayfish individuals, in consecutive image frames, based on information such as the movement trajectory, speed, and position change of the crayfish, construct an individual crayfish tracking model, and continuously and accurately identify and record their individual information during the movement of the crayfish;
[0043] Specifically, when constructing the individual crayfish tracking model, according to the movement trajectory of the crayfish, the position coordinates at different time points will be recorded. For example, within a certain period of time, the crayfish moves from point A to point B and then to point C in the breeding pond, and the connection of these coordinate points is its movement trajectory. In terms of speed, it is determined by calculating the ratio of the position change between adjacent time points to the time interval. For example, within 0.5 seconds, the crayfish moves 5 centimeters horizontally, and its horizontal speed is 10 centimeters per second. The position change information includes the increase or decrease of the position coordinates and the moving direction. When the crayfish appears in consecutive image frames, based on this movement trajectory, speed, and position change information, the model will predict the next position of the crayfish. When the crayfish is briefly blocked by aquatic plants, the model will activate the occlusion detection mechanism. If the complete information of the crayfish cannot be detected for 3 - 5 consecutive frames, it is determined to be in an occlusion state. At this time, through linear extrapolation, the possible position during the occlusion period is speculated based on the previous movement direction and speed, and at the same time, combined with the weighted historical trajectory, the previously recorded trajectory is comprehensively considered to adjust the speculated position, ensuring that when the crayfish reappears after being blocked, its individual information can still be accurately identified and recorded to achieve continuous tracking.
[0044] Step S6: According to the tracking results, count the number of crayfish passing through a specific area or within the entire breeding area within a set time period, and through the analysis and processing of the tracking data, obtain the accurate real - time number of crayfish.
[0045] Specifically, in the counting step, when adopting the partition counting model, the number of sub-regions into which the aquaculture area is divided should be determined according to the size of the aquaculture area and the density of crayfish distribution. For an aquaculture area with a small area and relatively uniform crayfish distribution, it can be divided into 4 - 6 sub-regions; while for an aquaculture area with a large area and uneven distribution, it may need to be divided into 10 - 16 sub-regions. An independent counting threshold is set for each sub-region, and this threshold is related to the average crayfish density in the entire aquaculture area. For example, in a breeding pond where crayfish are dense in the first half and relatively sparse in the second half, the counting threshold for the sub-regions in the first half will be set relatively small, perhaps 0.8 times the calculated value based on the average density; the counting threshold for the sub-regions in the second half is set to 1.2 times the calculated value of the average density. When counting within a sub-region, the relationship between the individual area of crayfish and the area of the sub-region is considered. If the area of a sub-region is 5 square meters and the individual area of a crayfish is measured to be 0.005 square meters, through relevant calibration methods and combined with the counting threshold, the approximate number of crayfish in this sub-region can be calculated. For the crayfish aggregation area, a specific algorithm is separately used for identification. By analyzing the distance and distribution pattern between crayfish, etc., the number of crayfish in the aggregation area is accurately counted. Finally, by synthesizing the counting results of each sub-region, the real-time number of crayfish in the entire aquaculture area is obtained, providing accurate data support for aquaculture management.
[0046] Preferably, in step S3, an image segmentation model based on an adaptive threshold is adopted, and the model formula is: T = α×μ + β×σ, where T is the adaptive threshold, μ is the average gray value of the image, σ is the standard deviation of the image gray value, the value range of α is 0.5 - 0.8, and the value range of β is 0.2 - 0.4. This model dynamically adjusts the segmentation threshold according to the gray value characteristics of the image itself, effectively improving the segmentation accuracy between crayfish and the background. At the same time, in terms of noise removal, an improved non-local mean denoising model is used, and the formula is: P(x) = ∑ y∈Ω w(x, y)I(y), where P(x) is the value of pixel x after denoising, I(y) is the value of pixel y in the original image, Ω is the neighborhood window centered on x, w(x, y) is the weight between pixel x and y, the weight is calculated using a Gaussian kernel function, and the window size is dynamically adjusted according to the local texture complexity of the image, with a value range of 3×3 to 11×11, so as to improve the denoising effect and retain the details of the image.
[0047] Preferably, in step S4, a convolutional neural network recognition model based on multi-feature fusion is constructed. Its network structure includes an input layer, multiple convolutional layers, a pooling layer, and a fully connected layer. The input of the model is the preprocessed image. The sizes of the convolutional kernels used in the convolutional layers are 3×3 and 5×5 respectively, the number of convolutional kernels gradually increases from 32 to 128, and the stride is 1 or 2. The pooling layer uses max pooling, and the size of the pooling kernel is 2×2. The number of nodes in the fully connected layers is 256 and 64 respectively. In the feature fusion stage, the color feature, shape feature, and texture feature of the crayfish are fused. Through the weighted fusion formula: F = w1C + w2S + w3T, where F is the fused feature vector, C is the color feature vector, S is the shape feature vector, T is the texture feature vector, the value range of w1 is 0.3 - 0.5, the value range of w2 is 0.2 - 0.4, and the value range of w3 is 0.2 - 0.4. To cope with the pose changes of crayfish, a pose compensation module is used to perform rotation compensation on the input image of the recognition model according to the angle θ between the long axis of the crayfish body and the horizontal direction. The rotation angle calculation formula is: where k ranges from 0.8 to 1.2, enabling crayfish in different poses to be accurately recognized.
[0048] Preferably, in step S5, a tracking model combining Kalman filter and Hungarian algorithm is adopted. The state transition equation of the Kalman filter model is: X k = AX k-1 + BU k-1 + W k-1 , where X k is the state vector at time k, covering the position and speed information of the crayfish, A is the state transition matrix, B is the control matrix, U k-1 is the control vector at time k - 1, and W k-1 is the process noise. The observation equation is: Z k = HX k + V k , where Z k is the observation vector at time k, H is the observation matrix, and V k is the observation noise. The parameters of matrices A, B, and H are set according to the motion characteristics of the crayfish. The value range of the position-related elements in A is 0.9 - 1.1, and the value range of the speed-related elements is 0.95 - 1.05; the value of B is adjusted according to the external interference situation, and the range is 0 - 0.1; the value of the position observation-related elements in H is 1, and the value of the speed observation-related elements is 0. The Hungarian algorithm is used for data association. A cost matrix D is constructed based on the Mahalanobis distance between the Kalman filter prediction result and the current observation. The Mahalanobis distance calculation formula is: Among them, x and y are the predicted state and the observed state respectively, and S is the covariance matrix. To deal with the situation of crayfish occlusion, an occlusion detection and recovery mechanism is used. When the observed values of an individual are missing for multiple consecutive frames (set to 3 - 5 frames), it is determined as occlusion, and the state during occlusion is estimated based on the previous movement trajectory. The estimation model adopts a combination of linear extrapolation and weighted historical trajectory, and the weight is dynamically adjusted according to the length of the occlusion time, with the range of 0.3 - 0.7.
[0049] Preferably, in step S6, to improve the counting accuracy, for the uneven distribution of crayfish in the breeding area, a partition counting model is adopted. The breeding area is divided into multiple sub - areas, and the number of sub - areas is determined according to the size of the breeding area and the density of crayfish distribution, with the range of 4 - 16. Each sub - area is set with an independent counting threshold N i , and the threshold calculation formula is: Among them, is the estimated value of the average crayfish density in the whole breeding area, and γ i is the density correction coefficient of each sub - area, and its value range is adjusted between 0.8 - 1.2 according to the actual distribution of crayfish in the sub - area. For counting the crayfish in each sub - area, a calibration model based on the relationship between area and quantity is adopted. According to the area A j of the identified crayfish individuals and the area A sub of the sub - area, combined with the counting threshold of the sub - area, the number n i of crayfish in the sub - area is calculated, and the formula is: Among them, m is the number of identified crayfish individuals in the sub - area, and δ is the calibration coefficient, with the value range of 0.9 - 1.1. Considering the possible aggregation behavior of crayfish, the aggregation area is separately identified and processed. When the average distance between crayfish individuals in a sub - area is less than the set threshold (set to 1.5 - 2 times the average body length of crayfish), it is determined as an aggregation area, and a counting optimization method based on cluster analysis is adopted. The aggregated crayfish are divided into different clusters, and the quantity statistics are carried out according to the characteristics of the clusters and the relationship between area and quantity to improve the counting accuracy of crayfish in the aggregation area.
[0050] Preferably, in step S1, according to the lighting conditions in the breeding area and the activity characteristics of crayfish, a sensor parameter adaptive adjustment model is constructed. For the change in light intensity, the adjustment formula for the sensor exposure time t is: Among them, L is the current light intensity, the value range of k1 is 100 - 200, and the value range of k2 is 1 - 3. For the change in the activity speed of crayfish, the adjustment formula for the sensor frame rate f is: f = k3×v + k4, where v is the estimated average activity speed of crayfish, the value range of k3 is 5 - 10, and the value range of k4 is 10 - 20. At the same time, to optimize the sensor's field of view range, according to the boundary of the breeding area and the distribution range of crayfish, the rotation angle α and the pitch angle β of the sensor are adjusted. The angle adjustment model is: Among them, Δx and Δy are the distances by which the boundary of the breeding area exceeds the current field of view range in the horizontal and vertical directions, x max , y max are the maximum horizontal and vertical distances that the sensor can cover, α max , β max are the maximum rotation and pitch angles of the sensor, and the value ranges are -45° to 45° and -30° to 30° respectively. Through this model, the adaptive optimization of sensor parameters is realized, and the quality of crayfish image acquisition is improved.
[0051] Preferably, in step S2, to reduce the pressure of data transmission and processing while maintaining the counting accuracy, an image acquisition optimization method based on the region of interest (ROI) is adopted. Through the analysis of the prior knowledge of the breeding area and the statistical analysis of the previously collected images, the main areas where crayfish often move are determined as the ROI. When the dynamic vision sensor acquires images, only the ROI area is acquired at high resolution, while other areas are acquired at low resolution. The size and position of the ROI area are dynamically adjusted according to the real-time activity of crayfish. The adjustment model is based on the Gaussian mixture model (GMM) to model the position distribution of crayfish. The GMM model formula is: Among them, P(x) is the probability density of pixel point x, K is the number of Gaussian distributions, and the value range is 3 - 5, π i is the weight of the i-th Gaussian distribution, and the value range is 0.1 - 0.5, N(x∣μ i , Σ i ) is a Gaussian distribution with μ i as the mean and Σ i as the covariance matrix. μ i is determined according to the statistical history of crayfish positions, and Σ i is adjusted according to the degree of dispersion of the position distribution, and the value range is determined according to the actual situation. In different breeding stages, according to the growth characteristics and activity range changes of crayfish, the determination parameters of the ROI area are dynamically updated to ensure the effectiveness of ROI selection.
[0052] Preferably, this method utilizes a fault detection and self-recovery mechanism to construct a fault detection model based on multi-parameter monitoring. The monitored parameters include the operating temperature T of the dynamic vision sensor, the data transmission rate R, the image acquisition frame rate f, and the fluctuation of the counting results, etc. The fault detection model uses a support vector machine (SVM) classifier, taking the data of the normal operating state and the fault state as training samples to train the SVM model. The kernel function of the SVM model adopts the radial basis function (RBF), with the kernel function parameter γ ranging from 0.1 to 1, and the penalty factor C ranging from 1 to 10. When the monitored parameters exceed the normal range, the SVM model determines that the system has a fault. For different types of faults, corresponding self-recovery strategies are adopted. For example, when it is detected that the operating temperature of the sensor is too high (exceeding the set threshold, set to 50°C), the heat dissipation device is started, and the operating mode of the sensor is adjusted to reduce the acquisition frame rate and resolution to reduce power consumption. The recovery formula is: where f old , r old are the original acquisition frame rate and resolution, and f new , r new are the adjusted acquisition frame rate and resolution, with k5 ranging from 1.5 to 2 and k6 ranging from 1.2 to 1.5. When it is detected that the data transmission rate is abnormal, the network connection is checked, and the network parameters are automatically reconfigured or the backup network channel is switched to ensure that the data can be transmitted normally. Through this mechanism, the stability and reliability of the system in a complex aquaculture environment are improved.
[0053] Preferably, this method adapts to the counting requirements of crayfish in different aquaculture environments and aquaculture modes, constructs an extensible counting model framework, which supports the access of multiple types of dynamic vision sensors, and automatically adjusts the parameters and models in the counting process according to the characteristic parameters of the sensors (such as resolution, frame rate, field of view, etc.). The mapping relationship between the sensor characteristic parameters and the counting model parameters is realized by establishing a parameter mapping table. The mapping table stores the image preprocessing parameters, recognition model parameters, tracking model parameters, and counting model parameters corresponding to different types of sensors. For example, for high-resolution sensors, in the image preprocessing step, the value of α in the adaptive threshold model can be appropriately increased, and the range is adjusted to 0.6 - 0.8, and the value of β is correspondingly decreased, and the range is adjusted to 0.2 - 0.3; in the recognition model, the number of convolutional kernels can be appropriately increased, from 32 - 128 to 64 - 256. At the same time, this framework supports optimizing the counting model according to the complexity of the aquaculture environment (such as the shape of the aquaculture pond, the presence of obstacles, etc.). For complex aquaculture environments, in the crayfish individual tracking step, the process noise W k-1 and the observation noise V kThe covariance matrix parameters are dynamically adjusted according to the degree of environmental interference, and the adjustment range is determined according to the actual situation. Through this extensible framework, the adaptability and generality of the counting method in different scenarios are improved.
[0054] As Figure 2 shown, a real-time crayfish counting system based on a dynamic vision sensor includes:
[0055] A sensor installation and adjustment unit for installing the dynamic vision sensor at a suitable position above the breeding area and adjusting the angle, parameters, etc. of the sensor according to the breeding environment and counting requirements. This unit is connected to the image acquisition unit to provide a suitable working state of the sensor for image acquisition.
[0056] An image acquisition unit that uses the dynamic vision sensor to collect the image sequence of the crayfish activities in the breeding area in real time, and the collected image data is transmitted to the image preprocessing unit.
[0057] An image preprocessing unit that performs preprocessing operations such as noise removal and contrast enhancement on the collected image sequence, and the processed image data is transmitted to the crayfish individual recognition unit.
[0058] A crayfish individual recognition unit that recognizes crayfish individuals from the preprocessed images by analyzing various characteristics of the crayfish, and the recognition results are transmitted to the crayfish individual tracking unit.
[0059] A crayfish individual tracking unit that tracks the recognized individuals according to the movement information of the crayfish individuals, and the tracking data is transmitted to the counting unit.
[0060] A counting unit that counts the number of crayfish according to the tracking results, and can improve the counting accuracy by using methods such as partition counting according to the situation of the breeding area. The final counting result can be output for uses such as breeding management.
[0061] This counting method and system have prominent advantages and achieve major breakthroughs in sensor installation and image acquisition. When installing sensors in traditional technologies, the selection of position and angle is arbitrary, resulting in a large number of monitoring blind spots, and the resolution is also difficult to meet the requirements for accurately identifying crayfish. When installing sensors in this system, the shape of the breeding area is fully considered. For example, in a square breeding pond, the sensor is installed at a corner slightly above the center. With the adjustment of the horizontal rotation angle from -45° to 45° and the vertical pitch angle from -30° to 30°, it can cover the breeding area comprehensively. The high resolution of 1920×1080 pixels can clearly present the fine features of crayfish. In terms of image acquisition, the time interval and frame rate settings of traditional methods are fixed and cannot adapt to different activity states of crayfish, often resulting in image jamming or data redundancy. This system can flexibly set the time interval according to the activity level of crayfish. For example, the time interval is 0.1 second during the active period and 0.5 second when quiet, and the frame rate is maintained at 15 - 30 frames per second, ensuring continuous images and reasonable data volume.
[0062] The image preprocessing and individual recognition links are also ahead of the existing technologies. In the past, image preprocessing technologies were unable to cope with complex breeding environments. When the water transparency is low, the light is dim, and there is noise interference, the image quality is poor, and it is difficult to distinguish crayfish from the background. The preset image enhancement algorithm of this system can automatically adjust according to the image brightness and pixel gray value distribution, adopt specific strategies for different noises, and can also adjust the neighborhood range according to the texture complexity to accurately highlight the outline of crayfish. In individual recognition, traditional technologies mostly rely on single features and are greatly affected by the posture and variety differences of crayfish, resulting in inaccurate recognition. This system constructs a feature library by integrating morphological, color, and motion features, which can accurately locate crayfish and effectively solve this problem.
[0063] In the crayfish tracking and counting links, there are obvious shortcomings in the existing technologies. Once the crayfish is blocked in traditional tracking technologies, it is easy to lose the target and cannot continuously record its information. The tracking model constructed by this system can predict the position of crayfish according to its movement trajectory, speed, and position changes. When the crayfish is blocked, it ensures continuous tracking through linear extrapolation combined with the weighting of historical trajectories. When counting, traditional methods are difficult to handle the uneven distribution and aggregation of crayfish in the breeding area, resulting in inaccurate counting. This system adopts a partition counting model, determines the number of sub-regions and counting thresholds according to the size of the breeding area and the distribution of crayfish, considers the relationship between the individual and the sub-region area, and processes the aggregation area separately, greatly improving the counting accuracy and providing reliable data support for breeding management.
[0064] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various equivalent changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalent scope.
Claims
1. A real-time counting method for crayfish based on a dynamic vision sensor, characterized in that, Including: Step S1: Select a suitable position above the farming area to install a dynamic vision sensor, adjust the sensor angle, configure the sensor parameters, and make the sensor's field of view cover the entire crayfish farming area to be counted, for capturing the activity images of crayfish in the farming area; Step S2: Use the dynamic vision sensor to continuously and uninterruptedly collect the image sequence of crayfish activities in the farming area at a set time interval, so that the collected images are coherent and fully display the movement trajectory and state changes of crayfish; Step S3: Conduct preprocessing on the collected image sequence, and through a preset image enhancement algorithm, remove the image noise interference and improve the contrast between crayfish and the background in the image; Step S4: From the preprocessed images, distinguish crayfish from other objects in the farming environment by analyzing the morphology, color, and movement characteristics of crayfish, determine the position and range of each crayfish in the image, and complete the individual recognition of crayfish; Step S5: For the identified crayfish individuals, in consecutive image frames, construct an individual crayfish tracking model based on the movement trajectory, speed, and position change information of the crayfish; Step S6: According to the tracking results, count the number of crayfish passing through a specific area or in the entire farming area within a set time period. Through the analysis and processing of the tracking data, obtain the real-time number of crayfish.
2. The real-time counting method for crayfish based on a dynamic vision sensor according to claim 1, wherein In step S3, an image segmentation model based on an adaptive threshold is adopted. The model formula is: T = α×μ + β×σ, where T is the adaptive threshold, μ is the mean gray value of the image, σ is the standard deviation of the image gray value, the value range of α is 0.5 - 0.8, and the value range of β is 0.2 - 0.
4. This model dynamically adjusts the segmentation threshold according to the gray feature of the image itself. When removing noise, an improved non-local mean denoising model is used, and the formula is: P(x) = ∑ y∈Ω w(x, y)I(y), where P(x) is the value of pixel x after denoising, I(y) is the value of pixel y in the original image, Ω is the neighborhood window centered on x, w(x, y) is the weight between pixel x and y, the weight is calculated using a Gaussian kernel function, and the window size is dynamically adjusted according to the local texture complexity of the image, with a value range of 3×3 to 11×11.
3. The real-time crayfish counting method based on a dynamic vision sensor according to claim 1, wherein, In step S4, a convolutional neural network recognition model based on multi-feature fusion is constructed. The network structure includes an input layer, multiple convolutional layers, a pooling layer, and a fully connected layer. The input of the model is the preprocessed image. The sizes of the convolutional kernels used in the convolutional layers are 3×3 and 5×5 respectively, the number of convolutional kernels gradually increases from 32 to 128, and the stride is 1 or 2. The pooling layer uses max pooling, and the size of the pooling kernel is 2×2. The number of nodes in the fully connected layers are 256 and 64 respectively. In the feature fusion stage, the color feature, shape feature, and texture feature of the crayfish are fused. Through the weighted fusion formula: F = w1C + w2S + w3T, where F is the fused feature vector, C is the color feature vector, S is the shape feature vector, T is the texture feature vector, the value range of w1 is 0.3 - 0.5, the value range of w2 is 0.2 - 0.4, and the value range of w3 is 0.2 - 0.
4. Using the pose compensation module, according to the angle θ between the long axis of the crayfish body and the horizontal direction, the input image of the recognition model is rotationally compensated. The rotation angle calculation formula is: where the value range of k is 0.8 - 1.2, and crayfish in different poses are recognized.
4. The real-time counting method for crayfish based on a dynamic vision sensor according to claim 1, wherein, In step S5, a tracking model combining Kalman filtering and the Hungarian algorithm is adopted. The state transition equation of the Kalman filter model is: X k = AX k-1 + BU k-1 + W k-1 , where X k is the state vector at time k, covering the position and velocity information of the crayfish. A is the state transition matrix, B is the control matrix, U k-1 is the control vector at time k-1, and W k-1 is the process noise. The observation equation is: Z k = HX k + V k , where Z k is the observation vector at time k, H is the observation matrix, and V k is the observation noise. The parameters of matrices A, B, and H are set according to the motion characteristics of the crayfish. The value range of the position-related elements in A is 0.9 - 1.1, and the value range of the velocity-related elements is 0.95 - 1.05; the value of B is adjusted according to the external interference situation, and the range is 0 - 0.1; the value of the position observation-related elements in H is 1, and the value of the velocity observation-related elements is 0. The Hungarian algorithm is used for data association. A cost matrix D is constructed based on the Mahalanobis distance between the Kalman filter prediction result and the current observation. The Mahalanobis distance calculation formula is: where x and y are the predicted state and the observed state respectively, and S is the covariance matrix. When the crayfish is occluded, an occlusion detection and recovery mechanism is used. When the observed values of an individual are missing for a continuous number of frames, set to 3 - 5 frames, it is determined as occlusion. The state estimation during occlusion is performed according to the previous motion trajectory. The estimation model adopts a combination of linear extrapolation and historical trajectory weighting, and the weight is dynamically adjusted according to the occlusion time length, with the range of 0.3 - 0.
7.
5. The real-time counting method of crayfish based on a dynamic vision sensor according to claim 1, characterized in that In step S6, for the uneven distribution of crayfish in the breeding area, a zoning counting model is adopted to divide the breeding area into multiple sub-areas. The number of sub-areas is determined according to the size of the breeding area and the density of crayfish distribution, ranging from 4 to 16. An independent counting threshold N is set for each sub-area. i , and the threshold calculation formula is: Where is the estimated average crayfish density value of the entire breeding area, and γ i is the density correction coefficient for each sub-area. The value range is adjusted between 0.8 and 1.2 according to the actual distribution of crayfish in the sub-area. For counting the crayfish in each sub-area, a calibration model based on the relationship between area and quantity is adopted. According to the identified area A of the crayfish individual j and the area A sub of the sub-area, combined with the sub-area counting threshold, calculate the number n of crayfish in the sub-area i , and the formula is: Where m is the number of identified crayfish individuals in the sub-area, and δ is the calibration coefficient with a value range of 0.9 to 1.
1. For the possible aggregation behavior of crayfish, the aggregation area is separately identified and processed. When the average distance between crayfish individuals in a certain sub-area is less than the set threshold, which is set to 1.5 to 2 times the average body length of crayfish, it is determined as the aggregation area. An optimized counting method based on cluster analysis is adopted to divide the aggregated crayfish into different clusters, and the quantity statistics are carried out according to the characteristics of the clusters and the relationship between area and quantity.
6. The real-time counting method of crayfish based on a dynamic vision sensor according to claim 1, characterized in that, In step S1, according to the lighting conditions in the breeding area and the activity characteristics of crayfish, an adaptive adjustment model for sensor parameters is constructed. For the change in light intensity, the adjustment formula for the sensor exposure time t is: where L is the current light intensity, the value range of k1 is 100 - 200, and the value range of k2 is 1 - 3. For the change in the activity speed of crayfish, the adjustment formula for the sensor frame rate f is: f = k3×v + k4, where v is the estimated average activity speed of crayfish, the value range of k3 is 5 - 10, and the value range of k4 is 10 - 20. At the same time, to optimize the sensor's field of view, according to the boundary of the breeding area and the distribution range of crayfish, the rotation angle α and the pitch angle β of the sensor are adjusted. The angle adjustment model is: where Δx and Δy are the distances by which the boundary of the breeding area exceeds the current field of view in the horizontal and vertical directions, x max , y max are the maximum horizontal and vertical distances covered by the sensor, α max , β max are the maximum rotation and pitch angles of the sensor, and the value ranges are -45° to 45° and -30° to 30° respectively.
7. The real-time counting method for crayfish based on a dynamic vision sensor according to claim 1, characterized in that, In step S2, an image acquisition optimization method based on the region of interest is adopted. By analyzing the prior knowledge of the aquaculture area and the statistical analysis of the previously acquired images, the main areas where crayfish often move are determined as the regions of interest. When the dynamic vision sensor acquires images, only the regions of interest are acquired at high resolution, while the other regions are acquired at low resolution. The size and position of the regions of interest are dynamically adjusted according to the real-time movement of crayfish. The adjustment model is based on the Gaussian mixture model to model the position distribution of crayfish. The Gaussian mixture model formula is: where P(x) is the probability density of pixel point x, K is the number of Gaussian distributions, and the value range is 3 - 5, π i is the weight of the i-th Gaussian distribution, and the value range is N(x∣μ i , Σ i ) is a Gaussian distribution with μ i as the mean and Σ i as the covariance matrix. μ i is determined according to the statistical history of crayfish positions, and Σ i is adjusted according to the dispersion degree of the position distribution, and the value range is determined according to the actual situation. At different aquaculture stages, according to the growth characteristics and activity range changes of crayfish, the determination parameters of the regions of interest are dynamically updated.
8. The real-time counting method for crayfish based on a dynamic vision sensor according to claim 1, characterized in that This method utilizes a fault detection and self-recovery mechanism to construct a fault detection model based on multi-parameter monitoring. The monitored parameters include the working temperature T of the dynamic vision sensor, the data transmission rate R, the image acquisition frame rate f, and the fluctuation of the counting results. The fault detection model uses a support vector machine classifier. The data in the normal working state and the fault state are used as training samples to train the support vector machine model. The kernel function of the support vector machine model adopts the radial basis function. The value range of the kernel function parameter γ is 0.1 - 1, and the value range of the penalty factor C is 1 - 10. When the monitored parameters exceed the normal range, the support vector machine model determines that the system has a fault. For different types of faults, corresponding self-recovery strategies are adopted. When it is detected that the working temperature of the sensor is too high, exceeding the set threshold of 50 °C, the cooling device is started, and the working mode of the sensor is adjusted to reduce the acquisition frame rate and resolution, and reduce power consumption. The recovery formula is: where f old , r old are the original acquisition frame rate and resolution, f new , r new are the adjusted acquisition frame rate and resolution. The value range of k5 is 1.5 - 2, and the value range of k6 is 1.2 - 1.
5. When it is detected that the data transmission rate is abnormal, check the network connection and automatically reconfigure the network parameters or switch to the backup network channel.
9. The real-time counting method for crayfish based on a dynamic vision sensor according to claim 1, wherein This method adapts to the counting requirements of crayfish in different aquaculture environments and aquaculture modes, constructs an extensible counting model framework. This framework supports the access of various types of dynamic vision sensors. According to the characteristic parameters of the sensors, including resolution, frame rate, and field of view, it automatically adjusts the parameters and models in the counting process. The mapping relationship between the sensor characteristic parameters and the counting model parameters is realized by establishing a parameter mapping table. The mapping table stores the image preprocessing parameters, recognition model parameters, tracking model parameters, and counting model parameters corresponding to different types of sensors. For high-resolution sensors, in the image preprocessing step, the value of α in the adaptive threshold model increases, and the range is adjusted to 0.6 - 0.8, while the value of β decreases accordingly, and the range is adjusted to 0.2 - 0.3; in the recognition model, the number of convolutional kernels increases, from 32 - 128 to 64 - 256. At the same time, this framework supports optimizing the counting model according to the complexity of the aquaculture environment. In step S5, the covariance matrix parameters of the process noise W k-1 and the observation noise V k are dynamically adjusted according to the degree of environmental interference.
10. A real-time crayfish counting system based on a dynamic vision sensor, characterized in that, Including: A sensor installation and adjustment unit, used to install the dynamic vision sensor at a suitable position above the farming area, and adjust the angle and parameters of the sensor according to the farming environment and counting requirements. This unit is connected to the image acquisition unit to provide a suitable working state of the sensor for image acquisition; An image acquisition unit, using the dynamic vision sensor to collect the image sequence of crayfish activities in the farming area in real time, and transmitting the collected image data to the image preprocessing unit; An image preprocessing unit, performing preprocessing operations of noise removal and contrast enhancement on the collected image sequence, and transmitting the processed image data to the crayfish individual recognition unit; A crayfish individual recognition unit, identifying crayfish individuals from the preprocessed images by analyzing various characteristics of crayfish, and transmitting the recognition results to the crayfish individual tracking unit; A crayfish individual tracking unit, tracking the identified individuals according to the movement information of crayfish individuals, and transmitting the tracking data to the counting unit; A counting unit, counting the number of crayfish according to the tracking results, and adopting a zoning counting method according to the farming area situation to improve the counting accuracy. The final counting result is output for farming management purposes.
Citation Information
Cited By
Crayfish egg counting, screening and hatching device based on image recognition
CN121867130A
An image recognition-based crayfish egg counting, screening and hatching device
CN121867130B