| With the development of artificial intelligence technology,how to develop wood resources in forests more efficiently,improve recycling efficiency,and further improve the level of forestry intelligence has become an important direction of forestry innovation and development.Measuring the diameter class and volume of log is an important direction of intelligent forestry research.Currently,most enterprises are still using the method of manual ruler inspection,which has high labor costs and low efficiency.This article focuses on the key and difficult issues such as uneven placement of wood in vehicle log volume detection,the need for layered loading of wood due to transportation efficiency and safety considerations,and excessive interference factors in the surrounding environment.The research focuses on the principle of binocular vision,deep learning instance segmentation algorithm,ellipse fitting algorithm,Tensor RT quantitative reasoning acceleration and deployment.The paper’s primary focus involves the subsequent aspects:First of all,obtain log-end area depth information.According to the principle of binocular vision,the measurement of log end diameter can be achieved through camera internal and external parameters,log-end area depth information,and log-end area point coordinates.The ZED2 binocular camera is used to obtain log-end area images and depth map,and the depth information of logs is obtained by reading the pixel values corresponding to the center point coordinates of each log-end area in the depth map.Secondly,a vehicle log volume detection method based on deep learning and binocular vision is designed.The improved Mask R-CNN model is used to obtain the log-end area mask map,and then an ellipse fitting algorithm based on the least square method is used to ellipse fit the mask map to obtain the relevant parameters of the log contour.Combined with depth information,the log-end area diameter class is measured.The log volume is measured by substituting the diameter class and length into the log volume calculation formula.At the same time,according to the characteristics of large differences in depth information between the upper and lower layers of the entire vehicle’s lot,the problem of wood layering can be solved by setting a depth threshold or using a clustering algorithm.In the experimental scenario,comparing the results of manual gauge inspection with the measurement results of the intelligent detection algorithm designed in this article,the volume error rate is 1.61%,and the average absolute error of a single log diameter class is 0.33 cm,which meets the requirements of forestry production enterprises for log diameter class detection and volume measurement.Thirdly,accelerate and deploy the reasoning of the model on an embedded platform.The changes in model accuracy and reasoning speed before and after quantization were compared,and the quantized model was deployed on the Nividia Jetson Xavier NX platform.The experimental results show that compared with the model before quantification,the precision of the model after quantification will be slightly reduced,but the weight of the model will be reduced to one fifth of the model before quantification at most,and the reasoning speed of the model will be increased by about 8 times at the highest,which is more suitable for deployment in embedded platforms.Finally,an intelligent detection system for vehicle log volume based on binocular vision is designed.The intelligent detection system is composed of a log image acquisition module,an intelligent detection algorithm module,and a human-computer interface module based on Py Qt5.The practicality of the system has been verified through a large amount of test data.Users can calculate the volume of the entire vehicle’s log by erecting cameras and taking images of the log-end area at the front and rear of the vehicle,which improves the efficiency of the detection of log volume. |