A high-precision real-time sorting system and method for industrial-grade plastic particles
By using multi-angle imaging and lightweight YOLO-RT model optimization, the challenges of accuracy, speed, and throughput in plastic particle detection and sorting were solved, resulting in a high-precision, high-speed plastic particle sorting system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG GUANWEI INTELLIGENT TECHNOLOGY CO LTD
- Filing Date
- 2026-03-13
- Publication Date
- 2026-07-28
AI Technical Summary
Existing plastic particle defect detection and sorting technologies are insufficient in terms of accuracy, speed and throughput to meet the requirements of large-scale industrial production. In particular, the accuracy of detecting tiny defects of 20 micrometers and above is insufficient, the real-time performance of the models is inadequate, and the single lightweight model solution leads to serious loss of accuracy.
Multi-angle imaging is achieved using a linear array of cameras and a strip light source array, combined with a lightweight YOLO-RT model for real-time defect identification. The YOLO-RT model is further optimized through knowledge distillation, quantization, pruning, and inference to achieve high-precision and high-speed sorting.
It achieves industrial-grade performance indicators such as high-precision detection of defects of 20 micrometers and above (≥99%), sorting speed ≥2000 particles/second, and end-to-end processing delay ≤10ms, meeting the requirements of modern high-speed production lines.
Smart Images

