宋怀波, 姜波, 吴倩, 李通, 何东健. 基于头颈部轮廓拟合直线斜率特征的奶牛跛行检测方法[J]. 农业工程学报, 2018, 34(15): 190-199. DOI: 10.11975/j.issn.1002-6819.2018.15.024
    引用本文: 宋怀波, 姜波, 吴倩, 李通, 何东健. 基于头颈部轮廓拟合直线斜率特征的奶牛跛行检测方法[J]. 农业工程学报, 2018, 34(15): 190-199. DOI: 10.11975/j.issn.1002-6819.2018.15.024
    Song Huaibo, Jiang Bo, Wu Qian, Li Tong, He Dongjian. Detection of dairy cow lameness based on fitting line slope feature of head and neck outline[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2018, 34(15): 190-199. DOI: 10.11975/j.issn.1002-6819.2018.15.024
    Citation: Song Huaibo, Jiang Bo, Wu Qian, Li Tong, He Dongjian. Detection of dairy cow lameness based on fitting line slope feature of head and neck outline[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2018, 34(15): 190-199. DOI: 10.11975/j.issn.1002-6819.2018.15.024

    基于头颈部轮廓拟合直线斜率特征的奶牛跛行检测方法

    Detection of dairy cow lameness based on fitting line slope feature of head and neck outline

    • 摘要: 针对人工跛行检测不够及时,难以发现突发中、重度跛行及轻度跛行行为的问题,该文提出了一种基于正态分布背景统计模型(normal background statistical model, NBSM)与局部循环中心补偿跟踪模型(local circulation center compensation track, LCCCT )和线性斜率最近邻分类(distilling data of KNN, DSKNN)技术的奶牛跛行检测方法。首先利用NBSM模型对奶牛序列图像中的目标奶牛像素区域进行分割,然后对得到的奶牛像素区域利用LCCCT模型提取目标奶牛身体前部像素区域,用其区域通过DSKNN模型提取目标奶牛的头部、颈部以及与颈连接的背部轮廓线拟合直线斜率数据,基于大样本视频序列帧数据将视频集制成轻度跛行、中重度跛行及正常等3类标签的斜率数据集。为了验证算法的有效性,对随机选取的18段奶牛视频进行了验证,其中正常奶牛、轻度跛行奶牛及中重跛行奶牛视频段各6段,获得头部、颈部及背部连接处的拟合直线斜率数据集。在未清洗的数据集上,分别利用SVM、Naive Bayes以及KNN分类算法进行了奶牛跛行的分类检测试验,试验结果表明,SVM与Naive Bayes跛行分类检测正确率均为82.78%,KNN奶牛跛行检测正确率为81.67%。将未清洗的数据集进行清洗后,3类算法的结果表明,KNN分类算法的跛行检测正确率达93.89%,高于SVM分类算法的91.11%及Naive Bayes分类算法的86.11%。上述结果表明通过头部、颈部及背部连接处的拟合直线斜率特性可以正确检测奶牛跛行,未清洗的数据经数据清洗后,KNN分类算法可以取得更好的检测结果。该研究结果对于奶牛跛行疾病的预防、诊断具有重要意义。

       

      Abstract: Abstract: Lameness diseases could cause high elimination rate of the worthless dairy cow, and early detection of dairy cow lameness disease is a significant research field of dairy farming. In this research, a lameness detection method of dairy cows with the fusion of LCCCT (local circulation center compensation tracking) and DSKNN (distilling data of k-nearest neighbor) was proposed. By using the normal background statistical model (DNBSM), the dairy cow videos were decomposed into image sequences, and segmented to target region and backgrounds. Then, the obtained pixel area of the upper contour of the cow body was extracted by the LCCCT. In the detected region, DSKNN were used to extract the slope data of the head, neck and the back connected to the neck region. Firstly, the DNBSM model is used to separate the target dairy cow's pixel area and background from the dairy cow's sequence image. Since the frontal movement of dairy cow body is greater than the back movement of the dairy cow body, the DNBSM algorithm is used to lead to a better detection of the front body pixels for the dairy cow. Then, the LCCCT model is used to track and extract the pixel area of the front dairy cow body, and the DSKNN model is used to extract the target's head and neck for slope data of contour line fitted. The changes in the slope data of the fitted straight line of the dairy cow's head and neck were used as the basis for the detection of lameness of dairy cows. The characteristics of the slope data of head-neck fit lines of different dairy cows are different. Compared with other body parts of dairy cows, the head and neck area data of dairy cows are relatively easy to obtain. When dairy cows stand or walk, the head and neck characteristics can be extracted stably, which is the basis for judging lameness. The upper contour of the dairy cow's body starts from the tip of the dairy cow's head and ends beyond the neck line. If the extracted contour line belongs to a defined area range, it is considered to be a valid contour line. Outside this range, it is considered that the extracted contour line is abnormal or has an error. The videos were divided into 3 slope data sets with 3 kinds of labels including slight lameness, moderate-severe lameness, and normal based on large sample video sequence frame data. In order to verify the validity of the algorithm, a total of 18 videos of dairy cows were processed. The slope data set was obtained from fitting line at the junction of the head, neck and back region. On the original data set, SVM, Naive Bayes algorithm and KNN classification algorithm were used to test the accuracy of dairy cow lameness detection, and the detection correct rates of SVM and Naive Bayes algorithm were both 82.78%, which were higher than that of KNN algorithm which was 81.67%. Test result illustrates that the slope feature of fitting line at the junction of the head, the neck and the back can be used to detect dairy cow lameness diseases. After cleaning the original data set, the correct detection rate of lameness classification by KNN classification algorithm was 93.89%, and the correct detection rates of SVM classification and Naive Bayes classification algorithm were 91.11%, and 86.11%, respectively. The results show that the KNN classification algorithm can get better results using cleaned data set. The results of this research can provide the reference for the prevention and diagnosis of lameness disease of dairy cows.

       

    /

    返回文章
    返回