Abstract:In order to accurately evaluate the cleaning condition of the inner wall of the gun barrel, the YOLOv5 artificial neural network combined with machine vision was used to detect the stains on the inner wall of the cleaned 155 mm caliber gun barrel in real time. Considering that the stains are mainly divided into oil stains and residual copper stains, the image recognition technology is used to identify and locate the types of stains and determine the area of stains in the detection task; Using the image pixel information and the external environment information, based on the video image collected by the monocular camera, the improved and trained YOLOv5 artificial neural network model is used as the recognition tool to carry out the real-time image recognition of the inner wall of the gun barrel. The experimental results show that the detection system can complete the target detection task well, and the target positioning error is controlled within 5 cm, which meets the requirements of the inner wall dirt positioning in the automatic cleaning of the inner wall of the gun barrel.