Machine vision-based mobile phone lens mount quality detection system
By constructing a topology graph and decoupling cross-modal features, and dynamically adjusting the detection process, the problems of structural area differences and high reflectivity in the quality inspection of mobile phone lens bases are solved, achieving high accuracy and adaptive detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHAANXI HUAWO TIANRUN TECH CO LTD
- Filing Date
- 2026-05-14
- Publication Date
- 2026-06-12
AI Technical Summary
Existing mobile phone lens mount quality inspection technologies struggle to distinguish the characteristic differences between different structural areas, are easily affected by highly reflective areas, leading to high rates of false positives and false negatives, and suffer from uneven distribution of computing resources, making it difficult to adapt to batch variations.
By constructing an initial topology graph, dynamically adjusting the receptive field and computational weights of the feature extraction network, and combining cross-modal feature decoupling, optical artifacts are separated from real defects, and the detection process is dynamically adjusted to adapt to production changes.
It improves the accuracy and adaptability of detection, reduces false alarm and false negative rates, optimizes the allocation of computing resources, and achieves stable detection under complex lighting conditions.
Smart Images

Figure CN122199537A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of machine vision inspection and industrial automation technology, specifically to a machine vision-based mobile phone lens mount quality inspection system. Background Technology
[0002] In the existing production and testing of mobile phone camera modules, for micro-structured parts such as mobile phone lens bases with stepped edges, deep blind holes and junction surfaces, industrial cameras are usually used with light sources to acquire images, and unified feature extraction, defect identification and quality judgment are performed based on the whole image to complete the detection of defects such as burrs, chipping, scratches, residual glue and deformation. In existing detection methods, fixed receptive fields and fixed computational resource allocation methods are often used for different structural regions. The judgment is mainly based on brightness changes, edge intensity or overall texture differences. There is a lack of modeling for the spatial logical relationship of the target component. It is difficult to distinguish the feature differences corresponding to different structural positions such as flat areas, stepped corners, blind hole entrances and junction surfaces. It is also difficult to take into account local minor defects and overall morphological abnormalities in the same detection process. However, in actual production lines, the surface of mobile phone lens bases is easily affected by coating reflection, exposure changes, occlusion, and differences in structural complexity. This can lead to highly reflective areas being misjudged as real defects, or real defects being masked by optical artifacts. In addition, there are problems such as high computational power consumption, difficulty in effectively utilizing low-confidence samples, and insufficient adaptability of test results to batch variations. As a result, the false alarm rate and false negative rate cannot meet the preset test standards, and the stability of the production line test cycle is affected. Summary of the Invention
[0003] The purpose of this invention is to provide a machine vision-based quality inspection system for mobile phone lens mounts, addressing the following technical problems: Existing surface quality inspection technologies for mobile phone camera modules have significant shortcomings in addressing spatial logic differences in different areas of microstructure components, limitations in fixed computing resources and receptive field allocation, and the confusion between real defects and optical artifacts caused by high reflectivity. There is an urgent need for a machine vision-based quality inspection system that can more accurately handle structural spatial topology logic, dynamically schedule computational weights and network receptive fields, and effectively remove high-reflectivity artifacts through cross-modal decoupling to identify real morphological defects. This invention can achieve its objective through the following technical solutions: A machine vision-based mobile phone lens mount quality inspection system, the system comprising: The image acquisition module, including an industrial camera and a light source component, is configured to: provide illumination through the light source component, acquire raw image data of the target component (a mobile phone lens base) through the industrial camera, extract the spatial topology from the raw image data, and construct an initial topology map containing spatial logical relationships by combining preset structural prior information. The dynamic topology feature routing module is configured to: receive the original image data and the initial topology map, calculate the actual activation receptive field area required for different sub-regions in the original image data, obtain the dynamic receptive field adaptation ratio based on the ratio of the global maximum receptive field area to the minimum receptive field area, dynamically adjust the network receptive field of the preset feature extraction network according to the dynamic receptive field adaptation ratio, calculate the topology feature routing hit rate of each node in the initial topology map, and preferentially allocate the preset network channels to the target nodes whose topology feature routing hit rate is higher than the preset hit rate threshold to allocate calculation weights, thereby generating a dynamic topology feature map; The cross-modal feature decoupling module is configured to: receive the dynamic topological feature map, extract optical reflection feature vectors and physical morphological defect feature vectors based on a preset multi-dimensional feature space, calculate the cross-modal feature decoupling degree of the optical reflection feature vectors and physical morphological defect feature vectors, separate high reflectivity artifacts and real morphological defects according to the cross-modal feature decoupling degree, and generate decoupling feature data. The quality inspection and evaluation module is configured to: receive the decoupling feature data, generate the quality inspection result of the target component based on the decoupling feature data, and update the structural prior information using the quality inspection result; The prior structural information includes three-dimensional stepped edge data, deep blind hole data, and interface surface data.
[0004] Optionally, the image acquisition module includes: An image acquisition unit is configured to acquire the raw image data via the industrial camera; The topology node generation unit is configured to extract high-frequency abrupt change regions and low-frequency flat regions from the original image data, and map the high-frequency abrupt change regions and the low-frequency flat regions to topology nodes of the initial topology graph; The logical edge construction unit is configured to calculate the spatial adjacency relationship between the topological nodes, generate connecting edges, and generate the initial topological graph by combining the prior structural information. The high-frequency abrupt change region corresponds to the minute burr features of the target component, and the low-frequency flat region corresponds to the overall deformation features of the target component.
[0005] Optionally, the dynamic topology feature routing module includes a graph convolutional network, which serves as the feature extraction network and comprises: The receptive field adaptive unit is configured to calculate the dynamic receptive field adaptive ratio of different sub-regions in the original image data, and adjust the receptive field area of the graph convolutional network according to the dynamic receptive field adaptive ratio. The computing power scheduling unit is configured to calculate the topology feature route hit rate of each node in the initial topology map, and allocate preset network channels to target nodes whose topology feature route hit rate is higher than the preset hit rate threshold. For nodes whose topology feature route hit rate is not higher than the preset hit rate threshold, basic network channels are allocated to generate the dynamic topology feature map. The preset network channel is configured as a high-dimensional tensor channel containing deep texture extraction parameters, and the basic network channel is configured as a low-dimensional tensor channel containing only grayscale gradient extraction parameters. The dynamic receptive field adaptation ratio is the ratio of the maximum receptive field area to the minimum receptive field area when processing non-uniform structures.
[0006] Optionally, the cross-modal feature decoupling module includes: The feature vector mapping unit is configured to map the dynamic topological feature map to the preset multidimensional feature space and extract the optical reflection feature vector and the physical morphological defect feature vector; wherein, the optical reflection feature vector is used to characterize the brightness peak, reflection gradient and saturation connectivity features of the local region; the physical morphological defect feature vector is used to characterize the edge breakage, contour deflection and local concavity and convexity features of the local region; The orthogonality calculation unit is configured to calculate the cross-modal feature decoupling degree between the optical reflection feature vector and the physical morphological defect feature vector in the preset multi-dimensional feature space; The artifact stripping unit is configured to filter the features in the preset multidimensional feature space according to the cross-modal feature decoupling degree to generate the decoupled feature data; Wherein, the cross-modal feature decoupling degree is the cosine distance between the optical reflection feature vector and the physical morphological defect feature vector.
[0007] Optionally, the artifact stripping unit is configured to perform the following conditional logic: When the cross-modal feature decoupling degree is greater than the preset decoupling degree threshold, it is determined that the real morphological defect exists in the corresponding local area of the target component, and the physical morphological defect feature vector is retained to generate the decoupling feature data; When the cross-modal feature decoupling degree is less than the preset decoupling degree threshold, it is determined that the high reflectivity artifact exists in the corresponding local area of the target component, and the optical reflection feature vector is removed to generate the decoupling feature data; When the cross-modal feature decoupling degree is equal to the preset decoupling degree threshold, a secondary feature extraction instruction is sent to the dynamic topology feature routing module so that the dynamic topology feature routing module regenerates the dynamic topology feature map for the corresponding local region of the target component.
[0008] Optionally, the quality inspection and evaluation module includes: The defect classification unit is configured to input the decoupled feature data into a preset defect classification model and output a morphological defect classification result containing the classification confidence of each category; wherein, the preset defect classification model is configured with a set of morphological defect categories for the corresponding workpiece, including burrs, chipped edges and residual glue. The quality assessment unit is configured to generate the quality inspection result based on the morphological defect classification result. The prior update unit is configured to extract features with a classification confidence level lower than a preset classification confidence threshold from the morphological defect classification results as unknown morphological features, and feed the unknown morphological features back to the structural prior information for updating.
[0009] Optionally, the system further includes a communication interface for connecting to an external production line, and: The context-aware delay monitoring module is configured to record the time cost from inputting the original image data to constructing the initial topology map, and generate context-aware delay data. The dynamic cycle adjustment module is configured to generate an adjustment command for the operating rate of the external production line based on the context-aware delay data through the communication interface: when the context-aware delay data is less than a preset delay threshold, a rate maintenance command is generated; when the context-aware delay data is greater than the preset delay threshold, a rate reduction command is generated and a computing power redirection command is triggered; when the context-aware delay data is equal to the preset delay threshold, the rate maintenance command is generated and a computing power warning signal is output.
[0010] Optionally, the system is deployed in an industrial control network and includes: An edge computing terminal is configured to carry the image acquisition module and the dynamic topology feature routing module, and to perform local feature extraction and computing power scheduling. A cloud server is configured to host the cross-modal feature decoupling module and the quality detection and evaluation module, and to perform feature vector processing and global updates of the structural prior information. The data transmission channel is configured to transmit the dynamic topology feature map and the quality detection result between the edge computing terminal and the cloud server.
[0011] Compared with the prior art, the present invention has the following beneficial effects: 1. This system extracts spatial topology through an image acquisition module and constructs an initial topology map by combining prior structural information. The dynamic topology feature routing module dynamically adjusts the receptive field of the feature extraction network based on local geometry and assigns corresponding computational weights to different nodes. This mechanism effectively overcomes the shortcomings of existing technologies that use fixed receptive fields and fixed computational resources for different structural regions. It enables the system to perform targeted feature extraction based on spatial logical relationships, improving the recognition accuracy of complex location features such as stepped edges and deep blind holes, while also improving the detection accuracy under complex lighting conditions.
[0012] 2. This system extracts optical reflection feature vectors and physical morphological defect feature vectors in a preset multi-dimensional feature space through a cross-modal feature decoupling module, and calculates the cross-modal feature decoupling degree between the two. Through this decoupling mechanism and conditional logic judgment, the system can effectively separate highly reflective artifacts from real morphological defects, solving the problem in actual production lines where artifacts are misjudged as defects due to coating reflection, or real defects are masked by reflection, thus improving the detection accuracy under complex lighting conditions.
[0013] 3. The quality inspection and evaluation module of this system is equipped with a prior update unit, which can specifically extract features with a classification confidence level lower than the preset classification confidence level threshold from the morphological defect classification results as unknown morphological features and feed them back to the structural prior information for updating. This mechanism breaks through the limitation of traditional detection models that are difficult to utilize low-confidence samples, realizes the dynamic iteration of detection standards as actual batch changes and the emergence of unknown features, and enhances the system's adaptability to actual production fluctuations such as mold wear and polishing status changes.
[0014] 4. This system is equipped with a context-aware delay monitoring module and a dynamic cycle adjustment module, which can record the time overhead from inputting raw image data to constructing the initial topology map in real time and generate context-aware delay data. Based on this, it sends adjustment instructions such as rate reduction and maintenance, as well as computing power redirection instructions to the external production line. Combined with the collaborative deployment of edge computing terminals and cloud servers, the system effectively overcomes the risk of cache backlog or missed shots caused by the fluctuation of complex workpiece mapping time, and realizes real-time dynamic coordination between detection load and production cycle. Attached Figure Description
[0015] The present invention will be further explained below with reference to the accompanying drawings and embodiments: Figure 1 This is a structural diagram of the system of the present invention. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.
[0017] Example 1: Please see Figure 1 A machine vision-based quality inspection system for mobile phone lens mounts, comprising: The image acquisition module, including an industrial camera and a light source component, is configured to: provide illumination through the light source component, acquire raw image data of the target component (a mobile phone lens base) through the industrial camera, extract the spatial topology from the raw image data, and construct an initial topology map containing spatial logical relationships by combining preset structural prior information. The dynamic topology feature routing module is configured to: receive the original image data and the initial topology map, calculate the actual activation receptive field area required for different sub-regions in the original image data, obtain the dynamic receptive field adaptation ratio based on the ratio of the global maximum receptive field area to the minimum receptive field area, dynamically adjust the network receptive field of the preset feature extraction network according to the dynamic receptive field adaptation ratio, calculate the topology feature routing hit rate of each node in the initial topology map, and preferentially allocate the preset network channels to the target nodes whose corresponding topology feature routing hit rate is higher than the preset hit rate threshold to allocate calculation weights, thereby generating a dynamic topology feature map. The cross-modal feature decoupling module is configured to: receive a dynamic topological feature map, extract optical reflection feature vectors and physical morphological defect feature vectors based on a preset multi-dimensional feature space, calculate the cross-modal feature decoupling degree between the optical reflection feature vectors and physical morphological defect feature vectors, separate high reflectivity artifacts from real morphological defects based on the cross-modal feature decoupling degree, and generate decoupling feature data. The quality inspection and evaluation module is configured to: receive decoupling feature data, generate quality inspection results of the target component based on the decoupling feature data, and update the structural prior information using the quality inspection results; The prior structural information includes three-dimensional stepped edge data, deep blind hole data, and interface data.
[0018] This embodiment provides a machine vision-based quality inspection mechanism for mobile phone lens mounts. This mechanism is deployed on the same mobile phone camera module production line. After the front-end station completes the forming of the mobile phone lens mount, the workpiece sequentially passes through a vision inspection station. The inspection station includes an industrial camera, a combination of ring and coaxial light sources, an edge computing terminal, and an analysis process communicating with a cloud server. The system is configured to first establish spatial logic based on the inherent structural rules of the workpiece, allocate corresponding computing resources, avoid global averaging of the entire image, and concentrate computing resources on high-risk areas such as stepped edges, deep blind hole entrances, and junction surfaces. When the conveying fixture delivers the target component into the shooting area, the light source component emits light according to the preset illumination mode, and the industrial camera acquires the original image data. Taking a cropped grayscale image as an example, it can be abstractly represented as being composed of several local regions. Region A shows a grayscale change rate greater than a preset high-frequency threshold, and region B shows a grayscale change rate not greater than a preset low-frequency threshold. If region C shows a grayscale change rate between the preset low-frequency threshold and the preset high-frequency threshold, it is marked as a mid-frequency transition region, and its original grayscale features are temporarily retained and handed over to the subsequent feature extraction network for processing in conjunction with the context. Region D is located at the edge of the blind hole and has a bright reflection. The image acquisition module first extracts the spatial topology from the original images, converting the geometric change regions related to steps, aperture edges, and edges into nodes, and then establishes edges based on the vertical, internal and external, and adjacency relationships between nodes. If the prior structural information records that the lens base of this type usually has the sequential relationship of upper platform - stepped surface - blind aperture entrance - aperture inner wall, the system will write these sequential relationships into the initial topology map, so that subsequent processing can not only extract highlight features, but also make logical judgments based on the structural position of the feature. The dynamic topology feature routing module receives the original image data and an initial topology map. Its processing focus is not on using the same convolution depth for all nodes, but on dynamically adjusting the receptive field based on local geometry. For example, if node N1 corresponds to a flat platform with uniform surrounding texture, a receptive field no larger than a preset base size is sufficient to extract stable background features. If node N2 corresponds to a stepped corner, it is necessary to extract the grayscale changes on both sides of the corner simultaneously, and the system adjusts its receptive field accordingly. Expand to If node N3 corresponds to the entrance of a deep blind hole, it is also necessary to combine the shadow information inside the hole, and then introduce a context window with a size larger than the basic size. At the same time, the system will also allocate calculation weights according to the importance of the nodes. For example, channels with a higher proportion than the preset threshold will be assigned to N2 and N3, and basic channels will be assigned to flat background nodes, thereby generating a dynamic topology feature map. After obtaining the dynamic topological feature map, the cross-modal feature decoupling module enters the processing. The main purpose is to distinguish the bright areas caused by optical reflection from the real morphological defects. To give a further example, suppose a local area is represented as a set of vectors in the multi-dimensional feature space, one set reflecting the trend of optical reflection and the other set reflecting the trend of morphological fluctuations. If a region experiences a sudden increase in brightness due to reflection from a metal coating, but the edge continuity is not disrupted, the optical reflection feature is strong while the morphological defect feature is weak. If a region has a real scratch, in addition to the brightness change, there is also morphological information such as boundary breaks, groove orientation, and local geometric discontinuities. After the system calculates the cross-modal feature decoupling degree of the two sets of vectors, it can peel off the highly reflective artifacts and retain feature data that is closer to the real defects. After receiving the decoupled feature data, the quality inspection and evaluation module outputs the quality inspection results of the target component. For example, the system can classify the results into categories such as qualified, burrs, chipped edges, hole edge collapse, and residual adhesive at the interface, and further provide the corresponding location and risk level. For low-confidence areas that appear in a single inspection, the system will not simply discard them, but will write back these unknown morphological features into the structural prior information, so that the inspection rules for subsequent batches and even subsequent batches can be incrementally updated. In this way, a closed loop of acquisition—topology modeling—dynamic routing—cross-modal decoupling—quality assessment—prior update is formed. If the original image is overexposed, causing a large area to be saturated to the maximum gray value, this area is first marked as a region to be reviewed. Instead of directly entering the decoupling judgment, it triggers a reshoot or a change in the light source angle for re-acquisition. If a key node is found to be missing during the initial topology map construction process, such as a blind hole entrance that should exist but is not detected, the system judges the workpiece as a positioning abnormality and outputs a repositioning command. If the quality inspection result conflicts with the prior structural information in terms of feature differences that exceed the preset conflict tolerance, such as a deep blind hole node that should not theoretically exist on a certain model of mobile phone lens base but appears repeatedly in the image, the system records it as a candidate sample for structural version change and waits for subsequent manual confirmation before including it in the prior. During continuous night shift production on the mobile phone camera module production line, a batch of lens bases experienced strong reflections at the interface due to changes in the polishing state of the mold. Traditional full-image convolution methods easily misidentify bright areas as scratches, leading to a false alarm rate exceeding the preset error tolerance. This implementation first constructs an initial topology map based on the original three-dimensional stepped edge data and interface data of the base, and then prioritizes the allocation of high computing power to the vicinity of the blind hole entrance and the intersection line of the interface. It utilizes cross-modal features to decouple and remove reflective artifacts, thereby retaining only the real edge chipping and residual adhesive features. To ensure consistency in object reference throughout the text, the aforementioned edge computing terminal corresponds to the edge computing terminal described later in terms of deployment form; the aforementioned analysis process represents the functional node running on the edge computing terminal, which does not constitute another independent detection entity parallel to the edge computing terminal; correspondingly, the nodes in the initial topology map maintain continuous node identification throughout the entire detection process of a single workpiece. After the node identification is generated by the image acquisition module, it is jointly referenced by the dynamic topology feature routing module, the cross-modal feature decoupling module, and the quality detection and evaluation module to ensure that the same local area corresponds one-to-one between the original image data, the initial topology map, the dynamic topology feature map, the decoupled feature data, and the quality detection result, without name drift or semantic confusion of the same structural area due to stage switching; Furthermore, in this embodiment, the computational weight is used to represent the relative computing resource level allocated to the corresponding node. It can be reflected in at least one of the network channel number, feature update priority, or iteration number. However, within the same round of detection, it uniformly serves the single meaning of high-risk nodes obtaining more computing resources and low-risk nodes obtaining basic computing resources. The three-dimensional stepped edge data, deep blind hole data, and interface data in the structural prior information are used as prior entries describing the structural position, hierarchical relationship, and adjacent constraints to participate in the initial topology graph construction and subsequent updates, respectively, without being confused with the subsequently extracted defect classification results. The purpose of this step is to enable the system to perform targeted feature extraction and defect identification by combining the spatial logical relationship of components, thereby achieving stable quality detection of complex three-dimensional microstructures and reducing ineffective computing power consumption and false judgments due to high reflectivity. The image acquisition module includes: The image acquisition unit is configured to acquire raw image data via an industrial camera; The topology node generation unit is configured to extract high-frequency abrupt change regions and low-frequency flat regions from the original image data, and map the high-frequency abrupt change regions and low-frequency flat regions to topology nodes of the initial topology graph. The logical edge construction unit is configured to calculate the spatial adjacency relationship between topological nodes, generate connecting edges, and generate an initial topological graph by combining prior structural information. Among them, the high-frequency abrupt change region corresponds to the minute burr characteristics of the target component, while the low-frequency flat region corresponds to the overall deformation characteristics of the target component.
[0019] This embodiment provides a topology node generation and logical edge construction mechanism for the image acquisition stage. Specifically, in the aforementioned production line scenario, the original image alone is insufficient to support subsequent dynamic routing, because if local abrupt changes and overall smooth areas are not distinguished first, the system can easily confuse high-frequency noise, surface textures, and real defects. Therefore, this embodiment further refines the image acquisition module into three collaborative units: image acquisition, node generation, and logical edge construction. Specifically, the image acquisition unit obtains raw image data from an industrial camera. As one implementation, one of the local detection windows can be set as a 5×5 grayscale block. If the grayscale difference between the center pixel and its neighborhood is greater than a preset jump threshold, for example, the grayscale suddenly increases from 40 to 180 and then falls back to 50, then the region can be regarded as a high-frequency abrupt change region. If the grayscale changes slowly as a whole in a region with an area greater than a preset platform area threshold, for example, smoothly transitioning from 80 to 95, then the region can be regarded as a low-frequency flat region. The topology node generation unit does not directly treat every pixel as a node, but aggregates the regions, compresses and maps high-frequency abrupt change regions into abrupt change nodes, and compresses and maps low-frequency flat regions into flat nodes, so that subsequent graph calculations focus on structural units rather than isolated pixels. Furthermore, if a mutation node is located within a range less than a preset distance threshold from the edge of the support pad, then the node is more likely to represent a microburr, notch, or local attachment; if a flat node covers a base platform with an area greater than a preset platform area threshold and its overall grayscale distribution exhibits a grayscale gradient change rate lower than a preset slope threshold, then the node is more likely to correspond to overall warping, indentation, or macroscopic deformation; the logical edge construction unit calculates the spatial adjacency relationship between these nodes; taking four nodes P1, P2, P3, and P4 as an example, where P1 is located on the upper platform, P2 is located on the step edge, P3 is located at the blind hole entrance, and P4 is located in the shadow area inside the hole; the system can establish connection edges between P1 and P2, P2 and P3, and P3 and P4, and supplement the logical attributes of P1 being outside P2, P3 being below P2, and P4 being an extension inside P3 based on structural priors, ultimately forming an initial topology graph containing spatial relationship constraints; In this process, the high-frequency abrupt change region and the low-frequency flat region are not separate from each other, but rather describe different levels of features of the same workpiece together; the former reflects local microscopic anomalies, while the latter reflects the overall geometric state; when both are included in the initial topology map, the system can detect not only minute defects such as burrs, but also low-frequency anomalies such as overall bending and warping. High-frequency abrupt change regions correspond to minute burr features, while low-frequency flat regions correspond to overall deformation features. In engineering implementation, this is a candidate structural semantic based on structural priors, regional continuity, and relationships between adjacent nodes, rather than being determined directly based on a single grayscale change. In other words, a region is first marked as an abrupt or flat node, and its location within the structure, its connection to surrounding nodes, and subsequent dynamic routing results are needed to gradually converge to the determination of burr or overall deformation candidates. This avoids directly equating isolated textures, local contamination, or single brightness fluctuations with real defects, thus maintaining an interpretable and stable mapping relationship between high-frequency / low-frequency division and the actual physical structure. If random noise points appear in the image, appearing as isolated bright spots, but lacking structural continuity around them and with an area lower than the preset minimum node area, the node generation unit will not include them in the formal nodes, but will mark them as noise candidates. If the area of a low-frequency flat region is greater than the preset upper limit threshold, causing a node to cover multiple structural functional areas, the system will automatically perform secondary segmentation based on structural priors to avoid merging regions with different structural positions into one node. If the adjacency relationship between nodes cannot be determined, for example, due to boundary breaks caused by occlusion, the logical edge at that point will not be written into a strong connection, but will be recorded as a connection to be confirmed, to be supplemented by the context in the subsequent feature routing stage. In the inspection of a batch of mobile phone lens mounts, the image acquisition unit collects images near the mounting surface of the lens mount; the node generation unit detects a high-frequency abrupt change band with a width of only a few pixels at the edge and maps it as an abrupt change node; at the same time, it detects a slowly undulating low-frequency region on the entire mounting surface and maps it as a flat node; the logical edge construction unit constructs a spatial logical link based on the relative positional relationship between the two and the stepped surface and the interface surface; subsequent modules can then perform feature extraction based on this structural background. The purpose of this step is to transform pixel changes in the original image into computable and traceable structural nodes and relational edges, thereby achieving a stable mapping from a two-dimensional image to a spatial logic graph and providing a basis for the joint detection of minute burrs and overall deformation. The dynamic topology feature routing module includes a graph convolutional network, which serves as a feature extraction network and comprises: The receptive field adaptive unit is configured to calculate the dynamic receptive field adaptive ratio of different sub-regions in the original image data and adjust the receptive field area of the graph convolutional network according to the dynamic receptive field adaptive ratio. The computing power scheduling unit is configured to calculate the topology feature route hit rate of each node in the initial topology map, and allocate preset network channels to target nodes whose topology feature route hit rate is higher than the preset hit rate threshold. For nodes whose topology feature route hit rate is not higher than the preset hit rate threshold, basic network channels are allocated to generate a dynamic topology feature map. The preset network channel configuration is a high-dimensional tensor channel containing deep texture extraction parameters, and the basic network channel configuration is a low-dimensional tensor channel containing only grayscale gradient extraction parameters. The dynamic receptive field adaptation ratio is the ratio of the maximum receptive field area to the minimum receptive field area when processing non-uniform structures.
[0020] This embodiment provides a dynamic topology feature routing mechanism based on graph convolutional networks. Specifically, in the previous embodiment, although an initial topology graph has been established, if a fixed receptive field and a fixed number of channels are still used for each node, the system will experience an imbalance in computing power allocation when facing a structure with a mixture of flat areas, edge areas, and deep hole areas. To address this, this embodiment introduces a receptive field adaptive unit and a computing power scheduling unit. Specifically, the receptive field adaptive unit calculates the dynamic receptive field adaptive ratio for different sub-regions. The detailed analysis is as follows: Suppose a detection image is divided into sub-regions R1, R2, and R3, where R1 is a large flat surface with a minimum activation receptive field area of 9; R2 is a stepped edge transition region with an activation receptive field area of 25; and R3 is the entrance to a deep blind hole and its shadow region with an activation receptive field area of 49. Then, the dynamic receptive field adaptive ratio in this image can be expressed as the ratio of 49 to 9, meaning the system can call upon differentiated extraction ranges as needed in different regions. This ratio characterizes the network's adaptability to non-uniform structures. After receiving the initial topology graph, the graph convolutional network propagates features under the constraints of nodes and edges. For flat nodes, the network can extract surface consistency using a receptive field no larger than the preset base size. For stepped edge nodes, the network needs to introduce the context of adjacent nodes to distinguish between real edges and non-physical artifacts. For deep blind hole nodes, the network also needs to establish information coupling across the hole opening and the area inside the hole. Therefore, the receptive field is dynamically adjusted at the node level. The computing power scheduling unit further calculates the topology feature route hit rate of each node; the topology feature route hit rate represents the frequency with which a certain node category is successfully extracted by high-discrimination features in historical inference and current batch statistics; specifically, the frequency is calculated as: the ratio of the number of times the node category is successfully associated with real morphological defect features within a preset historical time window to the total number of times the node category appears in the initial topology map; high-discrimination features specifically refer to feature data whose corresponding cross-modal feature decoupling degree is greater than a preset decoupling degree threshold; For example, node M1 corresponds to the edge of a blind hole, and it has been associated with real defects multiple times in samples within a preset historical time window, achieving a routing hit rate of 0.82; node M2 corresponds to a normal flat surface, with a hit rate of 0.21; node M3 corresponds to the corner of an interface, with a hit rate of 0.67. If the preset hit rate threshold is 0.60, the system allocates more deep channels and higher priority computing resources to M1 and M3, while allocating only basic channels to M2. In this way, the generated dynamic topology feature map retains more discriminative information at high-risk structures and maintains lightweight processing in low-risk areas. In engineering implementation, graph convolutional networks operate by updating node features, aggregating edge relationships, and fusing multi-layer features. During each layer update, nodes not only use their own image features but also receive structural context from neighboring nodes. For example, after receiving the shadow distribution from the nodes on the inner wall of the hole, the blind hole entrance node can more accurately distinguish between normal shadows and abnormal gradients caused by hole edge collapse. This structured propagation method is more suitable for the analysis of two-dimensional projection images of complex three-dimensional parts than simple planar convolution. If the topological feature routing hit rate of all nodes in an image is lower than the threshold, it indicates that there may be structural drift in the current batch. In this case, the system will uniformly use the basic channel and report the batch of samples. If the hit rate of a node is greater than the preset extreme value threshold and the corresponding area is less than the preset minimum effective area threshold, the system will superimpose the minimum area and minimum duration frame constraints. Only nodes that meet the structural stability conditions at the same time will be given high weight. If the receptive field expands to cover outside the image boundary, the boundary filling or mirror completion strategy will be adopted to avoid reconstruction deviation of edge nodes due to missing context. During batch testing of lens mounts, a certain batch exhibited periodic minor edge collapse near the blind hole entrance due to mold wear. The adaptive receptive field unit detected that this area simultaneously exhibited high-frequency edge variations and low-frequency shadow expansion, and adjusted its receptive field from the conventional... Upgraded to The computing power scheduling unit discovered that the hit rate of this node in multiple samples was consistently higher than the threshold, and then concentrated more network channels to allocate to this node and its neighboring nodes, thereby improving the stability of blind hole defect identification. The purpose of this step is to enable the feature extraction network to perform differentiated calculations based on the actual structural complexity and defect risk, thereby achieving effective scheduling of computing power and improving the ability to extract complex local geometric defects. The cross-modal feature decoupling module includes: The feature vector mapping unit is configured to map the dynamic topological feature map to a preset multi-dimensional feature space and extract optical reflection feature vectors and physical morphological defect feature vectors. The optical reflection feature vectors are used to characterize the brightness peak, reflection gradient and saturation connectivity features of the local region; the physical morphological defect feature vectors are used to characterize the edge breakage, contour deflection and local concavity and convexity features of the local region. The orthogonality calculation unit is configured to calculate the cross-modal feature decoupling degree between the optical reflection feature vector and the physical morphological defect feature vector in a preset multi-dimensional feature space. The artifact stripping unit is configured to filter features in a preset multidimensional feature space based on the cross-modal feature decoupling degree to generate decoupled feature data; The cross-modal feature decoupling degree is the cosine distance between the optical reflection feature vector and the physical morphological defect feature vector.
[0021] This embodiment provides a cross-modal feature decoupling mechanism. Specifically, the aforementioned dynamic topology feature map has already screened out high-risk nodes, but in high-reflectivity material scenarios, structured routing alone may still be affected by specular reflection. For example, the junction surface of the coated lens base will form a strip-shaped highlight at certain incident angles. This highlight feature is similar to a scratch at the pixel level. If it is not further decoupled, it is easy to generate a geometric consistency anomaly judgment. Specifically, the feature vector mapping unit maps the dynamic topological feature map to a predefined multi-dimensional feature space. In this space, the same local region is divided into two types of representations: one is an optical reflection feature vector, used to characterize information such as brightness peaks, reflection gradients, and saturation connectivity; the other is a physical morphological defect feature vector, used to characterize information such as edge breaks, contour deflections, local concavity / convexity, and structural continuity disruption. Taking local region L1 as an example, its reflection vector after mapping is... The morphological vector is The reflection vector obtained in another region L2 is... The morphological vector is The former is characterized by highlights that maintain geometric continuity, while the latter is characterized by highlights accompanied by morphological abrupt changes. The orthogonality calculation unit further calculates the cross-modal feature decoupling degree between the two types of vectors, specifically using cosine distance for calculation; the specific calculation logic for the cross-modal feature decoupling degree satisfies: ,in, Represents the degree of decoupling across modal features. Represents the optical reflection characteristic vector. Represents the feature vector of physical morphological defects; When the cosine distance is greater than the preset upper limit threshold, it indicates that the two types of features are significantly separated in the multidimensional space, and independent morphological anomalies are more likely to exist in local areas; when the cosine distance is less than the preset lower limit threshold, it indicates that the observed anomalies are mainly caused by optical reflection; here, orthogonality is used to characterize the degree of separation between the two sets of features in the discrimination space. The artifact stripping unit performs filtering based on this decoupling degree; for regions with small cosine distances, the system tends to preserve their normal structural background and weaken or eliminate reflection-dominant features; for regions with large cosine distances, the system preserves morphological abnormality-related features, enabling subsequent classifiers to focus on real defect features; the decoupled feature data generated in this way completes the feature separation of optical interference and structural abnormalities; This processing method separates the source of brightness and the source of structure in the feature space; even if reflection and defects exist in the same area at the same time, the system can still retain effective physical morphological information through dual vector expression, rather than uniformly weakening all bright area features; If the optical reflection vector and morphological defect vector of a certain local area are close to zero after mapping, it indicates that the area lacks effective information, and the system marks it as a low-information area; if both types of vectors are abnormally high after mapping, and the local area is located at the boundary of a known highly reflective structure, the system retains the dual features and submits them to subsequent conditional logic for judgment; if the vector magnitude is close to zero in the cosine distance calculation, the minimum magnitude correction is performed to avoid abnormal numerical amplification. When inspecting a batch of coated lens mounts, continuous bright bands appeared on the interface. After feature vector mapping, the system found that the reflection vector amplitude of most of these areas was higher than that of the morphology vector, and the cosine distance between the two was small. These areas were identified as areas dominated by reflection. In the bright bands, there were areas with local lengths or areas smaller than the preset threshold, accompanied by abrupt changes in edge direction. After mapping, the morphology vector increased significantly and the cosine distance increased. This feature was retained and entered into the subsequent defect judgment. The purpose of this step is to separate optical information from structural information under complex lighting and highly reflective material conditions, thereby suppressing non-physical artifacts and extracting the features of real morphological defects. The artifact stripping unit is configured to execute the following conditional logic: When the cross-modal feature decoupling degree is greater than the preset decoupling degree threshold, it is determined that there is a real morphological defect in the corresponding local area of the target component, and the physical morphological defect feature vector is retained to generate decoupling feature data. When the cross-modal feature decoupling degree is less than the preset decoupling degree threshold, it is determined that there is a high reflectivity artifact in the corresponding local area of the target component, and the optical reflection feature vector is removed to generate decoupling feature data. When the cross-modal feature decoupling degree is equal to the preset decoupling degree threshold, a secondary feature extraction instruction is sent to the dynamic topology feature routing module so that the dynamic topology feature routing module can regenerate the dynamic topology feature map for the corresponding local region of the target component.
[0022] This embodiment provides a condition determination and secondary extraction mechanism for decoupling boundary cases; specifically, after the cross-modal feature decoupling degree calculation is completed, in order to ensure the uniformity of the execution standard, this embodiment defines the artifact stripping process as a three-branch conditional logic; Specifically, let the preset decoupling threshold be 0.50. If the cosine distance of a certain local area is 0.73, which is greater than the threshold, it indicates that the optical reflection features and morphological defect features are clearly distinguishable in the feature space. At this time, the system determines that there is a real morphological defect in the area. During processing, the physical morphological defect feature vector is retained, the reflection-related components are weighted down, and decoupling feature data is generated. If the cosine distance of another local area is 0.22, which is less than the threshold, it indicates that the anomaly is mainly dominated by optical reflection. The system judges the area as a high-reflectivity artifact and removes or suppresses the optical reflection feature vector. In boundary cases, if the decoupling degree of a local area is equal to the threshold or falls within the preset tolerance band, the system does not make a direct judgment, but instead sends a secondary feature extraction instruction to the dynamic topology feature routing module. The secondary extraction is performed through one or a combination of the following methods: expanding the local receptive field to supplement the neighborhood structural context; increasing the number of network channels in the area to enhance feature representation; switching the supplementary lighting angle to re-acquire; after completing the secondary extraction, the dynamic topology feature map is regenerated, and the decoupling degree of the area is recalculated. For example, if the initial decoupling degree of a certain lens mount interface area is 0.50, the system issues a second extraction command; the dynamic routing module then changes the receptive field of this area... Upgraded to The context information of adjacent stepped surface nodes is introduced; after recalculation, if the decoupling degree increases to 0.66, the morphological defect features are retained; if it decreases to 0.31 after recalculation, it is used as a high reflectivity artifact filter; by supplementing the context information, the stability of boundary sample determination is improved. When the cross-modal feature decoupling degree is less than the preset decoupling threshold and optical reflection feature vectors are removed, the system retains the basic structure index, location identifier and suppressed background characterization of the region, so that the subsequent classification module can identify the structural background state of the region; when the secondary feature extraction still determines it to be a high reflectivity artifact, the region participates in the overall consistency verification as an artifact background. If the decoupling degree is still near the threshold after secondary feature extraction, the system can perform a limited number of re-extractions; if the upper limit is exceeded, the region is marked as a candidate for manual verification; if the original local region is found to have exceeded the effective boundary of the image during secondary extraction, the system reverts to the first extraction result and adds an uncertainty measurement label; if multiple adjacent regions are simultaneously at the threshold boundary, the system performs joint extraction on these regions and reconstructs the map on the basis of connected regions. In a batch of continuously produced mobile phone lens bases, a bright spot with a width smaller than the preset bright spot width threshold appeared at the edge of the blind hole entrance. During the first decoupling, the decoupling degree of this area fell near the threshold, and the system triggered a second feature extraction. After expanding the receptive field and introducing the shadow context of the hole wall, the system confirmed that the bright spot was not accompanied by edge breakage, recalculated the decoupling degree and reduced it to below the threshold, and finally removed it as a reflection artifact. Another adjacent sample showed an obvious contour gap after the second extraction, and the decoupling degree increased, and it was judged as a real hole edge defect. The same judgment criterion applies to values greater than, less than or equal to, and the preset decoupling degree threshold: first calculate the cross-modal feature decoupling degree of the local area in the current round, and then compare it with the current effective threshold; the secondary feature extraction instruction should at least carry the workpiece number, local area index and the first decoupling degree result, so that the dynamic topology feature routing module can perform re-extraction on the same local area; Furthermore, the retention of physical morphological defect feature vectors and the elimination of optical reflection feature vectors correspond to the fidelity output and suppression output of the corresponding feature components, respectively, both of which occur within the same local region's bi-vector expression framework; The purpose of this step is to provide a clear feature extraction path for critical samples, thereby achieving stable separation between non-physical artifacts and real defect features and reducing false positives or false negatives. The quality inspection and evaluation module includes: The defect classification unit is configured to input decoupled feature data into a preset defect classification model and output morphological defect classification results including classification confidence of each category; wherein, the preset defect classification model is configured with a set of morphological defect categories for the corresponding workpiece, including burrs, chipped edges and residual glue. The quality assessment unit is configured to generate quality inspection results based on the morphological defect classification results. The prior update unit is configured to extract features with a classification confidence level lower than a preset classification confidence threshold from the morphological defect classification results as unknown morphological features, and feed the unknown morphological features back to the structural prior information for updating.
[0023] This embodiment provides a quality assessment and prior update mechanism for closed-loop optimization of detection results; specifically, three processing units are introduced in the quality detection assessment stage: defect classification, quality judgment, and prior update. Specifically, the defect classification unit inputs decoupled feature data into a preset defect classification model and outputs morphological defect classification results. The model establishes a set of categories according to the workpiece type. For example, for lens bases, the categories include edge chipping, residual glue on the interface, scratches on the stepped surface, and overall deformation. For example, if the confidence scores of the classification results output for a certain sample are: burr 0.12, edge chipping 0.76, residual glue 0.08, and normal 0.04, then the defect classification unit will take edge chipping as the main classification result. The quality assessment unit generates quality inspection results based on the main classification results and their risk levels. If the main classification is normal and no abnormal areas exceeding the threshold are found in the entire image, it is judged as qualified. If the main classification is minor residual glue that does not affect assembly, a corresponding re-inspection instruction can be output. If the main classification is critical defects such as edge chipping or blind hole collapse, it is judged as unqualified. The quality assessment comprehensively considers the defect category, location, and size. The prior update unit is used to handle features with low system confidence assessment. When the highest confidence of the classification result is lower than the preset classification confidence threshold, the system extracts the features of the sample as unknown morphological features and feeds them back to the structural prior information for updating. For example, if a local area has a confidence of 0.41 for residual glue, a confidence of 0.38 for chipped edges, and a confidence of 0.21 for normal, while the preset threshold is 0.60, then this area will be regarded as an unknown morphological feature. During the update, its structural position, adjacency relationship, typical feature vector, and batch information are saved. The system first accumulates similar unknown samples in the cache, and decides whether to solidify them into new structural prior entries based on their frequency of occurrence and confirmation instructions; If the classification model outputs multiple categories with similar confidence scores and all below the threshold, the sample enters the unknown morphological feature pool; if the highest confidence score is above the threshold but the difference between it and the second highest category is less than the preset confidence difference threshold, the system adds an uncertainty measure label; if the unknown morphological feature does not reappear in the short term, it is kept in the temporary cache; if the feature highly overlaps with the existing prior, the system only adjusts the statistical weight of the prior entry. On the lens mount production line, an unrecorded step defect appeared on the interface. The system's highest confidence level for classifying this area was 0.47, which was lower than the preset threshold. The prior update unit extracted the unknown features of the structure, which were located on the side of the interface near the blind hole, connected to the edge nodes of the step, and had a typical form of continuous step discontinuity. These features were written into the prior candidate library for use in subsequent batch updates. The purpose of this step is to establish a feature update closed loop while completing the quality assessment, so as to achieve the extraction and adaptation of new morphological abnormal features. Example 2: The system also includes a communication interface for connecting to external production lines, and: The context-aware latency monitoring module is configured to record the time cost from inputting raw image data to constructing the initial topology map, and generate context-aware latency data. The dynamic cycle adjustment module is configured to generate adjustment instructions for the operating rate of the corresponding external production line based on context-aware delay data through the communication interface: when the context-aware delay data is less than the preset delay threshold, a rate maintenance instruction is generated; when the context-aware delay data is greater than the preset delay threshold, a rate reduction instruction is generated and a computing power redirection instruction is triggered; when the context-aware delay data is equal to the preset delay threshold, a rate maintenance instruction is generated and a computing power warning signal is output.
[0024] This embodiment provides a delay monitoring and dynamic adjustment mechanism for production cycle coordination; specifically, to prevent time fluctuations in the front-end mapping stage from causing cache backlog or missed beats, this embodiment coordinates the detection system with the cycle control of the external production line. Specifically, the context-aware delay monitoring module starts timing from the moment the original image is input and ends timing when the initial topology map is completed, generating context-aware delay data. For example, a mobile phone lens base with a normal surface condition takes 18ms from image input to the generation of the initial topology map, while another highly reflective lens base takes 29ms due to complex node segmentation. If the preset delay threshold is 25ms, the former is below the threshold and the latter is above the threshold. The dynamic cycle adjustment module sends adjustment commands to the production line controller through the communication interface; when the delay data is less than the threshold, the system generates a rate maintenance command; when the delay data is greater than the threshold, the system sends a rate reduction command on the one hand and triggers a computing power redirection command on the other hand, such as increasing the resource quota of the graph construction thread; when the delay data is equal to the threshold, the system generates a rate maintenance command and outputs a computing power warning signal at the same time. Taking three consecutive products as an example, their latency data are 22ms, 25ms, and 28ms respectively; the first product corresponds to the normal cycle time; the second product reaches the threshold, the system maintains the rate and outputs an early warning; the third product exceeds the threshold, the system sends a speed-down command and redirects computing resources to the initial topology graph construction stage; once the latency recovers to below the threshold, the system cancels the speed-down command. If the communication interface is interrupted, the system enters local protection mode, actively rejects new workpieces and outputs an alarm before the buffer reaches its limit; if the delay exceeds the threshold for multiple consecutive frames, the system sets a continuous speed reduction state; for occasional single-frame delay exceeding the threshold, the system smooths the process by averaging through a sliding window. In the high-reflectivity batch, the initial topology map construction delay increased; the monitoring module detected that the average delay increased from 23ms to 27ms, and the dynamic cycle adjustment module sent a speed reduction command to the production line, while allocating more computing resources to the map building thread; after the average delay dropped back to 24ms, the system sent a rate recovery command. The purpose of this step is to enable the processing load of the detection system to match the production line cycle time in real time, thereby achieving a synergy between detection accuracy and production line operation stability. The system is deployed in an industrial control network and includes: The edge computing terminal is configured to carry an image acquisition module and a dynamic topology feature routing module, and to perform local feature extraction and computing power scheduling. The cloud server is configured to host the cross-modal feature decoupling module and the quality detection and evaluation module, and to perform feature vector processing and global updates of structural prior information. The data transmission channel is configured to transmit dynamic topology feature maps and quality detection results between the edge computing terminal and the cloud server.
[0025] This embodiment provides an edge-cloud collaborative deployment mechanism; specifically, this embodiment adopts a collaborative division of labor structure between edge computing terminals and cloud servers under an industrial control network to balance real-time response requirements and global data processing needs; Specifically, the edge computing terminal is deployed on the detection station side, carrying the image acquisition module and the dynamic topology feature routing module; the acquisition of the original image, the generation of topology nodes, the construction of logical edges, the extraction of graph convolutional features, the adjustment of receptive field, and the scheduling of computing power are completed at the edge to reduce the network latency caused by large-scale image data transmission. The cloud server hosts the cross-modal feature decoupling module and the quality detection and evaluation module; the edge device sends the structured dynamic topology feature map to the cloud through the data transmission channel, and the cloud performs multi-dimensional feature space mapping, decoupling degree calculation, artifact removal, defect classification and global update of structural prior information; For example, after the original image completes mapping and routing at the edge, a dynamic topological feature map containing nodes, connecting edges, and node features is extracted, and the amount of data after compression is significantly reduced; the cloud receives this structured data, calculates the quality detection results and returns them to the edge, while writing low-confidence samples into the global prior update queue. When the edge computing terminal sends a dynamic topology feature map, it binds the workpiece number, the trigger time for taking a picture, and the location index, and maintains the time window locally. After the quality inspection result returned by the cloud is aligned with the number and location index, the edge terminal outputs the corresponding control action. If the returned result is within the time window, the result from the cloud is executed. If it is close to the window boundary, the edge terminal uses the local prediction result and performs record correction after the result from the cloud is returned. In an industrial control network environment, the data transmission channel adopts an industrial-grade transmission protocol; version number synchronization is maintained between the edge and the cloud. If the cloud server is unreachable for less than the preset timeout threshold, the edge computing terminal will activate the degradation mode, use the local cache model to complete the detection, and temporarily store the dynamic topology feature map, which will be uploaded after the network is restored; if there is high latency in transmission, the edge terminal will prioritize uploading the structured feature data of high-risk workpieces. The three production lines are each equipped with edge computing terminals and connected to the industrial control network. After a new feature of a production line is confirmed by the cloud, it is written into the global structure prior library. The cloud then synchronizes the updated prior to the edge terminals of the other production lines. The edge terminals are responsible for real-time feature routing, and the overall production line cycle time is not directly limited by the cloud update action. In this embodiment, the transmission path of the secondary feature extraction instruction remains consistent: when the cloud server determines that the cross-modal feature decoupling degree is equal to the preset decoupling degree threshold, it sends a secondary feature extraction request back to the edge computing terminal through the data transmission channel; the request includes the workpiece number, the local region index, and the suggested receptive field adjustment method; the edge computing terminal re-executes feature routing for the corresponding local region accordingly, and sends the newly generated dynamic topology feature map back to the cloud; Furthermore, the edge computing terminal mentioned above corresponds to the edge computing terminal in this embodiment, and the backend server mentioned above corresponds to the cloud server; the functional boundaries of the edge computing terminal and the cloud server in the system architecture correspond to the real-time processing body on the edge side and the global processing body on the cloud side, respectively; the transmitted dynamic topology feature map is the structured feature result output by the edge computing terminal; the transmission quality detection result is the judgment result output by the cloud server and sent back to the edge end. The purpose of this step is to deploy real-time on-site processing and global feature updates in a layered manner, thereby achieving collaboration between production line-level real-time detection and cross-production line feature data synchronization.
[0026] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A machine vision-based mobile phone lens mount quality inspection system, characterized in that, The system includes: The image acquisition module, including an industrial camera and a light source component, is configured to: provide illumination through the light source component, acquire raw image data of the target component (a mobile phone lens base) through the industrial camera, extract the spatial topology from the raw image data, and construct an initial topology map containing spatial logical relationships by combining preset structural prior information. The dynamic topology feature routing module is configured to: receive the original image data and the initial topology map, calculate the actual activation receptive field area required for different sub-regions in the original image data, obtain the dynamic receptive field adaptation ratio based on the ratio of the global maximum receptive field area to the minimum receptive field area, dynamically adjust the network receptive field of the preset feature extraction network according to the dynamic receptive field adaptation ratio, calculate the topology feature routing hit rate of each node in the initial topology map, and preferentially allocate the preset network channels to the target nodes whose corresponding topology feature routing hit rate is higher than the preset hit rate threshold to allocate calculation weights, thereby generating a dynamic topology feature map. The cross-modal feature decoupling module is configured to: receive a dynamic topological feature map, extract optical reflection feature vectors and physical morphological defect feature vectors based on a preset multi-dimensional feature space, calculate the cross-modal feature decoupling degree between the optical reflection feature vectors and physical morphological defect feature vectors, separate high reflectivity artifacts from real morphological defects based on the cross-modal feature decoupling degree, and generate decoupling feature data. The quality inspection and evaluation module is configured to: receive decoupling feature data, generate quality inspection results of the target component based on the decoupling feature data, and update the structural prior information using the quality inspection results; The prior structural information includes three-dimensional stepped edge data, deep blind hole data, and interface data.
2. The mobile phone lens mount quality inspection system based on machine vision according to claim 1, characterized in that, The image acquisition module includes: An image acquisition unit is configured to acquire the raw image data via the industrial camera; The topology node generation unit is configured to extract high-frequency abrupt change regions and low-frequency flat regions from the original image data, and map the high-frequency abrupt change regions and the low-frequency flat regions to topology nodes of the initial topology graph; The logical edge construction unit is configured to calculate the spatial adjacency relationship between the topological nodes, generate connecting edges, and generate the initial topological graph by combining the prior structural information. The high-frequency abrupt change region corresponds to the minute burr features of the target component, and the low-frequency flat region corresponds to the overall deformation features of the target component.
3. The mobile phone lens mount quality inspection system based on machine vision according to claim 1, characterized in that, The dynamic topology feature routing module includes a graph convolutional network, which serves as the feature extraction network and comprises: The receptive field adaptive unit is configured to calculate the dynamic receptive field adaptive ratio of different sub-regions in the original image data, and adjust the receptive field area of the graph convolutional network according to the dynamic receptive field adaptive ratio. The computing power scheduling unit is configured to calculate the topology feature route hit rate of each node in the initial topology map, and allocate preset network channels to target nodes whose topology feature route hit rate is higher than the preset hit rate threshold. For nodes whose topology feature route hit rate is not higher than the preset hit rate threshold, basic network channels are allocated to generate the dynamic topology feature map. The preset network channel is configured as a high-dimensional tensor channel containing deep texture extraction parameters, and the basic network channel is configured as a low-dimensional tensor channel containing only grayscale gradient extraction parameters. The dynamic receptive field adaptation ratio is the ratio of the maximum receptive field area to the minimum receptive field area when processing non-uniform structures.
4. The machine vision-based mobile phone lens mount quality inspection system according to claim 1, characterized in that, The cross-modal feature decoupling module includes: The feature vector mapping unit is configured to map the dynamic topological feature map to the preset multidimensional feature space and extract the optical reflection feature vector and the physical morphological defect feature vector; wherein, the optical reflection feature vector is used to characterize the brightness peak, reflection gradient and saturation connectivity features of the local region; the physical morphological defect feature vector is used to characterize the edge breakage, contour deflection and local concavity and convexity features of the local region; The orthogonality calculation unit is configured to calculate the cross-modal feature decoupling degree between the optical reflection feature vector and the physical morphological defect feature vector in the preset multi-dimensional feature space; The artifact stripping unit is configured to filter the features in the preset multidimensional feature space according to the cross-modal feature decoupling degree to generate the decoupled feature data; Wherein, the cross-modal feature decoupling degree is the cosine distance between the optical reflection feature vector and the physical morphological defect feature vector.
5. The machine vision-based mobile phone lens mount quality inspection system according to claim 4, characterized in that, The artifact stripping unit is configured to execute the following conditional logic: When the cross-modal feature decoupling degree is greater than the preset decoupling degree threshold, it is determined that the real morphological defect exists in the corresponding local area of the target component, and the physical morphological defect feature vector is retained to generate the decoupling feature data; When the cross-modal feature decoupling degree is less than the preset decoupling degree threshold, it is determined that the high reflectivity artifact exists in the corresponding local area of the target component, and the optical reflection feature vector is removed to generate the decoupling feature data; When the cross-modal feature decoupling degree is equal to the preset decoupling degree threshold, a secondary feature extraction instruction is sent to the dynamic topology feature routing module so that the dynamic topology feature routing module regenerates the dynamic topology feature map for the corresponding local region of the target component.
6. The mobile phone lens mount quality inspection system based on machine vision according to claim 1, characterized in that, The quality inspection and evaluation module includes: The defect classification unit is configured to input the decoupled feature data into a preset defect classification model and output a morphological defect classification result containing the classification confidence of each category; wherein, the preset defect classification model is configured with a set of morphological defect categories for the corresponding workpiece, including burrs, chipped edges and residual glue. The quality assessment unit is configured to generate the quality inspection result based on the morphological defect classification result. The prior update unit is configured to extract features with a classification confidence level lower than a preset classification confidence threshold from the morphological defect classification results as unknown morphological features, and feed the unknown morphological features back to the structural prior information for updating.
7. The mobile phone lens mount quality inspection system based on machine vision according to claim 1, characterized in that, The system also includes a communication interface for connecting to an external production line, and: The context-aware delay monitoring module is configured to record the time cost from inputting the original image data to constructing the initial topology map, and generate context-aware delay data. The dynamic cycle adjustment module is configured to generate an adjustment command for the operating rate of the external production line based on the context-aware delay data through the communication interface: when the context-aware delay data is less than a preset delay threshold, a rate maintenance command is generated; when the context-aware delay data is greater than the preset delay threshold, a rate reduction command is generated and a computing power redirection command is triggered; when the context-aware delay data is equal to the preset delay threshold, the rate maintenance command is generated and a computing power warning signal is output.
8. The machine vision-based mobile phone lens mount quality inspection system according to any one of claims 1 to 7, characterized in that, The system is deployed in an industrial control network and includes: An edge computing terminal is configured to carry the image acquisition module and the dynamic topology feature routing module, and to perform local feature extraction and computing power scheduling. A cloud server is configured to host the cross-modal feature decoupling module and the quality detection and evaluation module, and to perform feature vector processing and global updates of the structural prior information. The data transmission channel is configured to transmit the dynamic topology feature map and the quality detection result between the edge computing terminal and the cloud server.