| In China’s forging industry,it is very common to automate the forging process,and for the detection of appearance defects of forged parts before finishing,the country still generally relies on manual.labor.Inefficiency,error detection and missed detection are easy to occur,resulting in unstable and inconsistent product quality,which greatly hinders the development of enterprise.Therefore,automatic forging detection is a key problem that needs to be solved in the development of enterprises,and it is an important aspect to promote the development of domestic forging industry.In recent years,with the rapid development of machine vision technology and artificial intelligence technology,automatic detection of appearance defects of forged parts has become possible.The appearance defect detection system of pipe joint forging developed in this paper is based on image processing algorithm and deep learning algorithm to realize the automatic appearance defect detection of pipe joint forging.The specific research contents are as follows:(1)Analyze the types of appearance defects of pipe joint forging parts,select the light source,camera and other hardware according to the actual situation,build an optical experiment platform,and determine the most appropriate optical imaging scheme for each defect according to the experimental results.According to the determined optical imaging system,the mechanical structure and servo control system of the pipe joint forging defects automatic detection line are designed.The chain conveying mode and the intermittent rotation of the divider are adopted in the mechanical structure,which can realize the simultaneous detection of multiple inspection station.(2)The corresponding image detection algorithm was developed for various appearance defects of pipe joint forging parts,such as external hexagonal surface crack,insufficient top punching,too thin thickness of hexagonal surface,insufficient side punching of hexagonal surface,unclear characters,side pothole,folding and mold error defects.For the detection of the hexagonal surface crack defect,the background was removed by image enhancement,gray double threshold segmentation,maximal inner rectangle,and then the crack defect was identified by means of average filtering and threshold segmentation.For the detection of the defect of the hexagonal surface top blanking,the background is removed by using gray threshold segmentation,morphological closure operation,hole filling and finding the minimum inline rectangle,and then using gray multi-threshold segmentation and comparing the pixel area size of each connected area to judge whether there is a defect.For hexagonal side ran less than surface defects detection is divided into one side and without character,and character for a character on one side of the first use of bilateral gray-level threshold segmentation and holes filling to cut the target area,and then using the average filtering,gray threshold segmentation,holes filling and calculating the pixel size of the connected domain to determine whether there is a defect,The process is much the same for the characterless side.For the detection of the thickness of hexagonal surface is too thin,firstly the camera is calibrated,and then the grayscale is measured according to the size measurement algorithm proposed in this paper.For the character unclear defect detection,the character to be measured region is extracted firstly,and then the character is extracted to determine whether the character unclear defect exists.The detection of the side pit defect is divided into the character side and the character side respectively.The detection is carried out in different areas respectively and the final results are integrated to determine whether there is a defect.The detection of mould closing error defect is judged by solving the diameter difference between the maximum inscribed circle and the minimum circumscribed circle.The detection of folding defects is also based on the extraction of the measured cylinder image first,and then the line extraction of folding defects,which is determined by the number of pixel points in the line.(3)In this paper,deep learning algorithm is adopted to identify the outer hexagonal surface cracks and scratch defects and the inner hexagonal surface cracks and pit defects of pipe joint forging parts,and the rapid deployment network is carried out through image enhancement and transfer learning methods.Through experimental comparison,the ssd_inception_v2 network is preliminaryselected as the pre-training network.The deep learning network in this paper is proposed by optimizing the network structure.(4)Finally,an experiment is carried out on the appearance defect detection system of pipe joint forging developed.The results show that the comprehensive recognition rate reaches 97.47% by using the combination of image processing algorithm and deep learning algorithm to detect defects,and the longest detection time of a single image is 397.3ms,which can meet the requirements of online detection.In this paper,a novel result determination mechanism is proposed,which makes the implementation of the system possible.Finally,a corresponding human-computer interaction software is designed to realize the end-to-end detection. |