Editor’s introduction
The study presents a synthetic dataset generation pipeline focused on metal surface textures like sandblasting, parallel, and spiral milling. It uses procedural modeling to create physically plausible textures by controlling key parameters derived from manufacturing knowledge, allowing precise variation and generation of unobserved cases. The researchers evaluated synthetic data quality by measuring image similarities between real and synthetic textures, finding a trend linking these similarities to downstream detection performance. This suggests that domain-specific similarity metrics can better reflect task utility than general dataset metrics. The method enables large-scale data generation from minimal real-world input, offering improved realism and control over texture patterns.
Introduction
Automated machine vision has seen wide adoption in industrial applications to automate repetitive processes that rely on visual information. Visual quality inspection is a popular choice due to its versatility across different geometries and materials, cost-effectiveness, and inspection speed. It can be integrated in different stages of the manufacturing process, ensuring final quality, while minimizing the time and resource costs of inspecting an object. While manual visual inspection involving humans is a popular and often cost-effective choice for low-volume productions, an automated solution is more fitting for various scenarios, such as rapid production lines, continuous manufacturing, and extreme working environments (temperature, noise, chemicals, etc.). Although, machine vision systems are a flexible approach in terms of their variety of possible applications, they are highly specialized to the task at hand, designed using scarce expert knowledge and face adaptability issues under unforeseen inspection requirements or production environment changes.
Automated visual inspection systems (further referred to as inspection systems) are currently developed in a manner that requires a high level of rigidness to ensure efficient and reliable performance. The most rigid component is the machine vision algorithm, which is commonly implemented using traditional techniques. While they produce interpretable results and can offer verification, they are specialized for a particular use case and are sensitive to changes in the environment. This, in turn, reduces the customization capabilities of production lines, slowing down innovation in manufacturing. To overcome this, the integrators of inspection systems are turning towards machine learning (ML) techniques for machine vision, which demonstrated higher flexibility to changes. However, their reliability and flexibility over longer periods of time is yet to be proven, making the industry skeptical towards their integration into production lines. Additionally, machine learning requires a significant amount of training data, which is a major challenge since the industry aims at reducing the frequency of defective parts, making such data scarce. The inspection tasks are typically very specific and, since there are little to no publicly available datasets, the task becomes time-consuming due to data collection.
To overcome these issues, practitioners are turning to synthetic data sources as a supplement to data shortages. In academia, the usage of synthetic data for ML is rapidly gaining popularity. In industrial inspection systems, isolated studies have been performed providing evidence of its benefit. However, to date, there is a lack of commonly agreed upon best practices or a more comprehensive evaluation of the different steps that are required to generate a photorealistic synthetic dataset for visual inspection. Industrial inspection is facing scarcity of the datasets that are needed for benchmarking recognition models on surfaces with prominent microstructures, as well as dual datasets containing matching real and synthetic images for the development of domain alignment methods. To the best of the authors’ knowledge, no pipeline has been presented that can generate such data with a high level of realism and variety.
Related Work
The goal of synthetic image data generation is to generate image datasets where the image characteristics are ideally the same as those of images acquired in reality. The characteristics include both appearance and content distribution. When there is a discrepancy between the synthetic and real images in terms of their characteristics, it is referred to as the domain gap.
An early, straightforward, approach to extending training datasets was to add defect textures to the images of defect-free surfaces. The defects are 2D image patches that do not correctly represent light interaction and have an inconsistent appearance with respect to the remainder of the surface. Due to the nature of the approach, it is very difficult to enhance it in a way that would minimize the resulting domain gap. Therefore, further synthetic data efforts were aimed at generative methods, based on predominantly deep learning, and rule-based approaches, using computer graphics simulation based on a well-defined set of rules that describe the imaging context.
The high degree of modeling complexity when generating photorealistic surface features caused many of the authors to adopt the generative approach, focusing on defect generation. Jain et al. compare the performance of three different GAN architectures for generating defects in hot-rolled steel strips. Defect-GAN was introduced for automated surface defect synthesis by mimicking the defacement and restoration process and capturing stochastic variation of defects. Defect-Transfer GAN is trained over multiple products with similar defects in order to enable the introduction of semantically new information and, therefore, make up for the limited availability of all possible object attributes in the real dataset. Wei et al. generated defect patches and blended them into a clean image, thus they were able to obtain approximate segmentation masks. These approaches are more suitable for generating large defects that visibly differ from the surrounding surface and do not suffer if an image is resized to a lower resolution for inference performance reasons. As such, they can be expected to struggle when confronted with a surface that has a texture pattern whose appearance has prominent local variations, as is the case for milled surfaces. Schmedemann explored a hybrid approach by applying style-transfer on images generated by a rule-based approach to obtain more control and reduce the domain gap. It has shown that this approach can lead to a loss of features, making it unreliable without a human operator review of the generated images.
Generative deep learning approaches may result in images that look realistic but that also incorporate detail hallucinations or global structure errors, which can be difficult to detect by human eye. These cause misalignments of the detector models and risk increasing the number of false negatives. Also, these methods offer limited reasoning over the parameters that generate a particular scene, severely limiting the precision control over them. Hence, it is difficult to control the dataset content and the distribution of features within, severely limiting the generation of the edge cases that are crucial for the reliable operation of inspection systems. In addition and in part due to data shortage, to date, no generative models capable of generating data for visual inspection exist up to the precise specification of the end product.
Rule-based image synthesis relies on computer graphics for modeling and rendering virtual environments, which have recently gained popularity beyond the entertainment industry (e.g., movies or gaming). It represents a controllable, versatile, and reliable approach for generating arbitrary amounts of data with customized features and variations. As such, it has proven useful across various machine vision tasks, as discussed by Dahmen et al.. Synthetic data are currently predominantly used in human-oriented domains, autonomous driving, and robotics; see.
Human-oriented synthetic data are used in tasks that include body tracking and pose estimation or face recognition. Synthetic data for autonomous driving rely on virtual environments of large-scale urban and traffic scenes for recognition tasks and object detection. The robotics domain requires virtual environments for recognition tasks, such as semantic segmentation and object detection. In all three domains, the focus is on large scale geometric features while simulation of small scale details and textures is unnecessary.
Related Work
Procedural texture modeling is based on algorithms that completely describe the surface patterns without the need for additional data (e.g., image data). The main concept is to combine regular patterns (e.g., sine functions, simple shapes such as lines and circles, as well as other mathematical functions) discussed by Vivo et al. with irregular patterns (e.g., noise functions), as discussed by Dong et al.. Since procedural texture models are algorithmic descriptions of a texture, they offer parameterization and, thus, immense controllability, which is recognized by the computer graphics community for content creation. However, developing procedural textures is often done by artists who base their work on experience and expression rather than encoding physically correct parameters.
Deguy separates procedural models into implicit and explicit. An explicit procedural texture model generates a texture image that is first mapped onto the object’s surface and then used during rendering. Contrary, an implicit procedural texture model is directly evaluated during the rendering procedure, thus generating texture in render-time and allowing render-time re-parametrization. While explicit procedural models are easier to develop for complex texture patterns, implicit procedural texture models can cover arbitrarily large surfaces without repetitions or seams and are not restricted by the resolution. Bosnar et al. developed implicit procedural texture models for circular, parallel, and radial textures. Those patterns resemble processed surfaces but without taking an explicit machining method into account or basing them on real surface topography.
The advantage of data-driven texture modeling is that it can synthesize approximations of real-world surfaces for which there are no well-defined mathematical descriptions. However, those methods offer little control over the generated content since they depend entirely on the input data. Data-based texture modeling can be roughly separated into generative AI and exemplar-based approaches. Generative AI texture synthesis is often based on GANs, as discussed by Jetchev et al., Bergmann et al., and Zeltner et al.. While the results of these models often have remarkable appearance to a person, it is not possible to ensure that the results are physically correct, and it is very difficult to introduce controllable parameters for different types of textures. Exemplar-based texture synthesis uses algorithms to generate new texture images similar to a given input image. While stationary textures can be well reproduced, problems occur for textures with complex, large structures, e.g., milling rings.
Furthermore, since the output image relies entirely on the input image, it leaves no possibility of influencing the pattern itself. Raad et al. gave an overview of the common exemplar-based texture synthesis methods. They distinguished between statistical and patch-rearrangement methods.
Statistical exemplar-based methods perform two steps. First, model-dependent statistics of the input image are computed. Second, a randomly initialized image is adjusted such that it fits the observed statistics. The asymptotic discrete spot noise (ADSN) and the random phase noise (RPN) are both parameter-free and non-iterative statistical methods. A texture image simulated by the ADSN maintains the mean of the input image but has minor differences when comparing the sample auto-correlation since its Fourier modulus is the Fourier modulus of the input image multiplied by Rayleigh noise. The RPN creates texture images that have the same Fourier modulus as the input image and, thus, the same auto-correlation but with a random Fourier phase. Heeger and Bergen introduced a procedure for texture modeling that uses image pyramids. A random image is adjusted iteratively by matching the histograms of all images in its image pyramid to the corresponding images in the image pyramid of the reference image. Portilla and Simoncelli improved this method by using statistics such as cross-correlations between pyramid levels instead of histogram matching. In contrast to the exemplar-based methods that generate completely new texture images, the patch-rearrangement methods quilt patches taken from the input image. With the method of Efros and Freeman, the output image grows successively by adding certain patches one after the other in a raster-scan order. It is an extension of the method of Efros and Leung, which generates a new texture image pixel by pixel.
Guehl et al. introduced a hybrid approach combining procedural and data-based texture synthesis. The visual structure of the generated image texture is based on a procedural parametric model, while texture details are synthesized using a data-driven approach. Another hybrid approach is presented by Hu et al., in which the texture of the input image, which contains the BRDF parameters, is decomposed and proceduralized.
Dual Dataset
Publicly available datasets for inspection of metal objects mostly focus on defect recognition over flat surfaces and single-view inspection setups. With it, they reduce the expected appearance diversity of defects and surfaces in the image, making the defect recognition task easier. However, such a restriction is not possible for an inspection of more complex objects where multi-view imaging is required and the visibility of the defects varies between different views. The aforementioned datasets contain objects, such as hot-rolled steel, slightly curved metal pads, rails, and pipes. Datasets of smaller metal objects with complex geometry are also present; however, they are also under single-view inspection setups. Multi-view inspection setups inspect the same surface multiple times while varying, at least, the direction of the incoming light source or the direction of the camera so as to reduce the chance of missing defects due to low visibility. Examples in recent datasets include single-axis rotation, multiple illumination directions, and multiple view directions.
Pipeline Evaluation
To evaluate the quality of the pipeline, we have to evaluate the similarity of the data tht it produces to the real data acquired through inspection. Various metrics were proposed in recent works to estimate the quality of a dataset through general dataset factors, such as annotation consistency, or class balance. However, these metrics usually provide limited insight into the data coverage of the dataset and ignore domain- and task-specific factors that could describe biases taken when collecting the dataset. Another approach for comparing the quality of synthetic datasets to the real ones is by measuring their utility for the given task through the model performance changes when using the synthetic data. This, however, includes the inductive biases introduced by the model and training procedure selection, making it more difficult to estimate the quality of the dataset itself. We, thus, performed a more direct comparison of the datasets through image and data distribution similarities. When modeling a synthetic dataset, assumptions about the real world are made to increase the feasibility and economy of generating such datasets over the collection of more real data. To organize our evaluations, we proposed a distinction between a priori quality, evaluating the accuracy of the assumptions made before the data generation, and a posteriori quality, evaluating the accuracy of the generated synthetic data. To the best of the authors’ knowledge, this is a first evaluation of synthetic data quality that goes beyond the comparison of recognition model performances.
Conclusions
The presented method is capable of generating synthetic data for structured surface textures for a metal object by using a single sample of a real surface and knowledge about the manufacturing process. It allows precise control over its parameters, and the parameters are modeled to represent physically measurable or intuitively approximate features. The generated data offer the highest degree of realism, yet, for the studied textures, in terms of patterns, the intensity distributions and defects vary. Furthermore, the presented method is capable of generating synthetic data at scale, with support from the physically plausible variations in texture and defect parameters. The separation of modeling steps gave rise to the concept of scales decomposition, and provides a clear backbone on how further developments can improve and extend the capabilities of the pipeline. The decomposition of the dataset quality measurements allowed us to compare its similarity between the synthetic and real datasets as a whole while separating the similarity of the domain from the similarity of the task. The uncovered predictive trend that similarity metrics have on defect detection performance offers an efficient measurement technique for iterative synthetic data development. Finally, the published dual dataset serves the community by offering missing data for inspection of structured surfaces, facilitates domain adaptation research, and contributes a benchmark for the development of industrial inspection models.


