With the improvement of people’s living standards and the increasing demand for food quality,how to use portable non-invasive live detection equipment to improve the breeding technology of animal husbandry has become the focus of researchers.Fat content detection in live pig B-ultrasound image based on deep regression network is a non-destructive fat content detection technology in vivo,which can be widely used in pork grading,processing,quality control,pig breeding,management,and disease prediction.However,due to the inherent speckle noise in ultrasound images,it is difficult to extract distinctive features of fat or muscle,which will affect the accuracy of the computer vision model for fat content detection.This thesis focuses on how to predict the fat content value of live pigs accurately and efficiently.The main research contents are:(1)A hybrid filtering enhancement method combining spatial filtering and frequency domain filtering is proposed for B-ultrasound images,which reduces the image quality due to speckle noise.This method first uses homomorphic filtering to enhance dark area details,increase contrast,and remove noise,and then uses Gaussian filtering to increase the smoothness of the image.The continuous action of homomorphic filtering and Gaussian filtering makes the speckle noise in pig B-ultrasound images better suppressed,making the fat and muscle features in the image more distinguishable.(2)To address the issues of unclear fat characteristic information and low image resolution,a multi-level network model called Hybrid Attention Super Resolution Network(HASRNet)was proposed.By improving VGG-16 and combining the residual structure as the backbone network,more differentiated fat content features can be extracted by superimposing multiple modules.A feature extraction module using DO-Conv in combination with ACON activation function and a super-resolution feature fusion module was proposed.The CBAM hybrid domain attention module was used to select important feature information,and the Huber loss function was used to train the network.(3)To improve the processing efficiency of the fat content detection task of pig B-ultrasound image,and avoid the problem of excessive prediction network parameters and high time running cost,a lightweight network Lite-HASRNet is proposed based on HASRNet.Compared with HASRNet,an improved DO-DAConv convolution is proposed,which uses deep separable and asymmetric convolution based on DO-Conv.To ensure the accuracy of the lightweight network,knowledge distillation is applied to Lite-HASRNet using HASRNet as the teacher network,resulting in the KD-Lite-HASRNet model.The goal is to maintain certain accuracy and robustness while reducing the model size.To verify the effectiveness of the algorithm,this paper conducts related experiments on the live pig B-ultrasound image dataset.HASRNet had a R~2 of 0.9545 on the validation set.After 4-fold cross-validation on the test set,the average value of R~2 was 0.9361,the best value was 0.9606.The average value of MSE was 0.3926,and the best value was 0.2374.The mean value of MAE was 0.2429,and the best value was 0.2211.Compared with other advanced algorithms,the regression prediction indicators of this thesis’s algorithm have been improved.During inference,the best value of R~2 for KD-Lite-HASRNet was only 0.8858,but the parameters and FLOPs could be reduced by 43.69%and 76.57%,respectively,compared with HASRNet.The experimental results show that HASRNet has better prediction accuracy and KD-Lite-HASRNet has a lower time computation cost.The model in this thesis can effectively extract distinctive features of fat content and more accurately and efficiently predict fat content values using ultrasound images of live pigs. |