Method and system for detecting production quality of flexible circuit board
By reconstructing a three-dimensional model of a flexible printed circuit board using multi-angle photometric images and spectral data, and combining curvature and texture features for fusion analysis, the problem of identifying minute defects in high-density interconnected FPCs by existing detection systems has been solved. This has enabled high-precision, fully quantitative defect detection and closed-loop quality control, thereby improving production efficiency and product quality.
Patent Information
- Application Number
- CN202511717753.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2025-12-19
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing flexible printed circuit board (FPC) inspection systems lack the ability to deeply analyze the geometric properties and content features of the inspection target, making it difficult to effectively handle minor defects in high-density interconnected FPCs. Furthermore, the generalization ability of deep learning models is limited, making it difficult to identify complex material textures and minor defects.
A three-dimensional surface model is reconstructed using multi-angle photometric image sequences and multi-channel spectral data. Heterogeneous multi-scale fusion is performed by combining curvature features and texture features. Multi-dimensional feature description vectors are generated through feature aggregation. Feature selection and weighted calculation are performed by combining geometric and texture constraint rules to identify defective areas and generate a three-dimensional defect feature parameter report.
It achieves high-precision, full-quantity defect detection of flexible circuit boards, reduces false alarm rate and false alarm rate, builds a closed-loop quality control process, and improves production efficiency and first-pass yield.
Smart Images

