赵凯旋, 何东健. 基于卷积神经网络的奶牛个体身份识别方法[J]. 农业工程学报, 2015, 31(5): 181-187. DOI: 10.3969/j.issn.1002-6819.2015.05.026
    引用本文: 赵凯旋, 何东健. 基于卷积神经网络的奶牛个体身份识别方法[J]. 农业工程学报, 2015, 31(5): 181-187. DOI: 10.3969/j.issn.1002-6819.2015.05.026
    Zhao Kaixuan, He Dongjian. Recognition of individual dairy cattle based on convolutional neural networks[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2015, 31(5): 181-187. DOI: 10.3969/j.issn.1002-6819.2015.05.026
    Citation: Zhao Kaixuan, He Dongjian. Recognition of individual dairy cattle based on convolutional neural networks[J]. Transactions of the Chinese Society of Agricultural Engineering (Transactions of the CSAE), 2015, 31(5): 181-187. DOI: 10.3969/j.issn.1002-6819.2015.05.026

    基于卷积神经网络的奶牛个体身份识别方法

    Recognition of individual dairy cattle based on convolutional neural networks

    • 摘要: 视频分析技术已越来越多地应用于检测奶牛行为以给出养殖管理决策,基于图像处理的奶牛个体身份识别方法能够进一步提高奶牛行为视频分析的自动化程度。为实现基于图像处理的无接触、高精确度、适用性强的奶牛养殖场环境下的奶牛个体有效识别,提出用视频分析方法提取奶牛躯干图像,用卷积神经网络准确识别奶牛个体的方法。该方法采集奶牛直线行走时的侧视视频,用帧间差值法计算奶牛粗略轮廓,并对其二值图像进行分段跨度分析,定位奶牛躯干区域,通过二值图像比对跟踪奶牛躯干目标,得到每帧图像中奶牛躯干区域图像。通过理论分析和试验验证,确定了卷积神经网络的结构和参数,并将躯干图像灰度化后经插值运算和归一化变换为48×48大小的矩阵,作为网络的输入进行个体识别。对30头奶牛共采集360段视频,随机选取训练数据60 000帧和测试数据21 730帧。结果表明,在训练次数为10次时,代价函数收敛至0.0060,视频段样本的识别率为93.33%,单帧图像样本的识别率为90.55%。该方法可实现养殖场中奶牛个体无接触精确识别,具有适用性强、成本低的特点。

       

      Abstract: Abstract: Video analysis has been widely used to perceive the behavior of animals for precise dairy farming, which is useful to increase the productivity and reduce the disease rate. Using computer vision technique to recognize the individual cow is feasible to improve the efficiency of the automatic milking and feeding system. Effective and accurate recognition of individual dairy cattle is the prerequisite and foundation to record and analyze the animal behavior automatically. As the classic method of individual recognition, the typical electronic identification device, referred to a radio frequency identification device (RFID), must be installed on the neck or another position of the animal. But the available distance is limited and the RFID tags suffer from some shortages such as the loss of tags, tempering, and animal welfare. Besides, it requires extra device and redundant process to recognize the individual cow in a video using RFID method. Therefore, it is necessary to develop an accurate and efficient system for recognizing individual cows in feeding environment utilizing image processing method. In this paper, individual dairy cattle were recognized using the body images based on convolutional neural networks with video analysis method. Side-view images with a resolution of 704 pixels ×576 pixels were recorded when cows passed a narrow aisle to water trough. For target detecting, the frame difference method was implemented to obtain the outline and motion boundary of the cow. By dividing the target image into several same-width sections, the head and tail were removed from the image after checking the distribution of the target in the section. Because the ratio of the body's depth to cow's height was fixed at 0.6, the body area was located by drawing a box tangent to the back posture and then zoomed out 0.8 times of it to remove the external redundancy. For tracking the body image, template matching method was used to find the body area in the current frame by calculating the similarity against the target image in the previous frame. A convolutional neural network was built after analyzing the characteristics of the body images of cows. The network consisted of one input layer, two group of convolution- subsampling layers, and one output layer. The size of convolutional kernel was 5×5, and the subsampling size was 2×2. After testing different types of network architecture, the number of the feature maps in the first and third convolution layer were determined as 4 and 6, respectively, and the third convolution layers was partly connected to the second subsampling layer. The output layer was built up with 30 perceptrons, corresponding to the patterns of cows in the herd. After graying, resizing and normalizing, the body image of cow was transferred into a matrix sized 48×48 as the input of the network. 30 cows were captured 12 times for each, and 360 sets of videos were obtained in total, from which 60000 training frames, 21730 testing frames and 90 testing videos were selected randomly. In the tenth training epoch, the cost function was first less than 0.01. The result showed that 90.55% of the testing frames and 93.33% of the testing videos were recognized correctly, respectively. The testing data were captured from 7 a.m. to 6 p.m., so the network presented high robustness to the lightness diversity. The average elapsed time for recognizing one frame was lower than 0.01 s, and the total elapsed time for processing and recognizing one video was about 1 min, which showed a remarkable working efficiency and practicability. It suggested that the methods proposed here are feasible to recognize the individual dairy cattle. This study proves that the image processing technique has a great potential for recognition of animals.

       

    /

    返回文章
    返回