Figure CN122473050A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial visual inspection and intelligent sorting technology, and in particular to an industrial-grade high-precision real-time sorting system and method for plastic particles. Background Technology
[0002] As the core raw material for various plastic products, the quality of plastic granules is a key factor directly determining the performance of the final product. In industrial production, plastic granules commonly exhibit micro-defects of 20 micrometers or larger on their surface or inside, such as black spots, yellow spots, impurities, and irregular shapes. These defects severely affect key indicators of the finished plastic product, including mechanical strength, purity, corrosion resistance, and electrochemical properties. This makes defective plastic granules unsuitable for high-value-added fields with extremely high requirements for material consistency, such as semiconductors, implantable medical devices, and aerospace. To ensure raw material quality, defect detection and sorting technology for plastic granules (often referred to in the industry as "color sorters," "material pickers," or "sorting machines") has become an indispensable part of modern production lines.
[0003] However, to meet the core requirements of large-scale industrial production, current plastic particle defect detection and sorting technologies must meet the following technical specifications: accurate identification of defects 20 micrometers and larger; sorting speed ≥2000 particles / second; and end-to-end system latency ≤10ms from detection to sorting to avoid sorting misalignment. However, existing technologies generally suffer from low defect detection accuracy, insufficient throughput, and poor real-time performance, failing to meet the stringent requirements of large-scale industrial production. Specific technical bottlenecks are as follows: 1. Insufficient accuracy in detecting minute defects, and significant challenges in the synergy between optics and algorithms: Traditional visual inspection methods (such as edge extraction and threshold segmentation) have weak ability to identify minute defects with low contrast and are easily affected by the inherent characteristics of plastic particles, such as surface reflection and uneven color. Chinese patent CN112837311A discloses a polyethylene particle defect detection and identification system and method based on deep learning, which uses deep learning technology with traditional visual neural networks to identify polyethylene particle defects, but its ability to detect defects of 20 micrometers and above is limited. In addition, regarding the imaging challenges of transparent particles, Chinese patent CN117129366A discloses a method and device for detecting minute defects on the surface of transparent particles. This patent proposes a dedicated optical solution, but how to deeply integrate a complex and efficient optical imaging system with a lightweight and high-precision real-time detection algorithm to form a complete solution remains a problem that has not been systematically solved by existing technologies.
[0004] 2. Insufficient real-time performance and cumbersome models in industrial sorting: While attempts have been made to apply the YOLO algorithm to industrial sorting equipment to improve detection efficiency, the models are generally cumbersome and computationally demanding, making it difficult to meet real-time requirements. Chinese patent CN114782345A discloses a rapid ore identification and sorting method based on YOLOv5. However, for large materials such as ores, its YOLOv5 model is too complex to be easily transferred to the detection of micron-sized plastic particles. Furthermore, Chinese patent CN113591930A discloses a foreign object detection method for tea sorting machines based on an improved YOLOv4. Although it represents a lightweight improvement over YOLOv4, it aims to identify relatively large impurities in tea leaves. Its model structure and detection accuracy cannot meet the requirements for identifying defects of 20 micrometers and above, and its end-to-end latency is much higher than 10ms, demonstrating the limitations of existing YOLO algorithms in adapting to high-speed, precision sorting scenarios.
[0005] 3. Limited Model Lightweighting Solutions, Facing Difficulties in Balancing Accuracy, Speed, and Throughput: Existing technologies often employ a single strategy for model lightweighting. For example, Chinese patent CN116152346A discloses a lightweight convolutional neural network method for grain appearance quality detection, which involves replacing the backbone network with a lightweight one or performing simple network pruning or quantization on the YOLO model. Chinese patent CN115523958A discloses an intelligent detection and sorting device and method for silicon micropowder particles. While these solutions can improve speed in scenarios with similar small target detection requirements, such as particle sorting, they easily lead to a sharp decline in the model's ability to extract features from small targets, causing serious missed detection problems. Therefore, lightweighting results in significant accuracy loss, making it impossible to simultaneously achieve high-precision detection of defects of 20 micrometers or larger while maintaining a throughput of ≥2000 particles / second.
[0006] 4. The YOLO-RT model is not well-suited for industrial particle sorting scenarios, and its potential remains untapped: As a new generation of efficient real-time detection model, YOLO-RT possesses excellent speed potential. However, in the field of industrial sorting machines or material handling machines, existing research and applications are mostly limited to early versions such as YOLOv5 and YOLOv7, with no publicly available literature on its application to the detection of minute defects in plastic particles. Current technology lacks systematic research combining customized lightweight solutions with end-to-end optimization that integrate the characteristics of the YOLO-RT network structure, the material properties of plastic particles, and the core requirements of high throughput and low latency in industrial applications. This prevents its performance advantages from being fully realized in industrial sorting scenarios.
[0007] Therefore, developing a system that integrates advanced optical imaging, deeply customizes and lightweights the YOLO-RT model, and collaborates with a high-speed sorting actuator to achieve high-precision detection (≥99%) of micro-defects of 20 micrometers and above, a sorting speed of ≥2000 particles / second, and an end-to-end processing latency of ≤10ms has become the key to breaking through the technical bottlenecks of existing material pickers / sorters and meeting the material needs of high-value-added fields. Summary of the Invention
[0008] Addressing the core technical bottlenecks of existing plastic particle sorting technologies—insufficient accuracy in detecting minute defects, excessively high end-to-end processing latency, and limited system throughput—which are difficult to optimize in a coordinated manner, this invention provides an industrial-grade high-precision real-time sorting system and method for plastic particles. Existing technologies struggle to simultaneously meet the stringent industrial production requirements of high-precision detection of defects of 20 micrometers and above (≥99%), while also achieving an end-to-end processing latency of ≤10ms and a sorting throughput of ≥2000 particles / second. This invention aims to overcome these bottlenecks simultaneously through an innovative hardware and software collaborative architecture.
[0009] The objective of this invention is achieved through the following technical solution: This invention provides an industrial-grade, high-precision, real-time sorting method for plastic particles, comprising the following steps: S1: High-definition multi-angle images of plastic particles are continuously acquired through the linear array camera 4, and multi-angle illumination is used with the strip light source array 5 to eliminate reflection interference. The high-definition multi-angle images are then transmitted to the computer 6; where high-definition refers to 4K images. S2: Computer 6 uses a lightweight YOLO-RT model to perform real-time reasoning on the high-definition multi-angle image, outputs defect coordinates, defect category and confidence level, identifies defect particles based on defect category and confidence level and outputs a blow-delay command to PLC 7; S3: PLC 7 controls the nozzle 8 of solenoid valve 9 to generate airflow that blows defective particles away from their original trajectory; S4: Normal particles fall into the good product bin 10 along the chute 3, while defective particles enter the defective product bin 11 under the action of airflow; The lightweight YOLO-RT model described in step S2 is obtained through the following method: Add enhancement branches for minor defects to the YOLO-RT model and optimize the anchor box design to output an adapted and optimized YOLO-RT model; The adapted and optimized YOLO-RT model is constructed using a knowledge distillation framework to create a heterogeneous teacher-student architecture. Multi-level knowledge transfer is achieved by designing a composite loss function, and a lightweight student model after distillation is output. The distilled lightweight student model is quantized and calibrated using a mixed precision of INT8 and FP16, and the quantized model is output. Perform structured pruning on the quantized model to output the pruned model; The lightweight YOLO-RT model is obtained by accelerating optimization of the pruned model using real-time inference.
[0010] Further, in step S2, the step of identifying defective particles based on defect type and confidence level and outputting a blowing delay command specifically involves: converting the defect coordinates into physical coordinates on the slide (3), and then calculating the position and time of the defective particle passing through the nozzle (8) in combination with the real-time movement speed of the defective particle. The position is specifically the solenoid valve (9) number corresponding to the nozzle (8), and the time is the blowing delay. Combining the solenoid valve (8) number and the blowing delay gives the blowing delay command.
[0011] Furthermore, the enhancement branch of the micro-defect is achieved through multi-scale feature fusion, specifically: in, This represents the basic feature map output by the backbone network, with dimensions of [dimension number missing]. , For the number of channels, and The feature map size; Indicates the kernel size as Convolution operation, The set of values is {1, 3, 5}; Let the learnable fusion weight of the i-th branch satisfy the following condition: ; Indicates the number of parallel branches.
[0012] Furthermore, the knowledge distillation framework employs a composite loss function, comprising multiple combinations of soft label loss, hard label loss, and feature alignment loss; specifically, the composite loss function is as follows: in, This represents the soft-label loss, where c is the class. and These represent the teacher-student model for each category. The predicted original output value, where σ is the Softmax function. This is a temperature parameter, with a value ranging from 2 to 10. For category Defect weighting coefficient; For standard detection loss, For feature alignment loss, the mean square error function is used. , , This is the loss weighting coefficient.
[0013] Furthermore, the INT8 and FP16 mixed precision quantization specifically refers to: Where N is either 8 or 16, This represents the original weight matrix at FP32 precision. Scaling factor This is the zero-point offset, and round() is the rounding function.
[0014] Furthermore, the calibration specifically involves: performing quantization parameter calibration on the calibration dataset to ensure that the accuracy loss is controlled within ≤1%; the quantization parameter calibration employs the KL divergence method, iterative optimization method, and hierarchical calibration method.
[0015] Furthermore, the structured pruning includes channel importance assessment, targeted pruning, and fine-tuning training; The channel importance assessment specifically involves evaluating the contribution of each channel by calculating the L1 norm of the batch normalized layer weights, setting a threshold, and systematically removing redundant channels with low contributions from the quantized model. The contribution score is calculated using the following formula: in, Indicates channel Importance score To normalize the scaling factor at each level, This is the convolution kernel weight matrix for the corresponding channel. As a balance factor; The targeted pruning specifically involves dynamically adjusting a set threshold based on the target pruning rate. ,when The channel was pruned in time; targeted pruning was performed on the C3k2 and SPPF modules in the YOLO-RT model, with the overall pruning rate controlled within the range of 30%-40%; The fine-tuning training specifically refers to fine-tuning the model obtained after pruning.
[0016] Furthermore, the inference acceleration optimization includes batch processing optimization and layer fusion techniques.
[0017] This invention also provides an industrial-grade high-precision real-time sorting system, comprising: High-precision image acquisition module: includes a line array camera array 4 and a strip light source array 5. The line array camera array 4 specifically consists of two or more industrial-grade line array cameras, installed above and below the material throwing direction at the end of the chute 3. The strip light source array 5 specifically consists of four or more light sources, arranged on both sides of the chute 3. Lightweight AI Detection Module: Computer 6 integrates a lightweight YOLO-RT model and a location calculation program to achieve real-time defect identification; The sorting control module includes a PLC 7, a solenoid valve 9, and a nozzle 8. The nozzle 8 is located below the line scan camera array 4 and horizontally covers the width of the chute 3, thus achieving precise sorting. Conveying and collecting module: includes vibrating feeder 2, hopper 1, chute 3, good product bin 10 and defective product bin 11. Vibrating feeder 2 is located at the inlet of chute 3 to separate defective particles from normal particles.
[0018] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. Achieved a breakthrough in both detection accuracy and processing speed. The YOLO-RT model is deeply optimized through an innovative four-stage collaborative lightweighting scheme of "distillation-quantization-pruning-inference acceleration". This scheme breaks through the limitations of traditional single lightweighting strategies, reducing the number of model parameters by more than 70% and increasing the inference speed by 3 times, while still ensuring a detection accuracy of ≥99% for tiny defects of 20 micrometers and above. It effectively solves the technical contradiction of difficulty in balancing accuracy and speed in high-speed sorting scenarios.
[0019] 2. Achieved industrial-grade performance improvements across the entire value chain. Based on a collaborative architecture of "continuous imaging-AI decision-making-delayed spraying," and through the systematic integration of a high-frame-rate linear scan camera, high-speed data transmission, lightweight AI models, and a millisecond-level response sorting mechanism, industrial-grade performance indicators of end-to-end processing latency ≤10ms and sorting throughput ≥2000 particles / second are achieved. Compared with existing technologies, this represents a significant improvement in real-time performance and processing capabilities, fully meeting the cycle time requirements of modern high-speed production lines. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the structure of the high-precision real-time sorting system for plastic particles of the present invention; Figure 2 This is a schematic diagram of the lightweight YOLO-RT algorithm design of this invention; Attached reference numerals: Hopper-1; Vibrating feeder-2; Slide chute-3; Linear camera array-4; Strip light source array-5; Computer-6; PLC-7; Nozzle-8; Solenoid valve-9; Good product bin-10; Defective product bin-11. Detailed Implementation
[0021] 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.
[0022] It should be noted that, unless otherwise specified, the features in the following embodiments and implementation methods can be combined with each other.
[0023] In a first aspect, the present invention provides an industrial-grade high-precision real-time sorting system for plastic particles. The system is an industrial-grade sorting system based on a collaborative architecture of continuous image stream processing, AI real-time decision-making and position tracking delayed blowing, and integrates a high-precision image acquisition module, a lightweight AI detection module, a sorting control module and a conveying and collection module.
[0024] High-precision image acquisition module: This module includes a linear array camera array 4 and a strip light source array 5. As the front-end sensing unit of the system, this module overcomes surface reflection interference through multi-angle imaging, providing the system with high-definition multi-angle images at a rate of ≥2000 particles / second. The linear array camera array 4 consists of two or more industrial-grade linear cameras, which are relatively fixed and vertically mounted above and below the material ejection direction at the end of the chute 3, forming a multi-angle imaging layout. This layout aims to simultaneously capture particle surface information from different perspectives and take particle images from different angles, thereby effectively eliminating blind spots and shadows in single-view imaging. Working in conjunction with the linear array camera array 4 is the strip light source array 5, which consists of four or more light sources. These light sources are also arranged around the cameras on both sides of the chute 3. Their emission angles and the viewing angles of the linear array camera array 4 form a uniform bright field illumination environment. The specific wavelengths of the light source can effectively enhance the contrast between defects and the background. At the data flow level, after each line scan camera is activated, it connects directly to the computer 6 in the downstream lightweight AI detection module via a high-speed data interface (such as GE or Camera Link), and transmits high-definition multi-angle images in real time, forming a point-to-point direct connection architecture. This minimizes the transmission latency of image data and ensures the real-time, lossless flow of massive amounts of data. High-definition multi-angle images refer to 4K images, capable of recognizing a precision of 20 micrometers, while the line scan camera has 4096 pixels; the two correspond to each other. In summary, this module, through the line scan camera array 4 and the bar light source array 5, constitutes a high-quality image acquisition solution capable of adapting to the high-throughput production cycle of industrial applications.
[0025] The lightweight AI detection module, specifically a computer 6 integrating a lightweight YOLO-RT model and a location calculation program, serves as the system's intelligent decision-making center. It undertakes the core tasks of real-time image analysis, defect identification, and sorting instruction generation, and is crucial for achieving high precision and low latency. Hardware-wise, this module primarily uses a high-performance computer with an integrated GPU. It directly receives high-resolution multi-angle images from the front-end high-precision image acquisition module's linear array camera array 4 via high-speed interfaces (such as GE or CameraLink interfaces), ensuring low-latency data injection. Software-wise, the computer deploys a lightweight YOLO-RT model optimized through a four-stage process of "distillation-quantization-pruning-inference acceleration." This model outputs defect coordinates, defect categories, and confidence levels in real time. A newly added micro-defect enhancement branch improves the feature extraction capability for 20-micron targets. Furthermore, through hybrid precision quantization and TensorRT engine acceleration, the single inference latency is strictly controlled to within ≤5ms, thereby achieving real-time, high-precision (≥99%) identification and pixel-level positioning of plastic particle defects. Furthermore, this module integrates a position calculation program to output a blowing delay command, responsible for crucial coordinate mapping and delay calculation: accurately converting defect coordinates into physical coordinates on the (below) side of the chute 3, selecting defective particles to be sorted based on defect type and confidence level, and then calculating the particle's future position and time of passing through nozzle 8 based on the particle's uniform motion model and its physical coordinates. The position is simplified to the solenoid valve number corresponding to nozzle 8, and the time is the blowing delay. The solenoid valve number and blowing delay are combined to form a blowing delay command, which is then sent in real time to the programmable logic controller (PLC7) of the sorting control module via signal lines. In summary, this module, through the deep integration of "high-efficiency hardware platform + deep optimization algorithm," realizes the entire process from image acquisition to intelligent decision-making, providing core computing power support for the system to achieve an end-to-end latency of ≤10ms.
[0026] The sorting control module includes a programmable logic controller (PLC) 7, solenoid valves 9, and nozzles 8. Nozzles 8 are located below the linear array camera array 4, directly facing the outlet of the chute 3, and the nozzle array 8 horizontally covers the width of the chute 3. Each solenoid valve 9 corresponds to one nozzle 8 and controls the opening and closing of the nozzles. Nozzles 8 are connected to an air compressor, compressed air tank, or external air source. This module, as the system's high-precision actuator, has the core function of receiving the spray delay command from the lightweight AI detection module and converting it into a millisecond-level physical action to achieve precise separation of defective particles. Structurally, the module uses the PLC 7 as the control core, which is connected to the upstream computer 6 via signal lines to receive spray delay commands containing solenoid valve numbers and spray delay times in real time. Downstream of the PLC 7 are multiple solenoid valves 9 and nozzles 8, each solenoid valve 9 independently controlling one nozzle 8. This array is closely arranged along the material trajectory direction and installed at designated sorting points at the end of the chute 3. In terms of its working mechanism, the PLC7 internally maintains a high-precision delayed task queue. Once an instruction is received, a precise timer is started to ensure that the target solenoid valve 9 is triggered to open instantaneously at the calculated precise delay moment (system response delay ≤ 2ms), driving the high-pressure airflow to blow the defective particles off the normal track. The entire process embodies the seamless integration of "intelligent decision-making" and "precise execution." Through this position-tracking-based delayed jet blowing control strategy, reliable and precise physical separation of defective targets in a high-speed particle stream is ultimately achieved, providing crucial hardware execution guarantees for the system to achieve a sorting throughput of ≥2000 particles / second.
[0027] The conveying and collection module includes a vibrating feeder 2, a hopper 1, a chute 3, a good product bin 10, and a defective product bin 11. The vibrating feeder 2 is located at the inlet of the chute 3, allowing the granules to enter the chute 3 in a single layer at a uniform speed. The chute 3 is arranged at an inclination angle of 5°–85°. This module serves as the final stage of material circulation and sorting in the system. Its core function is to achieve single-layer, uniform conveying of plastic granules before sorting and precise classification and collection after sorting, which is the foundation for ensuring the system's throughput and sorting reliability. The vibrating feeder 2 disperses and organizes the densely stacked granule flow in the hopper 1 into a single layer and uniform sequence by precisely controlling the vibration frequency and amplitude, creating the preconditions for subsequent high-quality imaging and precise sorting. The ordered granules then enter the chute 3. Due to its specific inclination angle design, the granules achieve a uniform, continuous, and stable downward movement without tumbling under the action of gravity, forming a predictable motion trajectory. This is the physical basis for accurately calculating the blowing delay and avoiding sorting misalignment. At the end of the chute 3, the system is equipped with a classification and collection device, including a good product bin 10 located directly below the discharge end of the chute 3, which is a normal particle collection device, and a defective product bin 11 located at the landing point of the lateral blowing trajectory, which is a defective particle collection device. The two devices are arranged in a reasonable spatial layout to ensure that the defective particles separated by the blowing and the normal particles falling along the natural trajectory can be accurately and without error classified into the corresponding containers, thereby completing the industrial sorting and collection process of good and defective products.
[0028] Secondly, this invention provides a YOLO-RT algorithm, the core of which lies in a targeted multi-stage collaborative lightweight method of "distillation-quantization-pruning-inference acceleration" for the YOLO-RT model, and integrates micro-defect enhancement design, aiming to optimize the balance between speed and accuracy to meet the stringent requirements of industrial sorting for real-time performance and accuracy. The flowchart of this method is shown below. Figure 2 As shown, the specific steps are as follows: Step 1: YOLO-RT baseline model adaptation and optimization YOLO-RT (You Only Look Once Real-Time) is a real-time object detection algorithm based on a single-stage detection framework. Its core feature is transforming the detection task into a regression problem, significantly improving inference speed while maintaining high accuracy. The specific model can utilize the YOLOv5 Runtime Stack. The Feature Pyramid Network is a multi-scale feature fusion architecture that fuses feature maps of different resolutions through top-down and bottom-up paths, enhancing the model's ability to detect objects of different sizes. It is also a module constituting the YOLOv5 model. Anchors are a predefined set of bounding box templates used to provide prior knowledge of target size; optimizing anchor design can improve the regression accuracy of detection boxes. K-means++ clustering algorithm is an improved clustering algorithm that improves clustering effect and stability by optimizing the selection of initial centroids, used to generate anchor boxes that match defect distributions.
[0029] An enhancement branch for minor defects is added: The baseline model is specifically adapted to address the characteristics of minor defects in plastic particles. Specifically, a multi-path feature enhancement module is embedded in the feature pyramid network of the YOLO-RT model's neck layer. Multi-scale feature information is extracted through parallel convolutional branches, and a bidirectional feature fusion path is established, combining top-down and bottom-up approaches. The mathematical expression of the enhanced feature map output by the minor defect enhancement branch is as follows: in, The basic feature map (dimension 1) represents the output of the backbone network. , For the number of channels, and (for feature map size) Indicates the kernel size as Convolution operation ( The set of values is {1, 3, 5}. Represents the learnable fusion weights of the i-th branch (satisfying) ), Indicates the number of parallel branches (value is 3).
[0030] Optimize anchor box design: Based on the size statistics of a large number of defect samples, the K-means++ clustering algorithm is used to perform statistical analysis on the defect size in the training set. The anchor box design is re-optimized, generating 3 sets (10x10, 20x20, 40x40) of anchor boxes that are more in line with the size of small defects. These anchor boxes are used to replace the anchor boxes designed for general targets in the original model, thereby improving the regression accuracy of the detection boxes from the source and outputting an adapted and optimized YOLO-RT model.
[0031] Step 2: Knowledge Distillation Optimization Knowledge distillation is a model compression technique that transfers knowledge from a complex teacher model to a lightweight student model by constructing a "teacher-student" network framework. Soft labels are the class probability distributions output by the teacher model, containing more information about inter-class similarity compared to hard labels (one-hot encoding). Attention mechanisms are a biomimetic design in deep learning, mimicking the selective attention characteristics of the human visual system by assigning different weights to different parts of the input information to highlight key features and suppress redundant information. CBAM (Convolutional Block Attention Module) is a lightweight hybrid attention module that combines channel attention and spatial attention mechanisms, and can be embedded in any part of a CNN to enhance feature representation capabilities. Temperature parameter: a hyperparameter used to soften the Softmax output, enhancing knowledge transfer by adjusting the smoothness of the probability distribution.
[0032] A heterogeneous teacher-student architecture is constructed using an optimized YOLO-RT model. The teacher model employs a full YOLO-RT network with an embedded CBAM attention module, while the student model utilizes a lightweight infrastructure. Multi-level knowledge transfer is achieved through a composite loss function, the mathematical expression of which is: in, This represents the soft-label loss, where c is the class. and These represent the teacher-student model for each category. The predicted original output value, where σ is the Softmax function. This is a temperature parameter, with a value ranging from 2 to 10. For category Defect weighting coefficient; For standard detection loss, The feature alignment loss is calculated using the mean squared error function. , , These are the loss weighting coefficients (typical values 0.7, 0.2, 0.1).
[0033] The training process adopts a phased strategy: first, the teacher network is trained until convergence, then its parameters are fixed to guide the training of the student network, and finally, the distilled lightweight student model can be output.
[0034] Step 3: Mixed Precision Quantization Mixed-precision quantization refers to using different numerical precision representations for different layers of a neural network to balance computational efficiency and accuracy requirements. INT16 quantization maps 32-bit floating-point numbers to 16-bit integer representations, reducing storage overhead and memory bandwidth requirements by 50%. INT8 quantization maps 32-bit floating-point numbers to 8-bit integer representations, reducing storage overhead and memory bandwidth requirements by 75%. Calibration dataset: A dataset used to determine quantization parameters, ensuring that the accuracy loss of the model after quantization is controllable.
[0035] A hierarchical differential quantization strategy is adopted, and a differentiated scheme is formulated by analyzing the quantization sensitivity of each layer. The distilled model is then subjected to refined INT8 and FP16 mixed-precision quantization. The quantization formula is expressed as: Where N is either 8 or 16, This represents the original weight matrix at FP32 precision. Scaling factor This is the zero-point offset, and round() is the rounding function.
[0036] INT8 quantization: INT8 quantization is applied to the computationally intensive convolutional layers, fully connected layers, and other key components of the distilled lightweight student model to significantly reduce computational load and memory consumption.
[0037] FP16 Preservation: For the feature fusion layer that is sensitive to accuracy, especially the small defect enhancement branch added in step 1, FP16 precision is used to avoid the loss of small target feature information that may be caused by low precision quantization.
[0038] Calibration process: Quantization parameters are calibrated using a calibration dataset (containing tens of thousands of defect samples) to ensure accuracy loss is controlled within ≤1%, resulting in a quantized model. The quantization parameter calibration employs methods such as KL divergence, iterative optimization, and hierarchical calibration.
[0039] Step 4: Structured Pruning Optimization Structured pruning refers to pruning according to network structural units (such as channels and filters) to maintain network regularity and facilitate hardware acceleration. The scaling factor γ of the batch normalization layer reflects channel importance; channels with γ close to 0 contribute little to the output. The C3k2 module is an efficient convolutional block in the YOLO-RT model, achieving feature reuse and computational optimization through cross-stage partial connections (CSP) and a 3-layer convolutional structure (k2 may represent kernel size or variant versions). The SPPF module is the spatial pyramid pooling module in the YOLO-RT model, enhancing the receptive field and improving the model's adaptability to multi-scale targets through parallel processing of multi-scale pooling layers.
[0040] Channel importance assessment: The contribution of each channel is evaluated by calculating the L1 norm of the batch normalized layer weights, and a threshold is set (e.g., contribution ≥ 0.3). Redundant channels with low contributions are systematically removed from the quantized model. The contribution score is calculated using the following formula: in, Indicates channel Importance score To normalize the scaling factor at each level, This is the convolution kernel weight matrix for the corresponding channel. This is the balance factor (with a value of 0.5).
[0041] Targeted pruning: setting thresholds (Dynamically adjusted according to the target pruning rate), when The channel was pruned. Targeted pruning was performed on the C3k2 and SPPF modules in the YOLO-RT model, with the overall pruning rate controlled within the range of 30%-40%.
[0042] Fine-tuning training: The model obtained after pruning is subjected to 50 rounds of fine-tuning training to restore the model performance and obtain the pruned model.
[0043] Step 5: Real-time inference acceleration optimization TensorRT is a high-performance deep learning inference optimizer from NVIDIA, which improves inference speed through techniques such as layer fusion and kernel tuning. Batch processing refers to processing multiple input samples simultaneously, using parallel computing to increase throughput.
[0044] TensorRT Engine Export: End-to-end optimization of the pruned model based on the TensorRT engine, with the following inference latency model: in, For pure computation time, For memory access time, To reduce kernel startup overhead, low-level optimization techniques such as TensorRT engine layer blending, memory reuse, and automatic kernel tuning are enabled. This merges consecutive small operators into larger composite operators, reducing kernel startup times and optimizing memory access patterns to lower latency. Batch processing optimization: Considering the characteristics of the plastic granule sorting industrial scenario, the batch size during the final model inference is set to 4. This balances latency and throughput, achieving a model inference latency of ≤5ms, which allows for the output of a lightweight YOLO-RT model.
[0045] Thirdly, the present invention provides a sorting method for industrial-grade high-precision real-time sorting of plastic particles.
[0046] This sorting method is built upon a collaborative architecture of "continuous image stream processing, AI real-time decision-making, and position-tracking delayed blowing," forming a highly automated and precisely controlled closed-loop process. Its core lies in the seamless integration of imaging, analysis, decision-making, and execution through precise timing coordination of various modules and joint innovation at the system and algorithm levels, ultimately achieving industrial-grade high-precision and high-throughput sorting. The entire process unfolds as follows: First, the plastic granule raw material is processed by the vibrating feeder 2 to form a single-layer, uniform granule sequence. This sequence then enters the chute 3 and slides down the chute 3 at a uniform speed under gravity, laying the foundation for subsequent stable detection and precise sorting. When the granules enter the high-precision image acquisition module, the industrial-grade linear array camera 4 deployed on both sides of the chute 3, with the aid of uniform illumination from the bar light source array 5, instantly captures high-definition multi-angle images of the granules. These high-definition multi-angle images are then directly and losslessly transmitted to the memory of the computer 6 in the lightweight AI detection module.
[0047] Next, the lightweight YOLO-RT model deployed in computer 6 performs real-time inference on the incoming high-definition multi-angle images, accurately identifying and locating various defects (such as black spots and impurities) with a size of 20 micrometers or larger, and outputting defect coordinates, defect category, and confidence level. The inference latency of this core AI processing step has been optimized to ≤5ms. The defect coordinates output by the model are immediately sent to the system's position calculation program. This program accurately converts the defect coordinates into physical coordinates on the chute 3, and selects the defective particles to be sorted based on the defect category and confidence level. Then, based on the real-time movement speed of the particles and their physical coordinates, it calculates the position and time of the particles passing through the nozzle 8, quickly calculates the solenoid valve number and the blowing delay, and combines these to form a blowing delay command, which is sent to the PLC7 of the sorting control module in real time. The real-time movement speed of the particles can be estimated based on the feeding speed of the vibrating feeder 2, the length of the chute 3, and its inclination.
[0048] Subsequently, PLC7 receives instructions from the lightweight AI module in real time. If the current particle is determined to be a defective particle, PLC7 immediately adds its number and delay parameters to its internal high-precision delay task queue, and triggers the target high-speed solenoid valve 9 at the precisely calculated time point (system response delay ≤ 2ms), driving high-pressure airflow from nozzle 8 to precisely blow the defective particle away from its original trajectory.
[0049] Finally, the sorted particles follow different paths according to their category: normal particles fall naturally along the chute 3 into the good product bin 10 below; defective particles that are blown away deviate from their original trajectory under the action of airflow and fall into the defective product bin 11 set on the side, thus completing efficient and accurate classification and collection.
[0050] Through the above-mentioned end-to-end collaboration of "vibration feeding → imaging acquisition → AI recognition → delay calculation → jet sorting → classification collection", the system achieves industrial-grade high-performance indicators such as end-to-end processing latency ≤10ms and sorting throughput ≥2000 particles / second.
[0051] To further illustrate the present invention with reference to specific embodiments, this embodiment takes the sorting of PFA plastic granules as an example for detailed explanation.
[0052] Example: Industrial-grade high-precision real-time sorting based on PFA plastic granules This embodiment addresses the need for sorting defects such as 20-micron black spots, impurities, and irregular shapes in semiconductor-grade PFA plastic particles (particle size 2-3 mm), and establishes a complete industrial sorting system. The translucent nature and strong surface reflectivity of PFA material place higher demands on the imaging system and detection algorithm.
[0053] I. System Hardware Configuration and Parameter Settings High-precision image acquisition module: Two Hikvision MV-CL044-91NC line scan cameras (4096 pixels resolution, 75kHz line frequency) are selected, equipped with four sets of bar light sources, symmetrically installed on both sides of the stainless steel slide at a 45-degree angle. The light source adopts constant current drive, and the brightness can be steplessly adjusted according to the transparency of PFA particles.
[0054] Lightweight AI Inspection Module: Utilizes an industrial workstation equipped with an Intel Xeon W-2295 processor and an NVIDIA RTX 4090 graphics card, directly connected to a line scan camera via a 2.5 Gigabit Ethernet interface. The system features 128GB of DDR5 memory and a 2TB NVMe SSD for storage.
[0055] The sorting control module uses a Siemens S7-1500 series PLC (CPU 1518-4 PN / DP) connected to 16 FestoMEH-5 / 2-1 / 8 high-speed solenoid valves (response time 1.5ms). Each solenoid valve controls a stainless steel nozzle with a diameter of 0.8mm, and the nozzle array spacing is precisely calibrated to 3.2mm.
[0056] Conveying and collecting module: Equipped with a Syntron MF-200 electromagnetic vibratory feeder (frequency adjustable from 0-100Hz), the stainless steel chute has an optimized inclination angle of 35° and a Teflon coating treatment (roughness Ra≤0.6μm). The collecting device is made of anti-static PP material and has a volume of 20L.
[0057] II. Specific Implementation of the Lightweight YOLO-RT Model Dataset Construction: 50,000 sample images containing PFA particles with defects of 20 micrometers or larger were collected, including 30,000 images of black spot defects, 15,000 images of impurity defects, and 5,000 images of irregularly shaped particles. The training set, validation set, and test set were divided in an 8:1:1 ratio.
[0058] Model optimization details: The baseline model is specifically the YOLOv5 Runtime Stack of the YOLO-RT architecture, with the input resolution adjusted to 2048×512; A small defect enhancement branch is added to the Neck layer, and feature fusion is performed using three 1×1 convolutional kernels. During the knowledge distillation phase, the teacher model is equipped with a CBAM attention module, and the training cycle is 120 rounds. When performing mixed precision quantization, INT8 is used for convolutional layers, while FP16 precision is retained for feature fusion layers. The final model parameters were compressed from 12.8M to 3.6M, with a file size of 5.2MB.
[0059] III. System Workflow and Performance Testing In a real production line environment, the system operates continuously at a throughput of 2000 particles / second. PFA particles, after being shaped by a vibrating feeder, pass through the detection zone at a uniform speed of 3 m / s. A linear scan camera continuously acquires data at a 75 kHz horizontal frequency, and the image data is directly transmitted to the workstation via a 2.5GE interface. The lightweight YOLO-RT model has an average inference latency of 3.8 ms, and the PLC-controlled solenoid valve response latency is 2.1 ms. After 8 hours of continuous testing, the system performance is as follows: Detection accuracy: The detection accuracy for defects of 50 micrometers and above reaches 99.6%, of which the detection accuracy for defects of 20 micrometers and above is ≥99%, with a false detection rate of 0.2% and a false negative rate of 0.2%.
[0060] Real-time performance: The average end-to-end processing latency is 9.5ms (image acquisition and transmission 4.1ms + AI inference 3.8ms + PLC processing 1.1ms + sorting response 0.5ms, where the sorting response latency includes the mechanical delay of the solenoid valve).
[0061] Stability: It can run continuously for 8 hours without failure, and the sorting accuracy rate remains above 99%.
[0062] Production capacity: Stable support for sorting speed of 2000 particles / second, with a peak capacity of 3000 particles / second.
[0063] IV. Special Optimizations for PFA Materials Optical optimization: Four strip light sources are used for symmetrical illumination to enhance the contrast of PFA material surface defects.
[0064] Algorithm adaptation: A reflection suppression algorithm is added in the preprocessing stage to reduce surface reflection interference.
[0065] Mechanical adjustment: The Teflon coating on the surface of the slide reduces electrostatic adsorption of particles, ensuring stable motion trajectory.
[0066] This embodiment demonstrates that the system of the present invention can effectively meet the precision sorting requirements of high-performance engineering plastics such as PFA, achieving industrial-grade throughput while maintaining high precision. It is particularly suitable for raw material sorting in high-end fields such as semiconductors and medical devices, providing technical support for improving the quality and efficiency of the new materials industry.
Claims
1. An industrial-grade high-precision real-time sorting method for plastic granules, characterized in that, Includes the following steps: S1: High-definition multi-angle images of plastic particles are continuously acquired by a linear array camera (4), and multi-angle illumination is used by a strip light source array (5) to eliminate reflection interference. The high-definition multi-angle images are then transmitted to a computer (6); where high-definition refers to 4K images. S2: The computer (6) uses the lightweight YOLO-RT model to perform real-time reasoning on the high-definition multi-angle image, outputs the defect coordinates, defect category and confidence level, identifies the defect particles according to the defect category and confidence level and outputs the blowing delay command to the PLC (7). S3: PLC (7) controls the nozzle (8) of solenoid valve (9) to generate airflow that blows defective particles away from their original trajectory; S4: Normal particles fall into the good product bin (10) along the chute (3), while defective particles enter the defective product bin (11) under the action of airflow. The lightweight YOLO-RT model described in step S2 is obtained through the following method: Add enhancement branches for minor defects to the YOLO-RT model and optimize the anchor box design to output an adapted and optimized YOLO-RT model; The adapted and optimized YOLO-RT model is constructed using a knowledge distillation framework to create a heterogeneous teacher-student architecture. Multi-level knowledge transfer is achieved by designing a composite loss function, and a lightweight student model after distillation is output. The distilled lightweight student model is quantized and calibrated using a mixed precision of INT8 and FP16, and the quantized model is output. Perform structured pruning on the quantized model to output the pruned model; The lightweight YOLO-RT model is obtained by accelerating optimization of the pruned model using real-time inference.
2. The method as described in claim 1, characterized in that, In step S2, the step of identifying defective particles based on defect type and confidence level and outputting a blowing delay command specifically involves: converting the defect coordinates into physical coordinates on the slide (3), and then calculating the position and time of the defective particle passing through the nozzle (8) in combination with the real-time movement speed of the defective particle. The position is specifically the number of the solenoid valve (9) corresponding to the nozzle (8), and the time is the blowing delay. Combining the solenoid valve (8) number and the blowing delay gives the blowing delay command.
3. The method as described in claim 1, characterized in that, The enhancement branch for the minute defects is achieved through multi-scale feature fusion, specifically: in, This represents the basic feature map output by the backbone network, with dimensions of [dimension number missing]. , For the number of channels, and The feature map size; Indicates the kernel size as Convolution operation, The set of values is {1, 3, 5}; Let the learnable fusion weight of the i-th branch satisfy the following condition: ; Indicates the number of parallel branches.
4. The method as described in claim 1, characterized in that, The knowledge distillation framework employs a composite loss function, which includes multiple combinations of soft label loss, hard label loss, and feature alignment loss; the composite loss function is specifically as follows: in, This represents the soft-label loss, where c is the class. and These represent the teacher-student model for each category. The predicted original output value, where σ is the Softmax function. This is a temperature parameter, with a value ranging from 2 to 10. For category Defect weighting coefficient; For standard detection loss, For feature alignment loss, the mean square error function is used. , , This is the loss weighting coefficient.
5. The method as described in claim 1, characterized in that, The INT8 and FP16 hybrid precision quantization specifically refers to: Where N is either 8 or 16, This represents the original weight matrix at FP32 precision. Scaling factor This is the zero-point offset, and round() is the rounding function.
6. The method as described in claim 1, characterized in that, The calibration specifically involves: calibrating the quantization parameters of the calibration dataset to ensure that the accuracy loss is controlled within ≤1%; the quantization parameter calibration adopts the KL divergence method, iterative optimization method, and hierarchical calibration method.
7. The method as described in claim 1, characterized in that, The structured pruning includes channel importance assessment, targeted pruning, and fine-tuning training; The channel importance assessment specifically involves evaluating the contribution of each channel by calculating the L1 norm of the batch normalized layer weights, setting a threshold, and systematically removing redundant channels with low contributions from the quantized model. The contribution score is calculated using the following formula: in, Indicates channel Importance score To normalize the scaling factor at each level, This is the convolution kernel weight matrix for the corresponding channel. As a balance factor; The targeted pruning specifically involves dynamically adjusting a set threshold based on the target pruning rate. ,when The channel was pruned in time; targeted pruning was performed on the C3k2 and SPPF modules in the YOLO-RT model, with the overall pruning rate controlled within the range of 30%-40%; The fine-tuning training specifically refers to fine-tuning the model obtained after pruning.
8. The method as described in claim 1, characterized in that, The inference acceleration optimization includes batch processing optimization and layer fusion technology.
9. An industrial-grade high-precision real-time sorting system implementing the method of any one of claims 1-8, characterized in that, Include: High-precision image acquisition module: includes a line array camera array (4) and a strip light source array (5). The line array camera array (4) consists of two or more industrial-grade line array cameras installed above and below the material throwing direction at the end of the chute (3). The strip light source array (5) consists of four or more light sources set on both sides of the chute (3). Lightweight AI detection module: A computer (6) integrating a lightweight YOLO-RT model and a location calculation program to achieve real-time defect identification; The sorting control module includes a PLC (7), a solenoid valve (9), and a nozzle (8). The nozzle (8) is located below the line array camera array (4), and the nozzle (8) covers the width of the chute (3) laterally to achieve precise sorting. Conveying and collecting module: including vibrating feeder (2), hopper (1), chute (3), good product bin (10) and defective product bin (11). Vibrating feeder (2) is located at the inlet of chute (3) to separate defective particles from normal particles.