Detection of Local Anomalies on Patterned Surfaces

Matthias Haselmann

Research output: ThesisDoctoral Thesis


Surface inspection is an important part of quality assurance in many industries. Lower costs and more objective and reproducible assessments speak for automated implementations. Automated surface inspection, however, requires the automated evaluation of acquired surface images. Depending on the appearance of the surface, the detection of local anomalies can be a major challenge. In the present work, a multi-axial robotic system was used to take images of free-form plastic components that exhibit complex patterns that change significantly from sample to sample. Rule-based anomaly detection approaches require a lot of development effort for such surfaces and can rarely be reused for new or changed inspection tasks. In contrast to that, Machine Learning (ML) approaches are much more flexible and can even deal with inspection tasks where no rule-based approach seems to be possible. The prerequisite, however, is a sufficient amount of labeled training data. Typical data sets that are nowadays used as benchmark for modern ML architectures may contain millions of manually annotated images. With regard to surface inspection, however, it is necessary to keep the effort for data preparation to a minimum. Since manual labeling of anomalies in training data is time-consuming, in the given thesis two different ML approaches were developed that only require fault-free surface samples for the training. The first approach presented is based on synthetic anomalies, which are randomly generated and inserted during the training phase of a Convolutional Neural Network (CNN). Although the training was conducted with only five fault-free parts, the CNN reached an Area Under Precision-Recall Curve (AUPRC) of 0.75 on the test data. For comparison, an existing state-of-the-art anomaly detection approach based on Generative Adversarial Networks (GANs) was tested, which reached an AUPRC of 0.08. The second ML approach presented in the given work is based on a CNN-aided reconstruction of surface images where the central image areas are removed beforehand. The network is trained on fault-free image data only and thus learns to halucinate a fault-free version of the missing image region. The resulting reconstruction error of the center region is used to detect anomalies. The method reaches a AUPRC of 0.63 on the tested data set.
Translated title of the contributionDetektion von lokalen Anomalien auf gemusterten Oberflächen
Original languageEnglish
Awarding Institution
  • Montanuniversität
  • Pottlacher, Gernot, Assessor B (external), External person
  • Gruber, Dieter P., Assessor A (internal)
Publication statusPublished - 2019

Bibliographical note

no embargo


  • Surface Inspection
  • Anomaly Detection
  • Decorative Surface
  • Texture
  • Polymer Surface
  • Surface Defect
  • Machine Vision
  • Computer Vision
  • Robot Vision
  • Artificial Intelligence
  • Machine Learning
  • Deep Learning
  • Neural Network
  • Convolutional Neural Network
  • Image Segmentation
  • Unbalanced Data Sets

Cite this