Font Size: a A A

Research On Key Parts Extraction And Lameness Detection Of Dairy Cows Based On Video Analysis

Posted on:2020-12-07Degree:MasterType:Thesis
Country:ChinaCandidate:Q WuFull Text:PDF
GTID:2393330596472446Subject:Agricultural Electrification and Automation
Abstract/Summary:PDF Full Text Request
The intelligent detection of dairy cow's lameness is of great significance to improve the welfare of dairy cows and promote the modernization of breeding industry.However,manual detection method for dairy cow's lameness is time-consuming and subjective,which is difficult to adapt the continuous expansion scale of dairy farming.At present,video analysis based on deep learning method has developed and applied rapidly,which provides a very good method for rapid detection of cow's lameness.In order to realize rapid and accurate detection of dairy cow's lameness,a detection method of cow's lameness was proposed in this study,which was based on the characteristics of the relative step length of the front and back legs.The detection of key parts of the target and dairy cow's lameness in complex external environment were mainly studied.The main work and conclusions are as follows:(1)Accurate localization of dairy cow target is the basis in detecting its key parts.In order to achieve accurate localization of dairy cow target,theoretical analysis on optical flow method,inter-frame difference method,background subtraction method and Gauss mixture model was carried out firstly,and experimental studies on cow's lameness detection based on these different models were carried out.After comprehensive analysis,the method combined Gauss mixture model with background subtraction method was used to detect the cow target in this paper.The background was modeled by Gauss mixture model,and the dairy cow target was segmented by background subtraction method.However,there existed cases of breakage and incompleteness after cow's target segmentation.Therefore,to obtain the accurate cow's position,method of merging the minimal rectangular boxes was used to integrate the segmentation results in this paper.Finally,by calculating the pixel value of the rectangular frame area of the complete cow target,an appropriate threshold was set to eliminate the video frame that did not include the complete cow target.The results showed that it was effective and feasible to use the cow target detection algorithm to obtain the video frame samples containing the complete cow target.This study could lay a foundation for the accurate extraction of key parts of the cow.(2)Accurate segmentation of key parts of dairy cow target is the premise of dairy cow lameness detection.In order to detect key parts of dairy cow target accurately,YOLOv3 deep learning network was used to carry out research on detection of key parts of dairy cowin complex scenes in this study,and this method was compared with Faster R-CNN algorithm and Tiny-YOLOv2 algorithm.The results showed that the accuracy,recall rate,average frame rate and average accuracy rate of YOLOv3 algorithm were 99.18%,97.51%,21f/s and 93.73%,respectively;the accuracy,recall rate,average frame rate and average accuracy rate of Faster R-CNN algorithm were 97.48%,95.32%,8f/s,93.47%,respectively;the accuracy,recall rate,average frame rate and average accuracy rate of Tiny-YOLOv2 algorithm were 83.33%,65.55%,76f/s,76.33%,respectively,which indicated that YOLOv3 algorithm was more effective and feasible for high-precision detection of key parts of dairy cow target.In the leg category,the average accuracy of YOLOv3,Faster R-CNN and Faster R-CNN were 90.83%,90.11% and 62.26%,respectively.The results showed that YOLOv3 algorithm could be applied for high-precision detection of key parts of dairy cows.(3)The selection of lameness characteristics is the key to the automatic detection of cow's lameness.A method for detecting cow's lameness based on the characteristics of the relative steps of front and back legs was presented in this paper.It was found that the relative step length of the cow legs had obvious change when the cow limped,so the characteristics were used to detect the lameness of cows.According to the change period of the relative step length of the front and back legs and the fluctuation of cow's walking speed,a characteristic vector of relative step length was constructed by connecting the front and back legs step length in series with 50 frames.The construction of the characteristic vector provided data support for the use of the classifier to detect cow lameness.(4)In order to realize accurate detection of cow's lameness,a suitable classifier model for cow's lameness detection was constructed in this paper.And 92 cow's video samples were divided into training set and test set according to the proportion ratio of 2:1.That is,there were 62 samples in the training set and 30 samples in the test set.The detection test of lameness classification was carried out on the test set by using SVM classifier,KNN classifier and decision tree classifier,respectively.The test results showed that the accuracy of SVM classifier was up to 95.62%,which was apparently higher than the accuracy of KNN classifier of 94.68% and decision tree classifier of 89.29%.The true positive rate of SVM classifier was 94.15%,which was 0.69% and 3.87% higher than KNN classifier and decision tree classifier,respectively.The false positive rate of SVM was6.50%,which was 2.26% and 9.71% lower than KNN classifier and decision tree classifier,respectively.The results showed that it was effective and feasible to use the forelimb/hindlimb length characteristics in the detection of cow's lameness.(5)Detection software for cow's key parts and lameness based on Python3.6,PyQt5 and compilation toolbox of MATLAB GUI were designed in this paper,respectively.Through experimental verification,it was found that the processing system could realize the detection of key parts of dairy cows and the comparison of different classifier methods.
Keywords/Search Tags:Lameness detection, Deep learning, Target detection, Characteristic extraction, Classifier model
PDF Full Text Request
Related items