| Under the background of carbon peak and carbon neutrality,the improvement of forestry intelligence is an important guarantee for the realization of the dual carbon goal.The application of artificial intelligence in forestry production can effectively improve the level of forestry intelligence,and log counting and volume measurement are important directions of forestry intelligence.For a long time,forestry production enterprises have adopted the method of manual ruler,which has low efficiency,strong subjectivity and high labor intensity,so it has great research value for the automatic detection of log end faces.In the vehicle log detection,there are problems such as small targets are difficult to detect,end faces are obscured and easy to miss inspection,and the harsh environment in the southern forest area requires light and flexible detection methods.In this paper,the whole vehicle log is taken as the research object,the artificial intelligence target detection and instance segmentation method is used to detect it,and the log end face is extracted and measured by the example segmentation,and an intelligent log detection system suitable for Android device operation is designed.The main work contents are as follows:(1)Make a vehicle log image dataset.First,the gantry image acquisition system and mobile phone camera were used to collect images in a log yard.Secondly,the Labelme software is used to annotate the outlines of all the logs in the collected pictures.Finally,the data enhancement of image transformation and generative adversarial network provides rich image training for model training,and a semi-automatic labeling framework is proposed to improve the efficiency of labeling.(2)A vehicle log quantity detection model for improved YOLOv5 is proposed.Aiming at the problems of dense small targets and occlusion,the backbone network is optimized on the basis of YOLOv5 model,combined with the new feature fusion network,and the better loss function and bounding box filtering algorithm are selected.The experimental results show that the performance of the improved YOLOv5 vehicle log quantity detection model has been improved,the m AP of vehicle log detection reaches 0.731,and the log inspection rate is 99.551%,which realizes accurate log detection and accurate log counting.(3)An improved log end face instance segmentation model for YOLOv7-seg is designed.Firstly,the instance segmentation frame YOLOv7-seg is selected according to the model size,segmentation accuracy and other factors,and the optimization operations such as deformable convolution and coordinate attention mechanism are combined to realize the accurate segmentation of log end faces.Secondly,on the basis of the log end face segmentation results,the calculation method of log end face size is designed,so as to obtain the actual value of log size diameter,and finally the experiment shows that the log diameter level test results meet the enterprise measurement standard,compared with manual detection,the detection method proposed in this paper is more efficient.(4)Developed an Android-based log intelligent detection system.Firstly,the vehicle log quantity detection model and the log end face instance segmentation model were converted and deployed to the Android platform,and secondly,the human-computer interface was designed and developed and tested through C++ and Java hybrid programming,and finally the log counting and size measurement functions were realized. |