Procambarus clarkii disease identification edge computing system based on improved YOLOv5 algorithm
By improving the YOLOv5 algorithm, the edge computing system for crayfish disease identification has solved the problems of high false detection rate and low recognition accuracy of the crayfish disease identification system in complex scenarios, and achieved efficient disease identification and instant diagnosis under complex lighting conditions, thereby improving aquaculture efficiency.
Patent Information
- Application Number
- CN202510558879.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-09-16
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing crayfish disease identification system has a high false positive rate in complex scenarios and a low accuracy rate for identifying multiple diseases simultaneously.
The edge computing system for crayfish disease identification using the improved YOLOv5 algorithm includes a data acquisition and preprocessing module, a disease detection model based on the improved YOLOv5 algorithm, a multi-label association classification module, and an edge-cloud collaborative reasoning module. It improves image clarity by combining a dual-camera module with an active fill light unit, introduces a deformable convolution submodule and a channel spatial attention mechanism to enhance feature extraction capabilities, and combines the edge-cloud collaborative reasoning module to achieve instant diagnosis.
Improve image clarity under complex lighting conditions, reduce false detection rates, accurately identify subtle disease characteristics, improve the accuracy of identifying multiple concurrent diseases, meet the real-time requirements of edge devices, reduce diagnosis time, and improve the economic benefits of farming.
Smart Images

