| Animal husbandry occupies a very important position in China’s agricultural economy.The traditional livestock breeding industry mainly relies on manual implementation,which cannot meet the needs of precise management,which seriously hinders the rapid development of animal husbandry.People need more advanced technology to further improve the efficiency of the breeding industry,expand the breeding scale,and meet the needs of the development of fine animal husbandry.In recent years,the rapid development of artificial intelligence,especially the widespread application of computer vision,has brought new opportunities to the intelligent management of livestock.The use of computer vision technology to perceive and intelligently understand the behavior of livestock has brought a new direction of development for animal husbandry.This paper takes livestock as the research object,and uses the optical flow technology in computer vision to perceive and detect the movement of livestock.Optical flow is a method used to describe the motion of an object.The supervised optical flow algorithm depends on the quality of optical flow labels,and labeling optical flow labels requires a lot of labor costs.Even under a unified standard,it is difficult for humans to calibrate the movement of each pixel.Therefore,this study proposes a brand-new unsupervised optical flow estimation model for detecting the movement information of livestock.The proposed model can effectively solve the problems of large displacement,too smooth optical flow boundary and occlusion.Firstly,this paper studies the unsupervised optical flow extraction algorithm,and proposes a new unsupervised livestock optical flow extraction model.In this paper,based on the pyramid network,a new unsupervised loss function is redesigned according to the traditional optical flow loss function to avoid dependence on real optical flow labels.This model effectively solves the problem of large displacement and label dependence in optical flow extraction.Secondly,this paper studies the reasons that cause the optical flow graph boundary to be too smooth,and proposes a non-local filter based on convolutional neural network.This filter can effectively alleviate the problem of too smooth boundary and significantly improve the accuracy of the model.At the same time,the non-local filter based on convolutional neural network proposed in this paper solves the problem that the traditional non-local filter is difficult to integrate into the deep learning network.Finally,this paper analyzes the reasons why occlusion affects the accuracy of the optical flow,and proposes a model that uses forward optical flow and backward optical flow to reason about the occlusion map,and integrates the occlusion map and optical flow into the loss function to make the optical flow Interact with the occlusion map and update it alternately,thereby further improving the accuracy of the optical flow.This model effectively mitigates the effect of occlusion on the accuracy of optical flow. |