In recent years, a lot of interest has been generated in structural health inspection automation. Although a number of computer-vision based crack detection techniques have been designed but further research is needed. Firstly, they are crack focused so there is a requirement to research for Pits. Secondly, these techniques have not been used in practical visual inspection as they are often developed under near-ideal conditions, not in an on-site environment, which contain more complexities such as variable shapes, glare, and loss of focus due to curved surfaces. Thirdly, there is a need to detect pits and pit-to-cracks of microscopic level for early assessments. This research presents an automated inspection technique that is able to perform detection and measurements of on-surface micro-flaws caused by corrosion fatigue, including classification of pits and cracks by using artificial intelligence (AI) technology. It is an industry-driven application that can be used for both rail axles and pipelines. It has been used for two purposes. First purpose, is to serve as part of a tool to enable early detection of cracks and assess the remaining service life of a corroded axle. The measurement of the damage depends on the detection of small microscopic cracks (around 0.1-0.3mm long) within the corroded area. This serves as an input value into the remaining-life software in the RAAI project. The results have been validated by the Polimi data showing that the implemented method is able to provide a prompt outcome including highlighting location, measuring and counting specific features, using on-site data. The second purpose, is to create a tool that can provide assistance to a corrosion assessment operator. The outcome includes highlighting, measuring and counting specific features plus it is able to classify between pits and cracks, using on-site data. It also implements industrial standard, considering the closeness of the pits, their size and density. Thus, the tool reduces the skill level requirement of an operator, as the algorithm sets a standard for the desired defects to be counted in quantitative measures. The applicability of the proposed method has been evaluated on images taken from the field. The evaluation results confirm the high adoptability of the proposed method for defect inspection in an on-site environment. Firstly, new databases have been designed and created for the project that includes data handling, data gathering and data labelling. Database of such nature doesn't exist per existing research for the specific research problem. The data has been gathered by multiple sources that includes three site visits as well as data by performing bending testing at TWI, which expands the depth of the database. Pixel-wise labelled database of 165,888,000 data inputs, consisting of 115 microscopic pit images and 20 crack images has been created for this research task. Secondly, advance unsupervised image segmentation based detection, localisation, measurement and assessment is built that produces better results than the state-of-the-art algorithm, for this specific industry-driven problem. Watershed and Morphological-based (shape) algorithms are implemented for analysing and assessment. This includes tasks such as finding shapes, detecting edges, removing noise, object detection, counting objects, segmentation, filtering and region analysis. It is able to show quantitative results such as number of flaws detected, along with the flaw's length, area, eccentricity, and their location shown on the image. They were then tested at different sites such as data from Ireland, Italy and UK; and validated with real data such as number of flaws, their average length and the longest flaw. Detailed indicative measures were applied to test and validate the system's performance such as 95.2% accuracy, 55% precision, f1 score 56%, probabilistic rand Index (PRI) 91.7%, CV is 42.8%, VOI as low as 41.08%, and Global consistency error (GCE) as low as 2.6%. Thirdly, novel supervised machine learning methods are proposed. Especially, deep learning model is implemented as an image-wise classification model, pre-trained with AlexNet. The resultant outcome displays the class of the image to which it belongs. If the image has a pit, then the Pit model is able to pick it with 91.4% accuracy, and if the image has a crack, it is picked by the Crack model with a high accuracy of 98%. Another deep learning model implemented is a pixel-wise segmentation, based on a combination of two state-of the art models, UNet with VGG16. It shows performance with global accuracy of 93%. With a validation accuracy of 95% on validation training dataset and testing mean accuracy of 91%, mean IoU is 63.71% with a weighted IoU being 90.4%. Lastly and most importantly, a Defect Detection System (DDS) has been designed, implemented, tested and verified in a real-industrial application. It is a practical solution with a ready-to-use and resource-efficient design. The setup requires a laptop, portable microscope and an automated scanner. The laptop is attached to the microscope which capture flaws with up to 0.08mm size length sensitivity and saves data in images/video format. The microscope is mounted on the scanner, that auto-rotates the camera circumferential as well as in axial axes, along the structure component being inspected. It is based on the combination of both supervised and unsupervised learning methods by merging their strengths. Detects, measures and localises by unsupervised image segmentation, so it doesn't need to perform lengthy pixel-wise labelling; and classifies the flaws by using deep learning so it doesn't need to hard-code complex computational values. It is simple yet efficient.