Quantum Vision Takes A Step Forward

Quantum Vision Takes A Step Forward

A group of researchers has announced the results of their research work on applying quantum machine learning to detect defects in manufactured pieces using Noisy Intermediate-Scale Quantum (NISQ) devices. 

They applied two approaches: a Quantum Support Vector Machine on a universal gate-based quantum computer and QBoost on a D-Wave’s quantum annealer. By using classical vision systems as the basis and unbalanced data set of images from the GRXray+public dataset (consisting of fractures in manufactured car pieces), they concluded that quantum vision systems detect defects better than classical vision systems. 

In recent times, we’ve witnessed significant growth in quantum technology. Quantum computer manufacturers are looking into commercializing, and some of their devices are already solving complex problems classical computers cannot. Advances in error correction and scalability are becoming more feasible, and the technology finds application in many industries. One such is manufacturing.

In manufacturing, quantum technology is applied in predictive maintenance, artificial vision, optimization of factory logistics, and detecting defects in manufactured pieces. Detecting defects is a common problem in artificial visions related to quality assessment in a production line. Manufacturing companies use several methods, such as AI-based artificial vision methods, to detect defects. 

Classical approaches for computer vision are dominated by the use of deep Convolutional Neural Networks (CNN), which contains several parameters that act as black boxes and result in high inference times caused by the number of operations needed for just a single forward pass. The researchers aimed to prove that quantum vision systems can perform better than classical vision systems in detecting defects in manufactured pieces.

Dataset And Preprocessing 

GDXray+ dataset is a public X-ray dataset for computer vision testing and evaluation. It consists of five groups of images; the group called castings was used and consists of 67 series with 2727 images of automotive parts with defects and some without defects. The parts were labeled “with defects” and “without defects” using a custom program written in Python. 

A supervised classification system was trained to see if an image has a defect or not. Due to varying image sizes and low-contrast defects, the data set was preprocessed. The images were reshaped to 320×428 and flattened in addition to standardization and normalization procedures. Different contrast enhancement techniques were used to highlight the visibility of defects with contrast. 


The metrics used were precision, recall, and F1-score. Precision is the number of true positives over the sum of the number of true and false positives expressed as: 

P = Tp/ (Tp +Fp)

It’s the ability of the model to not classify a negative image as positive.

Recall is the number of true positives over the sum of false negatives and true positives. 

R = Tp/ (Tp + Fn) 

It is the ability of the model to find all positive samples. 

Precision and recall tend to trade off in an unbalanced dataset hence the need for harmony. The F1-score provides a more consistent metric. It is the harmonic mean of precision and recall. It unifies the precision and recall metrics.


QSVM On A Universal Quantum Computer

QSVM is a quantum-enhanced Kernel method. Here, each data point is mapped onto a Hilbert space of n qubits with dimensions 2n by a quantum feature gamma instead of performing the classification on the original space. The aim of QSVM is to find the separating hyperplane between the two classes of data (defects and normal images) using a classical SVM algorithm.

QBoost On A Quantum Annealer

QBoost algorithm is an ensemble model consisting of weak decision tree classifiers combined to form a strong classifier by finding the optimal binary weight. The QBoost algorithm aims to support weight sparsity and penalize complex models with weak classifiers to generalize unseen data better.

Classical Algorithms

One of the classical techniques for detecting defects is based on segmentation, which involves assigning a label to each image pixel. Pixels of the same label share similar characteristics. Defect segmentation involves separating the defects from the background to assign each defect to a different class. The remaining part of the images is considered as one class. 

While SVM aims to find the hyperplane that best splits the data into defect and normal data, Adaptive boosting or AdaBoost trains a sequence of weak models, each compensating the weakest of its predecessors. 

In their results, QSVM outperformed Classical SVM methods, and QBoost outperformed AdaBoost in defect detection. QBoost showed that current machine-learning models could outperform classical solvers while maintaining training and inference times.

In addition, QBoost-based solutions can perform model training in a quantum system and deploy the model in a classical system. Therefore, applying quantum-based methods in industrial manufacturing is possible in the near future.

See More