Abstract:In order to solve the tedious problems of traditional manual contact me asurement with large workload, relatively difficult measurement conditions and affecting the normal living habi ts of cattle,a method for measuring cattle body size based on binocular depth estimation with target detection is pr oposed.Firstly,the images are collected by a binocular camera,and the object detection algorithm YOLOv5(you on ly look once v5) is used to detect the feature parts of the body scale in the images,and combined with edge det ection and other algorithms to obtain the cattle body scale measurement points.Secondly,the binocular stereo matchin g algorithm is used to transform the binocular two-dimensional images into a spatial three-dimensional depth in formation map,and the three- dimensional coordinates of the measurement points are read on the depth informat ion map.Finally,the spatial Euclidean distance is used to calculate parameters of the cattle body scale in three-dimensional coordinate system.A test platform is built for the measurement,and the experimental resul ts show that the measurement accuracy of the method is higher than the existing related methods,in which the average relative error of body length is 2.4%,the average relative error of body height is 5.9%,and the avera ge relative error of the body oblique length is 3.3%,which provide a feasible demonstration for the measurement of ca ttle body scale.