Let the regular pattern set the reference.

I implemented an attention-guided autoencoder approach for anomaly detection in periodic scanning electron microscope (SEM) images. It learns from patches of a single image, using the repeated background as the basis for reconstruction.

A narrow bottleneck limits what the network can reproduce. Local departures from the regular structure can then stand out in the difference between the input and reconstruction.

Follow the result through the pipeline.

The Python workflow extracts overlapping patches, trains the model, reconstructs the image, and thresholds the absolute reconstruction error. Connected regions become candidate defects, with annotated images and a CSV of positions, areas, and shape measurements.

What makes this a metrology problem?

The result depends on image periodicity, contrast, noise, patch size, and the detection threshold. A bright residual is a candidate to investigate. The example demonstrates the workflow; it does not establish production detection accuracy.

Reported lengths and areas are in pixels and square pixels. Connecting those outputs to physical dimensions requires image calibration.

Built from published research.

The implementation follows the approach described by Alexey Solovey, Chuan Zhang, and Jane Y. Li in their 2024 ISTFA paper. The project repository includes the example workflow and a model card describing its assumptions and limitations.

Next: 01.6 / Early work in atom optics ↗