摘要
目前猪群图像检测均为基于水平框的目标检测算法,对于图像中猪体粘连和相互遮挡情况检测率较低,针对图像中的猪只长宽比例较大和可能发生任意角度旋转的特点,提出了一种基于双扩张层和旋转框定位的群猪目标检测算法(Dual dilated layer and rotary box location network,DR Net)。采集3个猪场的群猪图像,利用数据增强保留9600幅图像制作数据集;基于膨胀卷积搭建提取图像全局信息的双扩张层,借鉴Res2Net模块改进CSP层融合多尺度特征,猪只目标以旋转框定位并采用五参数表示法在模型训练中利用Gaussian Wasserstein distance计算旋转框的回归损失。试验结果表明,DR Net对猪只目标识别的精确率、召回率、平均精确率、MAE、RMSE分别为98.57%、97.27%、96.94%、0.21、0.54,其检测效果优于YOLO v5,提高了遮挡与粘连场景下的识别精度和计数精度。利用可视化特征图分析算法在遮挡和粘连场景下能够利用猪只头颈部、背部或尾部特征准确定位目标。该研究有助于智能化猪场建设,可为后续猪只行为识别研究提供参考。
At present,the target detection algorithm based on horizontal box is applied to pig objection detection.The adhesion and mutual occlusion in the image of pigs bring great difficulty to individual pig detection.The image of pig has a large ratio of length to width and may rotate at any angle.Object detection algorithm for group pig images based on dual dilated layer and rotary box location network(DR Net)was proposed.Images of pigs was collected in three pig farms.A dynamic clustering method based on histogram feature and singular value decomposition was used to extract the key frames of pig videos,Laplace operator was used to eliminate images with unclear targets.There were 9600 images as the data set after data enhancement.The outline of the pig with rotary box was marked.Data set was divided into training set,verification set and test set according to 8∶1∶1.Dual dilated layer used the residual structure and combined two convolution with different dilation factors.The receptive field was increased exponentially with the increase of layers.Stacking dual dilated layers can obtain very large receptive field,it can help the model understand the global information of the image with fewer parameters.Every pig target was located in a rotary box and represented by five parameters.In training,regression loss calculation method based on Gaussian Wasserstein distance was used.The model can get prediction results more accurate.In DR Net,the features of the input image was extracted by dual dilated layer.The CSP layer containing multi⁃layer Res2Net module,which was used to feature fusion and feature extraction of different scales.The prediction results were output through head network.The results showed that the precision,recall,mean average precision,MAE and RMSE of DR Net were 98.57%,97.27%,96.94%,0.21 and 0.54,respectively.DR Net was superior to YOLO v5 and YOLO v5 with rotary box location and pig target recognition accuracy was improved.By analyzing the visualization feature map,DR Net can accurately locate the target using the head,neck,back or tail feature of pigs under occlusion and adhesion condition.The research can contribute to the construction of intelligent pig farm and provide reference for the subsequent research on pig behavior recognition.
作者
耿艳利
林彦伯
付艳芳
杨淑才
GENG Yanli;LIN Yanbo;FU Yanfang;YANG Shucai(School of Artificial Intelligence,Hebei University of Technology,Tianjin 300130,China;Engineering Research Center of Intelligent Rehabilitation Device and Detection Technology,Ministry of Education,Tianjin 300130,China;Hebei Provincial General Animal Husbandry Station,Shijiazhuang 050035,China;Tianjin Mojieke Technology Co.,Ltd.,Tianjin 300130,China)
出处
《农业机械学报》
EI
CAS
CSCD
北大核心
2023年第4期323-330,共8页
Transactions of the Chinese Society for Agricultural Machinery
基金
河北省重点研发计划项目(22326606D、20326620D)。