Figure CN120656034A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of biometric technology, and in particular to an edge computing system for identifying crayfish diseases based on an improved YOLOv5 algorithm. Background Art
[0002] Procambarus clarkii, commonly known as crayfish, is a freshwater shrimp widely farmed worldwide. Common diseases of Procambarus clarkii include shell rot and ciliate infestation. These diseases can cause mass mortality, reduce aquaculture yields and economic benefits, degrade the water environment, damage the aquaculture ecosystem, and increase the difficulty and cost of aquaculture management. Therefore, identifying crayfish diseases is crucial in the aquaculture of Procambarus clarkii. However, existing crayfish disease recognition systems suffer from high false positive rates in complex scenarios such as turbid water, algae obstruction, and uneven lighting. They are unable to effectively separate shrimp features from background interference, have low accuracy for simultaneous recognition of multiple diseases, and suffer from significant cross-interference. Therefore, we propose an edge computing system for crayfish disease recognition based on an improved YOLOv5 algorithm. Summary of the Invention
[0003] The purpose of the present invention is to address the problems in the background technology of the existing crayfish disease recognition system having a high false detection rate in complex scenarios and a low recognition accuracy rate for multiple diseases at the same time, and to propose an edge computing system for crayfish disease recognition based on the improved YOLOv5 algorithm.
[0004] The technical solution of the present invention is an edge computing system for identifying crayfish diseases based on an improved YOLOv5 algorithm, comprising a data acquisition and preprocessing module, a disease detection model based on an improved YOLOv5 algorithm, a multi-label association classification module, and an edge cloud collaborative reasoning module, wherein:
[0005] The data acquisition and preprocessing module is used to acquire and preprocess data.
[0006] The disease detection model based on the improved YOLOv5 algorithm is used to detect and locate small-scale lesions on edge devices in real time;
[0007] The multi-label association classification module is used to classify multi-disease associations;
[0008] The edge cloud collaborative reasoning module is used to implement disease diagnosis reasoning.
[0009] Optionally, the data acquisition and preprocessing module includes a multispectral imaging unit, an adaptive enhancement unit, and a data normalization unit, wherein:
[0010] The multispectral imaging unit includes a visible light and near infrared dual camera module and an active fill light device, the active fill light device includes an ambient light sensor and an LED fill light array, the ambient light sensor is used to monitor the ambient light intensity I in real time. env , the power P of the LED fill light array is controlled by a regulation function, and the regulation function formula is expressed as: P = f (I env );
[0011] The adaptive enhancement unit adopts the method of fusing infrared channel data I IR The improved MSRCR algorithm of (x, y) is used to enhance the image, and the dynamic background is segmented through the DeepLabv3+ network, and the features of different scales are fused and the feature map F is output. ASPP , the calculation formula of the feature map output is:
[0012]
[0013] Among them, F is the input feature map, f i is the convolution operation with different dilation rates, and M is the number of operations with different dilation rates;
[0014] The data normalization unit uses scale-adaptive pyramid scaling technology to dynamically adjust the image scale according to the size of the shrimp body. For the input image I, the scale factors α i Scaling is performed to obtain a set of images of different scales {I i}={S(I,α i )}, and correct the shrimp body image.
[0015] Optionally, the disease detection model based on the improved YOLOv5 algorithm includes a backbone network module, a feature fusion architecture based on an improved bidirectional feature pyramid network, and a quantization deployment module;
[0016] The backbone network module includes a deformable convolution submodule, which introduces an offset Δp in the standard convolution operation of the YOLOv5 algorithm. n , the calculation formula of its convolution operation output y(p0) is:
[0017]
[0018] Among them, x is the input feature map, p0 is the output feature map position, p n is the convolution kernel sampling position, w n is the convolution kernel weight, N is the number of sampling points;
[0019] The improved bidirectional feature pyramid network introduces cross-layer skip connections, assuming that the input feature maps are F1, F2, ..., F n, after convolution and addition operations, the fused feature map F is output out , its calculation process includes the information transmission of cross-layer connections, and the formula is expressed as:
[0020] F out =f(F1,F2,…,F n ,skip-connections)
[0021] The feature fusion architecture filters and fuses features from different sources through an adaptive feature selection gate. a , F b , the calculation formula of the gate output G is as follows:
[0022] G=σ(W1F a +W2F b )
[0023] Among them, W1 and W2 are weight matrices, σ is the activation function, and the gate output G is used to control the feature fusion ratio.
[0024] The quantization deployment module quantizes the model weights and uses TensorRT to perform layer fusion on the model, combining multiple consecutive convolution, batch normalization, and activation function layers into one computing node;
[0025] The quantization process uses mixed precision quantization to quantize from FP32 to INT8, and the classification head retains FP16. The quantization process maps the floating point number x to an integer through the quantization parameters α and Δ The formula is as follows:
[0026]
[0027] Among them, clip is the clipping function, x min and x max The quantitative range.
[0028] Optionally, a channel space attention mechanism is introduced into the backbone network module. In the channel attention part, channel features are obtained through global average pooling and global maximum pooling operations, and the channel attention weight M is calculated through a multi-layer perceptron. c (F), calculated as:
[0029] M c (F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F)))
[0030] Among them, σ is the activation function, F is the input feature map;
[0031] In the spatial attention part, the channel dimension is compressed and the spatial attention weight M is obtained through convolution operation.s (F), the final output feature map F' = F × M c (F)×M s (F).
[0032] Optionally, the multi-label association classification module includes a pathology knowledge graph unit, a dynamic loss function unit and an uncertainty calibration unit;
[0033] The pathological knowledge graph unit includes a disease association matrix and a graph attention network encoder. The disease association matrix includes a disease association matrix A constructed based on clinical data, a matrix element α ij represents the strength of association between symptoms i and j;
[0034] The graph attention network encoder is used to take the disease association matrix A as input to construct a graph attention network, and the association relationship of concurrent diseases is modeled through the graph attention network. In the graph attention network, the output feature calculation formula of node i is:
[0035]
[0036] Among them, N(i) is the set of neighbor nodes of node i, α ij is the attention coefficient, which is obtained by calculating the similarity of node features, W is the weight matrix, and σ is the activation function;
[0037] The dynamic loss function unit includes a confidence-based weight adjustment algorithm, which is used to dynamically adjust the loss function weight according to the confidence of the model prediction. Let the model's prediction confidence for sample x be c(x), and the weights w of each item in the loss function be i Through the function w i = g(c(x)) to adjust;
[0038] Introduce the mutual exclusivity constraint of the disease into the loss function. For mutually exclusive diseases A and B, add the constraint term in the loss function in and is the model's predicted value for symptoms A and B, and λ is the constraint strength coefficient.
[0039] Optionally, the uncertainty calibration unit uses Monte Carlo Dropout uncertainty estimation to obtain an uncertainty estimation result. During model inference, the Dropout layer is randomly applied multiple times to obtain multiple prediction results. Let the model output be y, and the uncertainty is obtained by calculating the variance of the prediction result. The variance calculation formula is:
[0040]
[0041] Among them, y tis the t-th prediction result, is the average prediction result;
[0042] According to the uncertainty estimation result, the credibility of the diagnosis result is divided into high, medium and low confidence. The high confidence result is directly output, the medium confidence result is marked with a focus mark, and the low confidence result is marked with a manual review mark.
[0043] Optionally, the similarity of the node features is calculated by linearly transforming the features of node i and neighbor node j, obtaining the transformed features, concatenating the transformed features, performing linear transformation on the shared attention mechanism weight vector a, and processing the LeakyReLU activation function to obtain the unnormalized attention coefficient e ij , and its calculation formula is:
[0044] e ij =LeakyReLU(a T [Wh i ||Wh j ])
[0045] Among them, [Wh i ||Wh j ] means to convert Wh i and Wh j Perform splicing operations along the feature dimension;
[0046] The softmax function is used to normalize the unnormalized attention coefficient e ij Perform normalization processing to obtain the attention coefficient α ij , the softmax function formula is expressed as:
[0047]
[0048] in, is the set of neighbor nodes of node i, and
[0049] Optionally, the edge-cloud collaborative reasoning module includes a local decision-making unit, a cloud-based enhancement unit, and a communication optimization unit. The local decision-making unit includes a diagnostic model with a model size of <4MB. The diagnostic model is used to identify basic diseases locally and cache key feature vectors through a Redis embedded database.
[0050] Optionally, the cloud enhancement unit includes a multi-farm joint learning framework and a case system. The multi-farm joint learning framework includes edge devices of different farms participating in the joint learning, and updates the model parameters by exchanging information. Let the local model parameter of the kth edge device be θ k , after local training, calculate the parameter update Δθk Upload to the cloud server for aggregation and update the global model parameter θ. The formula is expressed as:
[0051]
[0052] Among them, n k is the number of samples on the k-th device,
[0053] The case system includes a rule engine and a case library. The rule engine is used to analyze low-confidence cases uploaded by edge devices according to preset disease diagnosis rules, and the case library is used to store historical difficult cases and diagnosis results.
[0054] Optionally, the communication optimization unit includes an improved feature compression transmission protocol based on JPEG2000, wherein the JPEG2000 uses wavelet transform to compress images, wherein the wavelet decomposition layer number is 5 layers, and Daubechies wavelet basis function is used, and data is transmitted through bandwidth adaptive transmission, supporting multi-mode switching, and dynamically adjusting the transmission strategy according to the network bandwidth status, and the diagnostic delay is <2s.
[0055] In summary, this application includes at least one of the following beneficial technical effects:
[0056] The present invention uses a dual-camera module combined with an active fill light unit to improve the clarity of acquired images under complex lighting conditions. It also enhances image details through an improved MSRCR algorithm that fuses infrared channel data. At the same time, it uses the DeepLabv3+ network to perform dynamic background segmentation, effectively eliminating the interference of water turbidity and algae occlusion, separating shrimp body and background interference features, and reducing the false detection rate.
[0057] The deformable convolution submodule and channel-space attention mechanism in the backbone network module further enhance the ability to extract small targets and complex features. This allows accurate identification of subtle disease features that may be overlooked in complex scenarios. The improved bidirectional feature pyramid network introduces cross-layer skip connections, which enhances the retention of key features in key areas such as the carapace edge and gills, improves the recognition accuracy of multiple diseases at the same time, and reduces cross-interference.
[0058] Furthermore, the present invention utilizes the diagnostic model and key feature vector cache of the local decision unit to realize basic disease identification in the offline state, meet the real-time requirements of the edge device, provide farmers with instant diagnosis results, and combine with the cloud enhancement unit to effectively improve the overall diagnostic accuracy. In actual breeding, farmers can quickly obtain preliminary diagnosis results through edge devices. For complex cases, the edge device transmits the data to the cloud for further analysis, and finally quickly obtains an accurate diagnosis, reducing the diagnosis time and thus improving the economic benefits of breeding. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 A structural block diagram of an edge computing system for crayfish disease identification based on an improved YOLOv5 algorithm is given in the present invention. DETAILED DESCRIPTION
[0060] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0061] The present invention proposes an edge computing system for identifying crayfish diseases based on an improved YOLOv5 algorithm. Figure 1 As shown in the figure, it includes data acquisition and preprocessing module, disease detection model based on improved YOLOv5 algorithm, multi-label association classification module and edge cloud collaborative reasoning module.
[0062] The data acquisition and preprocessing module is used to collect and preprocess data. The data acquisition and preprocessing module includes a multispectral imaging unit, an adaptive enhancement unit, and a data normalization unit, wherein:
[0063] The multispectral imaging unit includes a visible light and near-infrared dual camera module and an active fill light device. The visible light and near-infrared dual camera module is installed on a movable monitoring bracket. The active fill light device includes an ambient light sensor and an LED fill light array. The ambient light sensor monitors the light intensity I in real time at a frequency of 10 times per second. env , the power P of the LED fill light array is controlled by adjusting the function, and the adjustment function formula is expressed as: P = f(I env ), when it is detected that the light intensity in a certain area is lower than the set threshold, the intensity of the LED fill light array is automatically adjusted to ensure a clear image of the crayfish. The threshold is preferably set to 1000 lux.
[0064] The adaptive enhancement unit adopts the fusion of infrared channel data I IR The improved MSRCR algorithm based on (x, y) combines infrared channel data with visible light data at a weight ratio of 0.6:0.4, performs pixel-by-pixel enhancement on the collected crayfish images, and performs dynamic background segmentation through the DeepLabv3+ network based on the MobileNetv2 backbone architecture to separate the crayfish from the water background, extract the outline and detail features of the crayfish, fuse the features of different scales and output the feature map F ASPP , the calculation formula of the feature map output is:
[0065]
[0066] Among them, F is the input feature map, f i is the convolution operation with different dilation rates, and M is the number of operations with different dilation rates;
[0067] The data normalization unit uses scale-adaptive pyramid scaling technology to dynamically adjust the image scale according to the size of the shrimp. For the input image I, the scale factor α is i Scaling is performed to obtain a set of images of different scales {I i}={S(I,α i )}, and then input the image into the non-rigid deformation correction network to correct the image with a standard size of 640×640 to correct the image deformation and ensure that the image meets the input requirements of the subsequent detection network.
[0068] The present invention can improve the clarity of acquired images under complex lighting conditions by combining a dual-camera module with an active fill light unit, and enhance image details through an improved MSRCR algorithm that fuses infrared channel data. At the same time, dynamic background segmentation is performed through the DeepLabv3+ network, effectively eliminating the interference of water turbidity and algae occlusion, separating the shrimp body and background interference features, and reducing the false detection rate.
[0069] The disease detection model based on the improved YOLOv5 algorithm is used to detect and locate small-scale lesions on edge devices in real time. The disease detection model based on the improved YOLOv5 algorithm includes a backbone network module, a feature fusion architecture based on an improved bidirectional feature pyramid network, and a quantization deployment module. The backbone network module includes a deformable convolution submodule, which introduces an offset Δp in the standard convolution operation of the YOLOv5 algorithm. n , the calculation formula of its convolution operation output y(p0) is:
[0070]
[0071] Among them, x is the input feature map, p0 is the output feature map position, p n is the convolution kernel sampling position, w n is the convolution kernel weight, N is the number of sampling points, and the deformable convolution submodule performs convolution operation on the crayfish image, which can adapt to the irregular shape of crayfish disease characteristics and extract small target features such as shell abnormalities caused by diseases.
[0072] The improved bidirectional feature pyramid network introduces cross-layer skip connections, assuming that the input feature maps are F1, F2, ..., F n , after convolution and addition operations, the fused feature map F is output out, its calculation process includes the information transmission of cross-layer connections, and the formula is expressed as:
[0073] F out =f(F1,F2,…,F n ,skip-connections)
[0074] The improved bidirectional feature pyramid network fuses features at different levels, reducing misjudgments caused by cross-interference.
[0075] The feature fusion architecture filters and fuses features from different sources through an adaptive feature selection gate. a , F b , the calculation formula of the gate output G is as follows:
[0076] G=σ(W1F a +W2F b )
[0077] Among them, W1 and W2 are weight matrices, σ is the activation function, and the gate output G is used to control the feature fusion ratio.
[0078] The quantization deployment module quantizes the model weights and uses TensorRT to perform layer fusion on the model, merging multiple consecutive convolution, batch normalization, and activation function layers into one computing node. During the quantization process, mixed precision quantization is used to quantize from FP32 to INT8, and the classification head retains FP16, which reduces the amount of calculation while ensuring the accuracy of the model. The quantization process maps the floating point number x to an integer through the quantization parameters α and Δ The formula is as follows:
[0079]
[0080] Among them, clip is the clipping function, x min and x max The quantitative range.
[0081] The channel spatial attention mechanism is introduced into the backbone network module. In the channel attention part, the channel features are obtained through global average pooling and global maximum pooling operations, and the channel attention weight M is calculated by the multi-layer perceptron. c (F), the calculation formula is: M c (F) = σ(MLP(AvgPool(F))+MLP(MaxPool(F))), where σ is the activation function and F is the input feature map;
[0082] In the spatial attention part, the channel dimension is compressed and the spatial attention weight M is obtained through convolution operation. s (F), the final output feature map F' = F × M c(F)×M s (F) For the key areas of crayfish, such as the carapace and gills that are prone to lesions, the channel attention weight is preferably 0.8, and the spatial attention weight is preferably 0.7 near the lesion area, thereby enhancing the sensitivity to lesion features.
[0083] This invention improves the ability to extract small targets and complex features through deformable convolution submodules and channel space attention mechanisms, and can accurately identify subtle disease features that may be overlooked in complex scenarios. The improved bidirectional feature pyramid network introduces cross-layer jump connections, thereby enhancing the retention of features in key areas such as the carapace edge and gills, improving the recognition accuracy of multiple concurrent diseases and reducing cross-interference.
[0084] The multi-label association classification module is used to classify multi-disease associations. The multi-label association classification module includes a pathology knowledge graph unit, a dynamic loss function unit, and an uncertainty calibration unit. The pathology knowledge graph unit includes a disease association matrix and a graph attention network encoder. The disease association matrix includes a disease association matrix A constructed based on clinical data, and the matrix element a ij represents the strength of association between symptoms i and j;
[0085] The graph attention network encoder is used to take the disease association matrix A as input to construct a graph attention network. The graph attention network is used to model the association relationship of concurrent diseases. In the graph attention network, the output feature calculation formula of node i is:
[0086]
[0087] Among them, N(i) is the set of neighbor nodes of node i, α ij is the attention coefficient, which is obtained by calculating the similarity of node features, W is the weight matrix, and σ is the activation function.
[0088] Calculating the similarity of node features involves linearly transforming the features of node i and neighbor node j, obtaining the transformed features, concatenating the transformed features, performing linear transformation through the shared attention mechanism weight vector a, and processing it with the LeakyReLU activation function to obtain the unnormalized attention coefficient e. ij , and its calculation formula is:
[0089] e ij =LeakyReLU(a T [Wh i ||Wh j ])
[0090] Among them, [Wh i ||Wh j ] means to convert Whi and Wh j Perform splicing operations along the feature dimension;
[0091] Use the softmax function to normalize the unnormalized attention coefficient e ij Perform normalization to obtain the attention coefficient α ij , the softmax function formula is expressed as:
[0092]
[0093] in, is the set of neighbor nodes of node i, and
[0094] The dynamic loss function unit includes a confidence-based weight adjustment algorithm, which is used to dynamically adjust the loss function weight according to the confidence of the model prediction. Suppose the model's prediction confidence for sample x is c(x), and the weights w in the loss function are i Through the function w i = g(c(x)) to adjust;
[0095] Introduce the mutual exclusivity constraint of the disease in the loss function. For mutually exclusive diseases A and B, add the constraint term in the loss function in and is the model's predicted value for symptoms A and B, and λ is the constraint strength coefficient.
[0096] The uncertainty calibration unit uses Monte Carlo Dropout uncertainty estimation to obtain uncertainty estimation results. During model inference, the Dropout layer is randomly applied 50 times to obtain multiple prediction results. Let the model output be y, and the uncertainty is obtained by calculating the variance of the prediction results. The variance calculation formula is:
[0097]
[0098] Among them, y t is the t-th prediction result, is the average prediction result;
[0099] According to the uncertainty estimation results, the credibility of the diagnosis results is divided into high, medium and low confidence. The high confidence results are directly output, the medium confidence results are marked with a concern mark, and the low confidence results are marked with a manual review mark.
[0100] In the present invention, the disease association relationship is modeled by the pathological knowledge graph unit, the dynamic loss function unit suppresses contradictory diagnostic results, and the uncertainty calibration unit verifies the fuzzy case labels, which can more accurately diagnose the disease of Procambarus clarkii, help farmers take targeted measures in time, reduce the large-scale death of shrimp caused by the disease, and avoid the diseased and dead shrimp from rotting and decomposing in the water body, thereby preventing the deterioration of water quality and protecting the aquaculture ecological environment. At the same time, it reduces the cost of drug use and reduces the damage of drugs to the water ecology.
[0101] The edge-cloud collaborative reasoning module is used to implement disease diagnosis reasoning, including a local decision-making unit, a cloud enhancement unit, and a communication optimization unit. The local decision-making unit includes a diagnostic model with a model size of <4MB. The diagnostic model is used to identify basic diseases locally and cache key feature vectors through the Redis embedded database.
[0102] The cloud enhancement unit includes a multi-farm joint learning framework and a case system. The multi-farm joint learning framework includes edge devices from different farms participating in the joint learning. By exchanging model parameter update information, the local model parameter of the kth edge device is set to θ k , after local training, calculate the parameter update Δθ k Upload to the cloud server for aggregation and update the global model parameter θ. The formula is expressed as:
[0103]
[0104] Among them, n k is the number of samples on the k-th device,
[0105] The case system includes a rule engine and a case library. The rule engine is used to analyze low-confidence cases uploaded by edge devices according to preset disease diagnosis rules, and the case library is used to store historical difficult cases and diagnosis results.
[0106] The communication optimization unit includes a feature compression transmission protocol improved based on JPEG2000. JPEG2000 uses wavelet transform to compress images, where the wavelet decomposition layer number is 5 and the Daubechies wavelet basis function is used. Data is transmitted through bandwidth adaptive transmission, supporting multi-mode switching and dynamically adjusting the transmission strategy according to the network bandwidth status. The diagnostic delay is <2s. The edge device adaptively switches between 4G, 5G or Wi-Fi networks based on the real-time monitored network status. When the 4G signal strength is lower than 10dBm, the device automatically switches to a nearby Wi-Fi hotspot. If the signals of both are not ideal, the data will be temporarily cached and transmitted immediately after the signal is restored.
[0107] Through diagnostic models and key feature vector caching, the present invention can realize basic disease identification in an offline state, meet the real-time requirements of edge devices, provide farmers with instant diagnostic results, and effectively improve the overall diagnostic accuracy in combination with cloud enhancement units. In actual breeding, farmers can quickly obtain preliminary diagnostic results through edge devices. For complex cases, edge devices will transmit data to the cloud for further analysis, and finally quickly obtain accurate diagnosis, reducing diagnosis time and thus improving the economic benefits of breeding.
[0108] The above specific embodiments are merely several optional embodiments of the present invention. Based on the technical solutions of the present invention and the relevant inspirations of the above embodiments, those skilled in the art may make various alternative improvements and combinations to the above specific embodiments.
Claims
1. An edge computing system for crayfish disease identification based on an improved YOLOv5 algorithm, characterized in that: It includes a data acquisition and preprocessing module, a disease detection model based on the improved YOLOv5 algorithm, a multi-label association classification module, and an edge-cloud collaborative reasoning module, among which: The data acquisition and preprocessing module is used to acquire and preprocess data. The disease detection model based on the improved YOLOv5 algorithm is used to detect and locate small-scale lesions on edge devices in real time; The multi-label association classification module is used to classify multi-disease associations; The edge cloud collaborative reasoning module is used to implement disease diagnosis reasoning.
2. The edge computing system for crayfish disease identification based on the improved YOLOv5 algorithm according to claim 1 is characterized in that: The data acquisition and preprocessing module includes a multispectral imaging unit, an adaptive enhancement unit and a data normalization unit, wherein: The multispectral imaging unit includes a visible light and near infrared dual camera module and an active fill light device, the active fill light device includes an ambient light sensor and an LED fill light array, the ambient light sensor is used to monitor the ambient light intensity I in real time. env , the power P of the LED fill light array is controlled by a regulation function, and the regulation function formula is expressed as: P = f (I env ); The adaptive enhancement unit adopts the method of fusing infrared channel data I IR The improved MSRCR algorithm of (x, y) is used to enhance the image, and the dynamic background is segmented through the DeepLabv3+ network, and the features of different scales are fused and the feature map F is output. ASPP , the calculation formula of the feature map output is: Among them, F is the input feature map, f i is the convolution operation with different dilation rates, and M is the number of operations with different dilation rates; The data normalization unit uses scale-adaptive pyramid scaling technology to dynamically adjust the image scale according to the size of the shrimp body. For the input image I, the scale factors α i Scaling is performed to obtain a set of images of different scales {I i }={S(I,α i )}, and correct the shrimp body image.
3. The edge computing system for crayfish disease identification based on the improved YOLOv5 algorithm according to claim 1 is characterized in that: The disease detection model based on the improved YOLOv5 algorithm includes a backbone network module, a feature fusion architecture based on an improved bidirectional feature pyramid network, and a quantization deployment module; The backbone network module includes a deformable convolution submodule, which introduces an offset Δp in the standard convolution operation of the YOLOv5 algorithm. n , the calculation formula of its convolution operation output y(p0) is: Among them, x is the input feature map, p0 is the output feature map position, p n is the convolution kernel sampling position, w n is the convolution kernel weight, N is the number of sampling points; The improved bidirectional feature pyramid network introduces cross-layer skip connections, assuming that the input feature maps are F1, F2, ..., F n , after convolution and addition operations, the fused feature map F is output out , its calculation process includes the information transmission of cross-layer connections, and the formula is expressed as: F out =f(F1,F2,…,F n ,skip-connections) The feature fusion architecture filters and fuses features from different sources through an adaptive feature selection gate. a , F b , the calculation formula of the gate output G is as follows: G=σ(W1F a +W2F b ) Among them, W1, W2 are weight matrices, σ is the activation function, and the gate output G is used to control the feature fusion ratio; The quantization deployment module quantizes the model weights and uses TensorRT to perform layer fusion on the model, combining multiple consecutive convolution, batch normalization, and activation function layers into one computing node; The quantization process uses mixed precision quantization to quantize from FP32 to INT8, and the classification head retains FP16. The quantization process maps the floating point number x to an integer through the quantization parameters α and Δ The formula is as follows: Among them, clip is the clipping function, x min and x max The quantitative range.
4. The edge computing system for identifying crayfish diseases based on the improved YOLOv5 algorithm according to claim 3 is characterized in that: The backbone network module introduces a channel space attention mechanism. In the channel attention part, the channel features are obtained through global average pooling and global maximum pooling operations, and the channel attention weight M is calculated by the multi-layer perceptron. c (F), calculated as: M c (F)=σ(MLP(AvgPool(F))+MLP(MaxPool(F))) Among them, σ is the activation function, F is the input feature map; In the spatial attention part, the channel dimension is compressed and the spatial attention weight M is obtained through convolution operation. s (F), the final output feature map F' = F × M c (F)×M s (F).
5. The edge computing system for crayfish disease identification based on the improved YOLOv5 algorithm according to claim 1, characterized in that: The multi-label association classification module includes a pathology knowledge graph unit, a dynamic loss function unit and an uncertainty calibration unit; The pathological knowledge graph unit includes a disease association matrix and a graph attention network encoder. The disease association matrix includes a disease association matrix A constructed based on clinical data, a matrix element a ij represents the strength of association between symptoms i and j; The graph attention network encoder is used to take the disease association matrix A as input to construct a graph attention network, and the association relationship of concurrent diseases is modeled through the graph attention network. In the graph attention network, the output feature calculation formula of node i is: Among them, N(i) is the set of neighbor nodes of node i, α ij is the attention coefficient, which is obtained by calculating the similarity of node features, W is the weight matrix, and σ is the activation function; The dynamic loss function unit includes a confidence-based weight adjustment algorithm, which is used to dynamically adjust the loss function weight according to the confidence of the model prediction. Let the model's prediction confidence for sample x be c(x), and the weights w of each item in the loss function be i Through the function w i = g(c(x)) to adjust; Introduce the mutual exclusivity constraint of the disease into the loss function. For mutually exclusive diseases A and B, add the constraint term in the loss function in and is the model's predicted value for symptoms A and B, and λ is the constraint strength coefficient.
6. The edge computing system for crayfish disease identification based on the improved YOLOv5 algorithm according to claim 5, characterized in that: The uncertainty calibration unit uses Monte Carlo Dropout uncertainty estimation to obtain uncertainty estimation results. During model inference, the Dropout layer is randomly applied multiple times to obtain multiple prediction results. Let the model output be y, and the uncertainty is obtained by calculating the variance of the prediction results. The variance calculation formula is: Among them, y t is the t-th prediction result, is the average prediction result; According to the uncertainty estimation result, the credibility of the diagnosis result is divided into high, medium and low confidence. The high confidence result is directly output, the medium confidence result is marked with a focus mark, and the low confidence result is marked with a manual review mark.
7. The edge computing system for crayfish disease identification based on the improved YOLOv5 algorithm according to claim 5, characterized in that: The similarity of the node features is calculated by linearly transforming the features of node i and neighbor node j, obtaining the transformed features, concatenating the transformed features, performing linear transformation through the shared attention mechanism weight vector a, and processing the LeakyReLU activation function to obtain the unnormalized attention coefficient e ij , and its calculation formula is: e ij =LeakyReLU(a T [Wh i ‖Wh j ]) Among them, [Wh i ‖Wh j ] means to convert Wh i and Wh j Perform splicing operations along the feature dimension; The softmax function is used to normalize the unnormalized attention coefficient e ij Perform normalization processing to obtain the attention coefficient α ij , the softmax function formula is expressed as: in, is the set of neighbor nodes of node i, and 8. The edge computing system for crayfish disease identification based on the improved YOLOv5 algorithm according to claim 1, characterized in that: The edge-cloud collaborative reasoning module includes a local decision-making unit, a cloud-side enhancement unit, and a communication optimization unit. The local decision-making unit includes a diagnostic model with a model size of <4MB. The diagnostic model is used to locally identify basic diseases and cache key feature vectors through a Redis embedded database.
9. The edge computing system for crayfish disease identification based on the improved YOLOv5 algorithm according to claim 8, characterized in that: The cloud enhancement unit includes a multi-farm joint learning framework and a case system. The multi-farm joint learning framework includes edge devices of different farms participating in the joint learning. By exchanging model parameter update information, the local model parameter of the kth edge device is set to θ k , after local training, calculate the parameter update Δθ k Upload to the cloud server for aggregation and update the global model parameter θ. The formula is expressed as: Among them, n k is the number of samples on the k-th device, The case system includes a rule engine and a case library. The rule engine is used to analyze low-confidence cases uploaded by edge devices according to preset disease diagnosis rules, and the case library is used to store historical difficult cases and diagnosis results.
10. The edge computing system for identifying crayfish diseases based on the improved YOLOv5 algorithm according to claim 8, characterized in that: The communication optimization unit includes an improved feature compression transmission protocol based on JPEG2000. The JPEG2000 uses wavelet transform to compress images, where the wavelet decomposition layer number is 5 layers and Daubechies wavelet basis function is used. Data is transmitted through bandwidth adaptive transmission, multi-mode switching is supported, and transmission strategy is dynamically adjusted according to network bandwidth status. The diagnostic delay is <2s.
Citation Information
Cited By
Insect situation monitoring camera and monitoring method thereof
CN121170461A
Ultrasonic real-time focus positioning and benign and malignant auxiliary diagnosis platform based on deep learning
CN121329943A
A Deep Learning-Based Method for Real-Time Ultrasound Lesion Localization and Auxiliary Diagnosis of Benign and M
CN121329943B