农业工程学报
農業工程學報
농업공정학보
2015年
5期
181-187
,共7页
图像技术%算法%识别%卷积神经网络%深度学习%视频分析%奶牛%目标检测
圖像技術%算法%識彆%捲積神經網絡%深度學習%視頻分析%奶牛%目標檢測
도상기술%산법%식별%권적신경망락%심도학습%시빈분석%내우%목표검측
image technique%algorithms%identification%convolutional neural networks%deep learning%video analysis%dairy cattle%target detection
视频分析技术已越来越多地应用于检测奶牛行为以给出养殖管理决策,基于图像处理的奶牛个体身份识别方法能够进一步提高奶牛行为视频分析的自动化程度。为实现基于图像处理的无接触、高精确度、适用性强的奶牛养殖场环境下的奶牛个体有效识别,提出用视频分析方法提取奶牛躯干图像,用卷积神经网络准确识别奶牛个体的方法。该方法采集奶牛直线行走时的侧视视频,用帧间差值法计算奶牛粗略轮廓,并对其二值图像进行分段跨度分析,定位奶牛躯干区域,通过二值图像比对跟踪奶牛躯干目标,得到每帧图像中奶牛躯干区域图像。通过理论分析和试验验证,确定了卷积神经网络的结构和参数,并将躯干图像灰度化后经插值运算和归一化变换为48×48大小的矩阵,作为网络的输入进行个体识别。对30头奶牛共采集360段视频,随机选取训练数据60000帧和测试数据21730帧。结果表明,在训练次数为10次时,代价函数收敛至0.0060,视频段样本的识别率为93.33%,单帧图像样本的识别率为90.55%。该方法可实现养殖场中奶牛个体无接触精确识别,具有适用性强、成本低的特点。
視頻分析技術已越來越多地應用于檢測奶牛行為以給齣養殖管理決策,基于圖像處理的奶牛箇體身份識彆方法能夠進一步提高奶牛行為視頻分析的自動化程度。為實現基于圖像處理的無接觸、高精確度、適用性彊的奶牛養殖場環境下的奶牛箇體有效識彆,提齣用視頻分析方法提取奶牛軀榦圖像,用捲積神經網絡準確識彆奶牛箇體的方法。該方法採集奶牛直線行走時的側視視頻,用幀間差值法計算奶牛粗略輪廓,併對其二值圖像進行分段跨度分析,定位奶牛軀榦區域,通過二值圖像比對跟蹤奶牛軀榦目標,得到每幀圖像中奶牛軀榦區域圖像。通過理論分析和試驗驗證,確定瞭捲積神經網絡的結構和參數,併將軀榦圖像灰度化後經插值運算和歸一化變換為48×48大小的矩陣,作為網絡的輸入進行箇體識彆。對30頭奶牛共採集360段視頻,隨機選取訓練數據60000幀和測試數據21730幀。結果錶明,在訓練次數為10次時,代價函數收斂至0.0060,視頻段樣本的識彆率為93.33%,單幀圖像樣本的識彆率為90.55%。該方法可實現養殖場中奶牛箇體無接觸精確識彆,具有適用性彊、成本低的特點。
시빈분석기술이월래월다지응용우검측내우행위이급출양식관리결책,기우도상처리적내우개체신빈식별방법능구진일보제고내우행위시빈분석적자동화정도。위실현기우도상처리적무접촉、고정학도、괄용성강적내우양식장배경하적내우개체유효식별,제출용시빈분석방법제취내우구간도상,용권적신경망락준학식별내우개체적방법。해방법채집내우직선행주시적측시시빈,용정간차치법계산내우조략륜곽,병대기이치도상진행분단과도분석,정위내우구간구역,통과이치도상비대근종내우구간목표,득도매정도상중내우구간구역도상。통과이론분석화시험험증,학정료권적신경망락적결구화삼수,병장구간도상회도화후경삽치운산화귀일화변환위48×48대소적구진,작위망락적수입진행개체식별。대30두내우공채집360단시빈,수궤선취훈련수거60000정화측시수거21730정。결과표명,재훈련차수위10차시,대개함수수렴지0.0060,시빈단양본적식별솔위93.33%,단정도상양본적식별솔위90.55%。해방법가실현양식장중내우개체무접촉정학식별,구유괄용성강、성본저적특점。
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.