A finished product diversion control method and system based on discharge image
By combining multi-view synchronous acquisition and deep learning models, the shortcomings of existing finished product diversion control systems in defect identification and diversion efficiency have been solved, achieving precise diversion of finished product quality and process optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG BAIYILUN INTELLIGENT CONTROL SYST CO LTD
- Filing Date
- 2026-04-13
- Publication Date
- 2026-07-03
Smart Images

Figure CN122322162A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of diversion control technology, and more specifically, to a finished product diversion control method and system based on discharge images. Background Technology
[0002] In industrial automated production systems, finished product quality control is a core aspect of production management, and its level of precision directly impacts overall production efficiency and cost control. Traditional finished product sorting control systems generally employ a binary classification mechanism, releasing or rejecting finished products based solely on simple pass / fail criteria. This approach fails to adequately consider the complex hierarchical nature of finished product quality and the wide diversity of defect types in modern production, resulting in the inability to accurately identify and hierarchically manage defects in practical applications. Due to the lack of systematic analysis of defect types, location distribution, and severity, rework, scrap, and re-inspection products are mixed together in subsequent processing flows. This not only significantly increases the labor intensity and time cost of manual sorting but also severely hinders the construction of a complete traceability chain for quality data, leaving production process optimization without a reliable basis.
[0003] Existing image-based flow control technologies suffer from significant technical bottlenecks. These systems typically rely on single-view image acquisition devices, making it difficult to comprehensively capture the multidimensional features of finished products. This is especially true when dealing with products with complex structures or irregular surfaces, where crucial defect information is easily missed. Furthermore, the image processing algorithms employed are mostly limited to traditional methods such as basic edge detection or threshold segmentation, failing to effectively address the diverse defect pattern recognition needs and exhibiting insufficient performance in feature extraction accuracy and classification adaptability. In addition, these technologies generally lack real-time feedback and dynamic optimization capabilities, resulting in a rigid flow control decision-making process that cannot adjust rules promptly based on fluctuations in production parameters. This leads to poor system adaptability to changes in the production environment, hindering the continuous improvement of flow control efficiency and accuracy.
[0004] Despite significant advancements in multi-view synchronous image acquisition technology and the powerful potential of deep learning models such as the fusion architecture of convolutional neural networks and Transformers in image recognition, existing shunting control systems have yet to effectively integrate these technologies. Theoretically, multi-view data can provide a more complete view of defects, and deep learning models can delve deeper into feature correlations and achieve high-precision classification. However, in practical applications, systems often fail to deeply integrate image data with production parameters and lack closed-loop feedback mechanisms for dynamic correction of shunting rules. Especially in complex production environments, the system's responsiveness to real-time data acquisition is insufficient, and the lack of dynamic adjustment mechanisms for shunting rules prevents the overall solution from meeting comprehensive, automated, and precise control requirements, hindering its ability to support refined quality management and efficient process optimization. Summary of the Invention
[0005] The purpose of this invention is to provide a finished product diversion control method and system based on the discharge image, in order to solve the above-mentioned problems.
[0006] On one hand, the present invention provides a finished product diversion control method based on discharge images, comprising: The image acquisition device, which acquires images of finished products simultaneously from multiple perspectives, collects auxiliary data such as finished product discharge speed and discharge spacing during the finished product discharge stage. A deep learning model with a multi-module serial architecture is used to extract feature information on defect type, location, distribution and severity from finished image data; The finished products are classified into quality grades based on the quality judgment standards and characteristic information, and classification labels are generated; the quality grades include qualified, minor defects, serious defects, and pending review. The classification labels are matched with the diversion rules, and the diversion scheme is determined based on the real-time operating status of each diversion channel and the finished product output rhythm. The actuators distribute finished products with different classification labels to the corresponding discharge channels or temporary storage areas, and provide real-time feedback on the diversion status. By retrieving the finished product image data, diversion decision results and equipment operating parameters bound to the finished product from the storage module, the unique identifier of the finished product is associated with the production process parameters to locate the specific production process in which the defect occurred and the corresponding cause of the defect. The production process parameters are then adjusted according to the cause of the defect. Collect diversion deviation data, operating status data of each diversion channel, and finished product quality change data, compare them with preset standard thresholds, determine the root cause of the deviation, and then adjust the diversion rules.
[0007] Furthermore, the deep learning model is a hybrid model composed of a concatenated convolutional neural network and a Transformer, and the feature extraction steps are as follows: The preprocessed finished image data is input into the CNN module, and feature dimensionality reduction and redundant information filtering are completed through convolution and pooling operations to output local defect feature maps. The local defect feature map is serialized, converted into a one-dimensional feature vector that adapts to the Transformer module, and then input into its encoder. The Transformer module uses a multi-head attention mechanism to mine feature correlations and final global features, and outputs a global feature vector. The local and global feature vectors are dimensionally aligned, and a weighted fusion algorithm is used to obtain the fused feature vector. The fused feature vectors are normalized and then filtered and enhanced by a fully connected layer to output complete finished product feature information.
[0008] Furthermore, the steps for setting and adjusting the traffic splitting rules include: Collect the quality grade of finished products and the corresponding defect type, and classify the priority of the process according to the severity of the defects and the difficulty of repair. Statistical analysis of the operating parameters of each diversion channel is performed to calculate the processing capacity per unit time and set the channel priority. Establish the correspondence between quality level and channel priority, set the traffic diversion limit, form basic traffic diversion rules and enter them into the rule base; Collect production parameters and compare them with standard parameters. If the parameters exceed the fluctuation range, trigger the rule adjustment process. Adjust the channel priority, diversion limit, or temporary storage capacity limit according to the type of production parameter fluctuations. The new traffic splitting rules are simulated and verified. Once no anomalies are found, the rule base is updated to complete the adjustment.
[0009] Furthermore, data on diversion deviations, operational status data of each diversion channel, and changes in finished product quality are collected and compared with preset standard thresholds. After determining the root cause of the deviation, the diversion rules are adjusted, specifically including: Several data collection units are deployed throughout the diversion process to collect core diversion indicators at set intervals and clarify the calculation method for each indicator. Set threshold ranges for each core indicator of traffic diversion, and compare the real-time collected indicators with the threshold ranges; When any core indicator of the diversion exceeds the threshold range, the deviation cause analysis process is initiated. Based on the diversion data, equipment operation data, and finished product characteristic data, the root cause of the deviation is determined: if the diversion error exceeds the standard, the accuracy of the matching between the classification label and the diversion rule and the deviation of the actuator action are judged; if the diversion channel congestion duration exceeds the standard, the rationality of the diversion channel priority and the adaptability of the finished product diversion rhythm are analyzed; if the finished product classification accuracy exceeds the standard, the accuracy of the feature extraction of the hybrid deep learning model and the quality of the finished product image data are judged to meet the standards. Adjustments are made based on the root cause of the deviation: if the label and rule do not match correctly, adjust the flow splitting rule parameters; if the actuator action is deviated, calibrate the actuator; if the channel priority is unreasonable, reorder the channel priority; if the model feature extraction is deviated, fine-tune the model feature extraction threshold and the weights of the fully connected layer. After the adjustment is completed, shorten the data collection cycle, compare the changes of the core indicators of the diversion in real time, and monitor whether the indicators return to the threshold range; if the indicators meet the standards multiple times in a row, stop real-time monitoring and complete one feedback optimization; if the indicators do not meet the standards, repeat the deviation cause analysis process and adjustment until the indicators meet the standards.
[0010] Furthermore, it also includes preprocessing the finished image data: The original finished image data is filtered for noise using a filtering algorithm to obtain denoised image data. The color denoised image is converted to a grayscale image using the weighted average method; The grayscale image is processed using an edge detection algorithm to obtain image data containing the complete edge contour of the finished product; The region growing algorithm is used to segment the finished product region and the background region to obtain segmented image data; The segmented image is resized and normalized to obtain preprocessed image data.
[0011] Furthermore, the steps for acquiring the finished product image data are as follows: The image acquisition equipment is deployed by arranging multiple image acquisition devices at different locations along the finished product discharge path, including area array cameras arranged directly above, to the left and to the right of the finished product discharge path, and depth acquisition devices arranged directly in front of the finished product discharge path. The depth acquisition devices and area array cameras are at the same acquisition height, and auxiliary light sources are arranged around each image acquisition device. A photoelectric sensor is installed at the finished product outlet, which triggers all image acquisition devices to start synchronously when the finished product passes through. A multi-angle image of the finished product is captured by an area array camera, and after alignment and filtering, two-dimensional image data is obtained. The depth acquisition device collects the depth information of the finished product, generates 3D point cloud data, and converts it into 3D depth image data. Extract the coordinates of the feature points of the finished product, calibrate the coordinates of the three-dimensional image through a coordinate transformation algorithm, and obtain the fused image data; Collect auxiliary data, bind it with a unique identifier and timestamp to the fused image data, and transmit it to the image processing module.
[0012] Furthermore, the finished product quality grading step is as follows: Collect finished product samples, and based on a pre-set finished product standard sample library, use machine learning to complete sample annotation, and determine the feature boundaries and the range to be reviewed for each quality level. Based on the labeled samples, the defect types, scales and superposition requirements corresponding to each quality level are set; Extract the characteristic information of the finished product and compare it with the standards of each quality grade one by one; The quality level is determined based on the comparison results, and corresponding category labels are generated. When the feature information is in a fuzzy range, it is marked as pending review and the review process is triggered. The review is completed through multi-model cross-validation and secondary feature extraction. The classification labels are bound to the finished product identification and image data, and then transmitted to the triage decision module.
[0013] Furthermore, the implementation steps of the image acquisition device through multi-view synchronous acquisition are as follows: Multiple acquisition points are evenly set up along the discharge path. Each acquisition point synchronously collects image data and transmits it to the main processing module for splicing and fusion. Each quality level has an independent diversion channel, equipped with conveying, temporary storage and status detection components; The shunt control module receives classification tags, detects channel load, and sends a control signal if there is no overload. The actuators work in concert to transport the finished product to the corresponding channel and adjust the conveying speed. When the channel load approaches its limit, an alert is sent, finished products are temporarily stored, and the traffic is restored after the load decreases.
[0014] Furthermore, the steps for quality assessment and re-acquisition of the finished image data are as follows: Quality assessment is triggered immediately after a single finished image data is acquired and transmitted to the image processing module. This assessment process is carried out synchronously with the image acquisition process. A quality assessment algorithm is used to calculate image sharpness and contrast. Sharpness is obtained from the variance of gray values, and contrast is obtained from the proportion of gray value differences. Set the acceptable thresholds for sharpness and contrast, and determine whether the image quality meets the standards after comparison. If the image quality does not meet the standards, send a re-acquisition signal and record the number of acquisition failures. Set the maximum number of re-acquisitions, and start acquisition after adjusting relevant parameters before each acquisition. If the quality still does not meet the standards after multiple acquisitions, send a device check prompt. Mark the corresponding finished product as pending review and temporarily store it. It can be re-acquired and processed after the device is restored.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: By employing multi-view synchronous acquisition and fusion of two-dimensional and three-dimensional depth images, along with image quality assessment and reacquisition mechanisms, blind spots in acquisition are eliminated, ensuring the integrity and effectiveness of image data and providing a precise data foundation for defect detection.
[0016] By using a hybrid deep learning model that combines convolutional neural networks and Transformers, both local defect details and global features of the finished product are extracted, significantly improving the accuracy of defect type, location, distribution, and severity identification.
[0017] Automatic classification and verification are accomplished through machine learning, with no human intervention throughout the process. The classification boundaries are clear, the judgment is stable, human error is avoided, and the consistency and reliability of quality grading are improved.
[0018] The traffic diversion rules can be dynamically adjusted according to production parameters and channel load. Combined with channel congestion warning and temporary storage control, the diversion priority and diversion limit can be adaptively optimized to reduce channel congestion and improve diversion efficiency.
[0019] On the other hand, the present invention also provides a finished product diversion control system based on discharge images, for implementing the above-mentioned finished product diversion control method based on discharge images, including: Finished product image acquisition device, used to acquire two-dimensional and three-dimensional image data and auxiliary data of finished products; The image processing module is used for image preprocessing, quality assessment, feature extraction, and reacquisition command processing. The classification and decision-making module is used for classifying finished product quality, generating diversion labels, and determining diversion schemes. The diversion control module is used to send control signals, monitor channel status, and handle congestion warnings. The actuator is used to receive control signals and transport the finished product to the corresponding channel or temporary storage area; The storage module is used to associate and store various types of data and form a traceable chain; The feedback and optimization module is used to collect diversion indicators, analyze deviations, and adjust relevant parameters. The human-machine interaction module is used for command input, status display, anomaly prompts, and human-machine collaboration. It should be noted that the finished product diversion control system based on discharge images provided by this invention has the same beneficial effects as its method, and will not be elaborated further here. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart of a finished product diversion control system based on discharge images provided in an embodiment of the present invention; Figure 2 This is a functional framework diagram of a finished product diversion control system based on discharge images, provided for an embodiment of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0024] See Figure 1As shown, this embodiment of the invention provides a finished product diversion control method based on discharge images, including: S1: Through a multi-view synchronous image acquisition device, image data of the finished product and auxiliary data such as the finished product discharge speed and discharge spacing are collected during the finished product discharge stage; S2: A deep learning model with a multi-module serial architecture is used to extract feature information on defect type, location, distribution and severity from finished image data; S3: Classify the finished products according to the quality judgment standards and characteristic information, and generate classification labels; the quality grades include qualified, minor defects, serious defects and pending review. S4: Match the classification labels with the diversion rules, and determine the diversion scheme based on the real-time operating status of each diversion channel and the finished product output rhythm; S5: The actuator distributes finished products with different classification labels to the corresponding discharge channels or temporary storage areas, and provides real-time feedback on the diversion status; S6: By retrieving the finished product image data, diversion decision results and equipment operating parameters bound to the finished product from the storage module, the unique identifier of the finished product is associated with the production process parameters to locate the specific production process in which the defect occurred and the corresponding cause of the defect, and the production process parameters are adjusted according to the cause of the defect. S7: Collect diversion deviation data, operating status data of each diversion channel, and finished product quality change data, compare them with preset standard thresholds, determine the root cause of the deviation, and then adjust the diversion rules.
[0025] This embodiment provides a finished product diversion control method based on the output image, which aims to achieve refined management of finished product quality and automated diversion.
[0026] First, during the finished product unloading stage, image data is acquired using an image acquisition device. This device can consist of multiple cameras; for example, one camera positioned above the finished product for overhead viewing, and another positioned to the side for side viewing. These cameras are configured to trigger synchronously as the finished product passes a specific location, ensuring that images of the same finished product are captured from different perspectives. Simultaneously, photoelectric sensors or proximity switches can be used to detect the passing of the finished product and record auxiliary data such as the unloading speed and spacing. This auxiliary data can be easily measured using timers and distance sensors. For example, the speed can be calculated by measuring the time difference between two fixed points, and the spacing can be calculated by measuring the time interval between adjacent finished products passing through.
[0027] Secondly, after acquiring the finished image data, it needs to be processed to extract useful feature information. This task can be accomplished using a deep learning model with a multi-module cascaded architecture. For example, this model can consist of a convolutional neural network (CNN) module for initial feature extraction and a recurrent neural network (RNN) module for capturing long-range dependencies, cascaded together. The finished image data is input into the CNN module, where it undergoes multiple convolution and pooling operations to extract local texture, shape, and other features. Subsequently, the output of the CNN module is passed to the RNN module, which further processes these local features to identify the types of defects that may exist in the finished image, their specific locations, distribution patterns, and severity.
[0028] Furthermore, based on the extracted feature information and preset finished product quality judgment criteria, the finished products are classified into quality levels. These quality judgment criteria can be a series of predefined rules; for example, if the length of a scratch exceeds X millimeters, it is judged as a minor defect; if the depth of a dent exceeds Y millimeters, it is judged as a serious defect. Finished products whose feature information falls between different quality levels, or whose model has low confidence in their classification, can be marked as requiring review. After classification, the system generates a corresponding classification label for each finished product, such as "Acceptable," "Minor Defect," "Serious Defect," or "Requires Review."
[0029] Subsequently, the generated classification labels are matched with preset diversion rules, and the final diversion scheme is determined by combining the real-time operating status of each diversion channel and the finished product discharge rhythm. The diversion rules can be a simple lookup table; for example, finished products with the classification label "qualified" are assigned to channel A, and finished products with the classification label "minor defects" are assigned to channel B. The real-time operating status of the diversion channels can be monitored by simple sensors, such as detecting whether finished products are stuck in the channel or whether the channel's counter has reached the preset capacity limit. The finished product discharge rhythm can be obtained from the discharge speed and spacing information in auxiliary data. Based on this information, the system can decide whether to immediately divert the finished products or temporarily send them to a temporary storage area to wait for the channel to become available.
[0030] Next, the finished products with different classification labels are allocated to the corresponding discharge channels or temporary storage areas by the actuators. The actuator can be a simple pneumatic pusher or a robotic arm. For example, when the system determines that a finished product should enter channel A, the actuator receives a control signal and performs the corresponding action to push the finished product into channel A. During the diversion process, the diversion status is fed back to the control system in real time, for example, by sensors detecting whether the finished product has successfully entered the target channel.
[0031] Furthermore, to achieve quality traceability and process optimization, the system retrieves finished product image data, diversion decision results, and equipment operating parameters associated with the finished product from the storage module. The storage module can be a relational database, where each finished product has a unique identifier. This identifier is used to associate the finished product's image data, its classified quality level, the final diversion decision, and the operating parameters of the various equipment involved in the production process (e.g., temperature, pressure, etc.). By analyzing this associated data, the specific production stage where the defect occurred and its possible causes can be identified. For example, if a batch of finished products is found to have a common defect, and these products were all produced on specific equipment operating with specific parameters, then it can be inferred that the defect may be related to the operating parameters of that equipment. Based on the analyzed cause of the defect, the corresponding production process parameters can be adjusted to reduce or eliminate the occurrence of the defect.
[0032] Finally, to continuously optimize the performance of the diversion system, the system collects diversion deviation data, operational status data of each diversion channel, and finished product quality change data. Diversion deviation data can include the number of times the actual diversion result does not match the expected diversion plan. Operational status data of each diversion channel can include the channel occupancy rate or congestion duration. Finished product quality change data can be quality feedback obtained from random sampling or subsequent testing of the diverted finished products. This data is compared with preset standard thresholds. For example, if the diversion deviation rate exceeds the preset upper limit, or the congestion duration of a certain diversion channel exceeds the preset value, the system will initiate the deviation root cause analysis process. By analyzing this data, the root cause of the deviation can be determined, such as insufficient accuracy of the classification model, unreasonable diversion rules, or inaccurate actuator actions. Based on the determined root cause of the deviation, the system can adjust the diversion rules, such as modifying the classification threshold, adjusting the channel priority, or updating the diversion strategy.
[0033] This application further proposes that the aforementioned deep learning model is a hybrid model composed of a concatenated convolutional neural network and a Transformer. The feature extraction steps include: inputting the preprocessed finished image data into the CNN module, performing convolution and pooling operations to complete feature dimensionality reduction and redundant information filtering, and outputting a local defect feature map; serializing the local defect feature map, converting it into a one-dimensional feature vector adapted to the Transformer module, and inputting it into its encoder; mining feature correlation and finished global features through the multi-head attention mechanism of the Transformer module, and outputting a global feature vector; aligning the dimensions of the local feature vector and the global feature vector, and using a weighted fusion algorithm to obtain a fused feature vector; normalizing the fused feature vector, and after filtering and strengthening by a fully connected layer, outputting complete finished feature information.
[0034] The deep learning model described is a hybrid model composed of a convolutional neural network (CNN) and a Transformer, combining the advantages of different neural network architectures. CNNs excel at processing local features, capturing spatial information such as texture and edges by sliding convolutional kernels across the image. Transformer models, on the other hand, excel at processing sequential data and long-range dependencies, capturing global contextual information through self-attention mechanisms. As one implementation, the CNN module can employ classic or improved convolutional network structures such as ResNet, VGG, and Inception to initially extract low- and mid-level visual features from the image. The Transformer module can use Vision Transformer (ViT) or its variants, using the features extracted by the CNN as sequential input for global feature learning. Alternatively, the CNN module can be a lightweight backbone network, such as MobileNet or EfficientNet, to improve processing efficiency. The Transformer module can be a standard Transformer structure with multi-layer encoders for further refining and integrating the features output by the CNN.
[0035] The preprocessed image data is input into the CNN module, where convolution and pooling operations are used to reduce feature size and filter redundant information, outputting a local defect feature map. In this step, the CNN module, as the first stage of feature extraction, leverages its advantages in image processing. It learns local patterns in the image through convolutional layers and reduces the size of the feature map through pooling layers, lowering computational complexity while enhancing feature robustness. This filters out unimportant details, resulting in a feature representation focused on local defects. As one implementation, convolutional operations can use different kernel sizes (e.g., 3x3, 5x5) and strides (e.g., 1, 2) to capture local features at different scales. Pooling operations can employ max pooling or average pooling to retain the most important or smooth features. Alternatively, convolutional layers can use grouped convolution or depthwise separable convolution to improve efficiency. Pooling layers can use adaptive pooling, dynamically adjusting the output size based on the size of the input feature map.
[0036] The local defect feature map is serialized, converted into a one-dimensional feature vector adapted for the Transformer module, and input into its encoder. Transformer models typically process sequential data, thus requiring the conversion of the two-dimensional feature map output by the CNN into a one-dimensional sequence. The serialization operation allows the Transformer to treat each "block" or "region" in the local feature map as a "term" in the sequence, thereby applying its self-attention mechanism to capture the relationships between these "terms." One implementation approach is to segment the local defect feature map into several non-overlapping or partially overlapping patches, then flatten each patch into a one-dimensional vector and arrange them sequentially to form a sequence. Another approach is to perform global average pooling or max pooling on the local defect feature map to obtain a fixed-length vector, then copy it multiple times to form a sequence, or directly flatten each pixel (or small region) of the feature map as a sequence element.
[0037] The Transformer module utilizes a multi-head attention mechanism to mine feature correlations and global features of the finished product, outputting a global feature vector. The core of the Transformer module is the multi-head attention mechanism, which allows the model to learn different feature representations in different "attention heads" and capture the dependencies between any two positions in the input sequence, regardless of their distance in the original image. This enables the model to understand the global distribution of defects, the interactions between different defects, and the relationship between defects and the overall structure of the finished product, thus outputting a feature vector containing global contextual information. As one implementation, the multi-head attention mechanism projects the query, key, and value matrix into different subspaces, independently computes attention in each subspace, and finally concatenates and projects the results again to enhance the model's ability to capture complex relationships. As another implementation, the Transformer encoder can contain multiple identical layers, each consisting of a multi-head self-attention sublayer and a feedforward neural network sublayer, and is stabilized through residual connections and layer normalization.
[0038] The local and global feature vectors are dimensionally aligned, and a weighted fusion algorithm is used to obtain a fused feature vector. Local feature vectors (from the CNN) and global feature vectors (from the Transformer) represent different levels of information about defects in the final product. To fully utilize this information, they need to be fused. Dimensional alignment is a prerequisite for fusion, and the weighted fusion algorithm allows the model to dynamically adjust according to the importance of different features, generating a more comprehensive and robust fused feature vector. As one implementation, dimensional alignment can be achieved by adjusting the dimension of one vector to match the other through linear transformation layers (e.g., fully connected layers) or pooling layers. Weighted fusion can use learnable weight parameters to automatically determine the contribution ratio of local and global features through training. Alternatively, dimensional alignment can be achieved through upsampling or downsampling operations. Weighted fusion can employ attention mechanisms, allowing the model to dynamically assign weights to local and global features, or it can use simple element-wise addition or concatenation followed by fusion through a linear layer.
[0039] The fused feature vector is normalized and then filtered and enhanced by a fully connected layer to output complete product feature information. Normalization helps stabilize the training process, prevent gradient explosion or vanishing, and accelerate convergence. The fully connected layer, as the final feature integrator and filter, learns the complex nonlinear relationships between different dimensions in the fused feature vector, further extracting the most critical information for product quality classification, thus outputting complete product feature information for subsequent classification decisions. As one implementation method, normalization can employ batch normalization or layer normalization. The fully connected layer can consist of one or more linear layers, interspersed with activation functions (e.g., ReLU). Alternatively, L2 normalization can be used. The fully connected layer can be combined with a Dropout layer to prevent overfitting and output features with dimensions matching the number of categories in the subsequent classification task.
[0040] In one specific implementation, a convolutional neural network based on the ResNet-50 architecture can be used as the CNN module during feature extraction. Preprocessed image data, such as an image of size 224x224 pixels, is input into the ResNet-50 network. After multiple convolutional and pooling operations, the feature map output from the last convolutional layer of the ResNet-50 (e.g., a 7x7x2048 feature tensor) can serve as a local defect feature map. Then, to adapt to the Transformer module, this 7x7x2048 local defect feature map can be divided into 49 non-overlapping blocks, each flattened into a 2048-dimensional vector. These vectors, along with a learnable class token and positional encoding, constitute the input sequence and are fed into the Transformer encoder. The Transformer encoder can consist of six identical stacked layers, each containing a multi-head self-attention mechanism (e.g., eight attention heads) and a feedforward neural network. The vector corresponding to the class token output by the Transformer encoder is the global feature vector. Subsequently, the local feature vectors (e.g., a 2048-dimensional vector obtained by global average pooling of the local defect feature maps output by the CNN) and the global feature vectors (e.g., the 2048-dimensional class label vectors output by the Transformer) need to be dimension-aligned. This can be achieved using separate linear projection layers that map them to the same dimension, e.g., 512. Then, a learnable weighting parameter α (with a value between 0 and 1) can be used to perform weighted fusion using the formula `fused feature vector = α * local feature vector + (1 - α) * global feature vector`. Finally, the resulting fused feature vector can be layer normalized to ensure the stability of the feature distribution. This normalized vector is then fed into a network consisting of two fully connected layers. For example, the first fully connected layer maps the 512-dimensional vector to 256 dimensions and passes it through a ReLU activation function, while the second fully connected layer maps the 256-dimensional vector to a dimension corresponding to the number of quality levels (e.g., 4 dimensions), thus outputting the final complete finished feature information.
[0041] This application further proposes steps for setting and adjusting diversion rules, including collecting finished product quality grades and corresponding defect types, prioritizing diversion based on defect severity and repair difficulty; statistically analyzing the operating parameters of each diversion channel, calculating the processing capacity per unit time and setting channel priorities; establishing a correspondence between quality grades and channel priorities, setting diversion limits, forming basic diversion rules and entering them into the rule base; collecting production parameters and comparing them with standard parameters, triggering a rule adjustment process if they exceed the fluctuation range; adjusting channel priorities, diversion limits, or temporary storage capacity limits based on the fluctuation type of production parameters; simulating and verifying the new diversion rules, updating the rule base after confirming no anomalies, and completing the adjustment.
[0042] In this context, "separation priority" refers to the degree to which finished products of different quality levels or defect types are prioritized or allocated during the finished product separation process. This prioritization can be based on pre-defined business logic or expert experience. For example, finished products with "serious defects" and "high repair difficulty" can be set to the highest priority to remove them from the main production line as quickly as possible; while "qualified" finished products can be set to the lowest priority to ensure their smooth passage. Another implementation method is to assign a weighted score to each defect type and repair difficulty, and then calculate the final separation priority of the finished products through weighted summation or table lookup. "Channel priority" refers to the degree to which a particular channel is preferentially selected for finished product separation among multiple separation channels. "Processing capacity per unit time" refers to the number of finished products that a separation channel can process per unit time. Channel operating parameters can include current load rate, historical throughput, failure rate, maintenance plan, etc. For example, the system can monitor the current queue length or processing speed of each channel in real time, setting higher priority for channels with lower current load or faster processing speed. Alternatively, a basic priority can be set based on the inherent function of the channel (e.g., qualified product channels typically have higher processing capacity), and dynamically adjusted in conjunction with real-time operating status. The flow limit refers to the quantity of finished products of a specific quality grade that each flow channel can receive within a unit of time or a certain time period. The rule base is a database or configuration set that stores all flow rules. For example, a decision table can be established that explicitly stipulates that "qualified products" should be preferentially allocated to the "qualified product channel," with a flow limit of X pieces per minute for that channel; "minor defective" finished products should be preferentially allocated to the "rework channel," with a flow limit of Y pieces per minute. Once these rules are established, they are stored in the rule base as the initial basis for the system's flow decisions. Production parameters refer to key process parameters that affect finished product quality or production efficiency, such as production line speed, temperature, pressure, and raw material batches. The fluctuation range refers to the allowable variation range of these production parameters under normal operating conditions. For example, the normal fluctuation range of a key temperature parameter can be set to ±5℃. When the real-time collected temperature value exceeds this range, the system will determine that an anomaly may have occurred in the production process, and automatically initiate the flow rule adjustment process to cope with possible changes in finished product quality or fluctuations in production efficiency. The temporary storage capacity limit refers to the maximum capacity of the temporary storage area used to temporarily store finished products awaiting processing or review. When production parameters fluctuate, the system will adjust the diversion rules accordingly based on the specific type of fluctuation (e.g., whether it leads to an increase in the defect rate or a decrease in production efficiency). For example, if temperature fluctuations indicate a potential increase in the defect rate, the system may increase the diversion limit for "awaiting review" or "minor defect" finished products and decrease the diversion limit for "qualified products," while potentially increasing the capacity limit of the "temporary storage area" to accommodate the possible increase in finished products awaiting processing.Simulation verification refers to the process of testing and evaluating new diversion rules using simulation models or historical data before their actual application. For example, the system can use historical production data and known fluctuations in production parameters to run new diversion rules in a virtual environment and observe their impact on indicators such as finished product diversion efficiency, channel load, and defect handling time. Only when the simulation results show that the new rule can effectively solve the problem and does not introduce new anomalies (such as channel congestion or finished product backlog) will the system officially update the new rule into the rule base and put it into actual use.
[0043] This application further proposes a process for collecting diversion deviation data, operational status data of each diversion channel, and finished product quality change data, comparing them with preset standard thresholds, and adjusting the diversion rules after determining the root cause of the deviation. The specific steps include: deploying several data acquisition units throughout the diversion process, collecting core diversion indicators at set intervals, and clarifying the calculation method for each indicator; setting threshold ranges for each core diversion indicator and comparing the real-time collected indicators with the threshold ranges; when any core diversion indicator exceeds the threshold range, initiating a deviation cause analysis process, and determining the root cause of the deviation based on diversion data, equipment operation data, and finished product characteristic data: if the diversion error exceeds the standard, judging the accuracy of the matching between the classification label and the diversion rules and the deviation of the actuator's actions; if the diversion channel congestion duration exceeds the standard, ... Analyze the rationality of the triage channel priority and its compatibility with the finished product triage rhythm; if the finished product classification accuracy exceeds the standard, determine whether the feature extraction accuracy of the hybrid deep learning model and the quality of the finished product image data meet the standards; adjust according to the root cause of the deviation: if the label and rule match incorrectly, adjust the triage rule parameters; if the actuator action is deviated, calibrate the actuator; if the channel priority is unreasonable, reorder the channel priority; if the model feature extraction is deviated, fine-tune the model feature extraction threshold and the weight of the fully connected layer; after the adjustment, shorten the data collection cycle, compare the changes of the core triage indicators in real time, and monitor whether the indicators return to the threshold range; if the standards are met multiple times in a row, stop real-time monitoring and complete one feedback optimization; if the standards are not met, repeat the deviation cause analysis process and adjustment until the indicators meet the standards.
[0044] The data acquisition unit is a hardware or software module used to acquire key operating parameters during the diversion process in real time. Its role is to provide quantitative data on the operating status of the diversion system, laying the foundation for subsequent deviation detection and root cause analysis. The data acquisition unit can include various physical devices such as sensors (e.g., photoelectric sensors, weighing sensors, vision sensors), encoders, etc., or it can be a software interface integrated into the control system to read operating data from the PLC or SCADA system. Set-period acquisition refers to sampling data at predetermined time intervals (e.g., per second, per minute, or per batch) to ensure the timeliness and continuity of the data. Clear calculation methods for each indicator ensure consistency and comparability between different data sources. For example, diversion error can be defined as the percentage difference between the actual diversion quantity and the target diversion quantity, and channel congestion duration can be defined as the cumulative time that the finished product stays in the channel exceeds a preset threshold.
[0045] Threshold ranges are pre-defined upper and lower limits used to determine whether core traffic diversion indicators are operating normally. The purpose of setting threshold ranges is to establish a judgment standard, enabling the system to automatically identify potential anomalies and avoid frequent manual intervention. For example, for traffic diversion errors, a threshold range of ±5% can be set; for traffic diversion channel congestion duration, a threshold of 10 seconds can be set. The comparison between real-time collected indicators and threshold ranges can be implemented through programming logic. For instance, when the real-time collected traffic diversion error exceeds ±5%, the system determines it to be abnormal.
[0046] The deviation cause analysis process is the automatic or semi-automatic fault diagnosis process performed by the system after detecting an anomaly. Its purpose is to identify the root cause of the diversion anomaly from data across multiple dimensions, providing a basis for subsequent precise adjustments. Diversion data can include classification labels, diversion schemes, and actual diversion results; equipment operation data can include actuator action feedback, conveyor belt speed, and sensor status; finished product feature data refers to information such as defect type, location, and severity extracted by the deep learning model. The specific judgment logic for determining the root cause of the deviation includes: if the diversion error exceeds the standard, the focus is on checking whether the matching logic between the classification labels and diversion rules is accurate, and whether there are deviations or lags in the actions of the actuators (such as push rods and robotic arms); if the diversion channel congestion duration exceeds the standard, the analysis focuses on whether the current diversion channel priority setting is reasonable, and whether the rhythm of finished products entering the channel is compatible with the channel's processing capacity; if the finished product classification accuracy exceeds the standard, it is necessary to assess whether the accuracy of the hybrid deep learning model in feature extraction has decreased, and whether the quality of the finished product image data input to the model itself meets the requirements.
[0047] Adjusting based on the root cause of the deviation is a key step in addressing the problem specifically. Its purpose is to restore the triage system to normal operation and optimize its performance through precise intervention. For example, if a problem is found in the matching logic between classification labels and triage rules, parameters in the rule base can be modified, such as adjusting the triage channel corresponding to a certain quality level; if there is a physical deviation in the action of the actuator (such as a triage push rod), mechanical calibration or software compensation is required; if unreasonable priority settings for triage channels lead to some channels being idle or congested for extended periods, the priority order of each channel can be readjusted to better meet actual production needs; if the feature extraction capability of the deep learning model declines, resulting in lower classification accuracy, the model can be fine-tuned, for example, by adjusting the threshold parameters for feature extraction or modifying the weights of fully connected layers to improve its ability to identify defective features.
[0048] After adjustments are made, the data acquisition cycle is shortened, and changes in the core traffic diversion indicators are compared in real time to monitor whether the indicators return to the threshold range. If the indicators meet the standards multiple times consecutively, real-time monitoring stops, completing one feedback optimization cycle. If the indicators do not meet the standards, the deviation cause analysis process and adjustments are repeated until the indicators meet the standards. This step is an important part of the feedback closed-loop control. The purpose of shortening the data acquisition cycle is to capture changes in the system state more quickly and sensitively after adjustments, and to verify the adjustment effects in a timely manner. Real-time comparison of changes in the core traffic diversion indicators and monitoring whether they return to the threshold range is to confirm whether the adjustments have been effective. Multiple consecutive compliances indicate that the system has returned to stability, and the current optimization cycle can be ended. If the indicators do not meet the standards, it means that the previous adjustments may not be entirely correct or that new problems exist, requiring re-entering the deviation cause analysis process for iterative optimization until the system performance meets the requirements. This iterative feedback mechanism ensures the continuous optimization and robustness of the traffic diversion system.
[0049] The following is a concrete example. Along the finished product discharge path, photoelectric sensors and counters are installed at regular intervals as data acquisition units to collect real-time data on the quantity and flow rate of the passing finished products. Simultaneously, infrared sensors and timers are deployed at the inlet and outlet of each diversion channel to monitor the dwell time of the finished products within the channel, thereby calculating the channel congestion duration. Furthermore, position sensors can be integrated into actuators (such as pneumatic push rods) to provide real-time feedback on their operational status. These data acquisition units transmit the collected data, including the number of finished products passing through, channel dwell time, and push rod action feedback, to the diversion control module every 5-second preset cycle. The diversion control module presets threshold ranges for diversion error (e.g., the deviation between the actual number diverted to the qualified product channel and the required number does not exceed 3%), channel congestion duration (e.g., continuous congestion time in any channel does not exceed 15 seconds), and finished product classification accuracy (e.g., classification accuracy not less than 98%). When the system detects that the diversion error of the qualified product channel exceeds 3% three times consecutively, deviation cause analysis is initiated. At this point, the system first checks the matching records of the classification labels and diversion rules for the most recent batch of finished products. For example, it checks whether finished products that should have been diverted to the minor defect channel were incorrectly marked as qualified products. Simultaneously, it checks the pusher action feedback data for the qualified product channel to see if there are any cases where the pusher was not fully extended or extended too early. If the analysis results indicate a mismatch between the classification label and the diversion rules—for example, a specific defect type being incorrectly classified as a qualified product—the system automatically adjusts the diversion channel parameters corresponding to that defect type in the diversion rule library. If the analysis results point to pusher action deviation, it triggers the actuator calibration procedure, for example, by sending commands to fine-tune the pusher's stroke or response time. After adjustment, the data acquisition cycle is temporarily shortened to every 2 seconds, continuously monitoring the diversion error until ten consecutive errors are within 3%, at which point the system stops high-frequency monitoring, completing this feedback optimization.
[0050] This application further proposes a preprocessing step for the finished product image data, specifically including: filtering noise from the original finished product image data using a filtering algorithm to obtain denoised image data; converting the denoised color image to a grayscale image using a weighted average method; processing the grayscale image using an edge detection algorithm to obtain image data containing the complete edge contour of the finished product; segmenting the finished product region and the background region using a region growing algorithm to obtain segmented image data; and performing size adjustment and grayscale normalization on the segmented image to obtain preprocessed image data.
[0051] Preprocessing of the original finished image data aims to optimize image quality, making it more suitable for feature extraction by subsequent deep learning models. This includes noise filtering of the original finished image data using filtering algorithms to obtain denoised image data. This process eliminates random noise present in the image, such as salt-and-pepper noise and Gaussian noise, thereby improving image clarity and signal-to-noise ratio. Various filtering techniques can be used to achieve this step. For example, a Gaussian filter can be used to smooth the image and suppress high-frequency noise; alternatively, a median filter can be used to replace the current pixel value with the median value within the pixel's neighborhood, effectively removing impulse noise. The denoised color image is then converted to a grayscale image using a weighted average method. This simplifies the multi-channel color image data into a single-channel grayscale image data, reducing data redundancy and highlighting the image's brightness information. This is sufficient for many defect detection tasks and reduces subsequent computational complexity. This conversion can be achieved by weighted averaging of pixel values in the red, green, and blue color channels. For example, it can be performed according to the brightness calculation formula recommended by the International Telecommunication Union (ITU-R BT.601), or the weights of each channel can be adjusted according to specific application scenarios. The grayscale image is processed using an edge detection algorithm to obtain image data containing the complete edge contours of the finished product. Its function is to identify areas in the image where grayscale values change significantly, thereby extracting the boundary information of the finished product. Clear edge contours help distinguish the finished product from the background and provide a basis for defect localization. Commonly used edge detection algorithms include the Sobel operator, Prewitt operator, Roberts operator, and Canny operator, among which the Canny algorithm is often chosen due to its good noise resistance and single-edge response characteristics. The finished product region and background region are segmented using a region growing algorithm to obtain segmented image data. Its function is to merge adjacent pixels with similar characteristics (such as grayscale values, colors, or textures) based on pixel similarity criteria, thereby accurately separating the finished product from the complex background. This algorithm usually starts from one or more seed points and gradually expands outward until a preset stopping condition is met. The segmented images undergo resizing and grayscale normalization to obtain preprocessed image data. This step has two main objectives. Resizing aims to unify all segmented images to the fixed input size required by the deep learning model, ensuring consistent model processing. Grayscale normalization maps the image's grayscale value range to a standard interval (e.g., 0 to 1 or 0 to 255) to eliminate the influence of different lighting conditions or differences in acquisition equipment, improving the stability and generalization ability of model training. Resizing can employ methods such as bilinear interpolation or nearest neighbor interpolation, while grayscale normalization can use methods such as linear mapping or Z-score normalization.
[0052] Preprocessing the finished product image data can be achieved as follows: First, for the original finished product image data, a Gaussian filtering algorithm can be used to filter noise. For example, a 5x5 Gaussian kernel with a standard deviation of 1.0 can be used to smooth the image and remove high-frequency noise, thus obtaining denoised image data. Next, the denoised color image is converted to a grayscale image using a weighted average method. Specifically, the grayscale value can be calculated using the formula: grayscale value = 0.299*R + 0.587*G + 0.114*B, where R, G, and B represent the pixel values of the red, green, and blue channels, respectively. Subsequently, the Canny edge detection algorithm is applied to the obtained grayscale image. By setting a low threshold (e.g., 50) and a high threshold (e.g., 150), clear and continuous edge contours of the finished product are extracted, generating image data containing the complete edge contours of the finished product. Building upon this foundation, a region growing algorithm can be used for image segmentation. For example, a pixel in the center region of the final product can be selected as a seed point, and a grayscale similarity threshold of 15 can be set. All adjacent pixels whose grayscale values differ from the seed point by less than 15 are merged into the final product region, thus separating the final product from the background and obtaining segmented image data. Finally, the segmented image is resized to a uniform 224x224 pixels and grayscale normalization is performed, linearly mapping the grayscale values of all pixels to a floating-point number range of 0 to 1. This results in preprocessed image data for subsequent use by deep learning models.
[0053] This application further proposes the following steps for acquiring finished product image data: Deployment of image acquisition devices: Multiple image acquisition devices are arranged at different locations along the finished product discharge path, including area array cameras positioned directly above, to the left, and to the right of the finished product discharge path, and a depth acquisition device positioned directly in front of the finished product discharge path. The depth acquisition device maintains the same acquisition height as the area array cameras, and auxiliary light sources are arranged around each image acquisition device. A photoelectric sensor is installed at the finished product discharge port, triggering all image acquisition devices to start synchronously when the finished product passes through. The area array cameras capture multi-angle images of the finished product, which are aligned and filtered to obtain two-dimensional image data. The depth acquisition devices acquire the depth information of the finished product, generate three-dimensional point cloud data, and convert it into three-dimensional depth image data. The coordinates of the finished product feature points are extracted, and the three-dimensional image coordinates are calibrated using a coordinate transformation algorithm to obtain fused image data. Auxiliary data is acquired, bound with a unique identifier and timestamp to the fused image data, and transmitted to the image processing module.
[0054] Specifically, image acquisition equipment deployment refers to the strategic configuration of various types of image acquisition devices along the finished product discharge path to ensure comprehensive and multi-dimensional information capture of the finished product. Multiple image acquisition devices are placed at different locations along the discharge path, such as area scan cameras positioned directly above, to the left, and to the right. This aims to acquire surface images of the finished product from multiple angles, effectively avoiding occlusion or blind spots that may occur from a single viewpoint and ensuring the integrity of defect information. Area scan cameras typically employ high-resolution CCD or CMOS sensors, capable of capturing two-dimensional visual features such as texture and color on the finished product surface. This can be achieved by using industrial-grade high-speed area scan cameras or cameras with global shutter functionality to reduce motion blur. Simultaneously, a depth acquisition device is positioned directly in front of the finished product discharge path to acquire three-dimensional geometric information of the finished product, such as its shape, size, and surface undulations. This is crucial for identifying three-dimensional defects or assessing defect depth. Depth acquisition devices can employ structured light technology, calculating depth by projecting specific patterns and analyzing their deformation, or time-of-flight (ToF) technology, acquiring depth information by measuring the round-trip time of light. The depth acquisition device is kept at the same acquisition height as the area array camera to ensure spatial consistency between 2D image data and 3D depth data in the vertical direction, facilitating subsequent data fusion and calibration. This can be achieved through precise mechanical mounting and laser rangefinder-assisted calibration, or by using an integrated multi-sensor module. Auxiliary light sources are arranged around each image acquisition device to provide a uniform and stable lighting environment, eliminate shadows, improve image contrast and sharpness, and thus enhance the visibility of defects. The auxiliary light sources can use ring LED light sources to provide diffused illumination, or strobe light sources synchronized with the camera shutter to freeze moving images.
[0055] A photoelectric sensor is installed at the finished product outlet. Its function is to accurately detect the arrival of the finished product and use it as a trigger signal to initiate the image acquisition process. The photoelectric sensor can be a through-beam sensor, triggered when the finished product blocks the light beam; or it can be a reflective sensor, triggered when the finished product reflects the light beam. When the finished product passes through, it triggers all image acquisition devices to start synchronously, ensuring that all cameras capture images at the same point in time. This guarantees the temporal consistency between multi-view 2D images and 3D depth data, providing a foundation for subsequent data fusion. This can be achieved by sending synchronous trigger pulses from the sensor signals to all cameras via a programmable logic controller (PLC) or microcontroller, or by using an industrial camera synchronization controller for precise control.
[0056] After capturing multi-angle images with an area scan camera, the resulting two-dimensional image data needs to be aligned and filtered. Image alignment aims to eliminate geometric distortions and positional deviations between images from different viewpoints, ensuring the pixel correspondence of the same physical point under different viewpoints. This can be achieved through image registration based on feature point matching (such as SIFT and SURF algorithms) and homography or essential matrix, or by pre-calibrating the camera to obtain its intrinsic and extrinsic parameters, and then aligning through projection transformation. Image filtering removes low-quality images that are blurry, overexposed, underexposed, or contain irrelevant clutter, ensuring the quality of the input data. This can be done automatically based on image sharpness evaluation algorithms (such as Tenengrad and Laplacian variance), or by setting brightness and contrast thresholds to reject images that exceed the acceptable range.
[0057] Depth acquisition equipment collects depth information from the finished product, generates 3D point cloud data, and converts it into 3D depth image data. 3D point cloud data is the original set of 3D spatial coordinates, directly representing the geometry of the object's surface. A depth camera can directly output point cloud data or output a depth map, which is then converted back into a point cloud using camera intrinsics. 3D depth image data maps the 3D point cloud data onto a 2D image plane, with each pixel value representing depth information, facilitating fusion with the 2D image. This can be achieved by projecting the point cloud data onto a specific view plane to generate a grayscale depth map.
[0058] The process involves extracting the coordinates of feature points on the finished product and calibrating the 3D image coordinates using a coordinate transformation algorithm to obtain fused image data. Feature point coordinate extraction aims to identify key points on the finished product, serving as the basis for associating 2D and 3D data. This can be achieved using corner detection algorithms (such as Harris and Shi-Tomasi) or blob detection algorithms, or deep learning-based object detection models to identify specific feature regions. Coordinate transformation algorithm calibration unifies 2D and 3D depth image data from different coordinate systems into the same coordinate system, ensuring accurate spatial correspondence. This can be done using rigid body transformation (rotation and translation) matrices calculated using a calibration board or known geometric features, or by using the Iterative Closest Point (ICP) algorithm to align feature points in the point cloud data and 2D image. Fused image data combines the texture and color information of the 2D image with the geometric information of the 3D depth image to form comprehensive data containing richer information. This can be achieved by adding depth information as an additional channel to the 2D color image to form an RGB-D image, or by mapping the 2D image texture onto a 3D point cloud model.
[0059] Auxiliary data is collected, bound with unique identifiers and timestamps to the fused image data, and transmitted to the image processing module. Auxiliary data, such as finished product output speed and output spacing, provides crucial contextual information for subsequent defect analysis and production traceability. This data can be acquired through encoders or laser rangefinders, or estimated using visual tracking algorithms. Binding unique identifiers and timestamps ensures traceability and consistency for each data set, facilitating subsequent querying, analysis, and fault location. This can be achieved by storing the image file path, auxiliary data, unique ID, and timestamp as a single record using a database or file system. Transmission to the image processing module involves sending the collected raw and fused data to subsequent processing units for quality assessment, feature extraction, and other operations. This data transmission can be performed via high-speed Ethernet (such as GigE Vision) or a USB 3.0 interface.
[0060] In some other implementations, the quality grading step specifically includes: collecting finished product samples; labeling the samples using machine learning based on a preset finished product standard sample library to determine the feature boundaries and review ranges for each quality grade; setting the defect types, scales, and overlay requirements for each quality grade based on the labeled samples; extracting finished product feature information and comparing it with each quality grade standard; determining the quality grade based on the comparison results and generating corresponding classification labels; marking the feature information as needing review and triggering the review process when it is in a fuzzy range, completing the review through multi-model cross-validation and secondary feature extraction; binding the classification labels with finished product identifiers and image data, and transmitting them to the triage decision module.
[0061] The process involves collecting finished product samples. Based on a pre-defined standard sample library, machine learning is used to annotate the samples, determining the feature boundaries and review areas for each quality level. This step aims to establish and improve the criteria for judging finished product quality levels. Collecting finished product samples refers to obtaining representative examples of finished products from actual production lines. These samples can cover various quality conditions, including qualified products, different types of defective products, and ambiguous products in between. The pre-defined standard sample library is a database containing a large number of manually or expert-annotated finished product images and their corresponding quality levels and defect information. It provides initial training data and a reference benchmark for the machine learning model. Machine learning is used to annotate the samples. Supervised or semi-supervised learning algorithms can be used to automatically or semi-automatically classify and label newly collected finished product samples. For example, support vector machines (SVM) or decision trees can be used, combined with manual correction, to improve annotation efficiency and accuracy. Based on this, the system can learn and determine the distinguishing boundaries of different quality levels (such as qualified, minor defects, and severe defects) in the feature space. It also identifies areas where feature information lies between different levels and is difficult to classify clearly, defining these as "review areas" for subsequent special processing.
[0062] Based on the labeled samples, the defect types, scales, and cumulative requirements corresponding to each quality level are defined. This step is used to refine and quantify the judgment criteria for finished product quality levels. The labeled samples are verified finished product instances with clearly defined quality labels. Based on these samples, the permissible defect types (such as scratches, dents, color differences, foreign matter, etc.), defect scale limits (such as the length, width, and depth of scratches, the area and depth of dents, the ΔE value of color differences, etc.), and cumulative requirements for how to comprehensively judge when multiple defects coexist can be clearly defined for each quality level (e.g., acceptable products, minor defective products, major defective products). For example, it can be stipulated that a single minor defect does not affect the quality level, but when multiple minor defects accumulate to a certain number or total area, they may be escalated to major defects. These settings provide specific rules for subsequent automated quality judgment.
[0063] Extracting finished product feature information and comparing it with each quality level standard is the core step in quality assessment. Extracting finished product feature information involves using the aforementioned deep learning model to obtain detailed quantitative data about defect type, location, distribution, and severity from finished product image data. This feature information can be high-dimensional vectors or structured defect reports. Subsequently, this extracted finished product feature information is compared with each pre-defined quality level standard. The comparison process can employ various methods such as distance metrics, rule matching, or classifier discrimination to assess which quality level standard the finished product features best match.
[0064] The system determines the quality level based on the comparison results and generates a corresponding classification label. This step is the direct output of the quality assessment. Based on the comparison results between the above feature information and the quality standards, the system categorizes the finished product into one of the preset quality levels, such as "qualified," "minor defect," "serious defect," or "pending review." Once the quality level is determined, the system generates a corresponding classification label for the finished product. This label is a digital representation of the finished product's quality status and is used for subsequent triage decisions.
[0065] When feature information falls within a fuzzy range, it is marked as "pending review" and a review process is triggered. The review is completed through multi-model cross-validation and secondary feature extraction. This step aims to handle boundary cases that are difficult to classify clearly, improving the accuracy and robustness of the judgment. A fuzzy range refers to a situation where the finished product's feature information matches multiple quality level standards to a certain extent, or does not completely match any standard, making it difficult for the system to provide a clear quality level judgment. When the finished product's feature information falls into this fuzzy range, the system automatically marks it as "pending review" and immediately triggers a dedicated review process. This review process may include: multi-model cross-validation, which uses multiple different deep learning models or algorithms (e.g., in addition to the main classification model, introducing a model specifically trained for a particular defect type) to independently analyze and judge the same finished product image, improving the reliability of the decision through majority voting or weighted averaging of the results; and secondary feature extraction, which performs more refined and in-depth feature extraction on the finished product image, such as magnifying local regions, using different feature descriptors, or more complex feature fusion techniques to obtain more information helpful for the judgment.
[0066] The process of binding classification labels with finished product identification and image data and transmitting them to the triage decision module constitutes the output and transmission of quality assessment results. Once the quality level of the finished product is determined and a classification label is generated, the system associates and binds this label with the finished product's unique identifier (such as batch number, serial number, etc.) and the original or processed image data. This binding ensures the traceability of quality information, enabling easy access to detailed product quality status and original image evidence during subsequent triage, warehousing, or tracing of defect causes. Subsequently, these information-bound classification labels are transmitted to the triage decision module as a key input for formulating the final triage plan.
[0067] This application further proposes the following implementation steps for an image acquisition device that acquires images synchronously from multiple perspectives: multiple acquisition points are evenly set up along the discharge path, each acquisition point synchronously acquires image data, and transmits it to the main processing module for stitching and fusion; independent diversion channels are set up according to the quality level, equipped with conveying, temporary storage, and status detection components; the diversion control module receives classification labels, detects channel load, and sends a control signal if there is no overload; the actuators work in coordination to convey the finished product to the corresponding channel and adjust the conveying speed; when the channel load approaches the upper limit, an early warning is sent, the finished product is temporarily stored, and diversion resumes after the load decreases.
[0068] The phrase "uniformly setting multiple acquisition points along the discharge path, with each point synchronously acquiring image data and transmitting it to the main processing module for stitching and fusion" refers to the deployment of multiple image acquisition devices along the finished product discharge path to obtain more comprehensive and multi-angle image information. These acquisition points can be distributed along the length or width of the discharge path to ensure complete coverage of the finished product. For example, they can be positioned at the beginning, middle, and end of the discharge path, or from different perspectives such as above or to the side of the discharge path. Synchronous acquisition means that the image acquisition devices at all acquisition points start and complete image data capture at the same time or within a very short time interval, ensuring that the acquired image data is a snapshot of the same finished product in the same state, facilitating subsequent stitching, fusion, and analysis. This can be achieved through a unified trigger signal or a high-precision clock synchronization mechanism. Stitching and fusion refers to processing multiple image data from different acquisition points, eliminating overlapping areas, correcting geometric distortions, and ultimately generating one or a set of more complete and accurate finished product image data. This can be achieved through image registration algorithms and image fusion algorithms to provide a more comprehensive view of the finished product for subsequent analysis.
[0069] "Setting up independent diversion channels for corresponding quality levels, equipped with conveying, temporary storage, and status monitoring components" refers to establishing physically independent discharge paths for finished products of different quality levels (such as qualified, slightly defective, seriously defective, and pending review). This setup ensures the separation of finished products of different levels and the independence of subsequent processing. For example, multiple parallel conveyor belts, chutes, or robotic arm paths can be set up. Conveying components are mechanical devices responsible for guiding finished products from the main discharge path and moving them to the corresponding independent diversion channels. This can include conveyor belts, roller conveyors, pneumatic conveyors, or robotic arms, with controllable speed and direction. Temporary storage components are areas or devices set up within or at the end of the diversion channel for temporarily storing finished products. When the diversion channel cannot immediately process finished products for some reason, the temporary storage components can act as a buffer, preventing production line stagnation. For example, these can be buffer belts, hoppers, stacker cranes, or temporary shelves. Status monitoring components are sensors or detection devices used to monitor the real-time operating status of the diversion channel. This can include photoelectric sensors, weight sensors, speed sensors, blockage sensors, etc., used to obtain real-time operating information of the channel.
[0070] "The diversion control module receives classification tags, detects channel load, and sends control signals if no overload occurs." This means the diversion control module, as the core decision-making unit of the entire diversion system, is responsible for making diversion decisions based on the finished product classification results and channel status. It can be a programmable logic controller, industrial computer, or embedded system. Receiving classification tags means the diversion control module obtains the quality grade information of each finished product from the upstream quality classification module. Detecting channel load means the diversion control module obtains real-time operating data of each independent diversion channel through status detection components and assesses the current load of each channel accordingly. For example, it can determine whether a channel is approaching or has reached its processing capacity limit based on indicators such as the number of finished products in the channel, the conveying speed, and the temporary storage area occupancy rate. Sending control signals means that after making a diversion decision based on the classification tags and channel load, the diversion control module sends instructions to the actuator, directing it to convey the finished product to the specific diversion channel. These signals can be electrical signals, pneumatic signals, or network commands.
[0071] "Coordinated action of actuators to transport finished products to corresponding channels and adjust conveying speed" refers to mechanical devices that directly act on finished products to achieve their physical movement and diversion. This can include sorting robotic arms, push rods, forks, steering mechanisms, or variable-path conveyor belts. Coordinated action means that multiple actuators or different components of actuators cooperate with each other according to preset logic and timing to accurately divert finished products. For example, a push rod pushes a finished product away from the main line, while another conveyor belt accelerates and sends it into the target channel. Transporting to the corresponding channel means that the actuator, according to the instructions of the diversion control module, accurately guides or moves finished products with specific classification labels to their preset independent diversion channels. Adjusting the conveying speed means that the actuator can dynamically change the moving speed of the finished products according to the instructions of the diversion control module. This helps optimize diversion efficiency, avoid product accumulation or collisions, and adapt to the real-time processing capabilities of different channels.
[0072] "Sending an early warning when the channel load approaches its limit, temporarily storing finished products, and resuming diversion after the load decreases" means that the diversion control module continuously monitors and detects that the current load of a diversion channel is about to reach its maximum processing capacity or storage capacity. Sending an early warning means that when the channel load is detected to be approaching its limit, the system will immediately issue an alarm message. This can be an audible and visual alarm, a display screen prompt, or a message sent to the operator via the network to remind them to pay attention and take appropriate measures. Temporarily storing finished products means that to avoid production line shutdowns or product damage due to channel overload, the diversion control module will instruct the actuator to temporarily transfer the channel that should have entered the congested channel to a preset temporary storage area. Resuming diversion after the load decreases means that when the diversion control module detects that the load of the congested channel has decreased below a safe level due to downstream processing or the temporary storage area being emptied, the system will automatically release the temporary storage state and instruct the actuator to resume normal diversion of finished products to that channel.
[0073] This application's solution ensures the comprehensiveness and accuracy of finished product image data by evenly setting multiple acquisition points along the discharge path and simultaneously acquiring and stitching together image data, laying the foundation for subsequent precise classification. Independent physical diversion channels are set up for different quality grades, equipped with conveying, temporary storage, and status detection components, achieving physical isolation and independent processing of finished products of different grades, improving the orderliness of diversion. The diversion control module, as the core decision-making unit, receives classification labels in real time and continuously monitors the load of each channel. When a channel is not overloaded, the diversion control module sends precise control signals to the actuators, causing them to coordinate actions to accurately convey finished products to the corresponding channels and dynamically adjust the conveying speed to match channel capacity and product flow rate. Furthermore, to prevent diversion channel congestion, the system sends an early warning when the channel load approaches its limit and instructs the actuators to temporarily store finished products, automatically resuming diversion after the load decreases. This integrated diversion management mechanism tightly combines image acquisition, intelligent decision-making, and physical execution, forming a closed-loop control system that ensures the continuity, efficiency, and robustness of the finished product diversion process.
[0074] In one specific implementation, three image acquisition points can be set along the length of the finished product discharge path, located at the beginning, middle, and end of the path, respectively, with a high-resolution area array camera configured at each point. These cameras achieve synchronous acquisition via a unified trigger signal (e.g., triggered by a photoelectric sensor of the finished product passing through the discharge port). The acquired multiple image data are then transmitted to a main processing module, which uses an image registration algorithm based on SIFT feature point matching to align these images and generates a seamlessly stitched overall image of the finished product through a weighted average fusion algorithm. For different quality levels, such as "qualified," "minor defects," and "serious defects," three independent parallel conveyor belts can be set up as diversion channels. Each conveyor belt is equipped with an independent drive motor as a conveying component, a buffer hopper at the end as a temporary storage component, and multiple infrared beam sensors are installed on the conveyor belt as status detection components to monitor the quantity and conveying speed of the finished product in real time. The diversion control module can be an industrial-grade PLC that receives classification tags from the upstream classification module. The PLC continuously reads signals from the infrared sensors in each diversion channel, calculates the quantity of finished products and the conveying speed within the channel, and thus assesses the channel load. When the load of a channel does not reach a preset threshold, the PLC sends a control signal to the actuator (e.g., a pneumatic pusher array). Based on the signal, the pneumatic pusher array precisely pushes the finished products from the main conveyor line into the corresponding diversion channel. Simultaneously, the PLC adjusts the motor speed of the corresponding diversion channel conveyor belt via a frequency converter, thereby adjusting the conveying speed, based on the channel load. When the infrared sensor in a diversion channel detects a continuous increase in the quantity of finished products, approaching the upper limit of its buffer hopper's capacity, the PLC immediately issues an audible and visual warning through the HMI interface. At this time, the finished products that should have entered that channel are instructed to be pushed into a separate general-purpose temporary storage area. Once the finished products in the congested channel are processed downstream or the buffer hopper is emptied, and the load data fed back by the infrared sensor drops to a safe range, the PLC automatically releases the temporary storage state and resumes normal diversion of finished products to that channel.
[0075] This application further proposes steps for quality assessment and re-acquisition of finished image data, specifically including: Quality assessment is triggered immediately after a single finished image data is acquired and transmitted to the image processing module. This assessment process is carried out synchronously with the image acquisition process. A quality assessment algorithm is used to calculate image sharpness and contrast. Sharpness is obtained from the variance of gray values, and contrast is obtained from the proportion of gray value differences. Set the acceptable thresholds for sharpness and contrast, and determine whether the image quality meets the standards after comparison. If the image quality does not meet the standards, send a re-acquisition signal and record the number of acquisition failures. Set the maximum number of re-acquisitions, and start acquisition after adjusting relevant parameters before each acquisition. If the quality still does not meet the standards after multiple acquisitions, send a device check prompt. Mark the corresponding finished product as pending review and temporarily store it. It can be re-acquired and processed after the device is restored.
[0076] The quality assessment trigger is implemented immediately after a single finished image data is acquired and transmitted to the image processing module. This assessment process is synchronized with the image acquisition process to ensure timely image quality assessment, prevent low-quality images from entering subsequent processing stages, and improve system response speed and overall efficiency. This can be achieved by the image acquisition device sending a trigger signal to the image processing module after completing the transmission of a single image data. Upon receiving this signal, the image processing module immediately starts a preset quality assessment subroutine. Alternatively, the image processing module can have a data receiving listener that automatically invokes the image quality assessment module for processing once it detects that new finished image data has been completely transmitted, thus achieving automatic synchronous initiation of the assessment process.
[0077] A quality assessment algorithm is employed to calculate image sharpness and contrast. Sharpness is derived from the variance of grayscale values, while contrast is derived from the proportion of differences between grayscale values. Its purpose is to provide objective and quantitative image quality evaluation standards to determine whether an image meets the requirements for subsequent processing. For sharpness, statistical analysis of the image's grayscale values is performed to calculate the variance of all pixel grayscale values compared to the average grayscale value. A larger variance indicates a wider grayscale distribution, richer detail, and higher sharpness. Alternatively, the Tenengrad gradient function, Laplacian operator, or other methods can be used to calculate the image's gradient information, using the sum of squares or variance of gradient values to measure image sharpness. For contrast, the differences between grayscale values of adjacent pixels in the image can be calculated, and the proportion of these differences to the total number of pixel pairs can be statistically analyzed. Alternatively, the ratio of the difference between the maximum and minimum grayscale values to the average grayscale value can be calculated. Furthermore, methods such as RMS contrast (root mean square contrast) or Michelson contrast can be used to quantify contrast by calculating the standard deviation of pixel grayscale values or the difference between the maximum and minimum grayscale values.
[0078] Setting acceptable thresholds for sharpness and contrast, the system compares the images to determine if their quality meets the standards. If the image quality fails to meet the standards, a re-acquisition signal is sent, and the number of acquisition failures is recorded. A maximum number of re-acquisitions is set, and relevant parameters are adjusted before each acquisition. If the image still fails to meet the standards after multiple acquisitions, an equipment check prompt is sent. The corresponding finished product is marked as pending review and temporarily stored. It can be re-acquired and processed after the equipment recovers. This measure aims to establish image quality judgment standards and an anomaly handling mechanism, ensuring that only qualified images enter the subsequent process and providing guidance for troubleshooting and recovery. Threshold setting and judgment can be achieved through experiments or expert experience, setting upper and lower limits for sharpness (e.g., grayscale variance) and contrast (e.g., grayscale difference ratio). When the calculated image sharpness or contrast value falls within the preset acceptable range, the image quality is considered acceptable; otherwise, it is considered unacceptable. Alternatively, machine learning methods can be used to automatically learn and determine the optimal quality assessment threshold or classifier by training a large number of labeled qualified and unacceptable image samples. During re-acquisition and parameter adjustment, if the image quality is substandard, the system sends a re-acquisition command to the image acquisition device and records the number of acquisition attempts for the current product. Before re-acquisition, the system can fine-tune the parameters of the image acquisition device according to preset strategies (e.g., adjusting auxiliary light source brightness, adjusting camera exposure time, changing focal length, etc.) to obtain higher quality images. The system can also intelligently and selectively adjust the corresponding acquisition parameters based on the specific reasons for substandard image quality (e.g., too dark, too bright, blurry, etc.). Regarding the maximum number of attempts and equipment checks, the system maintains an internal counter to record the number of re-acquisition attempts. When the counter reaches the preset maximum number of attempts (e.g., 3 times), if the image quality is still substandard, the system determines that there may be a device malfunction and sends an equipment check prompt message to the operator. Simultaneously, the product is temporarily moved to a temporary storage area for manual review or equipment repair. The system can also intelligently determine the likelihood of device malfunction based on the acquisition failure pattern and provide more specific inspection suggestions. For products awaiting review and those temporarily stored, if multiple image acquisitions fail to meet the standards, the system marks them as "awaiting review" and instructs the executing agency to divert them to a dedicated temporary storage area to prevent them from entering the subsequent normal diversion process. Once the equipment returns to normal, the system can re-trigger the image acquisition and processing process for the temporarily stored product.
[0079] This application's solution triggers a quality assessment process immediately after the finished product image data acquisition is completed, and performs this process synchronously with the image acquisition process, ensuring the timeliness of image quality assessment. By employing a quality assessment algorithm to calculate image sharpness and contrast, and comparing it with a preset acceptable threshold, the system can objectively and quantitatively determine whether the image quality meets the standards. When the image quality does not meet the standards, the system can automatically send a re-acquisition signal, record the number of acquisition failures, and adjust relevant parameters before each re-acquisition to improve the acquisition success rate. If multiple acquisitions still fail to meet the standards, an equipment check prompt is sent, and the corresponding finished product is marked as pending review and temporarily stored until the equipment recovers for further processing. This series of steps forms a closed-loop image quality control mechanism, effectively filtering low-quality image data and ensuring the accuracy of subsequent feature extraction and quality classification, thereby improving the reliability and efficiency of the entire finished product diversion control method. As a key component of the entire diversion control method, this mechanism effectively avoids erroneous decisions caused by image quality issues, ensuring product quality and the smooth operation of the production process.
[0080] In other embodiments, see Figure 2 As shown, this application proposes a finished product diversion control system based on discharge images to implement the aforementioned finished product diversion control method based on discharge images. The system includes a finished product image acquisition device, an image processing module, a classification and decision-making module, a diversion control module, an actuator, a storage module, a feedback and optimization module, and a human-machine interaction module.
[0081] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A finished product diversion control method based on discharge images, characterized in that, include: The image acquisition device, which acquires images of finished products simultaneously from multiple perspectives, collects auxiliary data such as finished product discharge speed and discharge spacing during the finished product discharge stage. A deep learning model with a multi-module serial architecture is used to extract feature information on defect type, location, distribution and severity from finished image data; The finished products are classified into quality grades based on the quality judgment standards and characteristic information, and classification labels are generated; the quality grades include qualified, minor defects, serious defects, and pending review. The classification labels are matched with the diversion rules, and the diversion scheme is determined based on the real-time operating status of each diversion channel and the finished product output rhythm. The actuators distribute finished products with different classification labels to the corresponding discharge channels or temporary storage areas, and provide real-time feedback on the diversion status. By retrieving the finished product image data, diversion decision results and equipment operating parameters bound to the finished product from the storage module, the unique identifier of the finished product is associated with the production process parameters to locate the specific production process in which the defect occurred and the corresponding cause of the defect. The production process parameters are then adjusted according to the cause of the defect. Collect diversion deviation data, operating status data of each diversion channel, and finished product quality change data, compare them with preset standard thresholds, determine the root cause of the deviation, and then adjust the diversion rules.
2. The finished product diversion control method based on discharge image according to claim 1, characterized in that, The deep learning model is a hybrid model composed of a concatenated convolutional neural network and a Transformer. The feature extraction steps are as follows: The preprocessed finished image data is input into the CNN module, and feature dimensionality reduction and redundant information filtering are completed through convolution and pooling operations to output local defect feature maps. The local defect feature map is serialized, converted into a one-dimensional feature vector that adapts to the Transformer module, and then input into its encoder. The Transformer module uses a multi-head attention mechanism to mine feature correlations and final global features, and outputs a global feature vector. The local and global feature vectors are dimensionally aligned, and a weighted fusion algorithm is used to obtain the fused feature vector. The fused feature vectors are normalized and then filtered and enhanced by a fully connected layer to output complete finished product feature information.
3. The finished product diversion control method based on discharge image according to claim 2, characterized in that, The steps for setting and adjusting the traffic splitting rules include: Collect the quality grade of finished products and the corresponding defect type, and classify the priority of the process according to the severity of the defects and the difficulty of repair. Statistical analysis of the operating parameters of each diversion channel is performed to calculate the processing capacity per unit time and set the channel priority. Establish the correspondence between quality level and channel priority, set the traffic diversion limit, form basic traffic diversion rules and enter them into the rule base; Collect production parameters and compare them with standard parameters. If the parameters exceed the fluctuation range, trigger the rule adjustment process. Adjust the channel priority, diversion limit, or temporary storage capacity limit according to the type of production parameter fluctuations. The new traffic splitting rules are simulated and verified. Once no anomalies are found, the rule base is updated to complete the adjustment.
4. The finished product diversion control method based on discharge image according to claim 3, characterized in that, Collect diversion deviation data, operational status data of each diversion channel, and finished product quality change data, compare them with preset standard thresholds, determine the root cause of the deviation, and then adjust the diversion rules, specifically including: Several data collection units are deployed throughout the diversion process to collect core diversion indicators at set intervals and clarify the calculation method for each indicator. Set threshold ranges for each core indicator of traffic diversion, and compare the real-time collected indicators with the threshold ranges; When any core indicator of the diversion exceeds the threshold range, the deviation cause analysis process is initiated. Based on the diversion data, equipment operation data, and finished product characteristic data, the root cause of the deviation is determined: if the diversion error exceeds the standard, the accuracy of the matching between the classification label and the diversion rule and the deviation of the actuator action are judged; if the diversion channel congestion duration exceeds the standard, the rationality of the diversion channel priority and the adaptability of the finished product diversion rhythm are analyzed; if the finished product classification accuracy exceeds the standard, the accuracy of the feature extraction of the hybrid deep learning model and the quality of the finished product image data are judged to meet the standards. Adjustments are made based on the root cause of the deviation: if the label and rule do not match correctly, adjust the flow splitting rule parameters; if the actuator action is deviated, calibrate the actuator; if the channel priority is unreasonable, reorder the channel priority; if the model feature extraction is deviated, fine-tune the model feature extraction threshold and the weights of the fully connected layer. After the adjustment is completed, shorten the data collection cycle, compare the changes of the core indicators of the diversion in real time, and monitor whether the indicators return to the threshold range; if the indicators meet the standards multiple times in a row, stop real-time monitoring and complete one feedback optimization; if the indicators do not meet the standards, repeat the deviation cause analysis process and adjustment until the indicators meet the standards.
5. The finished product diversion control method based on discharge image according to claim 4, characterized in that, This also includes preprocessing the finished image data: The original finished image data is filtered for noise using a filtering algorithm to obtain denoised image data. The color denoised image is converted to a grayscale image using the weighted average method; The grayscale image is processed using an edge detection algorithm to obtain image data containing the complete edge contour of the finished product; The region growing algorithm is used to segment the finished product region and the background region to obtain segmented image data; The segmented image is resized and normalized to obtain preprocessed image data.
6. The finished product diversion control method based on discharge image according to claim 5, characterized in that, The steps for obtaining the finished product image data are as follows: The image acquisition equipment is deployed by arranging multiple image acquisition devices at different locations along the finished product discharge path, including area array cameras arranged directly above, to the left and to the right of the finished product discharge path, and depth acquisition devices arranged directly in front of the finished product discharge path. The depth acquisition devices and area array cameras are at the same acquisition height, and auxiliary light sources are arranged around each image acquisition device. A photoelectric sensor is installed at the finished product outlet, which triggers all image acquisition devices to start synchronously when the finished product passes through. A multi-angle image of the finished product is captured by an area array camera, and after alignment and filtering, two-dimensional image data is obtained. The depth acquisition device collects the depth information of the finished product, generates 3D point cloud data, and converts it into 3D depth image data. Extract the coordinates of the feature points of the finished product, calibrate the coordinates of the three-dimensional image through a coordinate transformation algorithm, and obtain the fused image data; Collect auxiliary data, bind it with a unique identifier and timestamp to the fused image data, and transmit it to the image processing module.
7. The finished product diversion control method based on discharge image according to claim 6, characterized in that, The steps for determining the quality grade of the finished product are as follows: Collect finished product samples, and based on a pre-set finished product standard sample library, use machine learning to complete sample annotation, and determine the feature boundaries and the range to be reviewed for each quality level. Based on the labeled samples, the defect types, scales and superposition requirements corresponding to each quality level are set; Extract the characteristic information of the finished product and compare it with the standards of each quality grade one by one; The quality level is determined based on the comparison results, and corresponding category labels are generated. When the feature information is in a fuzzy range, it is marked as pending review and the review process is triggered. The review is completed through multi-model cross-validation and secondary feature extraction. The classification labels are bound to the finished product identification and image data, and then transmitted to the triage decision module.
8. The finished product diversion control method based on discharge image according to claim 7, characterized in that, The implementation steps of the image acquisition device that acquires images synchronously from multiple perspectives are as follows: Multiple acquisition points are evenly set up along the discharge path. Each acquisition point synchronously collects image data and transmits it to the main processing module for splicing and fusion. Each quality level has an independent diversion channel, equipped with conveying, temporary storage and status detection components; The shunt control module receives classification tags, detects channel load, and sends a control signal if there is no overload. The actuators work in concert to transport the finished product to the corresponding channel and adjust the conveying speed. When the channel load approaches its limit, an alert is sent, finished products are temporarily stored, and the traffic is restored after the load decreases.
9. The finished product diversion control method based on discharge image according to claim 8, characterized in that, The steps for quality assessment and re-acquisition of the finished image data are as follows: Quality assessment is triggered immediately after a single finished image data is acquired and transmitted to the image processing module. This assessment process is carried out synchronously with the image acquisition process. A quality assessment algorithm is used to calculate image sharpness and contrast. Sharpness is obtained from the variance of gray values, and contrast is obtained from the proportion of gray value differences. Set the acceptable thresholds for sharpness and contrast, compare them to determine whether the image quality meets the standards, and if the image quality does not meet the standards, send a re-acquisition signal and record the number of acquisition failures. Set the maximum number of re-collections. Adjust the relevant parameters before each collection and start the collection. If the results still do not meet the standards after multiple collections, send a device check prompt. Mark the corresponding finished product as pending review and temporarily store it. It can be collected and processed again after the device is restored.
10. A finished product diversion control system based on discharge images, characterized in that, The finished product diversion control method based on the discharge image as described in any one of claims 1-9 includes: Finished product image acquisition device, used to acquire two-dimensional and three-dimensional image data and auxiliary data of finished products; The image processing module is used for image preprocessing, quality assessment, feature extraction, and reacquisition command processing. The classification and decision-making module is used for classifying finished product quality, generating diversion labels, and determining diversion schemes. The diversion control module is used to send control signals, monitor channel status, and handle congestion warnings. The actuator is used to receive control signals and transport the finished product to the corresponding channel or temporary storage area; The storage module is used to associate and store various types of data and form a traceable chain; The feedback and optimization module is used to collect diversion indicators, analyze deviations, and adjust relevant parameters. The human-computer interaction module is used for command input, status display, error prompts, and human-computer collaboration.