Calculation method, device and system based on quantum neural network model
Through the calculation method based on the quantum neural network model, the problem of low accuracy and efficiency of product appearance detection in the prior art is solved, high-precision and high-efficiency product detection are achieved, and the misjudgment rate is reduced.
Patent Information
- Application Number
- CN202510442893.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-05-09
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has low accuracy and low efficiency in product appearance detection, and is greatly affected by interference such as uneven light and product surface reflection.
The calculation method based on the quantum neural network model is adopted to collect product images through multi-spectral industrial cameras, perform image denoising processing and feature extraction, and use quantum convolutional layers, quantum pooling layers and quantum fully connected layers to build a quantum neural network model, output quantum probability amplitude distribution, and determine whether the product is qualified by similarity score.
The detection accuracy and efficiency are significantly improved. The high-dimensional image feature extraction capability of quantum neural networks is better than that of classic models, which greatly improves the detection rate of subtle defects and has strong anti-interference ability, reducing the misjudgment rate.
Smart Images

Figure CN119963554A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and specifically to a computing method, device and system based on a quantum neural network model. Background Art
[0002] In industrial production, when products are produced, it is necessary to inspect the appearance of the products to avoid defective products from being packaged and sold.
[0003] In the prior art, when inspecting the appearance of a product, it is usually done through manual visual inspection, which is not only inefficient but also has low accuracy. In the prior art, there are also methods of inspection through image algorithms, but due to interference from uneven light, reflection on the product surface, etc., low inspection efficiency may also occur.
[0004] To this end, this application proposes a computing method, device and system based on a quantum neural network model. Summary of the invention
[0005] To this end, the present application provides a computing method, device and system based on a quantum neural network model to solve the problems of low product detection accuracy and low efficiency in the prior art.
[0006] In order to achieve the above objectives, this application provides the following technical solutions:
[0007] A calculation method based on a quantum neural network model comprises the following steps:
[0008] The first step is the collection and preprocessing of product images. The manufactured products are transported by conveyor belts and pass through the collection area of multispectral industrial cameras. The multispectral industrial cameras collect image data of the products to be inspected and preprocess the image data. The preprocessing includes image noise reduction, image size normalization, and image feature area segmentation.
[0009] The second step is to encode the collected image data and encode the preprocessed image data into a quantum state, which specifically includes: using amplitude coding to map the pixel grayscale value to the amplitude information of the quantum bit; generating a quantum feature vector through parameterized quantum gate operations;
[0010] The third step is to construct a quantum neural network model, which includes a quantum convolution layer, a quantum pooling layer, and a quantum fully connected layer, and sequentially performs local feature extraction, dimension compression, and global correlation analysis on the quantum feature vector to output the quantum probability amplitude distribution;
[0011] The fourth step is to decode the quantum probability amplitude distribution into classical data and calculate its similarity with the pre-stored qualified sample feature space;
[0012] The fifth step is to determine whether the product is qualified based on the dynamically adjusted similarity threshold, and trigger the sorting device to perform the classification operation.
[0013] Preferably, the training process of the quantum neural network model includes:
[0014] Step 1: Build an industrial image dataset containing qualified samples and multi-class defect samples, and annotate the defect types;
[0015] Step 2: Design a hybrid loss function to optimize model parameters by combining quantum state fidelity and classical classification loss.
[0016] Step 3: Use a quantum-classical hybrid optimization algorithm to alternately update quantum gate parameters and classical network weights until the model converges;
[0017] Step 4: Verify the robustness of the model in a simulated noise environment to ensure that the detection accuracy is not lower than the preset threshold.
[0018] Preferably, the image noise reduction processing includes:
[0019] A generator is formed by a multi-qubit circuit, and a quantum state consistent with the real image distribution is generated by the generator;
[0020] By integrating the classical convolutional layer and the quantum state measurement module, the noise-filtered image data is output;
[0021] During training, the generator and discriminator parameters are optimized alternately until the two reach a dynamic balance.
[0022] Preferably, the method for dynamically adjusting the threshold comprises:
[0023] Build a quality fluctuation model based on historical data to predict the threshold range of the current production batch;
[0024] Correct the threshold in real time according to the ambient light intensity and product material reflectivity;
[0025] Set an upper limit on the threshold change range to avoid excessive fluctuations in detection results.
[0026] Preferably, the image size normalization includes providing marking lines in the acquisition area, and scaling the length of the marking lines in each image to the same length when acquiring product images, so that the size of the product is the same in all images.
[0027] In order to achieve the above objectives, this application also provides the following technical solutions:
[0028] A computing system based on a quantum neural network model, characterized by comprising the following modules:
[0029] Image acquisition module, integrating visible light camera and near infrared sensor, supporting simultaneous acquisition of multi-spectral images;
[0030] A quantum coding module converts image data into quantum states and stores them in quantum random access memory;
[0031] The quantum processing unit is based on a superconducting quantum chip and performs quantum neural network calculations.
[0032] The classical control unit coordinates the interaction between quantum computing and classical data and dynamically schedules the task queue;
[0033] The decision execution module controls the sorting device according to the similarity score and generates a test report.
[0034] Preferably, the image acquisition module comprises:
[0035] Visible light camera: resolution no less than 20 million pixels, supporting high dynamic range imaging;
[0036] Near infrared sensor: covers the 850nm to 1050nm band, used to detect the thickness of the surface oxide layer;
[0037] Switchable filter set: adjust the light transmission band according to the product material to improve image contrast.
[0038] In order to achieve the above objectives, this application also provides the following technical solutions:
[0039] A computing device based on a quantum neural network model, characterized in that it includes a conveyor belt, a multi-spectral industrial camera, a data processor and a sorting device.
[0040] Compared with the prior art, this application has at least the following beneficial effects:
[0041] The detection accuracy is significantly improved. The ability of quantum neural network to extract high-dimensional image features is better than that of classical models, which makes the detection rate of subtle defects significantly improved when this solution is implemented.
[0042] The detection efficiency is significantly improved. By using the technical solution of quantum parallel computing, the processing speed of this solution is significantly improved during its implementation, meeting the real-time monitoring requirements of high-speed production lines.
[0043] The anti-interference ability is strong, and the quantum entanglement characteristics enhance the model's robustness to lighting changes and surface reflections, thereby greatly reducing the misjudgment rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more intuitively illustrate the prior art and the present application, exemplary drawings are given below. It should be understood that the specific shapes and structures shown in the drawings should not generally be regarded as limiting conditions for implementing the present application; for example, those skilled in the art are capable of easily making conventional adjustments or further optimizations to the addition / reduction / attribution division, specific shapes, positional relationships, connection methods, dimensional ratios, etc. of certain units (components) based on the technical concepts and exemplary drawings disclosed in the present application.
[0045] Figure 1 A step diagram of a calculation method based on a quantum neural network model provided in Example 1 of the present application. DETAILED DESCRIPTION
[0046] The present application is further described below in detail through specific embodiments in conjunction with the accompanying drawings.
[0047] like Figure 1 As shown, a calculation method based on a quantum neural network model comprises the following steps:
[0048] In the first step, the manufactured products are transported by conveyor belts. The products pass through the acquisition area of the multispectral industrial camera. The multispectral industrial camera collects the image data of the products to be inspected and preprocesses the image data. The preprocessing includes image noise reduction, image size normalization, and image feature area segmentation.
[0049] The second step is to encode the preprocessed image data into a quantum state, which includes: using amplitude coding to map the pixel grayscale value to the amplitude information of the quantum bit; generating a high-dimensional quantum feature vector through parameterized quantum gate operations;
[0050] The third step is to construct a quantum neural network model, which includes a quantum convolution layer, a quantum pooling layer, and a quantum fully connected layer, and sequentially performs local feature extraction, dimension compression, and global correlation analysis on the quantum feature vector to output the quantum probability amplitude distribution;
[0051] The fourth step is to decode the quantum probability amplitude distribution into classical data and calculate its similarity with the pre-stored qualified sample feature space. The similarity is quantified by scoring.
[0052] The fifth step is to determine whether the product is qualified based on the dynamically adjusted similarity threshold, and trigger the sorting device to perform the classification operation. Products with a similarity greater than the similarity threshold are qualified, otherwise they are unqualified.
[0053] When this device is implemented, the product is transported on the conveyor belt, and the image of the product is collected and preprocessed by a multispectral industrial camera. The processed product image is then converted into a feature vector, and a neural network model is constructed based on the feature vector to detect the appearance of the product. The product is classified by a sorting device, thereby ensuring that the product can be identified quickly and accurately and that defective products are eliminated.
[0054] The training process of the quantum neural network model includes:
[0055] Step 1: Build an industrial image dataset containing qualified samples and multiple types of defect samples, and annotate the defect types. In this process, by marking different types of defects, the appearance of the product can be more comprehensively detected;
[0056] Step 2: Design a hybrid loss function, that is, analyze different types of defects, describe the defects more accurately, and optimize the model parameters by combining quantum state fidelity and classical classification loss, so that the defects of the product can be analyzed quickly, making this method more suitable for the factory assembly line;
[0057] Step 3: Use a quantum-classical hybrid optimization algorithm to alternately update quantum gate parameters and classical network weights until the model converges. This means that the model can now analyze various forms of defects, ensuring that each product and each type of defect can be quickly and efficiently identified and analyzed.
[0058] Step 4: Verify the robustness of the model in a simulated noise environment to ensure that the detection accuracy is not lower than the preset threshold.
[0059] The image noise reduction process comprises:
[0060] The generator is composed of a multi-qubit circuit, which makes the image processing more efficient and concise, and generates a quantum state consistent with the real image distribution through the generator;
[0061] By fusing the classical convolutional layer with the quantum state measurement module (judge), the noise-filtered image data is output;
[0062] During training, the generator and discriminator parameters are optimized alternately until the two reach a dynamic balance.
[0063] The method for dynamically adjusting the threshold comprises:
[0064] Build a quality fluctuation model based on historical data to predict the threshold range of the current production batch;
[0065] Correct the threshold in real time according to the ambient light intensity and product material reflectivity;
[0066] Set an upper limit on the threshold change range to avoid excessive fluctuations in detection results.
[0067] The image size normalization includes setting a marking line in the acquisition area, and scaling the length of the marking line in each image to the same length when acquiring product images, so that the size of the product is the same in all images. That is to say, there is a marking line with a fixed length in the acquisition area. When acquiring product images, the size of the image acquired each time may be different. In order to unify the image size, the length of the marking line in each acquired product image is unified, so that the size of the product acquired each time can be guaranteed to be consistent.
[0068] A system for a computing method based on a quantum neural network model, comprising the following modules:
[0069] The image acquisition module integrates a visible light camera and a near-infrared sensor, and supports simultaneous acquisition of multi-spectral images to make the information in the acquired images more accurate;
[0070] A quantum coding module converts image data into quantum states and stores them in quantum random access memory;
[0071] The quantum processing unit is based on a superconducting quantum chip and performs quantum neural network calculations.
[0072] The classical control unit coordinates the interaction between quantum computing and classical data and dynamically schedules the task queue;
[0073] The decision execution module controls the sorting device according to the similarity score and generates a test report.
[0074] The image acquisition module comprises:
[0075] Visible light camera: The resolution is not less than 20 million pixels, and it supports high dynamic range imaging, which ensures the clarity of the image captured by the visible light camera, so as to ensure more accurate judgment of the product appearance in the future;
[0076] Near infrared sensor: covers the 850nm to 1050nm band, used to detect the thickness of the surface oxide layer, making the device adaptable to multiple scenarios;
[0077] Switchable filter set: adjust the light transmission band according to the product material to improve the image contrast, which can help to judge the defects of the product appearance.
[0078] A computing device based on a quantum neural network model comprises a conveyor belt, a multi-spectral industrial camera, a data processor and a sorting device.
[0079] In industrial production, products are transported on conveyor belts, multispectral industrial cameras collect images of products, and data processors integrate various modules to analyze the appearance of products. After outputting the analysis results, the sorting device can also be controlled to eliminate products with unqualified appearance.
[0080] The technical features of the above embodiments may be arbitrarily combined (as long as there is no contradiction in the combination of these technical features). To make the description concise, not all possible combinations of the technical features in the above embodiments are described; these embodiments that are not explicitly written should also be considered to be within the scope of this specification.
Claims
1. A calculation method based on a quantum neural network model, characterized in that: The following steps are involved: The first step is the collection and preprocessing of product images. The manufactured products are transported by conveyor belts and pass through the collection area of multispectral industrial cameras. The multispectral industrial cameras collect image data of the products to be inspected and preprocess the image data. The preprocessing includes image noise reduction, image size normalization, and image feature area segmentation. The second step is to encode the collected image data and encode the preprocessed image data into a quantum state, which specifically includes: using amplitude coding to map the pixel grayscale value to the amplitude information of the quantum bit; generating a quantum feature vector through parameterized quantum gate operations; The third step is to construct a quantum neural network model, which includes a quantum convolution layer, a quantum pooling layer, and a quantum fully connected layer, and sequentially performs local feature extraction, dimension compression, and global correlation analysis on the quantum feature vector to output the quantum probability amplitude distribution; The fourth step is to decode the quantum probability amplitude distribution into classical data and calculate its similarity with the pre-stored qualified sample feature space; The fifth step is to determine whether the product is qualified based on the dynamically adjusted similarity threshold, and trigger the sorting device to perform the classification operation.
2. The calculation method based on the quantum neural network model according to claim 1, characterized in that: The training process of the quantum neural network model includes: Step 1: Build an industrial image dataset containing qualified samples and multi-class defect samples, and annotate the defect types; Step 2: Design a hybrid loss function to optimize model parameters by combining quantum state fidelity and classical classification loss. Step 3: Use a quantum-classical hybrid optimization algorithm to alternately update quantum gate parameters and classical network weights until the model converges; Step 4: Verify the robustness of the model in a simulated noise environment to ensure that the detection accuracy is not lower than the preset threshold.
3. The calculation method based on the quantum neural network model according to claim 1, characterized in that: The image noise reduction process comprises: A generator is formed by a multi-qubit circuit, and a quantum state consistent with the real image distribution is generated by the generator; By integrating the classical convolutional layer and the quantum state measurement module, the noise-filtered image data is output; During training, the generator and discriminator parameters are optimized alternately until the two reach a dynamic balance.
4. The calculation method based on the quantum neural network model according to claim 1, characterized in that: The method for dynamically adjusting the threshold comprises: Build a quality fluctuation model based on historical data to predict the threshold range of the current production batch; Correct the threshold in real time according to the ambient light intensity and product material reflectivity; Set an upper limit on the threshold change range to avoid excessive fluctuations in detection results.
5. The calculation method based on the quantum neural network model according to claim 1 is characterized in that: The image size normalization includes setting a marking line in the acquisition area, and scaling the length of the marking line in each image to the same length when acquiring product images, so that the size of the product is the same in all images.
6. A computing system based on a quantum neural network model, characterized in that: Includes the following modules: Image acquisition module, integrating visible light camera and near infrared sensor, supporting simultaneous acquisition of multi-spectral images; A quantum coding module converts image data into quantum states and stores them in quantum random access memory; The quantum processing unit is based on a superconducting quantum chip and performs quantum neural network calculations. The classical control unit coordinates the interaction between quantum computing and classical data and dynamically schedules the task queue; The decision execution module controls the sorting device according to the similarity score and generates a test report.
7. A computing system based on a quantum neural network model according to claim 6, characterized in that: The image acquisition module comprises: Visible light camera: resolution no less than 20 million pixels, supporting high dynamic range imaging; Near infrared sensor: covers the 850nm to 1050nm band, used to detect the thickness of the surface oxide layer; Switchable filter set: adjust the light transmission band according to the product material to improve image contrast.
8. A computing device based on a quantum neural network model, characterized in that: Includes conveyor belt, multispectral industrial camera, data processor and sorting device.
Citation Information
Patent Citations
Image recognition system and method based on quantum convolutional neural network
CN113361664A
Surface defect detection model training method and surface defect detection method and system
CN117011226A
Quantum noise interference resisting method and system based on quantum random disabling
CN118485155A
Oil and gas pipeline weld defect detection method based on quantum attention symmetry coding and decoding convolutional network
CN119006376A
Semiconductor defect classification and prediction method using deep learning algorithm
CN119131505A
Cited By
Ocean surface cloud detection method based on quantum convolutional neural network
CN120747728A