| Metallic materials are widely used and their quality has a significant impact on practical engineering applications.Metallographic testing is an important means of assessing the quality of steel by detecting the deterioration of steel materials.In the process of analysing the metallographic microstructure,the accurate assessment of the metallographic grain size of steel is the most critical task.The traditional method of assessing the grain size of metallurgy by hand has disadvantages such as low efficiency,susceptibility to personnel experience and non-repeatability of results.Digital image processing-based grain boundary recognition methods can only identify simple grain boundaries in clear metallographic images,and are less effective in the application of complex grain boundaries with interference.This paper combines the deep learning and digital image processing methods,around the metallographic image of steel grain rating method to carry out research,can effectively improve the efficiency of metallographic inspection,has important theoretical significance and engineering value,the main research content and the results achieved are as follows:(1)In order to evaluate the grain size of the steel samples to be tested,this paper first makes metallographic samples of the samples to be tested according to the relevant national standards,then collects the metallographic images of the samples under a high magnification microscope,then pre-processes the metallographic images and draws the grain boundary labels manually,and finally crops the metallographic images and the grain boundary label images with overlap to obtain the metallographic image data set.(2)The FCN,U-Net series convolutional neural network and Pix2 Pix generative adversarial network were used to train and validate the metallographic image dataset and set up corresponding comparison tests.An improved lightweight U-Net network framework was designed for the experimental results and the metallographic dataset in this paper.The experimental results show that the segmentation pixel accuracy of the grains on this metallographic image dataset reaches 93.91%,the category pixel accuracy reaches 88.27% and the Dice coefficient is 71.04%,the actual segmentation effect is good and meets the requirements of fast and accurate segmentation of metallographic image grains.(3)To address the phenomenon of broken points in the grain boundaries segmented by the convolutional neural network,this paper combines the operations of neighbourhood pixel finding and morphological operations in digital image processing to propose an optimised post-processing process for the grain boundary segmentation results,and finally adopts the relevant provisions of the area method and the cut-off point method in the national standard to predict the grade of the metallographic image grains of the sample to be tested.(4)Finally,in order to facilitate the operation of practitioners,the above-mentioned functions of image pre-processing,grain boundary segmentation,grain size rating and grain size rating report generation are integrated,and a metallographic grain size rating system is designed based on the Python language and Py Qt framework,which is convenient and fast to operate and improves the efficiency of inspectors.The research results provide a reference and reference for the application of deep learning in the field of metallographic inspection. |