  In this paper, we introduce an approach for detecting modifications in
assembled printed circuit boards based on photographs taken without tight
control over perspective and illumination conditions. One instance of this
problem is the visual inspection of gas pumps PCBs, which can be modified by
fraudsters wishing to deceive costumers or evade taxes. Given the uncontrolled
environment and the huge number of possible modifications, we address the
problem as a case of anomaly detection, proposing an approach that is directed
towards the characteristics of that scenario, while being well-suited for other
similar applications. The proposed approach employs a deep convolutional
autoencoder trained to reconstruct images of an unmodified board, but which
remains unable to do the same for images showing modifications. By comparing
the input image with its reconstruction, it is possible to segment anomalies
and modifications in a pixel-wise manner. Experiments performed on a dataset
built to represent real-world situations (and which we will make publicly
available) show that our approach outperforms other state-of-the-art approaches
for anomaly segmentation in the considered scenario, while producing comparable
results on the popular MVTec-AD dataset for a more general object anomaly
detection task.