Figure CN121169931A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image analysis, in particular to a flexible circuit board production quality detection method and system. BACKGROUND
[0002] With the increasing application of flexible circuit boards in modern electronic products and the rapid development of circuit board design towards high-density interconnection, extremely high requirements are put forward for production quality control. Defect detection has become a key link to ensure product performance and reliability. Therefore, automatic optical inspection and machine vision systems have become one of the mainstream choices in the industry.
[0003] However, the core challenge faced by current AOI technology is the lack of deep analysis capability of the geometric properties and content features of the detection target. The existing AOI system relies on traditional 2D image analysis, such as simple image segmentation and edge detection algorithms, when performing defect detection.
[0004] The precision of key geometric properties such as line width measurement and line spacing is crucial for the quality of high-density interconnection FPC. However, due to the lack of effective extraction, recognition and positioning of geometric property analysis (such as surface concave-convex, curvature change) capability, the system mainly makes judgments based on the overall 2D contour. This not only makes it difficult for the system to effectively handle the deformation correction problem of FPC, but also makes it difficult to visually identify small defects (such as fine cracks, burrs). At the same time, due to the lack of accurate image segmentation of complex surface materials, traditional methods are difficult to accurately distinguish between normal textures and small defects.
[0005] In addition, although attempts have been made in recent years to introduce deep learning for defect detection, due to the difficulty of industrial environment to provide large-scale and high-quality defect samples, the generalization ability of existing deep learning models is limited, making it difficult to effectively solve the problem of small size and complex shape defect recognition.
[0006] In summary, the core technical problem that needs to be solved for the existing FPC automatic optical inspection system is: how to use advanced feature extraction and multi-dimensional data fusion technology to systematically overcome environmental interference and complex material texture, and realize geometric property analysis of small defects on the surface of high-density interconnection FPC, so as to complete efficient and high-precision line width measurement, line spacing detection and defect detection.
[0007] Therefore, a flexible circuit board production quality detection method and system are proposed. SUMMARY
[0008] The present application aims to provide a flexible circuit board production quality detection method and system, aiming to solve the problem of single dimension detection method in the prior art, which cannot obtain geometric appearance and material component information at the same time, resulting in low detection rate of complex defects, high false positive rate, and lack of quantitative analysis capability, thus unable to effectively support production process closed-loop optimization.
[0009] To achieve the above object, the present application provides the following technical solutions: The present application provides a flexible circuit board production quality detection method, which specifically comprises the following steps: Collecting a multi-angle photometric image sequence and multi-channel spectral data of the flexible circuit board, performing region segmentation on the multi-channel spectral data based on spectral response, and generating a material region distribution map based on material inherent spectral characteristics; spatially registering the material region distribution map and the multi-angle photometric image sequence, and constructing a three-dimensional surface model of the flexible circuit board; According to the three-dimensional surface model, calculating and extracting curvature features for local topographic changes; performing heterogeneous multi-scale fusion of the curvature features and two-dimensional texture features extracted from the multi-angle photometric image sequence, generating a multi-dimensional feature description vector through feature aggregation processing; Based on the multi-dimensional feature description vector, performing feature screening through preset geometric and texture constraint rules, and performing weighted calculation on the screened feature components; calculating the deviation value of the processed multi-dimensional feature description vector and the feature reference of the standard part, positioning and identifying the surface abnormal area, and obtaining the pixel mask of the defect area; Mapping the pixel mask of the defect area to the three-dimensional surface model, segmenting and extracting a three-dimensional subset of the defect area, and generating a defect area feature parameter report in combination with the geometric parameters of the flexible circuit board.
[0010] Preferably, the step of collecting a multi-angle photometric image sequence specifically comprises: using a non-coplanar light source photometric stereo vision technology that irradiates from different directions at different times, collecting an image sequence under a single fixed camera view angle, and calculating a surface normal vector for each pixel point by analyzing the pixel brightness change caused by different illumination directions, and reconstructing a three-dimensional surface topography.
[0011] Preferably, the multi-channel spectral data is hyperspectral data; the step of region segmentation based on spectral response comprises: constructing a hyperspectral data cube by scanning imaging the flexible circuit board and dispersing the collected light signals, the hyperspectral data cube containing continuous narrow-band spectral bands from visible light to near-infrared spectral range, wherein each pixel corresponds to a unique spectral signature, and different material regions on the flexible circuit board are identified and segmented by comparing the spectral signature of each pixel with a preset material spectral library; the different material regions include copper foil, substrate, shielding layer, adhesive, cover film and surface treatment layer; the step of spatial registration specifically comprises: realizing pixel-level alignment of the two kinds of data by identifying and aligning the reference mark points commonly existing in the material region distribution map and the multi-angle photometric image sequence; extracting and matching local invariance feature points in the two kinds of data, calculating and applying an affine transformation matrix to complete the spatial registration.
[0012] Preferably, the curvature features are Gaussian curvature and mean curvature, and the local concave-convex shape of the surface abnormal region is quantified by analyzing the numerical value and sign of the Gaussian curvature and the mean curvature to distinguish convex defects from concave defects; the two-dimensional texture features are extracted from one image in the multi-angle photometric image sequence and include directional texture information of defects captured by applying a Gabor filter bank and local microstructure of defects represented by applying a local binary pattern operator.
[0013] Preferably, the step of heterogeneous multi-scale fusion comprises: normalizing the curvature features and the two-dimensional texture features of different sources to eliminate dimensional differences, calculating and assigning a weight value to each feature by an attention mechanism model for quantifying the contribution of each feature to defect recognition, and concatenating the weighted features to form a multi-dimensional feature description vector; the preset geometric and texture constraint rules include: taking the design reference of the flexible circuit board as a geometric constraint, the design reference including the minimum width, minimum spacing and aperture tolerance of the circuit; and taking the distribution range of the normal texture mode learned from the standard part sample as a texture constraint to eliminate feature components that do not conform to the design reference and deviate from the normal texture mode.
[0014] Preferably, the step of performing weighted calculation comprises: performing statistical analysis based on the historical defect database, calculating the correlation measure value between different feature components and key defect types, and assigning a fixed weight value to the corresponding feature component according to the correlation measure value; the feature reference of the standard part is the feature distribution of the normal sample learned by a pre-trained machine learning classifier; the machine learning classifier performs single-class classification training based on support vector machine, convolutional neural network and Transformer model, and the data set used in the single-class classification training only contains feature vectors of normal flexible circuit board samples.
[0015] Preferably, the deviation value calculation is to compare the input vector with the feature distribution, and to determine the input vector with a deviation from the distribution exceeding a preset threshold as abnormal; the method further comprises: using a multi-class classifier, which is constructed by supervised learning training on a labeled data set containing different types of single defect samples; analyzing the multi-dimensional feature description vector, and classifying the identified surface abnormal area into the corresponding defect type, the defect type including open circuit, short circuit, scratch, pit, foreign matter pollution, cover film blister, internal delamination and adhesive cavity.
[0016] Preferably, the defect area feature parameter report includes a quantitative index of the defect, which is determined by quantitative calculation on a three-dimensional subset of the defect area, wherein the three-dimensional subset of the defect area is segmented from the three-dimensional surface model; the quantitative index includes the three-dimensional volume, surface area, maximum depth, height and position coordinates relative to the flexible circuit board design reference of the defect; further comprising collecting the phase-locked thermal imaging data of the flexible circuit board to obtain a subsurface thermal anomaly distribution map; the process of obtaining the subsurface thermal anomaly distribution map specifically comprises: performing Fourier transform on each pixel point along the time dimension on the original thermal image sequence synchronized with the periodic excitation source collected by the phase-locked thermal imaging module, and extracting the phase response value at the excitation frequency corresponding to the excitation source period. The image composed of the phase response values of all pixel points is highly sensitive to the subsurface thermal characteristic changes, and the thermal anomaly features extracted from the subsurface thermal anomaly distribution map are fused with the three-dimensional curvature features and two-dimensional texture features to form a multi-dimensional feature description vector, which is further used to identify subsurface defects including internal delamination, adhesive cavity or buried hole defects.
[0017] Preferably, the method is integrated into a closed-loop quality control process, in which the defect area feature parameter report is used as a feedback signal, the quantitative defect index in the report is compared with the preset quality target through a PID controller, the control error is calculated, and the control instruction is output based on the error to automatically adjust the upstream production process parameters and realize real-time monitoring of the production state.
[0018] According to the described standardization scheme, an integrated flexible circuit board production quality detection system is integrated, including a data acquisition and modeling module, a feature engineering module, a defect recognition module and a report generation module, wherein: The data acquisition and modeling module is used for acquiring a multi-angle photometric image sequence and multi-channel spectral data of the flexible circuit board, performing region segmentation based on spectral response on the multi-channel spectral data, generating a material region distribution map based on the material inherent spectral characteristics, and spatially registering the material region distribution map with the multi-angle photometric image sequence to construct a three-dimensional surface model of the flexible circuit board. The feature engineering module is used for calculating and extracting curvature features for local topographic changes according to the three-dimensional surface model, and performing heterogeneous multi-scale fusion of the curvature features and two-dimensional texture features extracted from the multi-angle photometric image sequence, and generating a multi-dimensional feature description vector through feature aggregation processing. The defect recognition module is used for feature screening based on the multi-dimensional feature description vector through a preset geometric and texture constraint rule, and performing weighted calculation on the screened feature components, and positioning and recognizing a surface abnormal area by calculating a deviation value between the processed multi-dimensional feature description vector and a feature reference of a standard piece to obtain a pixel mask of a defect area. The report generation module is used for mapping the pixel mask of the defect area to the three-dimensional surface model, segmenting and extracting a three-dimensional subset of the defect area, and generating a defect area feature parameter report in combination with geometric parameters of the flexible circuit board.
[0019] Compared with the prior art, the beneficial effects of the present application are: 1、The present application improves the accuracy and reliability of detection. The present application can comprehensively judge defects through multi-modal fusion of three-dimensional geometric features (curvature) and surface material features (spectrum). For example, the system can easily distinguish between a three-dimensional concave defect and a harmless color spot existing only on the surface of the cover film, or identify a foreign object pollution with similar color to the surrounding substrate but completely different material composition. This multi-dimensional information complementary method fundamentally overcomes the false positives and false negatives caused by single information in traditional two-dimensional or three-dimensional detection technology, significantly improving the robustness and accuracy of detection.
[0020] 2、The present application realizes comprehensive quantitative analysis of defects. The present application surpasses the limitation of traditional detection methods which can only provide two-dimensional area or simple existence judgment of defects. By mapping the defect area to a three-dimensional model and segmenting, the three-dimensional volume, surface area, maximum depth / height and other key quantitative indicators of the defect can be accurately calculated. These refined parameters are crucial for evaluating the severity level of defects and judging their potential impact on product performance, providing a data basis for realizing refined statistical process control and quality management.
[0021] 3、The present application constructs an active closed-loop quality control process. The quantitative defect report is used as a feedback signal in the present application, which is directly linked to the upstream production process through a feedback controller, realizing closed-loop integration of quality detection and production control. This design makes quality detection no longer an isolated and passive post-screening link, but an active and real-time process optimization tool. It can automatically correct process drift and reduce the generation of defects from the source, thereby effectively improving product first-pass yield and reducing rework and scrap costs.
[0022] 4、The present application enhances the automation and intelligence level of the system. The entire detection process from data acquisition, feature engineering to intelligent decision-making and process feedback is highly automated. By using one-class classification algorithm for anomaly detection, the present application effectively solves the pain point of the lack of defect samples and the difficulty of constructing large-scale labeled data set in the industry, making the deployment and maintenance of artificial intelligence models more feasible and economical, and reducing the application threshold of intelligent detection technology. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 The overall flowchart of the flexible circuit board production quality detection method provided by the first embodiment of the present application is shown in the figure. Figure 2 The multi-modal data acquisition and three-dimensional modeling system architecture schematic diagram provided by the first embodiment of the present application is shown in the figure. Figure 3 The technical flowchart of the heterogeneous feature fusion and intelligent recognition mechanism provided by the second embodiment of the present application is shown in the figure. Figure 4 The quality detection system integration architecture and module cooperation relationship schematic diagram provided by the second embodiment of the present application is shown in the figure. Figure 5 The complete application flowchart of the closed-loop quality control process provided by the third embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0024] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0025] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application. Figures 1 to 5 The present application provides a flexible circuit board production quality detection method, and the technical solutions are as follows: A flexible circuit board production quality detection method, with reference to the drawings Figure 1 The specific implementation steps of the method provided by the present application include: S1, a multi-angle photometric image sequence and multi-channel spectral data of the flexible circuit board are collected, the multi-channel spectral data are subjected to region segmentation based on spectral response, a material region distribution map is generated based on material inherent spectral characteristics, the material region distribution map is subjected to spatial registration with the multi-angle photometric image sequence, and a three-dimensional surface model of the flexible circuit board is constructed; S2, curvature features for local topographic changes are calculated and extracted according to the three-dimensional surface model, the curvature features are subjected to heterogeneous multi-scale fusion with two-dimensional texture features extracted from the multi-angle photometric image sequence, a multi-dimensional feature description vector is generated through feature aggregation processing; S3, feature screening is performed through preset geometric and texture constraint rules based on the multi-dimensional feature description vector, and weighted calculation is performed on the screened feature components; deviation value calculation is performed on the processed multi-dimensional feature description vector and the feature reference of a standard piece, surface abnormal region is located and identified, and a pixel mask of a defect region is obtained; S4, the pixel mask of the defect region is mapped to the three-dimensional surface model, a three-dimensional subset of the defect region is segmented and extracted, and a defect region feature parameter report is generated in combination with the geometric parameters of the flexible circuit board.
[0026] Embodiment one This embodiment takes a piece of FPC used for connecting the mainboard of a smart phone as an example, and provides a flexible circuit board production quality detection method, with reference to the drawings Figures 1 to 3 The technical solutions are as follows: Further, multi-modal data of the flexible circuit board are collected, and a three-dimensional surface model and a subsurface thermal anomaly distribution map thereof are constructed; corresponding to the above step S1, the specific process is as follows: with reference to the drawings Figure 2The FPC to be measured is placed on a conveyor belt or precision translation stage moving at a constant speed along a predetermined direction. The data acquisition system is arranged above the translation stage, including a high-resolution industrial camera in a fixed position, three non-coplanar LED light sources, a push-broom hyperspectral camera, and a lock-in thermal imaging module. The multi-modal data acquisition specifically includes: Specifically, the photometric stereo vision technology is used to maintain a single fixed camera view of the industrial camera, and the three non-coplanar LED light sources at different azimuth and elevation angles are sequentially and independently lit. For each lit light source, the camera synchronously acquires a frame of image to obtain a sequence containing three images. Due to the different illumination directions, the brightness values of the same point on the FPC surface in the three images will change, and this change implies the information of the surface normal vector of the point. This technology is a high-computational-efficiency and simple-mechanical-structure three-dimensional reconstruction method. The push-broom hyperspectral camera is used to perform line-by-line scanning of the FPC, and the light signals of each pixel point are dispersed by the built-in grating or prism to construct a three-dimensional hyperspectral data cube. The data cube covers the spectral range from visible light to near-infrared, for example, 400 nm to 1100 nm, and contains hundreds of continuous narrow-band spectral bands, with a spectral resolution of up to 2.5 nm.
[0027] As a preferred embodiment, the multi-modal data acquisition of the flexible circuit board further includes acquisition of lock-in thermal imaging data to obtain a subsurface thermal anomaly distribution map, and the subsurface thermal anomaly distribution map is fused with the multi-dimensional feature description vector to identify subsurface defects including internal delamination, adhesive voids, or buried hole defects. This processing extends the detection dimension from the surface of the board to its interior by fusing the subsurface thermal imaging data, thereby achieving accurate identification and classification of hidden defects such as internal delamination and voids, and providing more diagnostic feedback signals for optimization of upstream production processes.
[0028] The present application uses photometric stereo vision technology to acquire image sequences through a single fixed camera view and multiple light sources, and reconstructs three-dimensional surface topography based thereon. This mechanism breaks through the speed and cost bottlenecks of traditional three-dimensional detection technologies (such as laser scanning), realizes high-speed, high-cost-performance accurate detection of micro-topography defects, and makes it suitable for large-scale online production needs.
[0029] Further, the obtained hyperspectral data cube is subjected to material region segmentation based on spectral response. Different constituent materials on the FPC, such as copper foil, polyimide substrate, cover film, adhesive, shielding layer and surface treatment layer, all have their unique spectral feature signatures. By comparing the spectral feature signature of each pixel in the data cube with a pre-established standard material spectral library, the material category to which each pixel belongs can be identified, thereby generating a material region distribution map. The construction process of the standard material spectral library includes: selecting various standard material samples used in flexible circuit board production, such as copper foils of different specifications, polyimide substrates, cover films, adhesives, etc.; under the same lighting and geometric conditions as the actual detection environment, scanning each standard sample using a hyperspectral camera to collect its hyperspectral data; pre-processing the collected data to eliminate noise and environmental influences; then, extracting and calculating the average spectral feature signature with statistical representation for each material, and storing it in the database to form the standard material spectral library.
[0030] Specifically, the generated material region distribution map, the collected multi-angle photometric image sequence and the subsurface thermal anomaly distribution map are spatially aligned. Specifically, by identifying and matching the reference marker points commonly present in all data sources, a feature-based registration algorithm is used to extract and match the local invariance feature points in the data, a unified affine transformation matrix is calculated and applied to each data map to achieve accurate pixel-level alignment. Using the registered photometric image sequence, for each pixel point, the Lambertian reflection model is solved by analyzing its brightness value in three different illumination images, the surface normal vector corresponding to the pixel point is calculated, and the normal vector field of all pixel points is integrated to reconstruct the global high-resolution three-dimensional surface model of the FPC to be detected, accurately reproducing the micro-topography of the FPC surface.
[0031] The present application uses hyperspectral imaging technology to collect multi-channel spectral data and generates a material region distribution map based on the unique spectral feature signature of the material. This mechanism breaks through the limitations of traditional optical detection that cannot distinguish the optical characteristics of different materials, realizes accurate material context perception of the area where the defect is located, provides a key basis for subsequent classification and judgment, and significantly reduces the false positive rate.
[0032] Further, according to the three-dimensional surface model and the collected data, heterogeneous multi-scale feature engineering is performed; corresponding to the above step S2, the specific process is: please refer to Figure 3Based on the generated three-dimensional surface model, the Gaussian curvature and the mean curvature are calculated. The curvature is a geometric invariant that describes the local bending degree of the surface. For example, a convex bubble area of the cover film will exhibit a significant positive mean curvature, while a pit corresponds to a negative mean curvature. At the same time, the local shape of the surface can be judged by analyzing the numerical value of the Gaussian curvature, which provides a basis for the fine classification of the defect morphology. By combining the numerical value and the sign of the curvature, different defects can be quantitatively distinguished and described in terms of severity. At the same time, a two-dimensional texture feature is extracted from the image with the most uniform illumination selected from the sequence of multi-angle photometric images. Specifically, a set of Gabor filters with different directions and frequencies is applied, which is sensitive to directional texture (such as linear scratches) and can effectively capture the directional information of defects.
[0033] In addition, a local binary pattern operator is applied to represent the local microstructure of the defect area, which is robust to illumination changes and can effectively describe non-structured texture abnormalities caused by foreign contamination or surface corrosion. This step defines a specific and efficient feature set that combines 3D curvature features for representing shape abnormalities such as concave and convex, and 2D texture features for representing surface abnormalities such as scratches and stains, creating a comprehensive feature representation that is sensitive to a wide range of defect types. Subsequently, three-dimensional curvature features, two-dimensional texture features, and subsurface thermal anomaly features from the lock-in thermography are effectively fused.
[0034] The present application calculates and combines three-dimensional curvature features representing local concave-convex shapes and two-dimensional texture features representing directional textures and microstructures. This mechanism breaks through the limitations of traditional feature extraction methods that only focus on a single scale or a single attribute, and constructs a comprehensive feature representation that is highly sensitive to a variety of physical forms of defects such as pits, bubbles, scratches, and stains.
[0035] Further, all features are normalized to eliminate dimensional differences. Then, a material-based dynamic cross-modal attention mechanism model is used to intelligently weight all features. The model is a simplified Transformer structure containing two encoder layers. The input feature vector and the material type (represented by one-hot encoding) are concatenated and linearly mapped to a 128-dimensional input embedding sequence through a fully connected layer. The sequence is processed in turn through two encoder layers with self-attention mechanism. Each encoder layer contains a 4-head self-attention sublayer and a feedforward neural network sublayer, and a residual connection and layer normalization are applied after each sublayer. The feedforward neural network sublayer consists of two linear transformation layers, the first layer has an output dimension of 512 and uses a rectified linear unit as the activation function, and the second layer has an output dimension consistent with the input dimension, which is 128. The training target of the attention model is to learn the internal correlation between the feature components of normal samples. Specifically, the input embedding sequence of normal samples is provided to the model, and the final output layer of the model is a fully connected layer with the same input dimension, which is used to reconstruct the original input. The training process uses reconstruction loss, such as the mean square error loss function, to minimize the difference between the original input vector and the output vector reconstructed by the model through the backpropagation algorithm. By training on a large number of normal samples, the self-attention mechanism within the model is forced to learn the typical dependency between feature components.
[0036] After training, in the subsequent defect detection stage, the extraction and application process of attention weights is as follows: the input embedding sequence of the sample to be tested is provided to the trained model, and the attention matrix output by the self-attention sublayer of the first layer encoder is extracted. First, average is performed on multiple attention head dimensions to obtain an average attention matrix with dimensions [feature component number, feature component number]. Then, to calculate the total average attention degree of each feature component on all other feature components, average pooling operation is performed on the second dimension of the matrix to obtain a weight vector corresponding to the number of input feature components. This vector quantifies the contribution of each feature to defect recognition. When the input is an abnormal sample, its feature combination deviates from the normal pattern learned by the model, causing abnormal attention weight distribution, and the weighted vector will significantly deviate from the normal sample cluster in the feature space, making it easy to be recognized by the subsequent one-class classifier. Finally, the weight vector is multiplied element-wise with the normalized original feature vector to obtain the weighted feature, which is then concatenated to form the final multi-dimensional feature description vector.
[0037] Further, the features weighted by the attention mechanism are concatenated or aggregated to generate a unified multi-dimensional feature description vector for each pixel. Specifically, the multi-dimensional feature description vector consists of components, and its structure is defined as follows: . and are the normalized Gaussian and mean curvature values respectively by Z-score method. are the response amplitudes of Gabor filter bank in 8 different directions and 2 different frequencies, totaling 16 components, also normalized by Z-score. is the feature histogram calculated by uniform LBP operator with radius 2 and neighborhood 8, containing 59 components. is the normalized gray value of the corresponding pixel in the sub-surface thermal anomaly distribution map, serving as a single-component feature. All feature components are concatenated in this order to form a fixed-dimension, well-structured vector, ensuring the stability and consistency of the subsequent machine learning model input.
[0038] As a preferred embodiment, the attention mechanism model is a material-based dynamic attention mechanism, which adjusts the weight values allocated to the curvature features and the two-dimensional texture features in real time according to the material type of the current detection area identified by the material area distribution map. When detecting copper foil line areas, the model automatically increases the weight allocated to the curvature features, and when detecting substrate areas, it automatically increases the weight allocated to the two-dimensional texture features. This model introduces a material-based dynamic attention mechanism, which adaptively adjusts the analysis weights of three-dimensional topography and two-dimensional texture features according to different materials in the detection area, thereby achieving more targeted and accurate flaw identification.
[0039] The present application introduces an attention mechanism model to weight and integrate heterogeneous features, and combines rules based on design benchmarks and normal texture patterns for feature screening. This mechanism breaks through the limitations of traditional feature fusion using fixed weights or simple splicing, achieving intelligent and adaptive evaluation of feature contribution and effective filtering of irrelevant noise, thereby significantly enhancing the accuracy and reliability of detection.
[0040] Further, based on the multi-dimensional feature description vector, the flaws are identified; corresponding to the above step S3, the specific process is: before performing flaw discrimination, the feature vector is screened by pre-set geometric and texture constraints to eliminate invalid or interfering features. In terms of geometric constraints, the minimum line width, minimum spacing and aperture tolerance of the FPC design benchmark extracted from the Gerber file are used as constraints. For example, if the FPC design specification requires a minimum line width of , and the feature analysis result shows that the copper foil width at a certain location is If so, the feature is marked as inconsistent with geometric constraints. In terms of texture constraints, the distribution range of normal texture patterns learned from a large number of standard qualified product samples is taken as a constraint. If the texture feature component of a certain region deviates significantly from the normal range, it is considered as a potential anomaly.
[0041] Specifically, the system can intelligently and adaptively weight the features according to their relevance to specific defects by introducing an attention mechanism and combining rule-based feature screening, and can filter noise according to design and material constraints, thereby further enhancing the accuracy and reliability of detection. In a simplified implementation, a dynamic attention mechanism can also not be used, but a fixed weight weighting calculation can be performed on the screened feature components. The historical defect database is established by collecting and storing defect sample data on the production line that is confirmed by artificial review or offline high-precision equipment, wherein each sample includes multi-modal raw data, extracted feature vectors, and label information such as defect type and severity level annotated by quality engineers. The fixed weight can be statistically analyzed based on a continuously updated historical defect database to calculate the relevance measure value between different feature components and specific key defect types, and then assigned accordingly. Subsequently, a feature benchmark is established. The establishment of the feature benchmark uses a one-class classification machine learning method, specifically a one-class support vector machine. The one-class classification machine learning method uses a structure based on an autoencoder. Specifically, the autoencoder is trained only using feature vectors containing normal flexible circuit board samples, and the training goal is to minimize the mean square error between the input vector and the network reconstructed output vector. After training, the autoencoder constitutes the feature benchmark of the standard part.
[0042] As a preferred embodiment, the feature benchmark of the standard part is a global machine learning classifier trained by a federated learning method on multiple detection systems in a distributed production network, wherein each local detection system only updates the local model using its local data and uploads the model parameter updates rather than the original data to the central server, and then aggregates to generate the global machine learning classifier. This system effectively protects the data privacy of each production base while aggregating diverse data in the distributed network to collaboratively train a more powerful and more generalizable global defect detection model.
[0043] The present application uses a one-class classification machine learning model trained only on normal flexible circuit board samples to construct the feature benchmark of the standard part. This mechanism skillfully avoids the "data imbalance" problem of industrial production, where defect samples are scarce, diverse, and difficult to collect, achieving efficient detection of anomalies, making the detection system more robust and easy to deploy in actual production lines.
[0044] Further, the multi-dimensional feature descriptor of each pixel on the FPC to be tested after screening and processing is input into the trained one-class support vector machine model, and the model calculates the deviation value of the vector from the "normal" boundary. If the deviation value exceeds the preset threshold, the pixel point is determined to be abnormal. Finally, all the pixel points determined to be abnormal are aggregated to form a pixel mask of the defect area.
[0045] Specifically, when using a one-class support vector machine model, the model is trained on a dataset containing only normal sample feature vectors, learning a minimum volume hypersphere or optimal segmentation hyperplane that can surround most normal sample points, which is the feature reference of the standard part. In detection, the multi-dimensional feature descriptor of each pixel on the FPC to be tested is input into the trained model. The deviation value is defined as the signed distance of the feature vector to the segmentation hyperplane; if the distance is negative and its absolute value exceeds a preset threshold, the pixel point is determined to be abnormal. For the model based on an autoencoder, the deviation value is the mean square error between the input vector and the reconstructed output vector of the model. The preset threshold is determined by calibrating on an independent normal sample validation set to achieve a preset false alarm rate.
[0046] Specifically, a multi-class classifier trained and constructed on a labeled dataset containing multiple types of defects is used to analyze the multi-dimensional feature descriptor vector, and the identified surface and subsurface abnormal regions are automatically classified into specific defect types, including open circuit, short circuit, scratch, pit, foreign matter pollution, cover film blister, internal delamination, or adhesive void. The addition of a multi-class classification step enables the system not only to detect defects but also to automatically classify them.
[0047] Specifically, the multi-class classifier uses a gradient boosting decision tree model. The model directly uses the multi-dimensional feature descriptor vector generated in the previous step as input. In the training phase, a feature vector dataset containing various labeled defect samples such as open circuit, short circuit, scratch, and pit is used. Iterative training is performed by minimizing the multi-class log loss function, and the final model can output the most likely defect type of the input vector according to the input vector.
[0048] After identifying the abnormal area, the present application further uses a multi-class classifier to automatically classify the defects. This mechanism breaks through the limitation of traditional detection systems that can only determine "yes / no" defects, and realizes automatic identification of defect types (such as open circuit, short circuit, scratch, etc.), providing valuable and structured data for root cause analysis and targeted process improvement in the production process.
[0049] Further, the identified defects are quantified and a report is generated; corresponding to the above step S4, the specific process is: first, the defect area pixel mask generated in the last step is mapped back to the three-dimensional surface model constructed previously, so as to accurately segment and extract the three-dimensional subset corresponding to the defect area. Then, the extracted three-dimensional subset is subjected to geometric calculation to generate a defect area feature parameter report containing quantitative indicators, including the three-dimensional volume (for example, the volume of a bubble is ), surface area, maximum depth or height (for example, the maximum depth of a scratch is ), and accurate position coordinates relative to the FPC reference marker point.
[0050] The present application can map the identified defects back to the three-dimensional model and generate a quantitative parameter report containing indicators such as three-dimensional volume, surface area, maximum depth / height, and position coordinates. This mechanism breaks through the limitations of traditional detection results being only binary judgments of "pass / fail", and realizes accurate and traceable quantification of the physical properties of each defect, providing operational data for fine quality control and process engineering.
[0051] Further, the present method can be integrated into a closed-loop quality control process, in which the generated defect area feature parameter report is used as a feedback signal. Through a PID controller, the quantitative defect indicators in the report (such as defect frequency, average depth, etc.) are compared with the preset quality target, the control error is calculated, and the control instruction is output based on the error, automatically adjusting the upstream production process parameters, thereby realizing real-time monitoring and optimization of the production state, and preventing the generation of defects from the source.
[0052] The core of this closed-loop control system is a multi-input multi-output controller, the internal logic of which can be realized based on rules or a simple linear model. Specifically, the controller maintains an association matrix or parameter lookup table inside, which defines the quantitative relationship between the error of different defect types and the adjustment amount of each upstream process parameter. This association matrix is constructed through experimental design in the early stages of production. For example, for bubble defects of the cover film, the lamination temperature and lamination pressure are sequentially fine-tuned in the experiment, and the bubble defect rate under different parameter combinations is recorded. Based on the collected data, a mathematical model between the defect rate and each process parameter is established through multivariate linear regression analysis. The coefficients of this model constitute part of the association matrix, for example, the matrix defines the proportional relationship between the bubble defect rate error and the lamination temperature adjustment value. In operation, the controller performs weighted operation on the current error values of all defect types and their respective weight coefficients, thereby calculating a set of adjustment instructions for multiple related process parameters that have been synergistically optimized. The PID parameters are optimized and set according to the actual response during the production line debugging phase through standard tuning methods such as Ziegler-Nichols.
[0053] The present application integrates the detection method into a closed-loop quality control process, uses the generated quantitative defect report as a feedback signal, and automatically adjusts the upstream production process parameters through a PID controller. This mechanism breaks through the limitations of traditional detection as an isolated "after-the-fact" link, upgrades the detection tool to an active "in-process" process control unit, and realizes real-time prevention of defects, thereby significantly improving overall production yield.
[0054] Embodiment Two The present embodiment provides a flexible circuit board production quality detection system. The system maps the steps of the method to specific functional hardware and software modules, referring to Figure 4 The system includes a data acquisition and modeling module, a feature engineering module, a defect recognition module, and a report generation module.
[0055] Further, the data acquisition and modeling module includes a high-resolution industrial camera installed above a precision translation stage, a set of non-coplanar LED light sources driven by a timing controller, a push-broom hyperspectral camera, a lock-in thermography module containing a periodic excitation source and a high-frame-rate infrared thermal imager, and an FPGA or dedicated timing controller for synchronously controlling all hardware and triggering data acquisition. All hardware is connected to an industrial control computer through high-speed data interfaces. On the software side, the module is embedded in the industrial control computer and runs device drivers, image acquisition software, algorithms for material segmentation based on a preloaded standard material spectral library, algorithms for multi-modal data space registration by matching reference marker points, and algorithms for performing photometric stereo calculations to reconstruct high-resolution three-dimensional surface models.
[0056] Further, the feature engineering module includes: the module is deployed on an industrial control computer or a dedicated edge computing server equipped with a high-performance graphics processing unit (GPU) to accelerate parallel computing. The module contains a geometric algorithm library for calculating three-dimensional model Gaussian curvature and average curvature, an image processing algorithm library for extracting two-dimensional image Gabor and local binary pattern features, and a deep learning model based on the Transformer architecture that implements a material-based dynamic attention mechanism for intelligent weighting and fusion of extracted heterogeneous multi-scale features, ultimately generating a unified multi-dimensional feature description vector for each pixel point.
[0057] Further, the defect recognition module includes: running on an industrial control computer or an edge computing server. It contains a geometry and texture constraint rule engine imported from a Gerber file, a pre-loaded one-class support vector machine model trained through federated learning or local data. The one-class support vector machine model is the feature benchmark of the flexible printed circuit standard part, and an algorithm for calculating the deviation value of the feature vector of the sample to be tested from the benchmark. In addition, the module also contains a pre-trained multi-class classifier for specific defect type classification of the areas judged to be abnormal, including open circuit, short circuit, scratch, pit, foreign matter pollution, cover film blister, internal delamination or adhesive cavity.
[0058] Further, the report generation module includes: receiving the defect area pixel mask output by the defect recognition module, mapping it back to the three-dimensional surface model to extract the three-dimensional subset of the defect, and performing geometric calculation on the subset to generate a feature parameter report containing quantitative indicators such as defect three-dimensional volume, surface area, maximum depth / height, and accurate position coordinates. The module also includes a communication interface that transmits the generated structured report to the factory's MES manufacturing execution system in real time through standard industrial protocols (such as Ethernet / IP, PROFINET, or OPC-UA) for quality traceability, or directly to the PLC / PID controller of the upstream equipment for closed-loop feedback control.
[0059] The present application defines an entity system composed of four core modules of data acquisition and modeling, feature engineering, defect recognition, and report generation, in which each module is tightly coupled with the central processing unit through a high-speed data interface to form a whole that works cooperatively. This mechanism breaks through the limitations of traditional detection methods that only stay at the algorithm level and lack specific, modular, and integrated implementation solutions, realizing full-process automation and efficient cooperation from multi-source heterogeneous data input to final quantitative defect report output.
[0060] Embodiment Three This embodiment describes the complete application process of the detection system of the present application as a production quality detection system in the mass production line of FPC of wearable devices (such as smart watches), referring to Figure 5 In the initial state, the detection system of the present application is integrated and deployed after the FPC lamination and curing station to detect the FPC just completed lamination 100% online, aiming to use detection data for real-time feedback and automatic correction of upstream production processes to prevent defects.
[0061] Further, in the continuous production process, the defect recognition module identifies a recurring defect pattern through analysis of the multi-modal data: small local depressions on the FPC surface, corresponding to internal voids generated during the lamination process. The report generation module goes to work, recording not only the quantitative parameters of individual defects, but also performing real-time statistical process control analysis, calculating moving averages and trends for defect frequency and severity (e.g. average depth). The module then packages the analysis results into a structured data frame containing key performance indicators such as defect type, current batch defect rate, average defect rate over the past 30 minutes, defect rate trend, and average defect depth. This data frame is transmitted in real-time to a central process control unit via OPC-UA protocol over industrial Ethernet.
[0062] Specifically, the central process control unit receives the data frame. The control logic (e.g. a PID controller) within the unit begins processing. The controller compares the received real-time defect rate to a pre-set quality target threshold, calculating a significant control error. At the same time, since the defect rate continues to be above the threshold and the trend in the data frame is "increasing", the integral and derivative terms of the controller accumulate, prompting it to determine that the current top priority task is to address the void issue. Based on its internal pre-set knowledge base or rule set associated with defect types, the controller determines that the most likely cause of this defect is lamination process parameter drift, and determines that the most effective means is to adjust the lamination pressure and dwell time.
[0063] In turn, the central process control unit generates a series of operation instructions and packages them into control data packets that can be directly executed by the upstream equipment. The unit sends these data packets to the PLC of the laminator via industrial bus. The operation instructions are a series of structured control commands encapsulated in standard industrial bus protocols, rather than simple parameter settings. For example, the instruction packet contains the target pressure value (P ), pressure rise rate, target dwell time (extended by 2 seconds), and execution trigger signal, and the controller of the press interprets these commands and executes the corresponding action sequence. After the instructions are issued, the detection system of the present invention continues to monitor the quality of the FPC produced subsequently and feeds back new detection reports to the process control unit. If the subsequent reports show that the defect rate has dropped to 0.25 per panel, the PID controller confirms that the adjustment is effective, the error terms decrease, and the system enters a new stable state, thus completing a complete, data-driven closed-loop feedback and process self-optimization process. In this embodiment of the present invention, the detection system has transformed from a passive defect detection tool to an active process control system, achieving automated and intelligent adjustment of the production process by providing real-time, quantitative feedback signals, effectively reducing waste rates and improving the mechanical reliability of the final product.
[0064] The present application constructs a three-dimensional model with material properties by synergistically collecting photometric and spectral data, and generates a multi-dimensional description vector by fusing the three-dimensional curvature and two-dimensional texture features, and then combines machine learning benchmarks to calculate deviations, locate defects and generate a quantitative report. This mechanism breaks through the limitations of traditional detection technology in three-dimensional topography recognition and material differentiation, solves the core technical problems of high false alarm rate and inability to quantitatively analyze caused by single information dimension. It realizes accurate positioning and quantification of defects, provides a new technical paradigm with high speed and high precision for online quality detection of high-reliability flexible printed circuit boards, and provides accurate data support for process optimization.
[0065] Although embodiments of the present application have been shown and described, it is to be understood that various modifications, substitutions, replacements and changes can be made to these embodiments without departing from the principles and spirit of the present application, and the scope of the present application is defined by the appended claims and their equivalents.
Claims
1. A method for quality inspection in the production of flexible printed circuit boards, characterized in that, include: A multi-angle photometric image sequence and multi-channel spectral data of a flexible circuit board are acquired. The multi-channel spectral data is then segmented based on spectral response, and a material region distribution map is generated based on the inherent spectral characteristics of the material. The material region distribution map is then spatially registered with the multi-angle photometric image sequence to construct a three-dimensional surface model of the flexible circuit board. Based on the three-dimensional surface model, curvature features for local morphological changes are calculated and extracted; the curvature features are heterogeneously fused with the two-dimensional texture features extracted from the multi-angle photometric image sequence, and a multi-dimensional feature description vector is generated through feature aggregation processing. Based on the multidimensional feature description vector, features are filtered through preset geometric and texture constraint rules, and the filtered feature components are weighted and calculated. By calculating the deviation between the processed multidimensional feature description vector and the feature reference of the standard part, the abnormal surface area is located and identified, and the pixel mask of the defect area is obtained. The pixel mask of the defective area is mapped onto the three-dimensional surface model, the three-dimensional subset of the defective area is segmented and extracted, and a defective area feature parameter report is generated by combining the geometric parameters of the flexible circuit board.
2. The method for quality inspection in the production of flexible printed circuit boards according to claim 1, characterized in that, The specific steps for acquiring multi-angle photometric image sequences are as follows: using photometric stereo vision technology with non-coplanar light sources illuminating from different directions at different times, acquiring image sequences under a single fixed camera viewpoint, and reconstructing the three-dimensional surface morphology by analyzing the pixel brightness changes caused by different illumination directions and calculating the surface normal vector for each pixel.
3. The method for quality inspection in the production of flexible printed circuit boards according to claim 1, characterized in that, The multi-channel spectral data is hyperspectral data. The region segmentation step based on spectral response includes: constructing a hyperspectral data cube by scanning and imaging the flexible circuit board and performing dispersion processing on the acquired light signal. The hyperspectral data cube contains a continuous narrow-band spectral band from visible light to near-infrared, where each pixel corresponds to a unique spectral feature signature. By comparing the spectral feature signature of each pixel with a preset material spectral library, different material regions on the flexible circuit board are identified and segmented. The different material regions include copper foil, substrate, shielding layer, adhesive, cover film, and surface treatment layer. The spatial registration step specifically involves: identifying and aligning the reference markers that coexist in the material region distribution map and the multi-angle photometric image sequence to achieve pixel-level alignment of the two types of data; using a feature-based registration algorithm, extracting and matching local invariant feature points in the two types of data, and calculating and applying an affine transformation matrix to complete the spatial registration.
4. The method for quality inspection in the production of flexible printed circuit boards according to claim 1, characterized in that, The curvature features are Gaussian curvature and mean curvature. By analyzing the values and signs of the Gaussian curvature and mean curvature, the local uneven shape of the surface abnormal area is quantified, and raised defects and sunken defects are distinguished. The two-dimensional texture features are extracted from one image in the multi-angle photometric image sequence, and include the application of Gabor filter banks to capture the directional texture information of defects, and the application of local binary mode operators to characterize the local microstructure of defects.
5. The method for quality inspection in the production of flexible printed circuit boards according to claim 1, characterized in that, The heterogeneous multi-scale fusion steps include: normalizing curvature features and two-dimensional texture features from different sources to eliminate dimensional differences; calculating and assigning a weight value to each feature through an attention mechanism model to quantify the contribution of each feature to defect identification; and concatenating the weighted features to form a multi-dimensional feature description vector. The preset geometric and texture constraint rules include: using the design benchmark of the flexible circuit board as a geometric constraint, which includes the minimum width, minimum spacing, and aperture tolerance of the lines; and using the distribution range of normal texture patterns statistically learned from standard part samples as a texture constraint, eliminating feature components that do not conform to the design benchmark and deviate from the normal texture pattern.
6. The method for quality inspection in the production of flexible printed circuit boards according to claim 1, characterized in that, The weighted calculation step includes: performing statistical analysis based on a historical defect database, calculating the correlation metric between different feature components and key defect types, and assigning a fixed weight value to the corresponding feature component based on the correlation metric; the feature benchmark of the standard part is the feature distribution of normal samples learned by a pre-trained machine learning classifier; the machine learning classifier performs single-class classification training based on support vector machine, convolutional neural network and Transformer model, and the dataset used for single-class classification training only contains feature vectors of normal flexible circuit board samples.
7. The method for quality inspection in the production of flexible printed circuit boards according to claim 1, characterized in that, The deviation value calculation involves comparing the input vector with the feature distribution and identifying input vectors with a deviation exceeding a preset threshold as abnormal. The method further includes: employing a multi-class classifier trained and constructed through supervised learning on a labeled dataset containing single defect samples of different types; analyzing the multi-dimensional feature description vector to classify the identified surface abnormalities into corresponding defect types, including open circuits, short circuits, scratches, dents, foreign matter contamination, film blistering, internal delamination, and adhesive voids.
8. The method for quality inspection in the production of flexible printed circuit boards according to claim 1, characterized in that, The defect region feature parameter report includes quantitative indicators for the defects, which are determined by quantifying a three-dimensional subset of the defect region, wherein the three-dimensional subset of the defect region is segmented from the three-dimensional surface model. The quantitative indicators include the three-dimensional volume, surface area, maximum depth, height, and position coordinates of the defect relative to the flexible circuit board design reference. It also includes acquiring phase-locked thermal imaging data of the flexible circuit board to obtain a subsurface thermal anomaly distribution map; and fusing the subsurface thermal anomaly distribution map with the multi-dimensional feature description vector to identify subsurface defects, including internal delamination or buried via defects.
9. The method for quality inspection in the production of flexible printed circuit boards according to claim 1, characterized in that, The method is integrated into a closed-loop quality control process, in which the defect area feature parameter report is used as a feedback signal. The quantified defect index in the report is compared with the preset quality target by the PID controller, the control error is calculated, and the control command is output based on the error to automatically adjust the upstream production process parameters and realize real-time monitoring of the production status.
10. A flexible printed circuit board (FPCB) production quality inspection system, the system being used to perform a FPCB production quality inspection method as described in any one of claims 1 to 9, characterized in that, include: The data acquisition and modeling module is used to acquire multi-angle photometric image sequences and multi-channel spectral data of flexible circuit boards, perform region segmentation based on spectral response on the multi-channel spectral data, and generate a material region distribution map based on the inherent spectral characteristics of the material. The material region distribution map and the multi-angle photometric image sequence are spatially registered to construct a three-dimensional surface model of the flexible circuit board. The feature engineering module is used to calculate and extract curvature features for local morphological changes based on the three-dimensional surface model; and to perform heterogeneous multi-scale fusion of the curvature features with the two-dimensional texture features extracted from the multi-angle photometric image sequence, and generate a multi-dimensional feature description vector through feature aggregation processing. The defect identification module is used to perform feature filtering based on the multidimensional feature description vector through preset geometric and texture constraint rules, and to perform weighted calculation on the filtered feature components. By calculating the deviation between the processed multidimensional feature description vector and the feature reference of the standard part, the abnormal surface area is located and identified, and the pixel mask of the defect area is obtained. The report generation module is used to map the pixel mask of the defective area onto the three-dimensional surface model, segment and extract the three-dimensional subset of the defective area, and generate a defective area feature parameter report by combining the geometric parameters of the flexible circuit board.
Citation Information
Cited By
Online visual inspection and defect positioning method for flexible hose composite material production line
CN122016653A